Topic 20 · Deep Dive

20.2 How to Build a Safe Home Practice Lab

Pick a Hypervisor Layer, Then Size It

A practice lab is a set of virtual machines running on a hypervisor. A type-2 hypervisor runs as an application on your ordinary desktop -- practical on a laptop with 16 GB of RAM and four cores, enough for two or three VMs at a time. A type-1 hypervisor boots bare-metal on a dedicated mini-PC or refurbished server and manages guest VMs directly, which is worth the extra hardware once you routinely run a victim, an attacker, and a defender simultaneously. Sizing rule of thumb: leave the host two cores and half the RAM for itself, and buy RAM before CPU -- memory is what caps your fleet. Whatever the layer, take a snapshot of every VM in a known-good state before each experiment, and name snapshots by purpose, not by date.

Segment the Virtual Network

The safety of the whole design rests on one decision: the virtual switch mode. Choose a host-only network -- the virtual switch attaches only to the host, so guest machines can talk to each other but cannot reach your LAN, your router, or the internet. A NAT mode adds outbound internet for package installs but still blocks unsolicited inbound traffic from the lab; use it only on a dedicated update NIC, never on the segment carrying your attack traffic. Never bridge the lab segment to your physical adapter: bridged mode places hostile packets -- exploit traffic, simulated malware, credential-spraying tools -- directly onto your home network where they reach every phone and laptop on Wi-Fi. Treat the lab as a hostile subnet that happens to live in your computer.

The VM Farm and Its Hygiene

Three machines cover most drills: a victim (a deliberately vulnerable or stock server), an attacker (a security distribution with the tools you are learning), and a defender (a second box with logging agents and analysis tooling watching the victim). Keep lab credentials obviously fake -- lab123-style strings, never real password hashes or personal data. Before and after every session, roll back to the golden snapshot; after every session, confirm the switch mode did not change. A lab that cannot escape its own subnet is a lab you can be reckless inside, which is exactly where learning happens.

Architecture Diagram

Host OS day-driver Hypervisor type-1 or type-2 Host-only network Attacker VM Victim VM Defender VM no route to home LAN NO bridged exposure
Host and hypervisor contain a VM farm on a host-only switch; the farm is isolated from the LAN and must never be bridged.

Key Takeaways

« Back to Topic 20« 20.1 / 20.3 »