:warning: UPDATE: 6/25/2020 - If you have bought a license for the VMWare provider for Vagrant - Go to my new post: https://michaelnieto.com/vmware-vagrant-provider/. The VMWare provider from Vagrant allows building Metasploitable 3 directly into VMWare Workstation Pro.
:arrow_right: Continue reading if you want to use VirtualBox for free.
Metasploitable3 is a virtual machine that is built from the ground up with a large amount of security vulnerabilities. For detailed information, click here to view its repository.
Configuring the virtual machine is a little tricky so I’ve documented the fastest way I was able to get it running on VirtualBox and VMware Workstation for free.
Download and install Vagrant:
Download and install VirtualBox:
https://www.virtualbox.org/ - VirtualBox is an open-source hypervisor from Oracle that can be used to host virtual machines. Vagrant uses it to create the virtual machine and run all the necessary scripts.
Download the Vagrantfile
- Create an empty folder. You can name it
- Right-click this link and choose “Save Link As” to save the “Vagrantfile”.
- Save the Vagrantfile to the folder you created
- Make sure the file’s name is Vagrantfile without .txt
- Open the file and confirm it has the configuration data. You can edit the file but at this point it’s not necessary.
The file should begin like this:
# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.synced_folder '.', '/vagrant', disabled: true config.vm.define "ub1404" do |ub1404| ub1404.vm.box = "rapid7/metasploitable3-ub1404" ub1404.vm.hostname = "metasploitable3-ub1404" config.ssh.username = 'vagrant' config.ssh.password = 'vagrant'
- While in the same folder, hold down the shift key and right click on the empty space below your file and select
Open PowerShell window here. Alternatively you can just open Powershell and change directories until you are in
- Type the following command:
- Vagrant will download and configure the Linux and Windows images.
Powershell should look like this:
- Open VirtualBox and your virtual machines should be running. Both machines use the following creds. Username: vagrant Password: vagrant
At this point you can use your virtual machines but I prefer to use VMWare Workstation Pro.
How to transfer your virtual machines to VMWare Workstation Pro
Export from VirtualBox
- Turn off your virtual machines running in Virtual Box.
- Click on File -> Export Appliance.
- Select the vm you want to export first.
- Select the folder where you’d like to save the vm and select Next.
- When finished, you should have an .ova file.
Import into VMWare Workstation Pro
- Locate your exported .ova file and right click on it and select “Open with VMWare Workstation”.
- Select a location where you want to save your vm and click import.
- If you get an error message, select
- The import process takes some time. Approximately 5 to 10 minutes on a new computer.
- Hack the planet!