Ⓜ️Metasploitable 3 for VMware Workstation
I've spent some good hours trying to get Metasploitable 3 to work on VMware Workstation as a homelab. Here I have sorted the steps that got the metasploitable 3 boxes to work on VMWare Workstation.

The official instructions Building Metasploitable 3 from Rapid7 did not work for me. I have encountered issues similar to these below when building up the boxes: https://github.com/rapid7/metasploitable3/issues/442 https://github.com/mitchellh/vagrant-aws/issues/3 https://github.com/rapid7/metasploitable3/issues/257
Following the installation steps below avoid the whole building steps. Instead, my steps download the working prebuilt boxes from rapid7-owned vagrant cloud host and allow me to deploy the metasploitable boxes from there.
Installations
Prerequisite
Before proceeding to the below installation steps, disable Windows Defender's Real-time protection and Cloud-delivered protection. Turn these back on after installing the metasploitable boxes.

1. Installing Packer
Download Packer (Amd64) at https://www.packer.io/downloads
Go to C:\Program Files\ and create a new folder named Packer
Extract the packer.exe to the newly created folder
Launch the Run app, by pressing the Windows key ⊞ + R, then type SystemPropertiesAdvanced
Click Environment Variables...
Look at the System Variables portion then double click on Path
Then click New and paste the directory path C:\Program Files\Packer then press OK
Check if Packer is configured correctly, type and run packer
in PowerShell. The result should look like this

2. Installing Vagrant
Download and install Vagrant from https://www.vagrantup.com/downloads
After rebooting when the installation is done, check if Vagrant is installed correctly by typing vagrant
in PowerShell. The result should look like this

3. Installing Vagrant VMWare utility
Download and install Vagrant VMWare utility from https://www.vagrantup.com/vmware/downloads
4. Installing Vagrant plugins
Two necessary vagrant plugins to install are the reload plugin and the vmware-desktop plugin
Launch PowerShell
Install vagrant-reload plugin, type and run
vagrant plugin install vagrant-reload
Install vmware-desktop plugin, type and run
vagrant plugin install vagrant-vmware-desktop
Check if the plugins are installed by typing vagrant plugin list
. The result should look like this

5. Resetting VMware virtual network setting (Optional)
This step was necessary for me to avoid the halting at "Waiting for SSH to become available..." issue. I've noted this step as optional in case you didn't encounter the issue.
Launch VMware Workstation and reset the virtual network setting by going to Edit > Virtual Network Editor

Then click on Change Settings, which then gives the option to Restore Default


6. Installing the metasploitable boxes
Go to the directory C:\ and make a new folder named metasploitable3-workspace
Open up PowerShell and traverse to the newly created folder C:\metasploitable3-workspace
Type and run
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/rapid7/metasploitable3/master/Vagrantfile" -OutFile "Vagrantfile"
There should now exist a file named Vagrantfile in the directory

At the same directory location, type and run the below code on PowerShell
vagrant box add rapid7/metasploitable3-ub1404 --provider vmware_desktop
This will download the prebuilt metasploitable Linux box for VMware Workstation. The result should look like this

Back on PowerShell, type and run the below code
vagrant box add rapid7/metasploitable3-win2k8 --provider vmware_desktop
This will download the prebuilt metasploitable Windows Server 2008 box for VMware Workstation. The result should look like this *Note: The win2k8 box size is huge (~7.3 GB) so the download will take a while*

To check if the two boxes are downloaded successfully, type and run vagrant box list
on PowerShell.The result should look like this

To deploy these two boxes, type and run
vagrant up --provider=vmware_desktop
The deployment process should look similar to below

Once vagrant finished the deployment, launch VMWare Workstation and open the boxes up at C:\metasploitable3-workspace\.vagrant\machines



There are now metasploitable boxes powered on and ready



Renewing Windows Server 2008 license
On the metasploitable Windows Server 2008 box, launch PowerShell, type and run
slmgr /rearm
The result should look like this

Last updated
Was this helpful?