Build a cybersecurity home lab on an old laptop
What hardware you need, which free hypervisor to use, how to wall the lab off from your home network, and what to put inside it.
Short answer
An old laptop with 8 GB is enough. Install a free hypervisor such as VirtualBox or VMware Workstation Pro, run Kali as the attacker and Metasploitable 2 as the target, and keep targets on an internal network that can't reach your home network or the internet. Snapshot everything.
- Cost
- Free software on a laptop you already own; 16 GB of memory is comfortable
- Time
- A working lab in a first weekend
The steps
- Turn on virtualisation and install a hypervisorFree way: VirtualBox or VMware Workstation Pro, both free for personal useTime: An hour or twoDone when: VT-x, AMD-V or SVM is enabled in the BIOS and the hypervisor opens.
- Import Kali and update itFree way: Ready-made VM images from KaliTime: An hour or twoDone when: Kali boots, the default password is changed and updates are installed.
- Put Metasploitable 2 on an internal networkFree way: Rapid7's free Metasploitable 2 downloadTime: Under an hourDone when: Its only adapter is the internal network, never Bridged.
- Test the isolationFree way: A quick check from KaliTime: MinutesDone when: Kali can reach Metasploitable, and Metasploitable cannot reach the internet.
- Snapshot both machinesFree way: Built into the hypervisorTime: MinutesDone when: You can roll each VM back to a clean state in seconds.
- Run your first scan and write it upFree way: The tools already in KaliTime: An afternoonDone when: You have half a page on what you found and what each open port is.
A home lab is a few virtual machines on one computer, connected on a private network that nothing else can reach. One machine is your attacker, one or more are deliberately vulnerable targets, and later you can add something that watches and logs. Because you own every machine, you can break anything you like, as often as you like.
You don't need new hardware. A laptop that's a few years old is usually enough to start.
What the laptop needs
The specs that matter, roughly in order of importance:
- Memory (RAM). 8 GB is the workable minimum: enough for your normal system plus a small attacker and a small target running together. 16 GB is comfortable and lets you add a third machine. Memory is usually the limit you'll hit first.
- Disk. An SSD makes a big difference; virtual machines on an old spinning hard drive are painfully slow. Plan for at least 100 GB free. An attacker VM takes 20 to 40 GB, and each target takes a few more.
- Processor. Any 64-bit Intel or AMD processor from the last ten years or so, with hardware virtualisation (Intel VT-x or AMD-V). Four cores is better than two.
- Virtualisation switched on. It's often off by default. Look in the laptop's BIOS or UEFI settings for "Virtualization Technology", "VT-x", "AMD-V" or "SVM" and enable it.
Apple computers with M-series chips can run labs too, but many of the classic vulnerable targets are built for Intel and AMD processors, so an older Windows or Linux laptop is often the easier choice.
Pick a hypervisor
A hypervisor is the program that runs virtual machines. All of these are free for personal use.
VirtualBox. Free, open source, and runs on Windows, Linux and macOS (check its download page for your Mac's chip). It's the one most beginner tutorials use, which makes it easy to follow along.
VMware Workstation Pro. Free to use; check Broadcom's licence terms for your use. It's polished and handles networking well. The download comes from Broadcom's support portal and needs a free account, which is a little fiddly the first time.
Hyper-V. Built into the Pro, Enterprise and Education editions of Windows, but not Home. It works, but fewer lab guides use it, and some security images are packaged with VirtualBox and VMware in mind.
Proxmox VE. If you have a spare machine to dedicate to the lab, Proxmox is a free hypervisor that replaces the operating system and is managed from a web browser. It's a good second step once a laptop lab feels cramped.
On Windows, VirtualBox and VMware can run slowly when Windows' own virtualisation features (Hyper-V, Virtual Machine Platform, memory integrity, or similarly named features) are switched on, because they then share the processor with Windows. If your VMs crawl, that's the usual reason, and Oracle's VirtualBox manual explains which features are involved. Think carefully before turning off memory integrity on a laptop you also use for banking and email; it's a real security protection. That's one more reason a dedicated old laptop suits a lab.
Keep the lab off your real network
The targets you'll install are deliberately full of holes. Metasploitable 2, for example, is an old Linux system with dozens of known vulnerabilities, made specifically to be attacked. If you plug it straight into your home Wi-Fi, anything else on that network, including whatever malware might already be on a family member's PC, can reach it too.
So the vulnerable machines go on a private virtual network:
- Host-only network (VirtualBox and VMware): the VMs can talk to each other and to your laptop, but not to your router or the internet.
- Internal network (VirtualBox) or a custom LAN segment (VMware): the VMs can only talk to each other. This is the safest choice for targets.
A simple, safe layout: give the attacker VM two network adapters, one on NAT so it can download updates and one on the internal network with the targets. Give the targets only the internal network adapter. Never set a vulnerable target to "Bridged", which puts it directly on your home network.
The attacker machine
Pick one:
- Kali Linux. The most common choice, maintained by OffSec. The Kali website offers ready-made virtual machine images for VirtualBox and VMware, so you can skip the installer and import the image directly.
- Parrot Security. Similar tools with a slightly lighter desktop, which can help on an older laptop.
Give it 2 to 4 GB of memory and two processor cores to start. Change the default password, update it once while it has internet access, then take a snapshot.
Targets to practise on
Start with one, and add others as you go.
- Metasploitable 2. An intentionally vulnerable Linux VM from Rapid7, available as a free download. It's old and full of classic weaknesses in network services, which makes it a good first target for learning scanning and enumeration. It only needs about 512 MB of memory.
- DVWA (Damn Vulnerable Web Application). A small web application with common flaws such as SQL injection and cross-site scripting, each with adjustable difficulty. It's free on GitHub and runs on a small Linux VM or in Docker.
- OWASP Juice Shop. A modern, deliberately insecure web shop maintained by OWASP, with a built-in scoreboard of challenges from beginner to very hard. It runs easily in Docker or Node.js.
Run web targets like DVWA and Juice Shop inside a Linux VM on the internal network, rather than directly on your laptop, so they stay as isolated as everything else.
Add a defender's view
Attacking machines teaches you half the picture. The other half, and the half most entry-level jobs are about, is seeing an attack from the defender's side.
- Wazuh. A free, open-source security monitoring platform. You install the server on one VM and small agents on your targets, and it collects logs and raises alerts. Run a scan from Kali and see what shows up. The Wazuh server needs a lot of memory on its own (check its documentation for the current minimum), which usually means a 16 GB laptop or a second machine.
- Security Onion. A fuller network security monitoring platform with packet capture, intrusion detection and dashboards. It's heavier and needs a lot of memory (check its documentation for current minimums), so it suits a Proxmox box or a desktop better than an old laptop.
Writing up one alert from start to finish, what triggered it, what you looked at and what you concluded, is exactly the kind of portfolio piece that helps for SOC analyst jobs.
Snapshots are your undo button
A snapshot saves the exact state of a VM so you can return to it in seconds. Take one:
- right after each VM is installed and working,
- before you try anything you're unsure about,
- before installing updates or new tools.
Targets will break as you attack them. That's the point. Roll them back to a clean snapshot and try again. Snapshots take disk space, so delete old ones you no longer need.
Once the steps above work, you have a lab. Everything after that is adding one machine or one tool at a time. When you want targets someone else built and keeps fresh, TryHackMe vs Hack The Box compares the two main platforms.
Questions people ask
How much RAM do I need for a cybersecurity home lab?
8 GB is the workable minimum for a small attacker and a small target running together. 16 GB is comfortable and lets you add a third machine. Wazuh and Security Onion both need a lot of memory; check their documentation for current minimums.
Is it legal to hack my own home lab?
Yes. You own every machine involved, so you can break anything as often as you like. The tools you learn must stay pointed at the lab. Scanning or attacking your neighbour's Wi-Fi, your school's network or a website you don't own is illegal.
Is VMware Workstation Pro free?
Yes, VMware Workstation Pro is free to use; check Broadcom's licence terms for your use. The download comes from Broadcom's support portal and needs a free account. VirtualBox is also free and is the one most tutorials use.
Can I build a home lab on a Mac?
Apple computers with M-series chips can run labs, but many classic vulnerable targets are built for Intel and AMD processors. An older Windows or Linux laptop is often the easier choice.
Why are my virtual machines so slow on Windows?
VirtualBox and VMware can crawl when Windows' own virtualisation features, such as Hyper-V, Virtual Machine Platform, memory integrity or similarly named features, are switched on. An old spinning hard drive also slows VMs badly; an SSD helps. Think carefully before turning off memory integrity on a laptop you use for banking.