CHAPTER 01 · FREE
The stack
45 minutes · 4 downloads · zero dollars
In this chapter you'll go from a bare laptop to a working lab with an attacker machine, two target machines, and an isolated network between them. You don't need to buy anything. You don't need a "real" server. You don't need a specific OS — Kali, Ubuntu, macOS, and Windows all work.
By the end you'll have:
- VirtualBox installed (the free, open-source hypervisor that runs on anything)
- Kali Linux 2025 as the attacker
- Metasploitable 2 as the first target
- A Windows 10 eval VM as the second target
- A host-only network isolating all three from your real laptop
Why this stack and not something else
There are a dozen ways to build a home lab. You can buy a dedicated server. You can use Proxmox. You can rent a cloud VM. All of those are worse for the beginner than what you're about to do, for a specific reason: they all delay the first exploit.
The thing that teaches you security is not configuring the hypervisor. It's watching a payload land, and then seeing it in a log. Every hour you spend on infrastructure is an hour not spent on that. So the stack is chosen to get you to the first exploit in one chapter, not one week.
VirtualBox is free, runs on any OS, and is the same platform most beginner courses use. Kali is the standard pentester OS. Metasploitable 2 is deliberately vulnerable in ~10 ways so you can pick a different exploit every day. The Windows 10 eval VM gives you a Windows target to practice the techniques that only work against Windows (Active Directory attacks, LSASS dumping, etc.). All four are free downloads from the publishers, no torrents.
What you need before you start
- A laptop with at least 8GB of RAM. 16GB is better. 8GB will work but you'll only be able to run two VMs at once.
- At least 60GB of free disk. Kali ~20GB, Metasploitable ~8GB, Windows 10 ~30GB.
- Hardware virtualization enabled in BIOS. On most laptops this is called VT-x (Intel) or AMD-V (AMD). If VirtualBox complains later, this is the fix — reboot into BIOS, find the setting, enable it.
- A stable internet connection for the downloads. The full set is ~12GB.
Install VirtualBox
Download from virtualbox.org/wiki/Downloads. Pick the installer for your host OS. Also download the Extension Pack from the same page (it enables USB 2.0/3.0 passthrough, which some USB attacks need — not chapter 1 material, but install it now while you're here).
Double-click the installer. On Linux, use the package manager if your distro has one (the Ubuntu / Debian install is a single .deb), otherwise the generic installer works. On macOS, the installer will ask for Kernel Extension permission — click "Allow" in System Settings → Privacy & Security.
sudo usermod -aG vboxusers $USER
then log out and back in. This lets VirtualBox access USB devices without sudo.
Open VirtualBox. If it loads to the empty VM list, you're done. If it warns about VT-x, reboot into BIOS and enable it.
Download the three VMs
You'll download three virtual machine images. Put them all in a folder like ~/vms/ so they're easy to find later — not on your Desktop, not in Downloads.
1. Kali Linux
Go to kali.org/get-kali → Virtual Machines. Download the VirtualBox image (7z archive, ~3GB). Extract it. You'll get a folder with a `.vbox` file — double-click it to import the VM into VirtualBox. When it asks about MAC address policy, choose "Generate new MAC addresses for all network adapters" (important — otherwise multiple lab machines cloned from the same image collide on the network).
Once imported, right-click the Kali VM → Settings → System → set Base Memory to 4GB if you have 16GB on the host, 3GB if you have 8GB. Under Display, set Video Memory to 128MB. Under Network, leave the first adapter as NAT for now (we'll fix this in chapter 2).
2. Metasploitable 2
This is the classic deliberately-vulnerable Linux target. The download URL has moved around over the years — search "Metasploitable 2 download" and you'll find the current mirror (the Rapid7 blog post usually has the direct link). It's a ~800MB zip. Extract it — you'll get a folder with a `.vmdk` file.
In VirtualBox, click New. Name it "Metasploitable 2", Type "Linux", Version "Ubuntu (64-bit)". Skip the ISO step. In Hard disk, choose "Use an existing virtual hard disk file" and point at the `.vmdk` you extracted. Set RAM to 1GB. Set network adapter to host-only (we'll fix this in chapter 2).
3. Windows 10 Enterprise Evaluation
Go to Microsoft Evaluation Center → Windows 10 Enterprise. Download the 64-bit ISO. It's a 90-day evaluation license — legal, free, and enough for learning.
In VirtualBox, click New. Name it "Windows 10 Target", Type "Microsoft Windows", Version "Windows 10 (64-bit)". Set RAM to 3GB. Create a new virtual hard disk (VDI, dynamically allocated, 30GB). During the install wizard, attach the ISO you downloaded. Complete the Windows install (choose "I don't have a product key" — the eval works without one). Once installed, install VirtualBox Guest Additions from the VirtualBox menu → Devices → Insert Guest Additions CD image → run the installer inside the VM.
The whole stack, side by side
After all three imports, your VirtualBox list should look like this:
┌─────────────────────────────┬────────┬──────┬──────────┐ │ VM name │ OS │ RAM │ Disk │ ├─────────────────────────────┼────────┼──────┼──────────┤ │ Kali Linux 2025.4 │ Kali │ 4 GB │ 20 GB │ │ Metasploitable 2 │ Ubuntu │ 1 GB │ 8 GB │ │ Windows 10 Target │ Win10 │ 3 GB │ 30 GB │ └─────────────────────────────┴────────┴──────┴──────────┘ Total RAM needed when all three run: 8 GB Total disk used: 58 GB Total cost: $0
If you have 8GB on your host, run two at a time, not three — the third will swap and everything gets slow. Metasploitable is tiny; you can leave it running permanently. Kali boots in ~30 seconds. Windows 10 is the slow one.
Verify the lab boots
Start each VM once to make sure the install worked. Log in:
- Kali — username
kali, passwordkali(change it now) - Metasploitable 2 — username
msfadmin, passwordmsfadmin - Windows 10 — the local account you created during install
In each VM, open a terminal (or Command Prompt on Windows) and run ip addr (Linux) or ipconfig (Windows). Write down the IP address you see — it'll be a 10.x.x.x or 192.168.x.x. That's the machine's address on the NAT network VirtualBox creates by default. In chapter 2 we'll replace this with the isolated host-only network that puts the three VMs on the same segment.
If all three VMs boot and show you a desktop, you've completed chapter 1.
What you have and what's next
You have:
- An attacker VM (Kali) with every pentest tool pre-installed
- Two target VMs, one Linux and one Windows
- VirtualBox managing them all on one laptop
- No money spent, no hardware purchased
Chapter 2 fixes the biggest beginner mistake: putting these VMs on your home Wi-Fi. Right now, if you start an attack inside Kali, it goes out your laptop's Wi-Fi adapter onto your real home network — which is illegal and dangerous. Chapter 2 shows you how to create a host-only network that isolates the lab from the rest of your laptop, in one VirtualBox network adapter setting change plus one iptables command.
Chapter 3 introduces the four targets in detail — Metasploitable, DVWA, Juice Shop, and the Windows VM — and what each teaches you that the others don't.