rapid7 / metasploitable3

Metasploitable3 is a VM that is built from the ground up with a large amount of security vulnerabilities.
Other
4.67k stars 1.13k forks source link

Failed to open a session for the virtual machine #207

Open ahusmc opened 6 years ago

ahusmc commented 6 years ago

Issue Description

Failed to open a session for the virtual machine Metasploitable3_default_1511382298878_23772 Result Code: E_FAIL (0x80004005)
Component: SessionMachine
Interface: ISession {7844aa05-b02e-4cdd-a04f-ade4a762e6b7}

Host System

Command Output

PS C:\Users\ahusm\VirtualBox VMs\Metasploitable3> vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'metasploitable3'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: Metasploitable3_default_1511382298878_23772 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly ==> default: Forwarding ports... default: 3389 (guest) => 3389 (host) (adapter 1) default: 22 (guest) => 2222 (host) (adapter 1) default: 5985 (guest) => 55985 (host) (adapter 1) default: 5986 (guest) => 55986 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: WinRM address: 127.0.0.1:55985 default: WinRM username: vagrant default: WinRM execution_time_limit: PT2H default: WinRM transport: negotiate ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... ==> default: Setting hostname... ==> default: Configuring and enabling network interfaces... ==> default: Mounting shared folders... default: /vagrant => C:/Users/ahusm/VirtualBox VMs/Metasploitable3 ==> default: Running provisioner: shell... default: Running: scripts/configs/enable_firewall.bat as c:\tmp\vagrant-shell.bat default: Ok. ==> default: Running provisioner: shell... default: Running: scripts/configs/configure_firewall.bat as c:\tmp\vagrant-shell.bat default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok. default: Ok.

ahusmc commented 6 years ago

Hi, guys. Anything on this issue?

Chan9390 commented 6 years ago

Hey try with the following setup:

ghost commented 6 years ago

Hey try with the following setup:

Packer v1.0.0 Vagrant v1.9.1 VirtualBox 5.1.14 (or any 5.1.1x)

I've been having the same issue with several different versions. I tried the versions you specified and I'm still having the same error as Ahusmc.

ahusmc commented 6 years ago

Hi, guys. Any chance that we could just get an installable live disk, iso, or ova of MS3 that just works. The vagrant build of MS3 appears to be flaky at best.

Chan9390 commented 6 years ago

Hey @ahusmc , to get a prebuilt metasploitable 3 box, please refer : https://github.com/rapid7/metasploitable3/tree/pre_built_box

ahusmc commented 6 years ago

Hi, @Chan9390 Your comment speaks directly to my point about the vagrant build process for MS3 not working on newer versions of VirtualBox. If the build process for MS3 is going to be dependent on out of date versions of VirtualBox, then why not just provide maintainable pre-built versions of the distro. Even with the restrictive Microsoft licensing, I'm sure we could figure something out. Thoughts?

Chan9390 commented 6 years ago

Hey @ahusmc , sorry for replying late. We were working on moving scripts to Chef provisioning so that the installation could work on any version of virtualbox (given that vagrant is properly configured). But we are facing a bug which doesnt allow the installation of Chef on guest VMs in virtualbox. Once that works, then virtualbox version doesn't really create any issue.

Creating pre-built version of metasploitable3 is a good idea. But what if new vulnerabilities are added to metasploitable 3. It would be better to pull the changes and create a VM locally instead of manually downloading the boxes for every new release.

(The plan of automating the build using jenkins was already in our mind. We might implement it in the future)

ahusmc commented 6 years ago

Hi, @Chan9390 Thanks for your response. I'm glad to hear that you and your team are on top of it. At this point, many in the community just want an MS3 build process or mani=tainable final product that is consistent, dependable, and works. Thanks again for your response and your great work. All the best.

ahusmc

ahusmc commented 6 years ago

At this point, MS3 is only useful if it can be consistently deployed and with a reasonable level of effort. What can we do to get the build process done in a more reliable manner?

mikeysshadow commented 6 years ago

I am getting the same error with both the manual and prebuilt routes. Any update on a fix or workaround for this?

errors

Chan9390 commented 6 years ago

Hey @mikeysshadow , can you show the Details of the virtual machine ?

mikeysshadow commented 6 years ago

@Chan9390 , Here you are. Details as requested machine details

mikeysshadow commented 6 years ago

@Chan9390 Any thoughts or ideas?

Chan9390 commented 6 years ago

Just curious to know if this is the only VM that doesnt start. Try to install Windows Server manually and check if it starts.

mikeysshadow commented 6 years ago

@Chan9390 I was able to boot a new VM from disk to start the install process. I backed out because I didn't have a OEM for that disk. Then I accidentally hit the start button for the Metasploitable3 VM and it booted up and I was able to log in and navigate around.

I have deleted the other VM that I created and Metasploitable continues to boot up fine. I am not sure if there were some sort of files that were created by virtualbox when creating a normal VM that the Metasploitable build does not. I'm going to continue to experiment by deleting the Metasploitable VM and have the script create it again to see if I run into the fault again or it continues to run properly.

Chan9390 commented 6 years ago

Interesting.

mikeysshadow commented 6 years ago

@Chan9390

I deleted the Meta VM and recreated it from the script and I got the same original errors. I followed the same steps I did before but still getting the errors.

I did however take the chance to create an OVF of the working Meta VM before I deleted it. That imports fine but a newly created one throws errors.

Chan9390 commented 6 years ago

Hey @ahusmc and @mikeysshadow , are you getting the same errors with the latest code ?

opiyodonpaul commented 2 years ago

Failed to open a session for the virtual machine kali linux.

The virtual machine 'kali linux' has terminated unexpectedly during startup with exit code 1 (0x1). More details may be available in 'C:\Users\DON\VirtualBox VMs\kali linux\Logs\VBoxHardening.log'.

Result Code: | E_FAIL (0x80004005) -- | -- Component: | MachineWrap Interface: | IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
![image](https://user-images.githubusercontent.com/97983487/165372331-94aa3ed4-a184-4000-a38f-c594cfd9ef19.png) ![VB ERROR 1](https://user-images.githubusercontent.com/97983487/165371108-e69b2ccc-43c9-4941-9e79-07a7f35eea84.PNG)
opiyodonpaul commented 2 years ago

I HAVE BEEN GETTING THIS ERROR PLEASE HELP FIX IT