Blog / security

How to Set Up a Free Security Testing Lab at Home

, 7 min read

An older laptop's webcam can become a useful, low-cost home monitoring system.
Photo: Intel Free Press, CC BY-SA 2.0 via Wikimedia Commons

Why You Need a Lab

You cannot learn cybersecurity by reading about it. You need to practice. But practicing on real systems without permission is illegal. The solution is a home lab — a controlled environment where you can legally hack, break things, and learn from your mistakes without consequences.

Everything described here is free. You do not need expensive hardware or paid software. A laptop with 8GB of RAM and a decent internet connection is enough to get started.

Setting Up Your Virtual Environment

Install VirtualBox (free, open source) on your computer. This lets you run multiple operating systems inside virtual machines without affecting your main system. Download Kali Linux — the industry-standard penetration testing distribution — and install it as a virtual machine.

Kali comes pre-installed with hundreds of security tools: Burp Suite, Nmap, Wireshark, Metasploit, John the Ripper, and more. You do not need to learn all of them. Start with the basics and expand as needed.

Vulnerable Applications to Practice On

DVWA (Damn Vulnerable Web Application) — A PHP/MySQL web application intentionally designed to be vulnerable. Perfect for learning XSS, SQL injection, CSRF, and file upload vulnerabilities. Install it inside a virtual machine and practice in a safe environment.

OWASP WebGoat — An intentionally insecure application maintained by OWASP. It teaches web security through guided lessons with built-in hints and solutions.

Juice Shop — OWASP's modern vulnerable web application. It is a full-featured e-commerce site with dozens of vulnerabilities to find. More realistic than DVWA and excellent for intermediate practice.

Metasploitable — A deliberately vulnerable Linux virtual machine. Great for practicing network-level attacks, service exploitation, and privilege escalation.

Online Platforms (No Lab Required)

If setting up virtual machines feels overwhelming, start with browser-based platforms:

  • TryHackMe — Guided, beginner-friendly rooms that teach security concepts step by step
  • Hack The Box — More challenging, with real-world-like machines to compromise
  • PortSwigger Web Security Academy — The best free web security training available, period
  • PicoCTF — Capture-the-flag challenges designed for students

A Suggested Learning Path

Week 1-2: Set up VirtualBox and Kali Linux. Complete the PortSwigger SQL injection labs. Week 3-4: Install DVWA and practice XSS and CSRF. Week 5-6: Start TryHackMe beginner rooms. Week 7-8: Attempt your first Hack The Box machine. This is not a fast process. Security fundamentals take time. But with consistent practice, you will develop real skills.

Important Rules

Only practice on systems you own or have explicit permission to test. Your home lab and the platforms listed above provide legal practice environments. Never apply these techniques to systems without authorization. The skills you develop are powerful — use them responsibly.