hello folks,
In this post, I am going to explain how to download and install Metasploitable3 in Linux with Virtual box.
Index
- Introduction of Metasploitable3
- Setup RequiredTools.
- Build Metasploitable3 Automatically ( for Pen tester )
- Build Metasploitable3 Manually ( For Developers )
- Pro Tip. (Optional)
- Download Metasploit3 ( VirtualBox OVA ) (Noo Need to Build)
- Acknowledgements
Introduction Metasploitable3
Metasploitable3 is a VM that is built from the ground up with a large number of security vulnerabilities. It is intended to be used as a target for testing exploits with Metasploit.
Differences between Metasploitable 3 and the older versions
Previous versions of Metasploitable were distributed as a VM snapshot where everything was set up and saved in that state. Metasploitable 3 introduces a new approach: dynamically building the VM image. It utilizes Packer, Vagrant, and a ton of scripts to go from nothing to a fully functional, exploitable VM within minutes.
Setup Required Tools
- Git (optional)
- Packer
- Vagrant
- Vagrant Reload Plugin
- VirtualBox
- Internet connection
- Minimum Physical memory required.
- Brain.
Git Installation.
sudo apt-get install git
Packer Installation
sudo apt-get install packer
Vagrant Installation
Download Link: https://releases.hashicorp.com/vagrant/1.9.1/
cd /tmp/ wget https://releases.hashicorp.com/vagrant/1.9.1/vagrant_1.9.1_x86_64.deb sudo dpkg -i vagrant_1.9.1_x86_64.deb
NOTE: Currently 1.9.1 is recommended as there are build issues with newer versions.
Vagrant Plugin
vagrant plugin install vagrant-reload
For Virtual Box installation follow the OFFICIAL site.
If you don’t have Brain, stop reading here. 😛
If you reading this Online Means you have internet already.
Minimum 8BG Physical Memory required on the Host system for Build Metasploitable. if don’t have 8GB go to Pro Tip Section it will help you.
Go Ahead. 😉
Download Metasploitable3
Actually, Our Metasploitable3 Installation journey starts from here. We have to download Metasploitable 3 from Official Sources and Build it step by step.
Official Project Source Link: https://github.com/rapid7/metasploitable3
Download Project
Using Git
git clone https://github.com/rapid7/metasploitable3.git
Any Browser
Visit this: https://github.com/rapid7/metasploitable3/archive/master.zip
Build Metasploitable3 Automatically ( for Pentester )
Run the command
vagrant box add jbarnett-r7/metasploitable3-win2k8
or
vagrant box add metasploitable3-win2k8 https://vagrantcloud.com/jbarnett-r7/boxes/metasploitable3-win2k8/versions/0.1.0/providers/virtualbox.box
This will download the 6.5+ GB box file from Vagrant cloud. This may take a while depending on your Internet connection.
List vagrant Box
vagrant box list
To start the VM
vagrant up
This will start up the VM network. This takes about 5-10 minutes.
Once this process completes, you can open up the VM within VirtualBox and log in.
The default credentials are
- Username: vagrant
- Password: vagrant.
Build Metasploitable3 Manually ( for Developer )
Here, I assume you already downloaded a Metasploitable 3 Project using Git or Browser. If you downloaded using any Browser or Download manager, Please extract it in any Directory where you have to written permission.
Let’s Build Begin,
Fire up terminal and Change Directory to metasploitable3’s folder.
Now, Download Windows Template.
Syntax : packer build –only=<provider>-iso windows_2008_r2.json
Here <provider> means, Which virtualization platform you are going to use for Importing.
I’m Going to use Virtual Box.
Provider
- Virtual Box: virtualbox
- Vmware: vmware
Warning: This Below command automatically Download Windows Template and Installed it in your Virtual Box and do all the required steps like setting up ssh, and other vulnerability.
packer build --only=virtualbox-iso windows_2008_r2.json
The above Command help u to Download all Pieces Which u required for the Next Step. It will take some mins or hours (Depending on Your Internet Speed and System 😛 ).
Let’s add this is a Vagrant environment.
vagrant box add windows_2008_r2_<provider>.box --name=metasploitable3
install the reload vagrant provisioner if you haven’t already
vagrant plugin install vagrant-reload
To start the VM
vagrant up
This will start up the VM and run all of the installation and configuration scripts necessary to set everything up. This takes about 20 minutes.
Once this process completes, you can open up the VM within VirtualBox and log in.
The default credentials are
- Username: vagrant
- Password: vagrant.
Pro Tips
If you are building for Virtual Box Provider. Modify windows_2008_r2.json files according to your host system.
LineNumber Code
85 "--memory", 86 "1200"
This is for Ram
91 "--cpus", 92 "2"
This is for the CPU.
And For VM-Ware users
41 "memsize": "2048", 42 "numvcpus": "2",
Modify these lines.
Download Metasplotitable 3 ( OVA file)
If you tried up by manually downloading and building and got frustrated or if you don’t have tools.
Just Download metasploitable3 OVA File and import into Virtual Box. (Like a Boss)
Download Link: click here
Acknowledgements
The Windows portion of this project was based on GitHub user [joefitzgerald’s](https://github.com/joefitzgerald) [packer-windows](https://github.com/joefitzgerald/packer-windows) project.
The Packer templates, original Vagrantfile, and installation answer files were used as the base template and built upon for the needs of this project.
Greetz : jbarnett ( for Cloud vagrant File )
This is all for this post.
Special thanks to my HackTheBox’s Friends @B00gie , @Danners and all other HackTheBox Telegram Group Members. 🙂
If you Like this post, Please Comment below and share it with others.
Hey, thanks for the Metasploitable3, however can you provide a torrent or magnet link.
Yes, thanks for effort and work you’ve put into this, but is there a torrent or Google Drive link? Mega only allows 5GB download for free users 🙁
yes. sure…. i ll update soon with link …. or just ping me on twitter @touhidshaikh22
thank you friend do not know how many times I try it and I have not managed to make it work … downloading …..
your welcome mate.
hello! can you creat ova file and put it in google drive for free downloading!
sure.. ill update this after 2 days…. busy now..
Thank! I would like both systems. on ubuntu and Windows
https://drive.google.com/file/d/1-cDEpDRl5_-QWBU8Ckpp_Zep-1-9-EY4/view?usp=sharing
Mega has download limit, it’s prompting to signup. Please share torrent link to download OVA file.
https://drive.google.com/file/d/1-cDEpDRl5_-QWBU8Ckpp_Zep-1-9-EY4/view?usp=sharing
please download from here.
thank you.
where are you???
mega.nz is not user friendly download hoster! I need a vm-file (like the .OVA) for vmware.
sure here is the link on gdrive
https://drive.google.com/file/d/1-cDEpDRl5_-QWBU8Ckpp_Zep-1-9-EY4/view?usp=sharing
thanks a lot for sharing this article.
but i need the OVA file of metasploitable3 for VMWARE Work Station only not with VirtualBox.
is it possible or not?
thanks for bests
Why is there no network device installed in your metasploitable3?
I can’t have a ip address because of no network device.
How can i fix it?
Nice, you have installed the VirtualBox guest additions, but i use vmware!
So i can’t install the vmware tools.
How can i fix that?
Thanks a lot for sharing this article.
But I’m getting an error after I ran vagrant up…(I used pentester phase)
can u help me out ….for fixing that issue
There is a problem with the download in google drive. Drive tells me i can’t download the file because too many users did, so i should try again later. I’ve been waiting a few days now but it’s still not working… could you fix it by charging it again or something please? Thank you very much
Hi, the link to Metaspoitable 3 isn’t available ( OVA) could upload another link?
Hello, i would to tell the link for the .ova file is broken. Maybe you can update it.
Hej bro,
can you provide a link to get the OVA file, I run all the time into errors. I use Windows 11, everything seems to be installed correctly, packer is OK, Vagrant is OK, environment variables are set and it looks good. I can proof it in the CLI. Nevertheless I can’t get Metasploitable3 to run, either there are problems with Vagrant or with the download of the remote files. I checked already to much of How to’s none helped
Thanks