Home
Cybersecurity & AI Security / Part 5 — Setting Up Your Security Lab

Setting Up Your Security Lab

CAP, ACID vs BASE, latency numbers, back-of-envelope estimation, single points of failure — the vocabulary every system designer thinks in.


Core Philosophy: You cannot learn to attack systems by attacking real ones — that is a crime, full stop. You also cannot learn by only reading. The answer, used by every professional, is a personal lab: deliberately vulnerable machines you fully own, sealed inside an isolated network where nothing you do can escape or cause harm. This lab is the single most important thing you build in Phase 0. Every later hands-on lab runs inside it.

Part 1: The Problem

The rest of this curriculum is full of instructions like “exploit this,” “escalate privileges,” “intercept this traffic.” You need somewhere to do that which is:

That place is a virtual lab. This section builds it.

Part 2: The Concept — Virtual Machines

A virtual machine (VM) is a complete computer that runs as software inside your real computer. It has its own virtual disk, memory, and network card. To the software inside it, it looks like a real, separate PC.

The program that runs VMs is a hypervisor. Common free ones: VirtualBox (free, all platforms) and VMware Workstation Player.

Why VMs are perfect for security learning:

text
        YOUR REAL COMPUTER (the "host")
   ┌──────────────────────────────────────┐
   │  Hypervisor (VirtualBox)             │
   │   ┌──────────────┐  ┌──────────────┐ │
   │   │  VM: Kali    │  │  VM: victim  │ │
   │   │  (attacker)  │  │  (target)    │ │
   │   └──────────────┘  └──────────────┘ │
   │   isolated lab network between them  │
   └──────────────────────────────────────┘

Part 3: The Two Machines You Need

A lab is, at minimum, two VMs:

1. The attacker machine — Kali Linux.Kali Linux is a free Linux distribution built for security work. It comes with hundreds of tools pre-installed — Nmap, Burp Suite, Metasploit, and most of what this curriculum uses. Using Kali means you don’t install tools one by one. (Parrot OS is a fine alternative; either works.)

2. The victim machine — a deliberately vulnerable target. This is a VM intentionally built to be broken into, for training. Well-known free ones include Metasploitable (a deliberately vulnerable Linux server) and various beginner-friendly vulnerable VMs from training sites. You attack these.

🔑 The golden rule of the lab: You attack the victim VM. You attack machines on hosted training platforms that explicitly invite it. You attack nothing else, ever. The lab exists precisely so that “what may I attack?” always has a clear, safe answer.

Part 4: The Critical Setting — Isolated Networking

This is the part you must not get wrong. When you create the VMs, the hypervisor asks how they should connect to networks. The options matter:

Networking mode What it does Use it?
Host-only / InternalVMs can talk to each other but not to the internet or your home network.✅ Yes — this is your safe lab network.
NATThe VM can reach the internet but is isolated from your other devices.⚠️ Only temporarily, to download updates/tools.
BridgedThe VM appears as a full device on your real home network.❌ Avoid for victim machines — it exposes them.

Set your attacker and victim VMs to a host-only / internal network so they can see each other but nothing else. A deliberately vulnerable machine on a bridged network is a genuine hazard — it’s a broken computer exposed to your whole home. The isolated network is the wall around your lab.

text
   ✅ SAFE LAB                  ❌ DANGEROUS
   ┌─────────────────┐         Kali ── home network ── internet
   │ Kali ─── victim │              victim ──┘
   │  (isolated net) │         a vulnerable VM exposed
   └─────────────────┘         to everything
   nothing leaks in or out

Part 5: Snapshots — Your Undo Button

A snapshot saves the complete state of a VM at a moment in time. Later, you “restore” the snapshot and the VM returns exactly to that state — every file, every setting.

Why this transforms your learning:

Habit to build now: snapshot a VM before anything risky, and keep a permanent “clean baseline” snapshot you never overwrite. This is the same habit the On-Prem module taught — and it matters even more here, because security labs deliberately break things.

Part 6: Hosted Lab Platforms — The Other Half of Practice

Your local lab is yours forever and works offline. Alongside it, hosted hacking-practice platforms give you a constantly refreshed supply of legal targets:

This curriculum’s labs use a mix: your local VM lab for things you want to own and break repeatedly, and hosted platforms for breadth and structured challenges. Both are 100% legal because the targets exist to be attacked. Section 3.7 builds this into an ongoing practice habit.

📓 Key Terms

Term Plain meaning
Virtual machine (VM)A full computer running as software inside your real one.
HypervisorThe program that runs VMs (e.g. VirtualBox).
HostYour real, physical computer.
GuestA VM running on the host.
Kali LinuxA Linux distro preloaded with security tools — the attacker VM.
Vulnerable VMA machine built intentionally insecure, for training.
Host-only / internal networkA network that connects VMs to each other but not outside.
SnapshotA saved VM state you can instantly restore.
Hosted lab platformAn online service offering legal, sanctioned hacking targets.

🧪 Hands-On Lab — Build Your Lab

This is the deliverable of section 0.5. Take your time; you’ll use this lab for months.

Task 1 — Install a hypervisor. Download and install VirtualBox (free, virtualbox.org). It runs on Windows, Mac, and Linux.

Task 2 — Create the attacker VM. Download the Kali Linux image (kali.org — it offers ready-made VirtualBox images that import in a couple of clicks). Import it. Boot it. Log in. You now have a fully equipped attacker machine.

Task 3 — Create the victim VM. Download a deliberately vulnerable VM (Metasploitable is the classic starting point). Import it into VirtualBox. Do not expose it — see Task 4.

Task 4 — Lock the network down. (The most important task.) In VirtualBox, set both VMs’ network adapters to Host-only or Internal Network, the same network for both. Verify: from Kali, you should be able to ping the victim VM; from the victim, you should not be able to reach the internet. That confirms the wall is up.

Task 5 — Snapshot both VMs while clean. With both VMs freshly set up, take a snapshot of each and label it clearly, e.g. CLEAN-BASELINE. Never overwrite this one. It’s your permanent reset point.

Task 6 — Do a first, gentle attack-surface scan. From Kali, find the victim’s IP (ip addr), then run nmap -sV <victim-ip>. You’ll see the victim’s open ports and services — its attack surface. You won’t exploit anything yet; you’re confirming the two machines can see each other and the lab works. Phase 2 and 3 take it from here.

Task 7 — Create an account on one hosted practice platform. Sign up for a beginner-friendly hacking-practice platform and start its introductory path. This gives you legal targets beyond your local lab.

⚠️ Common Mistakes

✅ Recap & What’s Next

Next (0.6): Tools cover most of the work, but not all of it. The final foundation is light scripting — using Python to automate, customize, and understand security tasks that no off-the-shelf tool quite handles.

⁂ Back to all modules