Installing Metasploitable3 in VirtualBox
This installation was done on virtual box running on Ubuntu 24.04 as the host system.
Prerequisite softwares
VirtualBox
A virtualization platform that allows you to create and manage virtual machines on your host system.
sudo apt update
sudo apt install virtualbox
Vagrant
It automates the creation and provisioning of virtual machines. It simplifies the setup process by handling configurations through the Vagrantfile
On the terminal use the following commands to install it:
sudo apt update
sudo apt install vagrant
Packer
Is used to build the virtual machine images for Metasploitable 3. It automates the creation of machine images for VirtualBox.
sudo apt install packer
Git
To clone the Metasploitable Repository.
sudo apt install git
Clone the Metasploitable 3 Repository
Clone the repository to get the setup files and change into the directory:
git clone https://github.com/rapid7/metasploitable3.git
cd metasploitable3-master
Install Vagrant Plugin
Install the required Vagrant plugin:
vagrant plugin install vagrant-reload
Build the Virtual Machine
Run the build.sh
script to create the VM.
For the Windows 2008 version:
./build.sh windows2008
For the Ubuntu 14.04 version:
./build.sh ubuntu1404
Start the Virtual Machine
Once the build process completes, use vagrant
to start the VM:
vagrant up
To start a specific machine specify its name:
vagrant up win2k8
vagrant up ub1404
List running VMs:
vagrant status
This process take some time, particularly when running vagrant up and when executing the build bash script. It will need some patience.