How to Build a Home Pentesting Lab With Parrot Linux (DVWA, Metasploitable)

Every tutorial that involves security tools comes with the same warning: practice only on systems you own or have written permission to test. The cleanest way to honour that is to build your own lab, a self-contained set of machines that live on your computer and never touch anyone else’s network. This guide shows you how to turn Parrot Linux into the control box and stand up two classic targets, DVWA and Metasploitable, so you can learn safely and legally.

What a home pentesting lab is

A pentesting lab is a group of virtual machines running on one physical computer, connected to each other on a private virtual network and isolated from the internet and from your real home network. One machine, your Parrot Linux install, is the attacker box with the tools. The others are deliberately vulnerable targets you are free to break. Because everything is virtual and private, nothing you do can reach a real system, and you can reset a broken target to a clean snapshot in seconds. This setup is the difference between learning offensive tools responsibly and crossing a legal line, so it is worth taking the time to build it correctly before you run a single scan.

Parrot is a strong choice for the attacker role because the Security and Hack The Box editions already carry the tooling you will reach for. If you are weighing editions, our guide on Parrot Home vs Security edition covers which one to install for lab work.

What you need before you start

Lab work is memory-hungry because you run several operating systems at once. A realistic minimum is:

  • A host machine with at least 8 GB of RAM; 16 GB makes running three VMs comfortable.
  • Around 60 GB of free disk space for the VMs and snapshots.
  • A CPU with virtualization support (Intel VT-x or AMD-V) enabled in the BIOS.
  • A hypervisor: VirtualBox is free and fine for this, VMware Workstation works too.

You can run Parrot either as your host operating system with the targets inside a hypervisor, or run all three machines as guests on a Windows or macOS host. Both work. If you plan to install Parrot itself in a VM, our VMware install guide walks through that part.

Step 1: Create an isolated network

The single most important setting in the whole lab is the network mode. You want your VMs to talk to each other but not to the internet or your LAN. In VirtualBox this is the Host-only or Internal Network adapter; in VMware it is a custom Host-only network. Set every VM in the lab to the same host-only network and nothing else.

Why this matters: the target machines are intentionally insecure. If Metasploitable were reachable from the internet, anyone could walk into it, and if it could reach your real network it could be used as a pivot. Host-only isolation removes both risks. Confirm it after boot by checking that a target cannot ping a public address:

ping -c 2 8.8.8.8

On a correctly isolated target that ping should fail. If it succeeds, fix the adapter before going any further.

Step 2: Set up the Parrot attacker box

Install or boot your Parrot Linux VM and give it an adapter on the same host-only network. Update it first so your tools are current:

sudo apt update && sudo parrot-upgrade

Note the machine’s address on the lab network so you know your own box from the targets:

ip addr show

The tools you will use most for first lab sessions, Nmap, a web proxy and Metasploit, ship with the Security edition. If you are on the Home edition, add them with apt as you need them.

Step 3: Deploy Metasploitable

Metasploitable is a purpose-built Linux VM stuffed with outdated, misconfigured services. It is the standard first target for learning network attacks against your own lab. Download the official image from Rapid7’s site, import it into your hypervisor, and attach it to the host-only network. Do not change its default credentials or patch anything; the vulnerabilities are the point.

Once it boots, find it from your Parrot box with a discovery scan:

sudo nmap -sn 192.168.56.0/24

Replace the range with your host-only subnet. When you have the target’s address, a service scan shows you the deliberately vulnerable surface:

nmap -sV 192.168.56.101

You will see a long list of old services. Each one is a lesson. Pick one, research the version, and practise against it knowing the box is yours to break.

Step 4: Deploy DVWA for web practice

DVWA (Damn Vulnerable Web Application) is a PHP/MySQL web app built to teach web vulnerabilities such as SQL injection, cross-site scripting and file upload flaws, each at adjustable difficulty levels. The easiest way to run it is in a container on a target VM. On a small Debian or Ubuntu target with Docker installed (our Docker on Parrot guide covers the install if you want the container host to be Parrot):

docker run --rm -it -p 80:80 vulnerables/web-dvwa

Then browse to the target’s lab IP from your Parrot box, log in with the documented default credentials, and run the setup script DVWA provides to create its database. Start at the “low” security level and raise it as you learn. Because this is your own container on an isolated network, you can attack it freely.

Step 5: Take snapshots

Before you touch a target, snapshot it. When you break something beyond repair, which you will, roll back to the clean snapshot instead of rebuilding from scratch. Snapshot your Parrot box too, so a bad configuration change is a one-click undo. This single habit saves more lab time than any tool.

A first session workflow

Put the pieces together in a repeatable order:

  1. Boot all VMs, confirm they share the host-only network and cannot reach the internet.
  2. From Parrot, run a ping sweep to find live targets.
  3. Run a service scan on a target to see what is exposed.
  4. Pick one service, read about its weakness, and practise against it.
  5. When finished, revert targets to their clean snapshots.

Keep notes on every box as if it were a real engagement. The documentation habit is as valuable as the technical skill.

Expanding the lab later

Once the basics feel comfortable, add variety. A Windows evaluation VM teaches a different world of attacks. Platforms like Hack The Box and TryHackMe give you a steady stream of fresh, authorized targets without the maintenance of running them yourself, and Parrot’s Hack The Box edition is tuned for exactly that. Mixing a local lab with those platforms gives you both control and variety while keeping everything inside the bounds of authorized testing.

Staying inside the lines

The whole value of a lab is that it keeps your practice legal. Never point your tools at a system you do not own or have explicit permission to test, never bridge the lab to your real network for convenience, and never reuse a wordlist or exploit against a live third-party target. Keeping the lab isolated is not just tidy, it is what keeps your learning lawful. For a wider view of how Parrot’s security tooling is meant to be used, see our honest take in the beginner’s guide to Parrot Linux.

FAQ

Can I build this lab on a laptop?

Yes, if it has at least 8 GB of RAM and virtualization enabled. Run fewer VMs at once on tight hardware, and shut down targets you are not actively using.

Do the targets need internet access?

No, and they should not have it. Download the images once, then keep every lab VM on an isolated host-only network with no route to the internet or your home LAN.

Is it legal to attack these machines?

Attacking DVWA and Metasploitable on your own isolated lab is legal because you own them and nobody else is affected. The same actions against a system you do not control are not, regardless of intent.