Skip to content

Commit 21ab357

Browse files
committed
Add ludus cyber lab post and removed htb challenges section
1 parent 1526529 commit 21ab357

9 files changed

Lines changed: 230 additions & 201 deletions

File tree

about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ icon: info
66

77
![](/assets/images/bio-photo.jpg)
88

9-
Hi, I'm s3rp3nt — a software and cybersecurity enthusiast with a deep interest in building robust software, understanding networks, and exploring the ever-evolving landscape of digital security. My journey into this field began during my studies, where I discovered a love for coding, solving complex problems, and securing systems.
9+
Hi, I'm 0xSerpent — a software and cybersecurity enthusiast with a deep interest in building robust software, understanding networks, and exploring the ever-evolving landscape of digital security. My journey into this field began during my studies, where I discovered a love for coding, solving complex problems, and securing systems.
1010

1111
In my free time, you'll often find me sharpening my skills through CTF competitions or platforms like HackTheBox and TryHackMe, where I tackle real-world challenges and hone my expertise.
1212

assets/images/headers/ludus.png

319 KB
Loading
392 KB
Loading

blog/index.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
icon: pencil
2+
expanded: true

blog/ludus-cyber-range.md

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
---
2+
layout: blog
3+
title: "Building a Cyber Range with Ludus"
4+
seo_title: "Setting up and Active Directory (AD) Cyber Range Lab with Proxmox VE and Ludus"
5+
date: 2025-11-22T15:38
6+
categories: ['Active-Directory', 'Homelab']
7+
---
8+
9+
![](/assets/images/headers/ludus.png)
10+
11+
Ever since I built my first homelab, I’ve been obsessed with having my own dedicated cyber range — my little digital fight club where I can break things, fix things, automate things, and then do it all again. True definition of insanity right here. But I didn’t want to risk nuking my daily-driver machine.
12+
13+
Then one day I looked over at my ancient desktop — the one that wheezes when you open more than three Chrome tabs (I actually needed to replace a few faulty fans) — and thought:
14+
15+
> “Bestie, you’re getting a glow-up.”
16+
17+
A quick dive into the documentation rabbit hole later, I found [Ludus](https://docs.ludus.cloud/), an open-source framework that basically said, “I heard you hate clicking through installers manually, let me cook.”
18+
19+
## Why Ludus?
20+
I chose Ludus for a few reasons:
21+
- It automates the heavy lifting of cyber range creation, because I am allergic to unnecessary clicking.
22+
- It supports modular “plugins,” including prebuilt Active Directory environments.
23+
- Everything is infrastructure-as-code, which means I can tear down and rebuild environments cleanly.
24+
- It's built for learning, research, and “I wonder what happens if—” moments, not production use.
25+
26+
Besides, I was already making use of [Proxmox](https://www.proxmox.com/) in my previous series and Ludus builds on top of it. So Ludus fits perfectly into my tech ecosystem.
27+
28+
## Setting up my Range
29+
Ludus' [documentation](https://docs.ludus.cloud/docs/quick-start/install-ludus) walks through the installation process, and following it is very straightforward so I won't be covering it in this blogpost.
30+
31+
After you have installed Ludus and created a user, you should be able to list the available templates.
32+
33+
```console
34+
$ ludus templates list
35+
+------------------------------------+-------+
36+
| TEMPLATE | BUILT |
37+
+------------------------------------+-------+
38+
| debian-11-x64-server-template | FALSE |
39+
| debian-12-x64-server-template | FALSE |
40+
| kali-x64-desktop-template | FALSE |
41+
| win11-22h2-x64-enterprise-template | FALSE |
42+
| win2022-server-x64-template | FALSE |
43+
+------------------------------------+-------+
44+
```
45+
46+
On a fresh install, a few default templates are provided but haven't been build yet. As I like to keep things up to date I added a `win2025` template, but you can add as many as you like (if the storage lets you).
47+
48+
```console
49+
$ git clone https://gitlab.com/badsectorlabs/ludus
50+
$ cd ludus/templates
51+
$ ludus templates add -d win2025-server-x64-tpm
52+
[INFO] Successfully added template
53+
$ ludus templates build -n win-2025-server-x64-tpm-template
54+
[INFO] Template building started
55+
$ ludus templates build -n debian-12-x64-server-template
56+
[INFO] Template building started
57+
```
58+
59+
While browsing the “Environment Guides,” I stumbled upon the **Game Of Active Directory – Ninja Hacking Academy (GOAD-NHA)** setup. This thing is basically an escape room for sysadmins — you drop in, and everything dares you to figure it out by yourself. But I wanted my cyber range to be on the latest Windows Server version, which at the time of writing is 2025.
60+
61+
That meant modifying the original Ansible scripts. Thankfully, it wasn’t as dramatic as it sounds, but it did feel like giving the templates a well-deserved modern update. My current ludus range configuration looks as follows:
62+
63+
```yml
64+
ludus:
65+
- vm_name: "{{ range_id }}-NHA-DC01"
66+
hostname: "{{ range_id }}-DC01"
67+
template: win2025-server-x64-tpm-template
68+
vlan: 10
69+
ip_last_octet: 30
70+
ram_gb: 8
71+
cpus: 2
72+
windows:
73+
sysprep: true
74+
- vm_name: "{{ range_id }}-NHA-DC02"
75+
hostname: "{{ range_id }}-DC02"
76+
template: win2025-server-x64-tpm-template
77+
vlan: 10
78+
ip_last_octet: 31
79+
ram_gb: 8
80+
cpus: 2
81+
windows:
82+
sysprep: true
83+
- vm_name: "{{ range_id }}-NHA-SRV01"
84+
hostname: "{{ range_id }}-SRV01"
85+
template: win2025-server-x64-tpm-template
86+
vlan: 10
87+
ip_last_octet: 32
88+
ram_gb: 6
89+
cpus: 2
90+
windows:
91+
sysprep: true
92+
- vm_name: "{{ range_id }}-NHA-SRV02"
93+
hostname: "{{ range_id }}-SRV02"
94+
template: win2025-server-x64-tpm-template
95+
vlan: 10
96+
ip_last_octet: 33
97+
ram_gb: 6
98+
cpus: 2
99+
windows:
100+
sysprep: true
101+
- vm_name: "{{ range_id }}-NHA-SRV03"
102+
hostname: "{{ range_id }}-SRV03"
103+
template: win2025-server-x64-tpm-template
104+
vlan: 10
105+
ip_last_octet: 34
106+
ram_gb: 6
107+
cpus: 2
108+
windows:
109+
sysprep: true
110+
111+
router:
112+
vm_name: "{{ range_id }}-router-debian12-x64"
113+
hostname: "{{ range_id }}-router"
114+
template: debian-12-x64-server-template
115+
ram_gb: 2
116+
ram_min_gb: 1
117+
cpus: 2
118+
119+
defaults:
120+
ad_domain_functional_level: Win2025
121+
ad_forest_functional_level: Win2025
122+
snapshot_with_RAM: true
123+
stale_hours: 0
124+
ad_domain_admin: domainadmin
125+
ad_domain_admin_password: password
126+
ad_domain_user: domainuser
127+
ad_domain_user_password: password
128+
ad_domain_safe_mode_password: password
129+
timezone: America/New_York
130+
enable_dynamic_wallpaper: true
131+
```
132+
133+
I also made a few tweaks to the available RAM of the VMs and updated the domain/forest functional level to 2025 as well. With this file we can start building our hacker lab.
134+
135+
## Ninja Hacker Academy Setup
136+
137+
!!!info
138+
NHA is designed as an educational challenge where users normally work toward gaining domain admin on two domains (`academy.ninja.lan` and `ninja.hack`)
139+
!!!
140+
141+
The scenario includes:
142+
- A starting point on `srv01` at `10.5.10.32`
143+
- Flags hidden on each machine
144+
- Up-to-date systems with Defender enabled
145+
146+
Let's create a new user for our range and start the deployment with the Ludus CLI.
147+
148+
```console
149+
$ ludus user add --name Ninja --userid NHA --url https://127.0.0.1:8081
150+
+--------+------------------+-------+---------------------------------------------+
151+
| USERID | PROXMOX USERNAME | ADMIN | API KEY |
152+
+--------+------------------+-------+---------------------------------------------+
153+
| NHA | Ninja | true | <YOUR_API_KEY> |
154+
+--------+------------------+-------+---------------------------------------------+
155+
156+
$ ludus range config set -f ad/NHA/providers/ludus/config.yml --user NHA
157+
[INFO] Your range config has been successfully updated.
158+
159+
$ ludus range deploy --user NHA
160+
[INFO] range deploy started
161+
```
162+
163+
At the end you should see something like this:
164+
165+
![](/assets/images/headers/ludus-nha-range-status.png)
166+
167+
At this point the old desktop is usually running enough VMs to sound mildly annoyed, but it manages.
168+
169+
### Ansible Provisioning
170+
171+
With our range deployed, we can start setting up the actual environment. With [Ansible](https://docs.ansible.com/) we can provision our whole infrastructure using custom playbooks. Using the available playbooks from [Orange-Cyberdefense](https://github.com/Orange-Cyberdefense/GOAD), I changed most of them to be compatible with the latest version of Ansible.
172+
173+
!!!info
174+
In the future I was thinking of publishing them on my [GitHub](https://github.com/bytebl33d), but they might already be there ;)
175+
!!!
176+
177+
We proceed with the provisioning and install the required collections:
178+
179+
```console
180+
$ ansible-galaxy collection install ansible.windows
181+
$ ansible-galaxy collection install community.general
182+
$ ansible-galaxy collection install community.windows
183+
```
184+
185+
Hop into the `ansible` directory where all the playbooks are located and run them all.
186+
187+
!!!info
188+
If you get the error `Ansible could not initialize the preferred locale: unsupported locale setting`, check your locales with `locale -a` and set it with `export LC_ALL=<YOUR_LOCALE>.utf8`
189+
!!!
190+
191+
```console
192+
$ cd ansible
193+
$ ansible-playbook -i ../ad/NHA/data/inventory -i ../globalsettings.ini main.yml
194+
```
195+
196+
## Connecting to the Lab
197+
198+
```console
199+
$ ludus user wireguard --user NHAc531df | tee ludus-wg.conf
200+
[Interface]
201+
PrivateKey = <PRIVATE_KEY>
202+
Address = 198.51.100.5/32
203+
204+
[Peer]
205+
PublicKey = <PUBLIC_KEY>
206+
Endpoint = 192.168.128.10:51820
207+
AllowedIPs = 10.5.0.0/16, 198.51.100.1/32
208+
PersistentKeepalive = 25
209+
```
210+
211+
Copy this file to your client and run WireGuard:
212+
213+
```console
214+
$ wg-quick up ./ludus-wg.conf
215+
```
216+
You can optionally narrow `AllowedIPs` down to only the `srv01` host for better isolation. And just like that, you’re securely connected to your newly deployed cyber range.

google980cd600b66d940e.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

index.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,36 @@ Below you can find reference links to my blog posts, writeups and educational co
1717
[!ref icon="beaker"](/categories/homelab/)
1818

1919
## Featured
20-
<a class="no-link mb-6 overflow-hidden border border-gray-200 rounded-lg md:flex dark:border-dark-700 hover:border-gray-400 dark:hover:border-dark-450" href="/writeups/hackthebox/machines/darkcorp/">
20+
<a class="no-link mb-6 overflow-hidden border border-gray-200 rounded-lg md:flex dark:border-dark-700 hover:border-gray-400 dark:hover:border-dark-450" href="/blog/proxmox-homelab-part1/">
2121
<div class="relative shrink-0 bg-gray-300 md:w-5/12 pb-9/16 md:pb-0 dark:bg-dark-450">
22-
<img class="absolute object-cover w-full h-full" src="/assets/images/headers/darkcorp.png">
22+
<img class="absolute object-cover w-full h-full" src="/assets/images/headers/ludus.png">
2323
</div>
2424
<div class="p-6">
25-
<div class="text-xs font-semibold text-blue-500 uppercase dark:text-blue-400">HackTheBoxWindows • Active Directory</div>
26-
<div class="mt-2 text-lg font-semibold leading-snug text-gray-900 dark:text-white md:text-xl">University (Insane)</div>
25+
<div class="text-xs font-semibold text-blue-500 uppercase dark:text-blue-400">Active-DirectoryHomelab</div>
26+
<div class="mt-2 text-lg font-semibold leading-snug text-gray-900 dark:text-white md:text-xl">Building a Cyber Range with Ludus</div>
2727
<div class="line-clamp-3">
28-
<p class="hidden mt-2 md:block">DarkCorp is an Insane Windows Active Directory machine that starts with a DripMail site. The application is vulnerable to XSS that allows... </p>
28+
<p class="hidden mt-2 md:block">Ever since I built my first homelab, I’ve been obsessed with having my own dedicated cyber range — my little digital fight club where I can break things..</p>
2929
</div>
3030
<div class="flex mt-3 items-center">
3131
<div class="text-sm text-gray-500 dark:text-dark-350">
32-
<span>2025-10-18</span>
32+
<span>2025-11-22</span>
3333
</div>
3434
</div>
3535
</div>
3636
</a>
37-
<a class="no-link mb-6 overflow-hidden border border-gray-200 rounded-lg md:flex dark:border-dark-700 hover:border-gray-400 dark:hover:border-dark-450" href="/writeups/hackthebox/machines/university/">
37+
<a class="no-link mb-6 overflow-hidden border border-gray-200 rounded-lg md:flex dark:border-dark-700 hover:border-gray-400 dark:hover:border-dark-450" href="/writeups/hackthebox/machines/darkcorp/">
3838
<div class="relative shrink-0 bg-gray-300 md:w-5/12 pb-9/16 md:pb-0 dark:bg-dark-450">
39-
<img class="absolute object-cover w-full h-full" src="/assets/images/headers/university.png">
39+
<img class="absolute object-cover w-full h-full" src="/assets/images/headers/darkcorp.png">
4040
</div>
4141
<div class="p-6">
4242
<div class="text-xs font-semibold text-blue-500 uppercase dark:text-blue-400">HackTheBox • Windows • Active Directory</div>
43-
<div class="mt-2 text-lg font-semibold leading-snug text-gray-900 dark:text-white md:text-xl">University (Insane)</div>
43+
<div class="mt-2 text-lg font-semibold leading-snug text-gray-900 dark:text-white md:text-xl">DarkCorp (Insane)</div>
4444
<div class="line-clamp-3">
45-
<p class="hidden mt-2 md:block">University is an Insane Windows Active Directory machine that starts with a university webpage. The web application allows exporting user profile pages... </p>
45+
<p class="hidden mt-2 md:block">DarkCorp is an Insane Windows Active Directory machine that starts with a DripMail site. The application is vulnerable to XSS that allows... </p>
4646
</div>
4747
<div class="flex mt-3 items-center">
4848
<div class="text-sm text-gray-500 dark:text-dark-350">
49-
<span>2025-08-15</span>
49+
<span>2025-10-18</span>
5050
</div>
5151
</div>
5252
</div>

0 commit comments

Comments
 (0)