Homelab · Personal Project

VirtualBox
Cybersecurity Lab

📅 2024–2025 🔧 VirtualBox · Kali Linux · Ubuntu · Windows 10 🏷 Homelab

Built an isolated multi-VM cybersecurity homelab from scratch using VirtualBox — a safe, air-gapped environment to practise SOC workflows, network reconnaissance, exploitation, log analysis, and host hardening without risk to production systems.

VirtualBox Kali Linux Ubuntu Server Windows 10 Host-only Networking Homelab SOC Workflows Log Analysis
View on GitHub ← Back to projects

Lab Setup

Three VMs communicate over a host-only network adapter (192.168.56.0/24) — isolated from the host machine's internet connection. A NAT adapter on Kali gives controlled internet access for tool updates only.

Kali Linux 2024.1
Attacker / Analyst
RAM: 4 GB
CPU: 2 vCPU
Disk: 50 GB
Net: Host-only + NAT
Ubuntu Server 22.04
Target / SIEM Host
RAM: 2 GB
CPU: 2 vCPU
Disk: 30 GB
Net: Host-only
Windows 10 Pro
Endpoint / SOC Client
RAM: 4 GB
CPU: 2 vCPU
Disk: 60 GB
Net: Host-only
  HOST MACHINE (Windows 11)
  └── VirtualBox
       │
       ├── [Kali Linux]──────────────────────────────────────────┐
       │    192.168.56.101                                        │
       │                          HOST-ONLY NETWORK              │
       ├── [Ubuntu Server]   ◄──  192.168.56.0/24  ──►          │
       │    192.168.56.102                                        │
       │                                                          │
       └── [Windows 10]──────────────────────────────────────────┘
            192.168.56.103

  Tools on Kali: nmap, metasploit, hydra, nikto, wireshark, burpsuite
  Tools on Ubuntu: apache2, ssh, fail2ban, auditd, wazuh-agent
  Tools on Windows: Sysmon, winlogbeat, Wireshark

Build Process

  1. 1
    Installed VirtualBox 7.0 on host. Created host-only network adapter at 192.168.56.0/24 with DHCP disabled — static IPs assigned per VM for predictable addressing.
  2. 2
    Installed Kali Linux from ISO. Updated repos, installed full toolset (kali-linux-everything). Configured SSH keys for passwordless access to Ubuntu target.
  3. 3
    Built Ubuntu Server target: installed Apache2, OpenSSH, MySQL, and a deliberately vulnerable web app (DVWA) for exploitation practice. Enabled auditd and configured logging to /var/log/audit.
  4. 4
    Set up Windows 10 endpoint with Sysmon (SwiftOnSecurity config) for rich event logging. Installed Winlogbeat to ship logs to Ubuntu Wazuh instance.
  5. 5
    Deployed Wazuh on Ubuntu as SIEM — agent on all three VMs, manager on Ubuntu. Custom rules for SSH brute-force, privilege escalation, and web attacks.

What I Practised

Reconnaissance Ran nmap service/version scans against Ubuntu target. Identified open ports (22, 80, 3306), service versions, OS fingerprinting. Built a mental target profile before any exploitation.
Exploitation (Controlled) Exploited DVWA SQL injection and XSS vulnerabilities manually. Used Hydra for SSH brute-force against a test user account with a weak password to observe detection in Wazuh.
SOC / Blue Team Monitored Wazuh alerts in real time during attacks. Correlated events across agents. Wrote MITRE ATT&CK mappings for detected activity (T1046 — Network Service Scanning, T1110 — Brute Force).
Log Analysis Parsed Apache access logs with awk/grep/python to extract request patterns. Identified indicators of scanning (high 404 rate, User-Agent anomalies). Produced a timeline of the attack.
Host Hardening Applied CIS Benchmark Level 1 controls to Ubuntu: disabled root SSH, configured fail2ban, set up UFW rules, audited SUID binaries, removed unnecessary packages. Re-tested attack surface before and after.

Sample Commands

# Kali — initial host discovery
┌──(kali@kali)-[~]
└─$ nmap -sn 192.168.56.0/24
Starting Nmap 7.94 ( https://nmap.org )
Host: 192.168.56.102 () Status: Up
Host: 192.168.56.103 () Status: Up
Nmap done: 256 IP addresses, 2 hosts up

# Service version scan on Ubuntu target
└─$ nmap -sV -sC -p- 192.168.56.102
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu
80/tcp open  http    Apache httpd 2.4.52
3306/tcp open mysql  MySQL 8.0.35

# Brute-force SSH to trigger Wazuh alert
└─$ hydra -l testuser -P /usr/share/wordlists/rockyou.txt ssh://192.168.56.102
# Ubuntu — check Wazuh alerts after attack
sagar@ubuntu:~$ sudo tail -f /var/ossec/logs/alerts/alerts.json | python3 -m json.tool
{
  "rule": {
    "id": "5710",
    "description": "Multiple SSH login failures.",
    "level": 10,
    "mitre": {"id": ["T1110"]}
  },
  "agent": {"name": "kali"},
  "srcip": "192.168.56.101"
}

Skills Gained

This homelab is the foundation for all other projects — a safe sandbox to try anything. Key takeaways: