How to Build Your Own Hacking Lab at Home
Back to Blog
Setup5 min read13,023 views

How to Build Your Own Hacking Lab at Home

From an empty laptop to a safe, isolated practice lab: the pieces you need, how to wire the network so nothing leaks onto your real one, and the snapshot habit that lets you break the same machine forever.

Z

ZeroDaysHack Team

May 18, 2026

You cannot learn to hack by reading. At some point you have to run the scan, send the payload, and watch something break — and the only place you can do that safely and legally is a lab you built yourself. This guide walks you from an empty laptop to a working, isolated practice environment: the pieces you need, how to wire them so nothing leaks onto your real network, and the one habit (snapshots) that lets you break the same machine a hundred times.

#The shape of a safe lab

A lab is a few virtual machines talking to each other on a private, isolated network — with the vulnerable ones unable to reach the internet or your home devices.

An isolated home lab: attacker and victim VMs on a private network
One attacker VM and some deliberately vulnerable victims, all on a host-only network that can't reach the internet or your home LAN.

You need four things:

  • A hypervisor — software that runs virtual machines. VirtualBox is free and perfect for this; VMware Workstation Player is a fine alternative.
  • An attacker VM — Kali Linux or Parrot OS, which ship with the tools preinstalled.
  • One or more victim VMs — machines designed to be vulnerable, so you have something legal to attack.
  • An isolated network — so the victims can't touch anything you care about.

#Choosing the network mode — this is the part that matters

Every VM gets a network "mode," and picking the wrong one is how people accidentally expose a deliberately-vulnerable box to their entire home network. Learn these three.

VM network modes and which to use for a vulnerable lab
Host-only for victims, NAT only for updating the attacker, bridged almost never.
ModeWhat it doesUse it for
Host-onlyVMs talk to each other and the host; no internet, no LANVictim machines — the safe default
NATVM reaches the internet through the hostUpdating Kali, pulling tools
BridgedVM joins your real network as a full deviceAlmost never in a vulnerable lab

A common safe setup gives the attacker VM two adapters — NAT (to update and download tools) and host-only (to reach the victims) — while every victim VM has host-only only. The attacker can reach the internet and the lab; the victims can reach only the lab.

#Step by step

  1. Install a hypervisor. Download and install VirtualBox. Add the Extension Pack for USB and extra features.
  2. Create the attacker VM. Download the Kali or Parrot VirtualBox image, import it, give it 2–4 GB RAM. Add a host-only adapter alongside its NAT one.
  3. Add a host-only network. In VirtualBox's Host Network Manager, create one (it'll be something like 192.168.56.0/24). This is your lab's private wire.
  4. Add victim machines. Good starters: DVWA (a deliberately vulnerable web app), OWASP Juice Shop (a modern vulnerable web app), and Metasploitable (a vulnerable Linux box). Set each to host-only.
  5. Verify isolation. From a victim VM, try to reach the internet — it should fail. From the attacker VM, ping a victim — it should work. If a victim can reach the internet, stop and fix the network mode before going further.
from the attacker VM: confirm the lab is reachable
# host discovery across your lab's host-only range
nmap -sn 192.168.56.0/24

#Snapshots: your undo button for a whole machine

Here's the feature that turns a lab from fragile to fearless. A snapshot freezes a VM's entire state so you can roll back to it instantly — after any amount of damage.

The snapshot cycle: break things, then revert to clean
Install clean, snapshot, attack, revert — repeat forever.

The cycle is simple and you'll use it constantly:

  1. Install the VM and get it clean.
  2. Snapshot that clean state.
  3. Attack it — infect it, exploit it, misconfigure it, whatever the lesson needs.
  4. Revert to the snapshot in a few seconds and go again.

#A few good first targets

  • DVWA — "Damn Vulnerable Web Application." Adjustable difficulty, perfect for learning SQLi and XSS by hand.
  • OWASP Juice Shop — a modern single-page app full of realistic bugs, with a built-in scoreboard.
  • Metasploitable 2/3 — a Linux box riddled with services to enumerate and exploit.
  • This platform's challenges — sandboxed targets with the authorisation built in, no setup required.

#Next steps

With an isolated lab and the snapshot habit, you have the one thing most people who "want to learn hacking" never set up: a safe place to actually do it. Point Nmap at your lab until the output feels obvious, then work through SQL injection and XSS against DVWA or Juice Shop. Every other guide on this blog assumes you have exactly this — a target you're allowed to break. Now you do.