VirtualBox Cybersecurity Home Lab — Complete Beginner's Guide 2026

·

You cannot learn offensive or defensive security by reading. You learn it by breaking things you are allowed to break. A home lab is the sandbox where you run Nmap, fire Metasploit modules, crack hashes, poison LLMNR, or watch an EDR light up — without touching a network you do not own. VirtualBox is the fastest, zero-cost way to build one: it runs on Windows, Linux and macOS (Intel), imports ready-made appliances, and scripts cleanly from the command line.

This guide takes you from a bare host to a working, fully isolated lab: install VirtualBox three ways, provision VMs with the GUI, VBoxManage and Vagrant, wire up NAT / host-only / internal networks correctly, then drop in a Kali attacker, Metasploitable 2, DVWA and a Windows victim. Every command is copy-pasteable. The single rule you will hear repeatedly: vulnerable VMs never touch the internet.

◈ Table of Contents

01 What a Home Lab Is & Why 02 Prerequisites & Requirements 03 Method 1 — Install VirtualBox 04 Method 2 — VBoxManage & Vagrant 05 Method 3 — OVA Import & Nested 06 Initial Config — Kali 07 Core Config — Lab Networking 08 Integration — Add Targets 09 Advanced — Segmented Lab 10 Maintenance & Troubleshooting 11 Sources & References
🧪

01 — What a Home Lab Is & Why You Need One

Phase 1 / 11

A cybersecurity home lab is a set of virtual machines running on your own computer, connected to a private virtual network that has no path to your real home network or the internet. One VM is your attacker (Kali Linux). The others are deliberately vulnerable targets. Because everything is virtual and snapshotted, you can exploit a box, wipe it, and rebuild it in seconds — and because it is isolated, a real attacker scanning the internet can never reach the intentionally broken services you are hosting.

VirtualBox is a Type-2 hypervisor from Oracle: it runs as an application on top of your existing OS rather than on bare metal. That makes it the ideal beginner platform — it is free and open source, installs in minutes on the OS you already use, and (critically for a lab) it can be driven entirely from the command line, so your entire environment becomes reproducible and disposable.

🎯

Practice Offense Legally

Run Nmap, Metasploit, Hydra and SQLmap against targets you own. Attacking machines in a network you control, with full permission, is completely legal.

🛡️

Build Detections

Generate real attack telemetry, then hunt it in Wazuh, Sentinel or Splunk. You cannot write a good detection for an attack you have never seen fire.

📜

Cert & CTF Prep

OSCP, PNPT, eJPT and CTFs all assume you can enumerate and exploit boxes. The lab is where that muscle memory is built — for free.

♻️

Break & Restore

Snapshots let you detonate ransomware samples or trash a box, then roll back to a clean state in under a minute. Nothing is permanent.

Everything in this guide is for use on hardware and networks you own. Scanning, exploiting or brute-forcing systems you do not have written authorization to test is a crime in most jurisdictions. Keep it in the lab.

📋

02 — Prerequisites & Requirements

Phase 2 / 11

You can start with a single 8 GB laptop, but the experience scales sharply with RAM. Every running VM consumes real memory from the host; the trick is to run only the VMs you need for the exercise in front of you and keep the rest powered off.

ResourceMinimumRecommendedNotes
Host RAM8 GB MIN16–32 GB RECKali ~4 GB, each target 1–4 GB. 8 GB = 2 VMs at a time.
CPUDual-core, VT-x/AMD-VQuad-core+ with virtualization onEnable Intel VT-x / AMD-V in BIOS/UEFI or VMs stay 32-bit only.
Free disk60 GB MIN250 GB SSD RECDynamically-allocated disks grow as used; snapshots eat space fast.
Host OSWin 10/11, Ubuntu 22.04+, macOS (Intel)—Apple Silicon (M1–M4) is not supported for x86 guests; see Phase 5.
VirtualBox7.07.1.x (latest)Install the matching Extension Pack for USB 2/3 and disk encryption.
Kali imageInstaller ISO or prebuilt VirtualBox VMPrebuilt VM (fastest)Download only from kali.org — verify the SHA256.

Before anything else, reboot into BIOS/UEFI and confirm virtualization is enabled (Intel VT-x / SVM Mode on AMD). On Windows, "Virtualization: Enabled" appears under Task Manager → Performance → CPU. Without it, VirtualBox refuses to boot 64-bit guests.

On Windows, Hyper-V, WSL2, Memory Integrity (Core Isolation) and the Windows Hypervisor Platform all grab the virtualization stack and can cripple VirtualBox performance or force painfully slow software emulation. If your VMs crawl, disable Hyper-V (bcdedit /set hypervisorlaunchtype off) and reboot.

💽

03 — Method 1: Install VirtualBox on the Host

Phase 3 / 11

Install the hypervisor first. Pick the section for your host OS. In all cases you install two things: VirtualBox itself, and the Oracle Extension Pack (same version number) which adds USB 2.0/3.0 passthrough, disk encryption and NVMe.

01Download the Installer & Extension PackAll OS

Grab the platform package for your host and the platform-independent Extension Pack. Never download VirtualBox from a mirror or a "download button" ad — only from virtualbox.org.

⬇️
virtualbox.org / Downloads
Windows hosts · Linux distributions · macOS / Intel · Extension Pack
OPEN →
Verify the download hash (example, Windows)
# Compare the printed hash against SHA256SUMS on the download page PS> Get-FileHash .\VirtualBox-7.1.6-*-Win.exe -Algorithm SHA256
02Install on Windows 10 / 11Windows

Run the installer with defaults, or drive it silently from an elevated PowerShell/CMD. The installer briefly drops your network while it inserts the host-only adapter — that is expected.

# Silent install from an elevated prompt PS> .\VirtualBox-7.1.6-*-Win.exe --silent --ignore-reboot # Then add the Extension Pack (accept the PUEL license) PS> & "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" extpack install --accept-license=sha256 Oracle_VirtualBox_Extension_Pack-7.1.6.vbox-extpack

Add C:\Program Files\Oracle\VirtualBox to your PATH so VBoxManage works from any terminal. Every command in Phase 4 assumes this.

03Install on Ubuntu / Debian (apt repo)Linux

Use Oracle's own repository, not the distro package — the distro version is usually stale and its Extension Pack will mismatch. Add the signing key, add the repo, install, then add yourself to the vboxusers group for USB.

# 1. Add Oracle's repository signing key $ wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc \ | sudo gpg --dearmor --yes -o /usr/share/keyrings/oracle-vbox-2016.gpg # 2. Add the repo for your Ubuntu codename (e.g. noble = 24.04) $ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-vbox-2016.gpg] \ https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" \ | sudo tee /etc/apt/sources.list.d/virtualbox.list # 3. Install VirtualBox 7.1 and kernel headers (for the kernel modules) $ sudo apt update && sudo apt install -y linux-headers-$(uname -r) virtualbox-7.1 # 4. Add your user to vboxusers, then log out/in $ sudo usermod -aG vboxusers $USER

If VMs fail with "Kernel driver not installed (rc=-1908)", the vboxdrv module did not build. Run sudo /sbin/vboxconfig. On Secure-Boot systems you must enroll a MOK key or the unsigned module is blocked — the installer prints the exact steps.

04Install on macOS (Intel) & Confirm the BuildmacOS / All

On an Intel Mac, mount the .dmg, run the installer, then approve the Oracle system extension under System Settings → Privacy & Security and reboot. Verify the version from a terminal on any host.

# macOS: install from the mounted dmg, then approve the kext and reboot $ sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target / # Confirm the install worked (any OS) $ VBoxManage --version $ VBoxManage list extpacks

Apple Silicon Macs (M1–M4) run ARM, not x86. The x86 Kali/Metasploitable images in this guide will not run there under VirtualBox. On those machines use UTM/QEMU with ARM images, or run the lab on a separate x86 host — see Phase 5.

⚙️

04 — Method 2: Reproducible VMs with VBoxManage & Vagrant

Phase 4 / 11

Clicking through the GUI is fine for one VM. The moment you want a lab you can tear down and rebuild identically — the equivalent of a Docker Compose file — you script it. VirtualBox ships VBoxManage, a complete CLI; Vagrant layers a declarative file on top so a whole lab comes up with one command.

01Create a VM from Scratch with VBoxManageCLI

This builds an empty Kali VM: register it, size CPU/RAM/VRAM, create a dynamically-allocated 60 GB disk, attach a SATA controller plus the installer ISO, and set the boot order. Adjust the ISO path to your download.

$ VBoxManage createvm --name "Kali-Attacker" --ostype Debian_64 --register $ VBoxManage modifyvm "Kali-Attacker" --memory 4096 --cpus 2 --vram 128 \ --graphicscontroller vmsvga --ioapic on --pae on $ VBoxManage createhd \ --filename "$HOME/VirtualBox VMs/Kali-Attacker/Kali-Attacker.vdi" \ --size 61440 --format VDI --variant Standard $ VBoxManage storagectl "Kali-Attacker" --name "SATA" --add sata --controller IntelAhci $ VBoxManage storageattach "Kali-Attacker" --storagectl "SATA" \ --port 0 --device 0 --type hdd \ --medium "$HOME/VirtualBox VMs/Kali-Attacker/Kali-Attacker.vdi" $ VBoxManage storageattach "Kali-Attacker" --storagectl "SATA" \ --port 1 --device 0 --type dvddrive --medium "$HOME/iso/kali-linux-2026-installer-amd64.iso" $ VBoxManage modifyvm "Kali-Attacker" --boot1 dvd --boot2 disk --boot3 none $ VBoxManage startvm "Kali-Attacker" --type gui
02Install & Use Vagrant for One-Command LabsCLI

Vagrant pulls prebuilt "boxes" and provisions them automatically. The kalilinux/rolling box is published by the Kali team. This brings up a headless Kali in minutes with zero clicking.

# Ubuntu host: install Vagrant from HashiCorp's repo $ wget -O- https://apt.releases.hashicorp.com/gpg \ | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg $ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ https://apt.releases.hashicorp.com $(lsb_release -cs) main" \ | sudo tee /etc/apt/sources.list.d/hashicorp.list $ sudo apt update && sudo apt install -y vagrant # Spin up an official Kali box $ vagrant init kalilinux/rolling $ vagrant up --provider virtualbox $ vagrant ssh
03Declare a Two-VM Lab in a VagrantfileIaC

This is the VirtualBox answer to a compose file: one text file defines an attacker and a target on the same private network. vagrant up builds both; vagrant destroy -f removes them. Put this in an empty folder as Vagrantfile.

Vagrant.configure("2") do |config| config.vm.define "attacker" do |a| a.vm.box = "kalilinux/rolling" a.vm.hostname = "kali" a.vm.network "private_network", ip: "10.10.10.5", virtualbox__intnet: "labnet" a.vm.provider "virtualbox" do |v| v.memory = 4096; v.cpus = 2 end end config.vm.define "target" do |t| t.vm.box = "ubuntu/jammy64" t.vm.hostname = "target" t.vm.network "private_network", ip: "10.10.10.20", virtualbox__intnet: "labnet" t.vm.provision "shell", inline: "apt-get update && apt-get install -y apache2" t.vm.provider "virtualbox" do |v| v.memory = 1024 end end end
$ vagrant up # build both VMs on internal net "labnet" $ vagrant status $ vagrant destroy -f # tear the whole lab down

Keep your Vagrantfiles in a git repo. Your entire lab topology becomes version-controlled and shareable — rebuild the exact same environment on a new machine with one git clone and vagrant up.

📦

05 — Method 3: Import Prebuilt Appliances & Nested Alternative

Phase 5 / 11

The fastest path for beginners is to skip OS installation entirely and import ready-made appliances. Kali ships an official prebuilt VirtualBox image; Metasploitable and many VulnHub targets are distributed as .ova / .vmdk files you import in one step.

01Import the Official Kali VirtualBox ImageOVA

Kali offers a prebuilt VirtualBox VM (7-zip archive) with tools preinstalled. Download it, extract, then import the .vbox or the OVA. This avoids the 20-minute installer entirely.

🐉
kali.org / Get Kali → Virtual Machines
Prebuilt VirtualBox 7z · default creds kali / kali · verify SHA256
OPEN →
# Import a downloaded appliance non-interactively $ VBoxManage import kali-linux-2026-virtualbox-amd64.ova \ --vsys 0 --vmname "Kali-Attacker" --cpus 2 --memory 4096 $ VBoxManage list vms
02Add Metasploitable 2 (Prebuilt VMDK)Target

Metasploitable 2 is Rapid7's intentionally vulnerable Linux VM — the classic first target. It ships as a VMDK inside a zip. Create a VM shell and attach the existing disk rather than creating a new one.

🎯
SourceForge / Metasploitable2
Official Rapid7 distribution · unzip to get Metasploitable.vmdk
OPEN →
$ VBoxManage createvm --name "Metasploitable2" --ostype Ubuntu_64 --register $ VBoxManage modifyvm "Metasploitable2" --memory 1024 --cpus 1 $ VBoxManage storagectl "Metasploitable2" --name "SATA" --add sata $ VBoxManage storageattach "Metasploitable2" --storagectl "SATA" \ --port 0 --device 0 --type hdd --medium "$HOME/vms/Metasploitable.vmdk"

Metasploitable 2 ships with the login msfadmin / msfadmin and dozens of unauthenticated services. It is a live target range in a box — give it an internal or host-only NIC only (Phase 7). Never bridge it or NAT it to the internet.

03Alternative: Run the Lab Nested on a HypervisorScale

If your laptop is out of RAM, or you are on Apple Silicon, host the lab on a dedicated box running Proxmox VE or VMware ESXi and reach it over RDP/SSH. You still export/import the same OVA appliances — the workflow barely changes.

# Export any VirtualBox VM to a portable OVA to move it to another host $ VBoxManage export "Metasploitable2" -o Metasploitable2.ova --ovf20 # On Proxmox, qemu-img converts the disk for a Proxmox VM $ qm importdisk 200 Metasploitable.vmdk local-lvm

CyberHawk has full walkthroughs for both platforms if you outgrow a laptop: the Proxmox VE 9 and VMware ESXi 8 homelab guides on the blog pick up exactly where VirtualBox leaves off.

🚀

06 — Initial Configuration: The Kali Attacker

Phase 6 / 11

Boot Kali, update it, install Guest Additions for a usable desktop, then snapshot it clean. This "golden" snapshot is the state you return to whenever an experiment leaves the box in a mess.

01First Boot & LoginKali

Prebuilt Kali images log in with kali / kali. If you installed from ISO, use the account you created. First thing after login: change the password.

┌──(kali㉿kali)-[~] └─$ passwd ┌──(kali㉿kali)-[~] └─$ ip a # note the interface + IP for later network checks
02Fully Update the SystemKali

Kali is a rolling release; update before you install anything. A stale mirror is the number-one cause of "package not found" errors for beginners.

└─$ sudo apt update && sudo apt -y full-upgrade └─$ sudo apt -y autoremove
03Install Guest AdditionsKali

Guest Additions unlock a resizable window, shared clipboard and shared folders. On Kali the packaged version is easiest; on other Linux guests, mount the Guest Additions ISO from the VirtualBox Devices menu and run the installer.

# Easiest on Kali — use the distro package └─$ sudo apt install -y virtualbox-guest-x11 && sudo reboot # Generic method (Devices → Insert Guest Additions CD image) └─$ sudo mount /dev/cdrom /mnt && sudo sh /mnt/VBoxLinuxAdditions.run

Enable a shared clipboard (bidirectional) and drag-and-drop under the VM's Settings → General → Advanced. It makes copying payloads and notes between host and Kali painless — but disable it before detonating anything untrusted.

04Take the "Golden" SnapshotSnapshot

Now that Kali is clean, updated and has Guest Additions, snapshot it. From now on you can experiment freely and roll back to this exact state in seconds.

$ VBoxManage snapshot "Kali-Attacker" take "clean-golden" \ --description "Updated Kali + Guest Additions, pre-experiment" $ VBoxManage snapshot "Kali-Attacker" list # Roll back later with: $ VBoxManage controlvm "Kali-Attacker" poweroff; \ VBoxManage snapshot "Kali-Attacker" restore "clean-golden"
🔌

07 — Core Configuration: Lab Networking (Get This Right)

Phase 7 / 11

This is the single most important phase and the one beginners get wrong. VirtualBox offers several adapter modes; for a lab you care about three. The rule: your attacker and targets must talk to each other, but the targets must never reach the internet or your real LAN.

ModeVM ↔ VMVM → InternetHost ↔ VMUse for
NAT (default)NoYesNo (port-fwd only)Updating Kali only
NAT NetworkYesYesNo (port-fwd only)Lab where Kali needs updates
Host-OnlyYesNoYesHost reaches lab; no internet
InternalYesNoNoMaximum isolation (malware)
BridgedYesYesYesAvoid for targets — exposes them to your LAN
01Create an Isolated NAT NetworkNetwork

A NAT Network lets all lab VMs talk to each other and reach the internet through the host (handy so Kali can update) while staying invisible from outside. Create it once, then attach VMs.

$ VBoxManage natnetwork add --netname LabNet \ --network "10.10.10.0/24" --enable --dhcp on $ VBoxManage natnetwork list # Attach Kali's first NIC to LabNet $ VBoxManage modifyvm "Kali-Attacker" --nic1 natnetwork --nat-network1 LabNet
02Add a Host-Only Network for ManagementNetwork

A host-only adapter gives your host machine a route into the lab (for SSH, RDP, copying loot) with no internet exposure. Create the interface, set its IP range, then attach it as a second NIC.

# Classic host-only interface (VirtualBox 7.x) $ VBoxManage hostonlyif create $ VBoxManage hostonlyif ipconfig vboxnet0 \ --ip 192.168.56.1 --netmask 255.255.255.0 $ VBoxManage modifyvm "Kali-Attacker" --nic2 hostonly --hostonlyadapter2 vboxnet0

Host-only ranges are restricted by default on Windows/macOS. Allowed ranges live in /etc/vbox/networks.conf (Linux/macOS) or %PROGRAMDATA%\VirtualBox\networks.conf (Windows). If ipconfig is refused, add your subnet there first.

03Use an Internal Network for Full IsolationNetwork

For detonating malware or running truly air-gapped targets, use an internal network: VMs on the same named intnet see each other and nothing else — not the host, not the internet. Assign static IPs inside the guests since there is no DHCP by default.

# Put a target on an isolated internal switch named "airgap" $ VBoxManage modifyvm "Metasploitable2" --nic1 intnet --intnet1 "airgap" $ VBoxManage modifyvm "Kali-Attacker" --nic3 intnet --intnet3 "airgap" # Inside the target, set a static IP (no DHCP on intnet) $ sudo ip addr add 10.20.20.10/24 dev eth0 && sudo ip link set eth0 up
04Verify Isolation Before You AttackVerify

Prove the lab is sealed. From a target VM, a ping to a public address must fail. From Kali, discovery of the lab subnet must succeed. If a target can reach 8.8.8.8, stop and fix its NIC before doing anything else.

# On the TARGET — this MUST fail (no internet) $ ping -c2 8.8.8.8 # On KALI — discover live hosts on the lab subnet └─$ nmap -sn 10.10.10.0/24
Isolation is correct when
  • Targets cannot ping or resolve any public address
  • Kali sees the targets with nmap -sn on the lab subnet
  • No lab VM uses a Bridged adapter
  • Your real router's DHCP client list shows none of the lab VMs
Reference topology: host-only for management, NAT Network for the attack range, zero route to production.
🎯

08 — Integration: Add Your Target VMs

Phase 8 / 11

A lab is only useful with things to attack. Start with one Linux target and one web-app target, then add a Windows victim to practice the attacks that dominate real enterprise breaches. The table below is a sensible starter roster and what each box teaches.

Target VMRAMTeachesDefault creds
Metasploitable 2512–1024 MBService enumeration, unauth RCE, Metasploit basicsmsfadmin / msfadmin
DVWA (Docker)host containerSQLi, XSS, CSRF, file upload, command injectionadmin / password
Windows Server (eval)4 GBSMB attacks, AD, credential theft, pivotingset at install
VulnHub box (OVA)variesFull CTF-style boot-to-root chainsper machine
01Wire Up Metasploitable 2 & Do a First ScanLinux Target

Attach Metasploitable to LabNet, boot it, find its IP, then run a service scan from Kali. Every port you see is an attack surface to research.

$ VBoxManage modifyvm "Metasploitable2" --nic1 natnetwork --nat-network1 LabNet $ VBoxManage startvm "Metasploitable2" --type headless # From Kali: find it, then enumerate services and versions └─$ nmap -sn 10.10.10.0/24 └─$ nmap -sV -p- 10.10.10.20
02Deploy DVWA (Damn Vulnerable Web App)Web Target

DVWA is the standard sandbox for web attacks — SQL injection, XSS, file upload, command injection — with tunable difficulty. The fastest install is the official Docker image on any Linux target VM.

# On a Linux target VM with Docker installed $ sudo apt update && sudo apt install -y docker.io $ sudo docker run -d --restart unless-stopped -p 80:80 --name dvwa vulnerables/web-dvwa # Browse from Kali — login admin / password, then "Create / Reset Database" └─$ firefox http://10.10.10.30/

Pair DVWA with Burp Suite (already in Kali). Set Firefox's proxy to 127.0.0.1:8080, and you can intercept, replay and fuzz every DVWA request — the exact workflow used against real web apps.

03Add a Windows Victim VMWindows Target

Most enterprise attacks land on Windows. Grab a free time-limited evaluation ISO from the Microsoft Evaluation Center (Windows Server) or the ready-made Windows 11 dev VM, install it as a normal VM, and place it on LabNet. Later, promote it to a Domain Controller to practice Active Directory attacks.

🪟
Microsoft Evaluation Center
Free 180-day Windows Server eval ISO · Windows 11 Enterprise eval
OPEN →
# Create the shell, attach the eval ISO, boot the installer $ VBoxManage createvm --name "Win-Victim" --ostype Windows2022_64 --register $ VBoxManage modifyvm "Win-Victim" --memory 4096 --cpus 2 --vram 128 \ --nic1 natnetwork --nat-network1 LabNet --clipboard-mode disabled $ VBoxManage createhd --filename "$HOME/VirtualBox VMs/Win-Victim/win.vdi" --size 61440

To practice attacks like SMB relay or a certain 2017 worm-class SMB exploit, you must disable Windows Defender and the firewall inside the lab VM and skip patches. That is exactly why the VM must be isolated — you are deliberately running a machine with its defenses off.

04End-to-End Connectivity TestVerify

Confirm the attacker can reach every target and that a full exploitation toolchain works end to end — here, a quick Metasploit handshake against the classic vsftpd backdoor on Metasploitable.

└─$ nmap -sn 10.10.10.0/24 # all targets present? └─$ msfconsole -q msf6 > use exploit/unix/ftp/vsftpd_234_backdoor msf6 > set RHOSTS 10.10.10.20 msf6 > run
🧠

09 — Advanced: Segmented, Reproducible Lab

Phase 9 / 11

Once the basics work, grow the lab to mirror a real network: multiple subnets separated by a firewall, cheap disposable clones of targets, and tuned resources so more VMs fit on the same host.

01Add a pfSense Router VM to Segment SubnetsFirewall

A pfSense VM with two NICs turns a flat lab into a routed one: a "corp" subnet behind the firewall and a "DMZ" in front, so you can practice pivoting and firewall bypass. WAN faces the NAT Network; LAN faces an internal network the corp VMs share.

# pfSense: WAN on LabNet, LAN on internal switch "corp" $ VBoxManage modifyvm "pfSense" --nic1 natnetwork --nat-network1 LabNet $ VBoxManage modifyvm "pfSense" --nic2 intnet --intnet2 "corp" # Corp targets sit only on the internal "corp" switch $ VBoxManage modifyvm "Win-Victim" --nic1 intnet --intnet1 "corp"
🔥
pfSense CE Download
Free community firewall/router ISO for the segmentation VM
OPEN →
02Clone Targets Cheaply with Linked ClonesClone

A linked clone shares the parent's disk and only stores differences — seconds to create, a fraction of the space. Perfect for spinning up five identical victims for a CTF. Take a snapshot first; linked clones branch from it.

$ VBoxManage snapshot "Win-Victim" take base --description "clone source" $ VBoxManage clonevm "Win-Victim" --snapshot base --options link \ --name "Win-Victim-02" --register # Full independent copy instead (bigger, standalone): $ VBoxManage clonevm "Win-Victim" --mode all --name "Win-Full-Copy" --register
03Tune Resources to Fit More VMsPerf

Trim memory and cores on idle targets, enable the paravirtualization interface for the guest type, and turn on nested paging. Small tweaks let an 8 GB host juggle three or four VMs.

$ VBoxManage modifyvm "Metasploitable2" --memory 640 --cpus 1 $ VBoxManage modifyvm "Win-Victim" --paravirtprovider hyperv --nestedpaging on $ VBoxManage modifyvm "Kali-Attacker" --paravirtprovider kvm # Watch host resource use while VMs run $ VBoxManage list runningvms && VBoxManage metrics query

Run targets headless (--type headless) and reach them over SSH/RDP. A GUI-less VM uses noticeably less RAM and CPU than one rendering a desktop you never look at.

04Multi-Subnet Reference ArchitectureDesign

A realistic layout for practising lateral movement: an attacker subnet, a DMZ, and an internal corp subnet behind pfSense. Each lives on its own switch; only pfSense bridges them.

SegmentSwitch / ModeSubnetHosts
AttackerNAT Network "LabNet"10.10.10.0/24Kali
DMZInternal "dmz"10.10.20.0/24DVWA, Metasploitable
CorpInternal "corp"10.10.30.0/24Win DC, Win client
EdgepfSense (3 NICs)routes allFirewall / gateway
🔧

10 — Monitoring, Maintenance & Troubleshooting

Phase 10 / 11
01Keep the Lab HealthyOps

Update Kali weekly, prune old snapshots (they consume disk and slow VMs), and export a golden appliance so a corrupted VM is a five-minute restore, not a rebuild.

# Prune snapshots you no longer need $ VBoxManage snapshot "Kali-Attacker" list $ VBoxManage snapshot "Kali-Attacker" delete "old-experiment" # Reclaim space from a dynamic disk after deleting files inside the guest $ VBoxManage modifymedium disk "$HOME/VirtualBox VMs/Kali-Attacker/Kali-Attacker.vdi" --compact # Back up the whole VM as a portable appliance $ VBoxManage export "Kali-Attacker" -o kali-golden.ova
02Common Errors & FixesTroubleshoot

The problems below account for the overwhelming majority of "my lab won't work" posts. Work top to bottom.

SymptomCauseFix
Only 32-bit guests offeredVT-x/AMD-V off, or Hyper-V owns itEnable virtualization in BIOS; bcdedit /set hypervisorlaunchtype off
VERR_VMX_ROOT / rc=-1908vboxdrv module not loadedsudo /sbin/vboxconfig; enroll MOK if Secure Boot
Extremely slow VMsWindows Core Isolation / WSL2 activeDisable Memory Integrity & Hyper-V, reboot
VMs can't see each otherUsing plain NAT (not NAT Network)Switch NICs to NAT Network or Internal
Target has internetBridged/NAT adapter on a targetMove target to Host-Only or Internal
Host-only ipconfig refusedSubnet not in allow-listAdd range to networks.conf
Blurry / tiny screenGuest Additions missingInstall Guest Additions, reboot
"Kernel driver not installed" (Win)Install blocked / older buildReinstall as admin; allow Oracle driver

Snapshots are not backups. A snapshot chain lives inside the same disk file — if that file corrupts, every snapshot goes with it. Keep a periodic VBoxManage export OVA on separate storage for anything you cannot afford to rebuild.

Your lab is complete when
  • VirtualBox + Extension Pack installed and VBoxManage --version works
  • Kali is updated, has Guest Additions, and a "clean-golden" snapshot
  • At least one Linux and one web target respond to Kali on the lab subnet
  • Every target fails to reach the internet (verified isolation)
  • You can restore any VM to a known-good state in under a minute
📚

11 — Sources & References

Phase 11 / 11

Primary, first-party documentation for every tool used in this guide. Always download tools from these official sources and verify checksums.

Oracle VirtualBox User Manual — VBoxManage, networking modes, snapshots Oracle VirtualBox — Official Downloads & Extension Pack Kali Linux — Prebuilt Virtual Machines & ISOs Kali Docs — Install Kali as a VirtualBox Guest Rapid7 — Metasploitable 2 Documentation Metasploitable 2 — Official Download (SourceForge) DVWA — Damn Vulnerable Web Application (GitHub) HashiCorp Vagrant — Documentation Netgate pfSense CE — Download Microsoft Evaluation Center — Free Windows Eval ISOs

Your lab is live — now put it to work.

With targets on the bench, the next step is running structured attacks and building the detections that catch them. Follow along with CyberHawk's hands-on guides — Nmap, Metasploit, Burp Suite, hashcat and the Active Directory home lab — on the CyberHawk blog, and test artifacts you find against the free IOC Scanner. Ready-to-run SOC playbooks live in the SOP library.

◈ Stay Connected

Follow CyberHawk Threat Intel for threat intelligence, deployment guides and hands-on SOC tooling content.

🌐 Website ▶️ YouTube ▶️ YouTube (2) 𝕏 Twitter / X ♪ TikTok ✈️ Telegram
🔍 IOC Scanner 🛠️ Live Tools 📚 Courses 🚨 Threat Intel 📝 Blog 📋 SOPs

"They can't exploit you if you are the Exploit."