boup.
FR EN

Setting up a Cyber Range with Ludus, GOAD and Wazuh

6 min readHomelabLinuxCybersécuritéOutils
Contents

Context

I needed a cyber lab or “cyber range” at home to practice Active Directory attack scenarios and test custom tooling. Ludus fits this need perfectly and supports several hypervisors, including Proxmox. This article covers installing Ludus on a Proxmox server, deploying a GOAD (Game Of Active Directory) lab, then adding the Wazuh extension for detection.

I did not set this lab up on my existing Proxmox homelab. I preferred to rent a dedicated server because Ludus manages the hypervisor directly. I wanted to keep it separate from my homelab, which runs some important services and is my personal “production” environment. The Ludus documentation also recommends starting from a clean machine installed with Debian 12, not Proxmox.

If, like me, you don’t have a spare machine for the lab, get a dedicated server. To keep the cost down I went with Kimsufi, OVH’s low-cost brand. The KS-4 configuration (Intel Xeon-E3, 32GB DDR4, 450GB SSD) was more than enough for my needs at €25/month including VAT.

Installation

Starting from Debian 12 is important. According to the documentation it is still possible from Proxmox 8, but it recommends starting from scratch with Debian 12.
I tried with Proxmox 9 but ran into network problems after installing Ludus, for example no DHCP for the lab VMs.

https://docs.ludus.cloud/docs/quick-start/install-ludus/

text
apt update && apt install curl sudo git ca-certificates python3-debian
text
curl -s https://ludus.cloud/install | bash

All the default options are fine, and the local IP can be the same as the public IP without any problem.

Configuring the Proxmox firewall

Accessing the Proxmox web console via an SSH port forward

bash
ssh -L 8006:127.0.0.1:8006 ovhdedie

In the SSH session, change the root password: passwd root
Then open the Proxmox console in your browser at https://localhost:8006 and log in as root.

  1. Enable the firewall at the “Datacenter” level without configuring any rules Firewall configuration at the datacenter level

  2. Configure the rules on the ludus host, which is our Proxmox hypervisor Rules configuration on the ludus host

  3. Configure the following rules to allow only Wireguard and SSH SSH and Wireguard rules configuration

Important

Never expose the Proxmox administration interface (port 8006) to the internet. You can restrict access further by opening ports only for your source IP. Be careful: if your IP is dynamic, you could lock yourself out.

It’s better to leave ping enabled so that OVH doesn’t intervene on the machine because it no longer responds to ping. Trust me, I speak from experience :)

If you choose to block it, you need to disable proactive interventions in the OVH console. Otherwise the technicians will reboot the server into rescue mode as soon as it stops responding to ping.

Finally, check that the SSH service does not accept password authentication, only public key authentication.

The Wireguard server is installed by Ludus and lets you connect to the lab machines and the various LANs through the VPN. It is configured with the Ludus CLI.

Configuration

Creating a user

https://docs.ludus.cloud/docs/quick-start/create-a-user

Wait for the Ludus installation to finish so you can retrieve the ROOT API key.

text
root@ludus:~$ ludus-install-status
Ludus install completed successfully
Root API key: ROOT.<>

Create a user, here admin:

text
export LUDUS_API_KEY='ROOT.<>'
ludus user add --name "admin" --userid admin --admin --url https://127.0.0.1:8081

export LUDUS_API_KEY='admin.<>'

Retrieve the user’s Proxmox creds: ludus user creds get

Retrieve the user’s Wireguard configuration: ludus user wireguard

GOAD (Game of Active Directory)

GOAD is a pentest active directory LAB project. The purpose of this lab is to give pentesters a vulnerable Active directory environment ready to use to practice usual attack techniques.

Link to the official repository: https://github.com/Orange-Cyberdefense/GOAD

Ludus offers packaged, preconfigured environments that are very useful for a cyber range. Documentation for the GOAD environment: https://docs.ludus.cloud/docs/environment-guides/goad

Installing GOAD

Retrieving the VM templates

text
export LUDUS_API_KEY='admin.<>'
git clone https://gitlab.com/badsectorlabs/ludus
cd ludus/templates
ludus templates add -d win2016-server-x64

ludus templates add -d win2019-server-x64
ludus templates build

The build takes a while. If it is stuck on a VM for too long, there is most likely a network problem. This is where I hit the Proxmox 9 problem mentioned in the introduction: the firewall configured by Ludus was blocking DHCP.
After reinstalling the machine following the Ludus documentation’s recommendations, building the templates took about 45 minutes.

To follow the build progress and logs:

text
ludus templates logs -f

At the end of the build:

text
root@ludus:~/ludus/templates# ludus templates list

+------------------------------------+-------+
|              TEMPLATE              | BUILT |
+------------------------------------+-------+
| debian-11-x64-server-template      | TRUE  |
| debian-12-x64-server-template      | TRUE  |
| kali-x64-desktop-template          | TRUE  |
| win11-22h2-x64-enterprise-template | TRUE  |
| win2022-server-x64-template        | TRUE  |
| win2016-server-x64-template        | TRUE  |
| win2019-server-x64-template        | TRUE  |
+------------------------------------+-------+

Deploying GOAD

text
git clone https://github.com/Orange-Cyberdefense/GOAD.git
cd GOAD
sudo apt install python3.11-venv
export LUDUS_API_KEY='myapikey'  # put your Ludus admin api key here
./goad.sh -p ludus
GOAD/ludus/local > check
GOAD/ludus/local > set_lab GOAD # GOAD/GOAD-Light/NHA/SCCM
GOAD/ludus/local > install

And now be patient, as the documentation says:

Now you wait.
[WARNING] lines are ok, and some steps may take a long time, don’t panic!
This will take a few hours. You’ll know it is done when you see: [*] Lab successfully provisioned in XX:YY:ZZ

Adding Wazuh

Wazuh is an open source SIEM that lets you test detection rules and search through your lab’s logs. It is built on Elastic but is security-oriented. Documentation for adding the Wazuh extension to the GOAD lab: https://orange-cyberdefense.github.io/GOAD/extensions/wazuh/

text
cd ~/ludus/templates
ludus templates add -d ubuntu-22.04-x64-server
ludus templates build
ludus templates logs -f

root@ludus:~/ludus/templates# ludus templates list

+------------------------------------+-------+
|              TEMPLATE              | BUILT |
+------------------------------------+-------+
| debian-11-x64-server-template      | TRUE  |
| debian-12-x64-server-template      | TRUE  |
| kali-x64-desktop-template          | TRUE  |
| win11-22h2-x64-enterprise-template | TRUE  |
| win2022-server-x64-template        | TRUE  |
| ubuntu-22.04-x64-server-template   | TRUE  |
| win2016-server-x64-template        | TRUE  |
| win2019-server-x64-template        | TRUE  |
+------------------------------------+-------+

Wait for the GOAD installation to finish, then:

text
screen # to keep the command running even if the SSH session drops
cd GOAD
./goad.sh -p ludus
GOAD/ludus/local > load <instance_id>
GOAD/ludus/local > install_extension wazuh

Windows 11 VM and OPNsense

Once GOAD and Wazuh were in place, I added a Windows 11 VM to have a user workstation as a target, and a firewall to control what leaves the lab for the outside.

For the firewall, I deployed an OPNsense VM, positioned as a router between the lab LAN and the dedicated server’s WAN. To create a virtual LAN, I first created a Linux bridge through the Proxmox web interface. I then modified the network cards of the various VMs, giving the OPNsense VM two, one for the WAN and one for the LAN.

OPNsense allows granular filtering, notably on domain names, and is easy to administer through its web interface. This let me whitelist only the necessary flows to block Windows/EDR telemetry, and so test custom red teaming tools in an isolated environment.