Safe Ethical Hacking Lab Setup: A Step-by-Step Guide
By Mr Maze · Published 9 Oct 2026 · Updated 9 Oct 2026
What do you need for a home hacking lab?
- A computer with 16 GB of RAM (8 GB can run one or two small VMs), about 100 GB of free disk space, and CPU virtualization enabled in BIOS/UEFI.
- A hypervisor such as VirtualBox (free, Windows, Linux and Intel Mac), VMware or KVM/QEMU. On Apple Silicon Macs, use UTM or VMware Fusion with ARM builds of your guests.
- An attacker machine, for example Kali Linux or Parrot OS.
- Practice targets built to be attacked, such as OWASP Juice Shop, DVWA, Metasploitable 2 or machines from VulnHub.
Step 1: Turn on virtualization
Restart into BIOS/UEFI and enable Intel VT-x or AMD-V (often called SVM Mode). Without it, VMs run slowly or refuse to start.
Step 2: Create an isolated network
Install your hypervisor, then create a Host-only network or an Internal Network. These have no route to your router, which is the whole point. In VirtualBox the host-only default range is 192.168.56.0/24.
Do not use bridged mode for vulnerable machines. Bridged mode puts a deliberately insecure VM straight onto your home network.
Step 3: Build the attacker VM
Install Kali or Parrot, update it while it has temporary NAT internet access, then switch its adapter to the lab network only. Take a snapshot named clean-base.
Step 4: Add vulnerable targets
Import one target at a time, attach it only to the lab network and snapshot it before you touch it. Start with one web target (Juice Shop or DVWA) and one network target (Metasploitable 2).
Step 5: Check isolation
From a target VM, try to ping your router and a public address such as 1.1.1.1. Both should fail. If either works, fix the network adapter before you continue.
Step 6: Write down your scope
Your scope is the lab range, for example 192.168.56.0/24. Run tools only against those addresses. This habit carries straight over to real, authorised work. See our guide on scope and consent when scanning.
Safety rules
- Never expose vulnerable VMs to the internet or your home network.
- Keep personal files, passwords and real accounts out of lab machines.
- Keep your host OS and hypervisor updated.
- Restore a snapshot after every experiment you want to repeat.
Common mistakes
Leaving a target on NAT or bridged mode, skipping snapshots, typing the wrong IP and scanning your router, and giving the VMs too little RAM.