Why I Created a Cybersecurity Lab
I wanted to learn ethical hacking and penetration testing — but safely. I didn’t want to mess up my real home network or open it to actual hackers. That’s why I built a **private virtual hacking lab** right inside my laptop using: -> Kali Linux (for hacking) -> VulnHub machines (to hack) -> VirtualBox (to run both machines safely)What You’ll Need
-> A laptop or PC with at least **16GB RAM** (important for running two VMs smoothly) -> **VirtualBox** installed (free) -> **Kali Linux** virtual machine -> A vulnerable machine (I used the Mr. Robot VM from VulnHub)Step 1: Install VirtualBox
Go to the official VirtualBox website and download it for your OS (Windows, Linux, or macOS). Also install the Extension Pack. 👉 Download VirtualBox Once installed, we’ll use this to run our hacking machine and the vulnerable machine side-by-side.Step 2: Download Kali Linux and Mr. Robot VM
You’ll need two machines: ✅ Kali Linux – The attacker (comes with all hacking tools) ✅ Mr. Robot VM – The target (intentionally vulnerable) 👉 Download Kali for VirtualBox 👉 Download Mr. Robot from VulnHub These are `.ova` files – easy to import into VirtualBox.Step 3: Import the Machines into VirtualBox
Open VirtualBox and: -> Click **File → Import Appliance** -> Select the Kali `.ova` file -> Do the same for the Mr. Robot `.ova` file -> Rename the machines to something cooler if you want 😉 Do not start the VMs yet.Step 4: Create an Isolated Internal Network
To keep everything secure, we’ll isolate these VMs from your real network. -> Go to **Settings → Network** for both VMs -> Change “Attached to” from NAT to **Internal Network** -> Set network name to something like: `labnet` Now both machines can talk to each other — but not your real network. Super safe!Step 5: Add a DHCP Server
Internal networks don’t automatically assign IPs, so we’ll create a DHCP server using VirtualBox command line: Open CMD as Admin and run this:
VBoxManage dhcpserver add --network=labnet --server-ip=10.10.10.1 --lower-ip=10.10.10.100 --upper-ip=10.10.10.120 --netmask=255.255.255.0 --enable
Step 6: Boot and Verify
1. Start Kali Linux 2. Log in: → username: `kali` → password: `kali` 3. Open Terminal and run:ip a
4. You should see something like:
10.10.10.100
Now start Mr. Robot and let it boot in the background.
Step 7: Find and Scan the Vulnerable Machine
Back in Kali Terminal, use `nmap` to scan the internal range:sudo nmap -sS -T4 10.10.10.100-120
This will find the Mr. Robot VM. Look for open ports like 80 (web server), 443 (HTTPS), and 22 (SSH).
Step 8: Start Hacking (Ethically!)
Now open a browser in Kali and go to:http://10.10.10.101
(or whatever IP was assigned)
You’ll see the Mr. Robot themed vulnerable web server — now use your tools like:
-> Nikto
-> Gobuster
-> SQLmap
-> Burp Suite
To enumerate, exploit, and find the hidden flags (it’s a CTF-style machine).
🔗 Related: My Raspberry Pi Cloud Server Guide – Host your own private file server with full security.
Comments