Metasploitable 3 is Rapid7's free, intentionally vulnerable practice lab, and it is the version people reach for once Metasploitable 2 feels too easy. It gives you two targets instead of one: a Windows Server 2008 R2 box and an Ubuntu 14.04 box, both packed with real CVEs and hidden playing-card flags, like a small CTF you run at home. The catch is the setup, which trips up more beginners than any exploit on it. If you want to warm up while the boxes download, the free Nmap Commands lab on HackerDNA walks you through the same scan-to-root loop in your browser.
This guide covers what Metasploitable 3 actually contains, the fastest way to get both VMs running, the errors almost everyone hits, four first attacks in a sensible order, and how to hunt the flags without spoiling them.
TL;DR: Metasploitable 3 is two vulnerable VMs (Windows Server 2008 R2 and Ubuntu 14.04) that Rapid7 distributes as Vagrant boxes, not as a simple download. Install VirtualBox and Vagrant, grab Rapid7's Vagrantfile, run vagrant up ub1404, and log in with vagrant / vagrant. Start on the Linux box, where a SQL injection chains into SSH and sudo, then move to Windows for Jenkins and Tomcat, and treat the card flags as your CTF.
What Is Metasploitable 3?
Metasploitable 3 is a free, open-source set of intentionally vulnerable virtual machines built by Rapid7 for practicing exploitation with Metasploit and other tools. Unlike Metasploitable 2, it is not a finished disk image: it is a collection of Packer templates, Vagrant files, and provisioning scripts that build the vulnerable machines for you.
Rapid7 announced it on November 15, 2016, with a Windows image first and a Linux version promised later. Today the official GitHub repository builds two targets:
- win2k8: Windows Server 2008 R2 running GlassFish, Apache Struts, Tomcat, Jenkins, IIS, ManageEngine Desktop Central, Elasticsearch, WordPress, phpMyAdmin, and a Ruby on Rails app.
- ub1404: Ubuntu 14.04 running ProFTPD 1.3.5, a backdoored UnrealIRCd, Drupal 7.5, Apache Continuum, Samba, CUPS, MySQL, and a deliberately broken PHP payroll app.
- Flags: both machines hide poker-card images. Rapid7's launch post says they are protected with obfuscation, strict permissions, file attributes, and embedded files, so finding them takes post-exploitation work, not just a shell.
- Star Wars users: besides the default
vagrantaccount, both machines have users named after Star Wars characters (luke_skywalker,han_solo,darth_vader, and more), each with a weak password.
One honest caveat before you invest an evening. The prebuilt boxes on HashiCorp's registry were last published in 2018 (the Windows box in March, the Linux box in July). The repository still gets small maintenance commits, but the software inside is frozen in time, which is exactly what you want from a target and exactly why it should never touch a real network.
Should a Beginner Start With Metasploitable 3?
Not as your very first target. If you have never exploited a service, start with our Metasploitable 2 beginner's guide: it is one zip file, one VM, and a root shell in ten minutes. Metasploitable 3 earns its place after that, for two reasons. It is the easiest free way to practice against Windows, and its vulnerabilities need small chains (find a credential, reuse it, escalate) instead of one-command backdoors. That is much closer to how a real CTF box plays.
What Your Computer Needs Before You Start
Most failed Metasploitable 3 installs fail here, before a single command runs. Check this table against your machine first:
| Requirement | Prebuilt boxes (recommended) | Building it yourself |
|---|---|---|
| Software | VirtualBox + Vagrant | VirtualBox + Vagrant + Packer + vagrant-reload plugin |
| Disk space | Room for two VM disks | 65 GB free (Rapid7's figure) |
| Memory | 2 GB per VM, plus your Kali VM | 4.5 GB for the build |
| CPU | x86-64 with VT-x or AMD-V enabled in the BIOS | |
| Time | A download and a few minutes of provisioning | An afternoon (it downloads the Windows ISO first) |
Our take: use the prebuilt boxes. Building from source only makes sense if you want to modify the Chef recipes, reset the Windows trial, or enable the hard-mode Linux flags.
Apple Silicon Macs: both boxes are x86-64 images published for VirtualBox and VMware, and none of them is an ARM build. On an M-series Mac you would be stuck with slow full emulation. If that is your laptop, a browser-based lab platform is the practical option.
How to Install Metasploitable 3 With Vagrant
Rapid7's quick start is three commands. Here is the same process with the steps that keep you out of trouble:
- Install VirtualBox and Vagrant. Use the installers from virtualbox.org and HashiCorp, not your distribution's packages. Rapid7's troubleshooting page specifically warns about Kali's
aptVirtualBox and Arch's Vagrant missing WinRM support. If you run VirtualBox 7.2, you need Vagrant 2.4.9 or later, the release (August 2025) that added 7.2 support. - Create a workspace and fetch the Vagrantfile.
mkdir metasploitable3-workspace cd metasploitable3-workspace curl -O https://raw.githubusercontent.com/rapid7/metasploitable3/master/Vagrantfile - Start the Linux box first. A plain
vagrant upstarts both VMs at once. Bring them up one at a time so a problem with one does not hide behind the other:
Vagrant downloadsvagrant up ub1404rapid7/metasploitable3-ub1404, creates the VM with 2 GB of RAM, and gives it the fixed address172.28.128.3on a private network. - Start the Windows box. Run
vagrant up win2k8. It joins the same private network but gets its address from DHCP. Expect a long pause at "Waiting for machine to boot" while WinRM comes up. - Pick your difficulty. By default the Windows firewall blocks SMB, RPC, RDP, and MySQL. To start with the firewall off, provision with
MS3_DIFFICULTY=easy vagrant up win2k8. Easy mode is a reasonable first pass. Default mode is more realistic. - Snapshot both machines. Run
vagrant snapshot save fresh. When you break something,vagrant snapshot restore freshtakes you back in seconds. - Connect Kali. Give your Kali VM a host-only adapter on the same VirtualBox network (vboxnet, 172.28.128.0/24). The targets never need internet access.
The default login on both boxes is vagrant / vagrant. Use the console only to confirm the VM booted. Everything else should come from Kali, the way a real tester would work.
Building Metasploitable 3 Yourself
If you clone the repository, ./build.sh ubuntu1404 or ./build.sh windows2008 (or .\build.ps1 on Windows) runs Packer, builds a fresh box, and adds it to Vagrant. The Windows build installs Windows Server 2008 R2 SP1 from Microsoft's 2010 evaluation ISO, and the Windows Update step in its answer file is commented out. That is why the box is still missing patches years later. Rapid7's wiki also notes that the trial is valid for 30 days: after that, Windows nags about activation and shuts itself down after an hour or two of use, so rebuilding resets the clock.
Finding the Targets and Running Your First Scan
The Linux box is always at 172.28.128.3 unless you change the Vagrantfile. Find the Windows box with a ping sweep from Kali, then scan both with version detection:
nmap -sn 172.28.128.0/24 # who is alive?
nmap -sV -p- -oN ub1404.nmap 172.28.128.3
nmap -sV -p- -oN win2k8.nmap 172.28.128.4 # use the IP you found
Your exact output will vary by build, but Rapid7's firewall and iptables rules tell you what should be reachable:
| Box | Ports opened by Rapid7's config | What is behind them |
|---|---|---|
| ub1404 | 21, 22, 80, 445, 631, 3000, 3306, 3500, 6697, 8080, 8181 | ProFTPD, SSH, Apache (payroll app, Drupal), Samba, CUPS, MySQL, a Node.js chatbot, Ruby web apps, UnrealIRCd, Apache Continuum |
| win2k8 | 80, 3000, 4848, 8020, 8080, 8282, 8484, 8585, 9200, plus SNMP on 161/udp | IIS, Rails, GlassFish, ManageEngine, Tomcat and Struts, Jenkins, WordPress and phpMyAdmin, Elasticsearch |
| win2k8 (default mode) | 135, 139, 445, 3306, 3389 blocked | Open only with MS3_DIFFICULTY=easy |
That last row matters more than it looks. If you plan to fire EternalBlue (MS17-010) at a default Windows build, you will see no port 445 and assume the scan failed. It did not. The firewall is doing its job, and part of the exercise is finding another way in.
Your First 4 Attacks on Metasploitable 3
Do these in order. The Linux chain teaches you to connect findings, and the Windows attacks teach you that an exposed admin panel is often a shell. Restore your snapshot between attacks.
1. Payroll App SQL Injection to SSH to Root (Linux)
Browse to http://172.28.128.3/payroll_app.php. It is a login form, and the source in Rapid7's repo shows why it is broken: it pastes your username and password straight into select username, first_name, last_name, salary from users where username = '$user' and password = '$pass'. Put this in the username field and anything in the password field:
' UNION SELECT username, password, null, null FROM users -- -
The query returns four columns, so the UNION also returns four. The "First Name" column of the results now shows each user's password in plain text. Here is the chain: the payroll database and the Linux system accounts are built from the same list of users, with the same passwords. Try them over SSH:
ssh [email protected]
sudo -l # leia, luke and han are in the sudo group
sudo -i
Three findings, one root shell, no exploit code. If you can only do one attack on Metasploitable 3, make it this one.
2. ProFTPD 1.3.5 mod_copy (Linux)
ProFTPD 1.3.5 ships the mod_copy module, and CVE-2015-3306 lets anyone run its SITE CPFR and SITE CPTO commands without logging in. The build also makes /var/www/html world-writable. Prove it by hand first:
nc 172.28.128.3 21
SITE CPFR /etc/passwd
SITE CPTO /var/www/html/passwd.txt
# then browse to http://172.28.128.3/passwd.txt
Reading a file is the proof. Turning it into code execution is what exploit/unix/ftp/proftpd_modcopy_exec automates, and our guide on how to use Metasploit explains the search, use, set, run loop if it is new to you.
3. Jenkins Script Console (Windows)
Rapid7's wiki lists Jenkins on port 8484 with no credentials enabled. Browse to http://<win2k8-ip>:8484/script and you get a Groovy console that runs code on the server:
println "whoami".execute().text
println "systeminfo".execute().text
That is command execution through a feature, not a bug. In practice, a CI server with no login is a jackpot finding on an internal test, because it runs code by design and usually stores credentials for other systems. That makes it worth more of your time than the flashy CVEs. Note which account you are running as, then decide whether you need to escalate. The Metasploit equivalent is exploit/multi/http/jenkins_script_console.
4. Tomcat Manager With Default Credentials (Windows)
Port 8282 runs Apache Tomcat 8.0, and the wiki gives its manager login as sploit / sploit. Pretend you do not know that. Run auxiliary/scanner/http/tomcat_mgr_login against the port and let it find the pair, then deploy a WAR file with exploit/multi/http/tomcat_mgr_upload. Guessing default credentials on an admin panel and then using that panel to upload code is a pattern you will see again in CTFs and on real tests.
When you land a low-privilege Windows shell: enumerate before you exploit. Check whoami /priv, service permissions, and scheduled tasks. The Windows privilege escalation fundamentals chapter on HackerDNA covers the checks that matter, in the order a tester runs them.
Hunting the Metasploitable 3 Flags
Root is not the end on Metasploitable 3. The card flags turn it into a CTF, and they are where most of the learning happens, because each one is hidden with a different technique. Without spoiling locations, here is the kind of work they ask for, based on Rapid7's own build scripts:
- Permissions and hidden files: some cards are readable only by SYSTEM or a specific user, so you need the right account, not just any shell.
- Encoded and embedded data: expect Base64, files tucked inside archives and documents, and at least one card hidden in an NTFS alternate data stream on Windows.
- Forensics: a packet capture, an audio file, and image metadata all show up in the Linux recipes.
- Databases and services: one Windows card lives in a MySQL table, and a hard-mode Linux card sits behind a port-knocking daemon.
The Linux box has an easy set of flags by default. Its hard-mode flags are only added when you build the box yourself with the MS3_LINUX_HARD environment variable set. Rapid7 also says a hint about the flags can be found in one of the services, so read every web page you land on.
Common Metasploitable 3 Problems and Fixes
These come from Rapid7's own troubleshooting page and VirtualBox's documentation:
- "The IP address configured for the host-only network is not within the allowed ranges." On Linux and macOS hosts, VirtualBox only allows host-only addresses in 192.168.56.0/21 by default, and the Linux box wants 172.28.128.3. Create
/etc/vbox/networks.confcontaining* 172.28.128.0/24, or edit the IP in the Vagrantfile to something like 192.168.56.10. - The VM hangs while "waiting for SSH" or WinRM. Each VM needs at least 2 GB of RAM. If your host cannot allocate it, the VM stalls silently. Close other VMs and try again.
- Provisioning failed halfway. Do not rerun
vagrant upon a half-built machine. Rapid7 recommendsvagrant destroy, thenvagrant up, to start clean. - Files disappear during a build on a Windows host. Security software on the host can flag some of the deliberately vulnerable files (Rapid7 mentions
jenkins.exeandmeterpreter.php) and quarantine them. That is expected for a vulnerable lab. The prebuilt boxes avoid the problem, or build inside a dedicated VM. - Windows shuts down after an hour or two. The 30-day evaluation has expired. Restore an early snapshot or rebuild the box.
- Vagrant errors about paths. A space or non-Latin character in your user folder breaks it. Point
VAGRANT_HOMEat a simple path such asC:\vagrant-home.
Metasploitable 3 vs Other Practice Targets
| Option | Price | Setup | Best for |
|---|---|---|---|
| Metasploitable 2 | Free | One zip, one VM | Your first network exploits |
| Metasploitable 3 | Free | Vagrant, two VMs, 2 GB RAM each | Windows practice and short exploit chains |
| VulnHub machines | Free | One VM download per box | Varied boot-to-root CTF boxes |
| HackerDNA | Free tier, Pro plan | Browser, no VPN | Guided labs with user and root flags, nothing to install |
If your laptop struggles to run Kali plus two 2 GB targets, that is not a skill problem. It is a hardware problem, and browser-based labs solve it without a cent of new RAM.
Legal and Ethical Considerations
Critical reminder: Metasploitable 3 is built to be attacked. Nothing else on your network is. Always get explicit written authorization before testing any system you do not own.
- Keep it on a private network. Do not switch the adapters to Bridged or add port forwarding. These VMs run years of unpatched software with known exploits.
- Watch your scan ranges. If Kali also has a NAT or bridged adapter, a typo in a subnet can point Nmap at your router or a neighbor's device.
- Practice is not permission. Finding an exposed Jenkins or Tomcat manager on the internet is a reason to report it through the owner's disclosure process, never a reason to log in.
Frequently Asked Questions
What is the Metasploitable 3 username and password?
The default login on both the Windows and Linux boxes is vagrant with the password vagrant. Both machines also have weak Star Wars-themed accounts such as luke_skywalker and han_solo, and finding their passwords is part of the challenge.
What is the IP address of Metasploitable 3?
With Rapid7's Vagrantfile, the Linux box (ub1404) is fixed at 172.28.128.3. The Windows box (win2k8) gets an address from DHCP on the same private network, so find it with nmap -sn 172.28.128.0/24 or by running ipconfig on its console.
Where can I download Metasploitable 3?
Rapid7 does not publish a single ISO or OVA. You download the Vagrantfile from the official rapid7/metasploitable3 GitHub repository and Vagrant pulls the prebuilt boxes for you, or you build them with Packer. Be careful with third-party OVA exports on file-sharing sites, because you cannot verify what was changed inside them.
Should I start with the Windows or the Linux box?
Start with Linux. It boots faster, has a fixed IP, and its payroll SQL injection to SSH to sudo chain teaches you how findings connect. Move to Windows once you are comfortable, ideally in default firewall mode.
Is Metasploitable 3 better than Metasploitable 2?
It is harder and more varied, not strictly better. Metasploitable 2 is the easier first target. Metasploitable 3 adds Windows, newer web applications, short exploit chains, and flags, but costs much more setup time and RAM.
Does Metasploitable 3 work on a Mac with Apple Silicon?
Not well. The boxes are x86-64 builds for VirtualBox and VMware, so an M-series Mac would need slow full emulation. An Intel Mac, a Windows PC, or a Linux machine with VT-x or AMD-V works far better.
Last verified: November 2026. Setup steps, system requirements, ports, credentials, and flag techniques checked against the rapid7/metasploitable3 repository, its wiki, and its Vagrantfile. Box publish dates checked on HashiCorp's Vagrant registry. Vagrant's VirtualBox 7.2 support checked in the Vagrant changelog, and host-only network ranges in the VirtualBox manual. Module names checked in the Metasploit Framework repository.
Your Next Steps
Metasploitable 3 is the best free way to get Windows exploitation practice and a home CTF out of one project, as long as your hardware can carry it. Bring up the Linux box tonight, run the payroll SQL injection chain to root, then spend a weekend on the Windows box and the card flags. Write down every finding as you go. That notebook is your first pentest report.
If the Vagrant setup is what is holding you back, do not let it stop you from learning. Start with the free Nmap Commands lab to practice the scan-to-root loop in your browser, then take on Query Quake to master the SQL injection that opens Metasploitable 3's Linux box. You can start with HackerDNA's free tier - no credit card required.