Cybersecurity Hands-on Laboratory: 40+ Practical Security Exercises

Theoretical knowledge alone does not make a cybersecurity engineer. Real competence is forged by configuring firewalls, capturing live packets on network interfaces, safely dissecting malware, and exploiting deliberately vulnerable web applications. Below are 40+ structured hands-on laboratory exercises divided across eight core operational domains for university students and ethical hackers.

Domain 1: Network Reconnaissance & Packet Analysis Labs (Labs 1 - 6)

Lab 1: Comprehensive Nmap Service Audit

Deploy a local Ubuntu VM. From a Kali Linux VM, execute a stealth SYN scan discovering open ports, service versions, and OS detection. Export findings to XML and HTML reports.

sudo nmap -sS -sV -sC -O -oA lab1_scan 192.168.1.50

Lab 2: Wireshark Cleartext Credential Extraction

Run Wireshark on a virtual adapter. Log into an unencrypted HTTP demo portal. Use display filters to locate the POST request and extract the cleartext username and password.

http.request.method == "POST" && frame contains "password"

Lab 3: ARP Spoofing & MitM Simulation

Using arpspoof or ettercap in an isolated virtual network, simulate ARP cache poisoning between two virtual machines and verify the poisoned ARP cache table.

sudo arpspoof -i eth0 -t 192.168.1.100 192.168.1.1

Lab 4: Snort Custom Intrusion Rule Creation

Write a custom Snort rule in /etc/snort/rules/local.rules that triggers an alert whenever a client sends an ICMP Echo Request (Ping) larger than 500 bytes.

alert icmp any any -> any any (msg:"Ping of Death Probe"; dsize:>500; sid:1000005; rev:1;)

Domain 2: Web Application Penetration Testing (Labs 7 - 16)

Deploying the DVWA Vulnerable Training Lab with Docker

Run Damn Vulnerable Web Application (DVWA) locally in a single command:

docker run --rm -it -p 80:80 vulnerables/web-dvwa
  • Lab 7 (SQLi): Bypass the DVWA login form at 'Low' security using admin' OR '1'='1' #.
  • Lab 8 (UNION SQLi): Extract all table names and password hashes from information_schema.
  • Lab 9 (Stored XSS): Inject a persistent payload into the Guestbook that steals document.cookie.
  • Lab 10 (CSRF): Build a third-party HTML page that silently changes the victim's password upon page load.
  • Lab 11 (File Upload RCE): Upload a minimal PHP web shell by bypassing client-side extension validation, and read /etc/passwd.
  • Lab 12 (Command Injection): Exploit the ping utility using pipe separators: 127.0.0.1 | whoami.

Domain 3: Applied Cryptography & PKI Labs (Labs 17 - 24)

  • Lab 17: Encrypt and decrypt a confidential document using OpenSSL AES-256-CBC and compare with AES-256-GCM.
  • Lab 18: Generate a 4096-bit RSA key pair, extract the public key, and encrypt a file using openssl rsautl.
  • Lab 19: Compute SHA-256 checksums of ISO images and verify file integrity against published hashes.
  • Lab 20: Create an internal private Root Certificate Authority (Root CA) and sign an SSL certificate for an Apache virtual host.
  • Lab 21: Benchmark hash cracking speeds with Hashcat across MD5 vs SHA-256 vs bcrypt using rockyou.txt wordlist.
  • Lab 22: Inspect an active domain's TLS handshake and cipher suite support using testssl.sh.

Domain 4: DevSecOps & System Hardening Labs (Labs 25 - 34)

  • Lab 25: Write pre-commit Git hooks with gitleaks to automatically reject commits containing AWS access keys.
  • Lab 26: Configure a Semgrep SAST scanning pipeline inside a local GitHub repository.
  • Lab 27: Harden an insecure Node.js Dockerfile, migrate it to a Google Distroless base image, and verify non-root execution.
  • Lab 28: Scan a production Docker image using trivy image and remediate all Critical CVEs.
  • Lab 29: Configure Linux iptables firewall rules to drop all incoming packets except established SSH and HTTPS.
  • Lab 30: Enforce strict SSH daemon hardening: disable root login, change port, and mandate Ed25519 public key auth.

Domain 5: Privilege Escalation & Forensics Labs (Labs 35 - 42)

  • Lab 35: Run LinPEAS on a deliberately misconfigured Linux VM and identify exploitable SUID binaries.
  • Lab 36: Exploit a writable /etc/passwd file to add a new superuser account with UID 0.
  • Lab 37: Dump Windows physical RAM on a virtual machine using FTK Imager Lite.
  • Lab 38: Analyze a memory dump using Volatility 3 to list hidden running processes (windows.pslist) and network connections.
  • Lab 39: Extract browser history and deleted sqlite files from a seized disk image using Autopsy.
  • Lab 40: Perform live triage on a simulated ransomware-infected Linux server: identify the encrypting PID and isolate the host.

Frequently Asked Questions (FAQ) - Student & Interview Review

Q1. What hardware specifications are recommended for running a cybersecurity lab?

A modern 64-bit computer with at least 16 GB of RAM, a multi-core processor (Intel i5/i7 or AMD Ryzen 5/7), and 100 GB of free SSD storage is recommended to run Kali Linux and vulnerable VMs simultaneously in VirtualBox or VMware.

Q2. Where can I practice legal ethical hacking challenges online?

Excellent authorized platforms include TryHackMe (beginner-friendly structured rooms), Hack The Box (intermediate-to-advanced penetration testing labs), PortSwigger Web Security Academy (the gold standard for free web application testing), and OverTheWire (Linux command-line security).

Explore Related Cybersecurity Tutorials & Next Steps

Broaden your defensive and offensive security knowledge across our curriculum:

120+ Cybersecurity Interview Q&A

Test the conceptual knowledge gained while completing these 40+ practical labs.

BCA & University Viva Voce Guide

Prepare for academic lab viva examinations on Nmap, Wireshark, and DVWA.

Real-World Cyber Attack Scenarios

Step-by-step incident response drills simulating real-world security breaches.

Cybersecurity Master Cheat Sheet

Keep all essential command-line tools and syntax at your fingertips while practicing.

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Reddit

You may also like this!