Metasploitable 2 is the safest and most practical way to learn penetration testing. It is a deliberately vulnerable Linux virtual machine created by Rapid7, the same company behind the Metasploit Framework, designed specifically so students and security professionals can practise real attack techniques in a fully legal, isolated environment.
Every ethical hacking student and penetration testing certification candidate needs a safe target to practise on. Metasploitable 2 solves this problem completely. It ships pre-loaded with dozens of intentionally misconfigured services and known vulnerabilities across every major protocol, FTP, SSH, Telnet, HTTP, SMB, MySQL, PostgreSQL, and more, making it the ideal training partner for tools like Nmap, Metasploit, Nikto, and Gobuster.
The best part: installing Metasploitable 2 is completely free. The VM is distributed as a VMware VMDK disk image that runs on both VirtualBox and VMware Workstation Player without any licensing cost. The entire setup takes under fifteen minutes.
Think of Metasploitable 2 like a flight simulator for pilots. Trainee pilots do not practise emergency landings on real commercial aircraft carrying passengers. They use a simulator that replicates every system and failure mode in a safe, controlled environment. Metasploitable 2 is the flight simulator for ethical hackers — a fully realistic target where every mistake is a learning opportunity, not a legal liability.
System requirements before you begin
| HypervisorVirtualBox or VMwareVirtualBox 6.1+ recommended — free on all platforms | RAM for lab4 GB minimum512 MB for Metasploitable 2 + your attacker VM |
| Disk space8 GB freeThe VMDK image is approximately 1.75 GB compressed | Attacker VMKali LinuxRun alongside Metasploitable 2 on the same host-only network |
| Network typeHost-onlyIsolates the vulnerable VM from the internet — essential safety step | OS supportWindows, Mac, LinuxVirtualBox runs on all three — host OS does not matter |
Critical safety requirement. Metasploitable 2 is intentionally full of serious vulnerabilities. It must never be connected to the internet or any network that has internet access. Always configure its network adapter to Host-Only mode in VirtualBox or VMware. This isolates it completely to your local machine and prevents any external exposure of the vulnerable services running inside it.
How to install Metasploitable 2 on VirtualBox
Complete Metasploitable 2 installation and setup workflow
| 1 | Download the VM | Download Metasploitable 2 from SourceForge — search “Metasploitable2” on sourceforge.net. The download is a ZIP file containing the VMDK disk image. Extract it to a folder on your machine. |
| 2 | Create new VM | Open VirtualBox and click new. Name the VM “Metasploitable2”. And Set Type to LinuxVersion to Ubuntu (64-bit) . Click Next. |
| 3 | Allocate RAM | Set memory to 512 MB Metasploitable 2 is a lightweight Linux system and runs comfortably on minimal RAM, leaving more resources for your Kali Linux attacker VM. |
| 4 | Attach the VMDK | On the Hard Disk screen select Use an existing virtual hard disk file . Click the folder icon and browse to the extracted Metasploitable.vmdk file. Select it and click Create. |
| 5 | Set network to Host-Only | Go to Settings → Network → Adapter 1. Change Attached to from NAT to Host-only Adapter completely. |
| 6 | Boot and verify | Click Start. Metasploitable 2 boots to a login prompt. Log in with username msfadmin and password msfadmin. Run ifconfig to get the VM’s IP address for use in your practice scans. |

Verifying the lab — scanning Metasploitable 2 from Kali Linux

Vulnerable services pre-loaded in Metasploitable 2
Key services and their training purpose in Metasploitable 2
| 21/tcp | vsftpd 2.3.4 | Contains a hidden backdoor (CVE-2011-2523). Practise exploit/unix/ftp/vsftpd_234_backdoor in Metasploit. |
| 22/tcp | OpenSSH 4.7 | Outdated SSH version. Practise credential brute-forcing and known weak key vulnerabilities. |
| 23/tcp | Telnet | Plaintext protocol. Practise credential capture with Wireshark and understand why Telnet is deprecated. |
| 80/tcp | Apache 2.2.8 | Hosts multiple vulnerable web applications including DVWA, Mutillidae, and phpMyAdmin for web app testing. |
| 445/tcp | Samba 3.0.20 | Username map script vulnerability (CVE-2007-2447) allows unauthenticated remote code execution. Classic Metasploit lab exercise. |
| 3306/tcp | MySQL 5.0.51a | Accessible without a strong root password. Practise MySQL enumeration, authentication bypass, and data extraction. |
| 5900/tcp | VNC | VNC remote desktop with a weak password. Practise credential brute-forcing and remote desktop access techniques. |
| 8180/tcp | Apache Tomcat | Default credentials on Tomcat Manager. Practise authenticated manager access and WAR file upload for remote code execution. |
Metasploitable 2 is the only target machine students should use when they begin their Metasploit Framework journey. It provides a realistic environment where every service is genuinely vulnerable — not simulated. Every technique that works on Metasploitable 2 uses the same process and Metasploit modules used in real authorised engagements. The learning transfers directly to certification exams and professional practice.
The ideal home lab consists of three VMs on a Host-Only network: Kali Linux as the attacker machine, Metasploitable 2 as the primary Linux target, and Metasploitable 3 (Windows Server) as the Windows target. This three-VM setup covers the full range of techniques tested in the OSCP and CEH certifications and costs nothing to build.
Frequently asked questions about Metasploitable 2
Is Metasploitable 2 free to download and use?
Yes — Metasploitable 2 is completely free. It is distributed by Rapid7 on SourceForge as an open download with no registration or payment required. The download is a ZIP archive containing a VMware VMDK disk image that is compatible with both VirtualBox and VMware Workstation Player — both of which also offer free editions for personal and educational use. The only cost involved in building a complete home penetration testing lab with Metasploitable 2 is the hardware running it. Many students run the entire lab on a laptop with 8 GB of RAM.
What is the default login for Metasploitable 2?
The default username and password for Metasploitable 2 are both msfadmin. This credential is intentional and documented — it is the same weak credential students practise against when learning credential brute-forcing techniques. Once logged in, you can run ifconfig to find the VM IP address and netstat -tuln to view all listening services. The root password is also msfadmin, and sudo access is freely available — making it straightforward to explore the full Linux file system during post-exploitation practice exercises.
Which certifications use Metasploitable 2 for training?
Metasploitable 2 is the most commonly recommended practice VM for OSCP (Offensive Security Certified Professional) preparation — it contains many of the same service types and vulnerability patterns encountered in the official OSCP lab. The CEH (Certified Ethical Hacker) iLab practicals use similar deliberately vulnerable environments. eJPT (eLearnSecurity Junior Penetration Tester) training modules reference Metasploitable 2 directly in their lab exercises. TryHackMe and Hack The Box also recommend it as a local alternative for practising Metasploit modules before working on their hosted challenge machines.

