Commit Graph
21 Commits
Author SHA1 Message Date
quoije 28cf7080ee tools: decode BloodHound JSON into exploitable edges
bloodhound-python only writes JSON for the GUI, so a terminal user sees a
successful collection and nothing else. bh_clues.py answers the question
that matters: for one account, its groups, SPNs, non-inherited ACEs and
local-admin/PSRemote edges — with GetChanges+GetChangesAll collapsed into
DCSync. Shipped in both tool ISOs and copied by the Kali setup; the student
sheet uses it after the collector.
2026-10-26 23:14:52 -04:00
quoije 3023525737 dc01: serve the site on http://norbourg.lab too
The domain name must keep resolving to the DC for AD, so redirect at the
HTTP layer: a netsh portproxy on the DC forwards port 80 to FS01, and a
firewall rule opens it. Both URLs now serve the archived site. doctor
checks the short URL and warns (not fails) when the forward is absent.
2026-10-26 22:43:51 -04:00
quoije a9e55469b3 docs: enumerate accounts over LDAP, not SAMR on SMB
nxc smb <machine> --users reads the local SAM: on a member server that is
empty, which reads like a failure. The hand-out now uses nxc ldap against
the DC and explains the difference; the walkthrough matches.
2026-10-26 22:13:12 -04:00
quoije 6bb7758709 proxmox: bake xrdp into the Kali template
KALI_XRDP=1 installs xrdp while the template is still a VM, so every clone
and every kali reset keeps it. The lab has no Internet, so the host runs a
temporary squid bound to 10.10.10.1 and restricted to the probe address
(10.10.10.249); it is stopped and disabled afterwards. A ~/.xsession is
written for kali so the xfce session starts under xrdp.

Docs cover exposing one RDP port per seat with socat (3381..3385).
2026-10-26 19:40:57 -04:00
quoije e08731bf37 proxmox: parse out-data in the Kali seat verification
Same field-name difference as the Windows path; the seats were configured
correctly but the check read an empty string and warned every time.
2026-10-26 18:55:37 -04:00
quoije b6dff5693c proxmox: read out-data from the guest agent JSON
PVE 8 returns out-data/err-data instead of out/err, so every backend_ps
call was parsed as an empty string: Test-Path guards said "missing" and
backend_wait never saw True. Accept both key names.
2026-10-26 18:13:18 -04:00
quoije 30dbefdb1b proxmox: tolerate NUL-padded agent output and avoid false stage guards
powershell.exe over the guest agent can return UTF-16LE, so Test-Path read
as T\0r\0u\0e and every 'grep true' failed. Strip NULs in _qga_unwrap,
and only treat an explicit False as proof that the role script is absent.
2026-10-26 17:58:06 -04:00
quoije f0f5ffc140 bootstrap: install the vioser driver for the running Windows build
The recursive search returned vioserial/2k12 first (alphabetical), and
pnputil rejects it on Server 2022 with -536870325. The agent MSI installed
fine (exit 0) but never had a channel. Pick the folder from the OS build
and fall back through the other amd64 builds until one succeeds.
2026-10-26 17:49:01 -04:00
quoije 37852b3f0b provision: fail fast when the role script is missing
A missing seed payload used to look like a hung stage: the scheduled task
exited immediately and backend_wait polled for an hour. Both backends now
check Test-Path on the role script before scheduling it.
2026-10-26 17:23:36 -04:00
quoije 06a9034214 proxmox: reboot once after the install so the guest agent can connect
The agent MSI was installed at first logon, before the virtio-serial port
existed. The service started without a channel and Proxmox kept reporting
"guest agent is not running", which blocked provisioning at backend_ready.

- backend_finalize now waits for the first-logon bootstrap to finish
  (stamp.txt over SMB, which does not need the agent), detaches the
  installer ISO, reboots the VM once and waits for the agent to answer.
- bootstrap logs the pnputil and msiexec exit codes, so bootstrap.log says
  exactly what happened if it still fails.
- check requires smbclient (site sync + finalize) and python3.
- instructor guide: snapshot doubles disk usage, plan ~60 GB.
2026-10-26 17:23:05 -04:00
quoije bcc370d70f bootstrap: find the virtio CD by content, not by volume label
Get-Volume only returns a label when the image carries one; when it did
not, the whole block was skipped and neither vioser nor the agent was
installed. Probe the drives for guest-agent/qemu-ga-x86_64.msi instead.
2026-10-26 13:01:10 -04:00
quoije 0189330117 bootstrap: install the VirtIO serial driver before the agent
qemu-ga-x86_64.msi installs the service but not vioserial. The service then
starts without a channel and Proxmox reports "guest agent is not running",
so provisioning never gets past backend_ready. Install vioser.inf from the
virtio CD first, then enable and start the service.
2026-10-26 12:40:10 -04:00
quoije 4dc27a4208 proxmox: fix the status table and the template lifecycle
Found on the first real deployment:

- status used the qemu implementation (pidfile + VNC display) and died with
  "qemu_pidfile: command not found". The Proxmox override shows VMID, state
  and role, plus the Kali seats once they exist.
- snapshot templated the working VM in place (id 1100) while reset cloned
  from base+100 (1200), so reset always failed and up could not start a
  template. snapshot now clones the VM into 1200 and templates the clone;
  reset and launch clone 1200 back into 1100.
- working clones are full copies: snapshot --update destroys and rebuilds
  the template, which would orphan a linked clone.
- vnc prints the noVNC URL instead of a localhost display that does not
  exist on Proxmox.

Checked against a stubbed qm: status table, snapshot, reset and
launch-without-a-VM all behave.
2026-10-26 12:29:47 -04:00
quoije 30d806c06c audit for the own-Kali deployment
- dc01-post: drop the vestigial Serveurs-Admins group. It only existed to be
  nested into the DC's administrators, which was removed; leaving it would
  suggest a privilege that no longer exists.
- prerequis: participants who bring their own Kali are told where to get
  norbourg.txt, and the address table no longer promises a provided VM.
- qemu check: assert the firewalld isolation zone and policy. They persist
  across reboots but nothing verified them, so a missing policy would go
  unnoticed until a VM reached the office LAN.
- up/reset: skip the directory wait when dc01 is not in the table.
- deck: no implication that a Kali VM is always provided.

Redeployed from scratch without Kali: build and provision completed in one
pass, doctor reports 0 warnings, and the documented path reproduces through
DCSync with no shortcut (C$ denied, decoy ACE absent).
2026-10-25 15:35:43 -04:00
quoije 59e2594c1e dc01: make the delegated ACL the only way out, and stabilise the state
Three shortcuts and one race made the lab either easier than documented or
non-deterministic:

- Serveurs-Admins was nested in BUILTIN\Administrators on the DC, so
  m.legault was a de-facto domain-controller admin (C$, NTDS.dit) and the
  whole ACL lesson could be skipped. It also made SDProp treat her as
  protected: an hour after provisioning, the intended GenericAll ACE was
  wiped. Removed the nesting; adminCount is explicitly reset.
- the t.smith decoy ACE gave a working path to Domain Admin until SDProp
  ran (up to an hour after a fresh build). The role now grants it and
  revokes it immediately, so the state is deterministic.
- the replication-rights grant stacked duplicate ACEs on every re-run; it
  now removes its own ACEs first.
- up/reset/save returned as soon as WinRM answered, while the directory
  was still starting; doctor right after could report a missing ACE and
  missing replication rights on a healthy lab. They now wait for
  Get-ADDomain on dc01.

doctor: a decoy ACE that is still present is now a failure, not a success.
The deck's wording matches the new behaviour.
2026-10-25 14:05:55 -04:00
quoije df5ce2d497 docs: first draft of the workshop deck (21 slides)
Intro, rules, topology, methodology, then the debriefing path and the
defensive angle. Text lives in build_slides.py so it can be regenerated;
the .pptx is the editable artifact.
2026-10-25 13:39:33 -04:00
quoije 0dbfcc7147 lifecycle: up/reset wait for every guest before returning
doctor run right after reset reported false failures because the VMs were
still booting. _start_lab now waits for WinRM on each guest (300 s) and
names the ones that did not answer.
2026-10-24 16:48:01 -04:00
quoije ca72e1aa2e windows: fix first-boot races and non-idempotent stages
A from-scratch rebuild surfaced three defects that only appear on a clean
deployment:

- dc01-post: `Set-ADObject -Identity <sAMAccountName>` raises
  ADIdentityNotFoundException even right after New-ADUser, so resolve the
  DN once and reuse it. The stage aborted before DNS, flags, DHCP and the
  audit policy, leaving a half-built domain.
- bootstrap ran the role script at first boot while `provision` also ran
  it. fs01 tried to join a domain that did not exist yet, and dc01 ran two
  promotions concurrently; the loser wrote "FAIL Stream was not readable".
  Roles are now only started by the harness, which orders them.
- fs01: the `.url` MIME existence test read the staticContent element
  (-Name '.') instead of its collection, so any re-run died on a duplicate
  entry. Test -Name 'collection'.

Every stage now takes a PID-based lock: a duplicate start exits instead of
racing the real one.

Validated on a fresh build: doctor 0 warnings, and the full path
(site -> SMB -> AS-REP -> Kerberoast -> WinRM -> ACL -> replication ->
DCSync) reproduces.
2026-10-24 16:38:37 -04:00
quoije 95d70fa5a4 docs: explain how to add seats beyond the default five 2026-10-24 14:57:59 -04:00
quoije ef6fe18333 proxmox: one turnkey Kali VM per participant
Deploy N attacker VMs alongside the domain lab and hand each colleague a
console URL, with nothing to install or configure on their side.

- import the Kali image once, keep it as a template, clone per seat
- deterministic MAC + DHCP reservation on DC01, so addresses are stable
- configure through the QEMU guest agent: hostname, wordlist from the
  tool ISO, sshd, then verify network and DNS
- add the `users` command: a PVEVMUser account scoped to one VM plus the
  noVNC URL and generated password
- check: 7z/pveum presence, address range, RAM budget for the clones
- destroy cleans up the clones and the template

The documented path no longer depends on bloodyAD: the password reset uses
impacket-changepasswd (already installed) and ACL inspection uses nxc's
daclread module, both verified against the live lab.
2026-10-24 14:57:38 -04:00
quoije dcb64ac65e Restructure the repository per session
session1/ now holds the whole live lab (content, platforms, docs, answer key,
README); session2/ keeps the design for the second workshop. The root README
indexes both and states that session2 modifies session1 rather than
duplicating it.

build-bundle.sh builds from session1 and still produces a flat archive, so
the documented paths inside a deployment (platforms/<p>/lab.sh) are
unchanged. .gitignore follows the move.
2026-10-24 14:22:39 -04:00