-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Kali Linux Cookbook - Third Edition
By :
In this recipe, you will add machines that you can use for targets by installing Metaspoloitable3 VMs. Metasploitable3 Linux and Windows machines are vulnerable VMs designed for penetration testing and security research. Built by Rapid7, Metasploitable3 has outdated software, misconfigurations, and security vulnerabilities.
It is a practical environment for users to explore and exploit various security flaws and is effective for vulnerability scanning, exploitation, privilege escalation, and post-exploitation activities. It also provides an ideal platform to practice attack vectors and tools such as Kali Linux. Using this VM helps you identify and exploit weaknesses in Linux and Windows operating systems.
You need the following to complete this recipe:

Figure 1.34 – Vagrant download
Tip
A quick way to open a command window is to type command or cmd into the search window.
D: drive. From there, we must add a new workplace directory, naming it metasploitable3-workplace, and cd into it, as shown.d:
cd kali_cb_vms
mkdir metasploitable3-workplace
cd metasploitable3-workplace
powershell Invoke-WebRequest -Uri "https://raw.githubusercontent.com/rapid7/metasploitable3/master/Vagrantfile" -OutFile "Vagrantfile"
vagrant up

Figure 1.35 – Vagrant up
The process will take a significant amount of time, and there will be some warnings generated due to configuring a host-only network before installing Metasploitable3.
If either of those VMs is running, you will want to shut them down. The easiest way is to select the VM and right-click and select Stop, and click Shutdown.

Figure 1.36 – Stop VMs

Figure 1.37 – VirtualBox networking
Now, to clean up each VM, we select the VM and click on the Network icon.

Figure 1.38 – VM network settings
vagrant. For the Windows machine, both the administrator and Vagrant user’s password are vagrant.Note
Remember not to expose vulnerable machines directly to the internet.
Vagrant is an open source software product for building and maintaining virtualized development environments. Vagrant was used to deploy the pre-built Metasploitable3 VMs within VirtualBox quickly and straightforwardly.
Vagrant is a useful tool, and I would recommend reviewing the website for additional information on useful options as you continue with the lab:
https://developer.hashicorp.com/vagrant/intro
There is plenty of useful information on the Metasploitable3 GitHub pages located at https://github.com/rapid7/metasploitable3?tab=readme-ov-file and https://github.com/rapid7/metasploitable3, and specific information about the vulnerabilities can be found on the wiki at https://github.com/rapid7/metasploitable3/wiki/Vulnerabilities.