You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blog/ludus-cyber-range.md
+97-28Lines changed: 97 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,46 +60,46 @@ While browsing the “Environment Guides,” I stumbled upon the **Game Of Activ
60
60
61
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:
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
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`)
135
+
!!!warning
136
+
If the build process fails, as happened to me :(, it might be because of unsufficient system resources. Just rerun the script or reboot the VMs and try again.
139
137
!!!
140
138
141
-
The scenario includes:
142
-
- A starting point on `srv01` at `10.5.10.32`
139
+
140
+
## Ninja Hacker Academy Setup
141
+
NHA is designed as an educational challenge where users normally work toward gaining domain admin on two domains (`academy.ninja.lan` and `ninja.hack`). The scenario includes:
142
+
- A starting point on `WEB` at `10.2.10.32`
143
143
- Flags hidden on each machine
144
144
- Up-to-date systems with Defender enabled
145
145
146
146
Let's create a new user for our range and start the deployment with the Ludus CLI.
147
147
148
148
```console
149
149
$ ludus user add --name Ninja --userid NHA --url https://127.0.0.1:8081
150
+
[INFO] Adding user to Ludus, this can take up to a minute. Please wait.
Before continuing, make sure that your inventory file at `workspace/ludus/inventory` matches the IP addresses from your range. In my case the range starts with `10.2.10.x` so I will update it accordingly:
192
+
193
+
```console
194
+
$ cat NHA/workspace/ludus/inventory
195
+
[default]
196
+
; Note: ansible_host *MUST* be an IPv4 address or setting things like DNS
Hop into the `ansible` directory where all the playbooks are located and run them all.
186
219
187
220
!!!info
188
221
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`
This will take some time for it to complete — a good opportunity to refresh your coffee while automation does its thing. In case we ever make a change to one of the playbooks or tasks we can also just run a single one:
After it is finished provisioning our lab, we can take snapshots via the proxmox web UI or SSH run the following ludus command (make sure your disks allow snapshots)
240
+
241
+
```console
242
+
$ ludus --user NHA snapshot create clean-setup -d "Clean NHA setup after ansible run"
243
+
[INFO] Successfully created snapshot 'clean-setup' for VM 118
244
+
[INFO] Successfully created snapshot 'clean-setup' for VM 119
245
+
[INFO] Successfully created snapshot 'clean-setup' for VM 120
246
+
[INFO] Successfully created snapshot 'clean-setup' for VM 121
247
+
[INFO] Successfully created snapshot 'clean-setup' for VM 122
248
+
[INFO] Successfully created snapshot 'clean-setup' for VM 123
249
+
```
197
250
198
251
## Connecting to the Lab
199
252
200
253
```console
201
-
$ ludus user wireguard --user NHAc531df | tee ludus-wg.conf
254
+
$ ludus user wireguard --user NHA | tee ludus-wg.conf
202
255
[Interface]
203
256
PrivateKey = <PRIVATE_KEY>
204
257
Address = 198.51.100.5/32
205
258
206
259
[Peer]
207
260
PublicKey = <PUBLIC_KEY>
208
261
Endpoint = 192.168.128.10:51820
209
-
AllowedIPs = 10.5.0.0/16, 198.51.100.1/32
262
+
AllowedIPs = 10.2.0.0/16, 198.51.100.1/32
210
263
PersistentKeepalive = 25
211
264
```
212
265
@@ -215,4 +268,20 @@ Copy this file to your client and run WireGuard:
215
268
```console
216
269
$ wg-quick up ./ludus-wg.conf
217
270
```
218
-
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.
271
+
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. Let's do a quick test with one of the local admin passwords to see if everything works fine.
Turning an old desktop into a fully automated Active Directory cyber range has been one of the most satisfying upgrades to my homelab so far. With Proxmox handling the virtualization and Ludus orchestrating everything, I now have a modern, customizable environment for testing scenarios, experimenting with configurations, and learning in a safe space.
0 commit comments