Post

Cybersecurity Lab

Updated cybersecurity lab

Cybersecurity Lab

Summary

This homelab simulates a segmented enterprise network consisting of production services, Active Directory infrastructure, dedicated security tooling, and a DMZ. The goal of this lab is to:

  • Practice network segmentation and firewall rule design
  • Simulate red team and blue team activity
  • Test detection and logging with Wazuh and Security Onion
  • Perform vulnerability management with OpenVAS
  • Harden services and analyze attack telemetry

Hardware & Virtualization Layer

Hardware Specs

My entire lab is hosted locally.

CPU: i7-14700K (20 cores, 28 logical processors)

RAM: 64 GB

Storage: 2 TB SSD

I would recommend similar specs if you plan on creating a lab like this one. See the Virtual Machines Overview table for the total hardware utilization.

Virtualization Platform

I switched from VirtualBox to VMware Workstation because I found that VMware has faster VM boot times and it is easier to set up virtual networks compared to VirtualBox.

Link: https://www.vmware.com/products/desktop-hypervisor/workstation-and-fusion

Network Architecture

Logical Topology

image.png Last updated: 2/24/26, after completing the data exfiltration exercise (Added an SO sensor to the AD network)

Network Architecture Overview

In my setup, the main networks are the home network (192.168.1.0/24) and the internal network (10.10.0.0/16). The internal network encompasses all 4 virtual networks.

OPNsense acts as the central routing and segmentation enforcement point. OPNsense is essentially the bridge between different internal networks, as well as internal networks and the home network. Internal networks reach the Internet the same way as devices on the home network: through the router (192.168.1.1). So if OPNsense is offline, internal networks cannot communicate with each other, with the home network, or the Internet.

Internal networks are essentially behind 2 layers of firewalls.

NetworkCIDRPurposeVMs
Home (WAN)192.168.1.0/24Untrusted external networkOPNsense, Kali
Prod10.10.1.0/24Production / Web‑app microservicesMySQL, RabbitMQ, Data Processor
Active Directory (AD)10.10.2.0/24Active Directory domainDC01, CLIENT1‑BOB
Security/Admin (SOC)10.10.3.0/24Security & admin toolsWazuh, Security Onion, OpenVAS, Ubuntu Desktop
DMZ10.10.4.0/24Public-facing serversWebServer

Virtual Machines Overview

VM NameOSNetwork AdaptersKey Role(s)IP Address(es)ProcessorsRAM (GB)Storage (GB)Wazuh Agent Installed
OPNsenseFreeBSDWAN, Prod, AD, SOC, DMZRouting, segmentation, port forwarding for WebServer192.168.1.167, 10.10.1.1, 10.10.2.1, 10.10.3.1, 10.10.4.12420No
WebServerUbuntu Server 24.04DMZPublic-facing web app10.10.4.101225Yes
MySQLUbuntu Server 24.04ProdDatabase10.10.1.101225Yes
RabbitMQUbuntu Server 24.04ProdMessage broker10.10.1.201225Yes
Data ProcessorUbuntu Server 24.04ProdData‑processing/API service10.10.1.301220Yes
DC01Windows Server 2025ADDomain controller10.10.2.102460Yes
CLIENT1‑BOBWindows 11 EnterpriseADAD client10.10.2.212464Yes
UbuntuUbuntu Desktop 24.04SOCSysadmin workstation & blue teamer10.10.3.112425Yes
WazuhAmazon Linux 2023SOCHost-based SIEM/XDR10.10.3.24850No
Security OnionOracle Linux 9SOC, AD, DMZNetwork-based SIEM and IDS/IPS, monitoring AD and DMZ networks10.10.3.3816200No
OpenVASUbuntu Server 24.04SOCVulnerability scanning10.10.4.448150Yes
Kali LinuxKali Linux 2025.4WANRed teamer/external attacker192.168.1.1681250No

WAN is synonymous with the home network. WAN means that the adapter is set to Bridged. This means that VMs are treated like actual devices on the home network, getting an IP address via DHCP from the home router.

Security Onion does not get an IP address for the AD and DMZ networks. It is strictly there to monitor traffic on those interfaces.

Total Processors: 29

Total RAM: 58 GB

Total Storage: 714 GB

With my hardware, I can run all VMs at the same time without any issue, however it is not necessary most of the time.

Security Stack

  • Wazuh (v4.14.2)
    • Host visibility wherever the agents are installed
    • Primary SIEM for host-based telemetry
      • Sysmon for Windows-based endpoints, syslog for Linux-based endpoints
    • XDR capabilities with Active Response
    • File integrity monitoring
  • Security Onion (v2.4.200)
    • Network visibility for all interfaces
    • Primary SIEM for network-based telemetry
      • Firewall logs, NetFlow logs, Zeek
    • Packet capturing and monitoring for the AD and DMZ networks
  • OpenVAS
    • Deployed via Docker
    • Vulnerability scanning
    • Compliance scanning

Web Application Stack

The application is a simulated crypto exchange utilizing a microservice architecture. See Systems Integration for more information. I am only deploying 1 cluster due to the sheer amount of VMs I already have in this lab.

  • Web Server (DMZ)
    • Apache2
    • HTML/CSS/JavaScript frontend
    • PHP backend
    • Exposed to the WAN via port forwarding
    • Backend services - should theoretically be completely isolated from the WAN and have strict firewall rules
      • MySQL (Prod)
      • RabbitMQ (Prod)
      • Data Processor (Prod)
        • API worker in PHP

Lab Setup

Most of these are not full-fledged tutorials, as the setup process for some of the components are very similar to the previous lab. I have provided links when necessary.

Attack Simulations

Attack and incident response scenarios.

Remediation/ Lab Updates

Addressing any weaknesses/vulnerabilities identified from previous attack scenarios.

Extras

Active Directory and Wazuh exercises recycled from my previous lab.

This post is licensed under CC BY 4.0 by the author.