Commit Graph
62 Commits
Author SHA1 Message Date
quoije b134cd9737 docs: align the permission section with the lab flow
Collect, decode with bh_clues.py, confirm with daclread, then look at the
target's groups and exercise the right. The example uses the entry account
(a dead end) so the sheet teaches the output without handing over the path;
the walkthrough shows the real svc_backup output and the DCSync nuance.
Also corrected the pronouns for m.legault (Marie).
2026-10-26 23:49:22 -04:00
quoije ab96939b20 bh_clues: --help, lab notice and clearer errors
argparse usage with an example, a header line in the output stating it is a
Norbourg-lab tool, and explicit messages for a missing collection or an
unknown account. The tool ISOs describe the script next to the wordlist.
2026-10-26 23:21:52 -04:00
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
quoije 62d3c4282c Student guide and README: control of the domain, not Domain Admin
The graded path ends with replication rights and DCSync, not membership in
Domain Admins, so the stated objective was inaccurate. Also documents that
C$/ADMIN$ require local admin while hidden shares depend only on their own
ACL — which is how the server flag is reachable.
2026-10-24 14:20:52 -04:00
quoije a29a5ce4b9 Docs: final pass for the replication-rights design
blue-team: the reset target is m.legault; the ACL row explains that the same
ACE on t.smith is stripped hourly by SDProp; the DA-logon row becomes the
replication event (4662).

answer key: DCSync runs as m.legault, t.smith is listed as the protected
decoy, and two new pitfalls document why C$ refuses a plain account and why
WinRM on DC01 is authorization, not a closed port.

README: structure table gains session2/. No stale references remain
(AdminSDHolder, Serveurs-Admins, C:\flag).
2026-10-24 14:19:59 -04:00
quoije 4446bb6a0f Align the docs with the explicit-rights design
Answer key no longer claims two viable targets: SDProp has already reverted
the t.smith decoy by the time a student looks, so 'get writable' shows only
m.legault. Keeps t.smith as the documented trap instead.

Instructor runbook and the archive index now describe the replication-rights
story rather than the old BUILTIN\Administrators one.
2026-10-24 14:10:14 -04:00
quoije 122aeed6cb Escalate through explicit replication rights, not a protected group
The AdminSDHolder anchor worked but handed svc_backup GenericAll over every
protected object, including Domain Admins — a shortcut that undermined the
intended lesson.

New design, matching how backup products actually get AD access:
  svc_backup --GenericAll--> m.legault (plain user, never protected)
  m.legault in Sauvegarde-AD, which holds Replicating Directory Changes
  and ...All on the domain — the vendor requirement for AD-aware backups

Nothing on that path is a protected object, so SDProp has nothing to rewrite.
t.smith stays as the decoy whose ACE is reverted hourly.

The flag moves to C:\Sauvegarde, shared as Sauvegarde\$ readable by the
backup group: C\$ is admin-only, so a plain account could never fetch it.

web --sync now mirrors instead of merging (it used to leave deleted files
served forever) and clears the staging folder that smbclot only adds to.
Lore 2016/2021 rewritten around the replication requirement.
2026-10-24 14:06:21 -04:00
quoije 5e9be0a0b3 Anchor the delegation in AdminSDHolder; document the mechanism
BUILTIN\Administrators is itself a protected group, so adding
Serveurs-Admins to it made m.legault transitively protected too: SDProp
then wiped both ACEs and reset adminCount. doctor caught it.

The durable fix is the one that works in a real domain: the ACE lives in
AdminSDHolder, which SDProp copies onto protected objects every hour, so it
is re-applied rather than deleted. The adminCount workaround is gone.

Lore gains a 2021 note explaining exactly this, in the voice of the
instructor who hit it: the delegation kept vanishing, the vendor explained
AdminSDHolder, the right was moved there and stopped disappearing.
2026-10-24 13:49:08 -04:00
quoije 23f4e1f060 Fix the missing DHCP reservation; scaffold session 2
dc01-post.ps1 now creates the 10.10.10.101 reservation itself (it only
existed in the running lab), and doctor checks it.

session2/ holds the design for the second workshop: LSASS credential theft
with mimikatz, overpass-the-hash and pass-the-ticket, the scheduled-task
plant it needs, the detections to add alongside, and the open question to
prototype first. Nothing is implemented; the live lab is untouched.
2026-10-24 13:46:44 -04:00
quoije b9bc0eb079 Add 'save': the closing step for any change
save = snapshot --update + start, and falls back to a first-time snapshot
when no baseline exists yet. On the qemu platform it folds the working
overlays into the base images and brings the lab back up; on proxmox it
re-templates.

Documented as the rule it is: every deliberate change to the lab ends with
save, so reset always returns to the state you meant to freeze.
2026-10-24 02:13:18 -04:00
quoije 9ba0ca98ac Add the in-world archive trail that explains the lab
Six dated notes under _archives/ on the public share, one per artifact:
the 2003 backup deployment and its permanent password, INC-0142 (the
object-level delegation), the 2011 'the agent needs local admin' shortcut,
the 2016 'this is equivalent but looks better in an audit' note, and the
2019 copy of the procedure for t.smith.

Students find the reasons for the permissions instead of being told them;
the instructor gets a per-step debrief trail. Referenced from the student
guide, the runbook and the answer key.
2026-10-24 01:57:52 -04:00
quoije 8933c9a669 Replace the unrealistic ACL target with a realistic delegation
GenericAll over a Domain Admin cannot survive in a real domain: SDProp
rewrites protected objects from AdminSDHolder every hour. The previous
design only worked thanks to adminCount=0, which no IT team would ever set.

New design, matching what broad delegation actually looks like:
  svc_backup --GenericAll--> m.legault (plain user, ACE stable)
  m.legault in Serveurs-Admins, which is in BUILTIN\Administrators on DC01

t.smith stays as a decoy: the same edge exists but is reverted by SDProp,
which is itself a lesson.

Also repairs accounts that an interrupted first run left disabled (m.legault
was one), and doctor now checks the stable path, the account state and the
DC admin membership.
2026-10-24 01:46:25 -04:00
quoije 723586029f Fix the ACL being reverted by SDProp, and make doctor check the puzzle
t.smith is a Domain Admin, therefore a protected object: SDProp rewrites his
security descriptor every hour from AdminSDHolder and deletes any ACE not
present there. The GenericAll that the lab builds was silently removed by
that cycle, so 'bloodyad set password' started failing with the misleading
'oldpass not valid' error.

Clearing adminCount on the target takes it out of SDProp's scope while it
stays a Domain Admin. Applied in dc01-post.ps1 (guarded) and baked into the
baseline.

doctor now verifies the invariants that services do not reveal: the ACE,
adminCount, SPN, disabled pre-auth, minimum password age, root.txt, the
easter-egg TXT and the DHCP scope. This is exactly the drift that was
invisible before.
2026-10-24 01:36:33 -04:00
quoije 599cf23204 Student memo: complete the command set
Adds the four commands the lab needs that were missing from the cheat
sheet: the web entry (curl), reading a file from an admin share, the
bloodyad action that exercises a delegated right, and the final DCSync
secretsdump. Placeholders only, no target names.
2026-10-24 00:03:27 -04:00
quoije b13ec8da95 Persist the Kali setup in its base image
New 'kali snapshot' subcommand commits the working overlay into the base
image, the same way the Windows guests are frozen. After it, reset returns
to a Kali that already has: the wordlist under /opt/norbourg, bloodyAD,
sshd enabled at boot, and the dual resolver (DC first, slirp second).

Verified by booting from the committed base with no manual step: sshd
answers, 1716-line wordlist present, bloodyad on PATH, lab and public names
both resolving.

Docs: README and instructor checklist describe the new step.
2026-10-23 07:14:19 -04:00
quoije 6fb5c3b4ca Kali keeps the DC as resolver and still reaches the internet
The DC returns SERVFAIL for names outside its zones, so glibc falls through
to the next nameserver. Listing the slirp resolver second (10.0.2.3) gives
lab names from the DC, public names from the tunnel, and keeps apt working.
No dnsmasq or per-domain config needed.

Docs: instructor checklist and the participant note both describe the
two-resolver setup, and warn that the connection name is case-sensitive.
2026-10-23 00:59:17 -04:00
quoije 4ee3bba0c5 prerequis: hosts-file fallback is legitimate, with the right apex
The doc claimed a hosts file would break nxc and Kerberos lookups. It does
not: name-to-IP is all the tools need, and the lab works with IPs plus
-dc-ip. What actually matters is that the domain name points at the DC —
a hosts entry pointing norbourg.lab at FS01 silently sends tooling to the
wrong machine, which is exactly what happened during testing.

Documents both routes and the one rule that matters.
2026-10-23 00:50:24 -04:00
quoije b93ed45635 Docs: full accuracy pass across all five files
prerequis: tools list corrected (collector, not the BloodHound GUI), the
provided Kali VM path added (DHCP + DNS come free), address table completed
with the Kali reservation and the DHCP range.

blue-team: null sessions are refused in this lab, so the SMB row no longer
claims one; the GenericAll is planted at build time, so the detectable
signal is its use (4724), not an ACE creation (5136); added ready-to-run
Get-WinEvent queries with the field indices.

answers: nxc instead of netexec, domain flag on every call, bloodyad -H,
and the no-GUI shortcut documented.

README/instructeur: what the image actually ships, and how to add bloodyAD.
2026-10-23 00:48:12 -04:00
quoije 6818a57500 Student guide: rewrite the cheat sheet against the real toolset
- nxc/netexec with the domain flag, from Kali
- AS-REP and Kerberoast commands with the actual flags (-request, -format
  hashcat, -dc-ip, -outputfile)
- hashcat modes called out explicitly (18200 AS-REP, 13100 TGS)
- bloodyAD get writable as the no-BloodHound way to answer permission
  questions, since the GUI is not installed
- note that bloodhound-python -c all is required for ACL data
2026-10-23 00:46:20 -04:00
quoije 801cf7e851 Docs: qualify the remaining lab.sh paths
Troubleshooting table and the post-deployment checklist now say where each
command must run, and the stale 'step to come' note for the site is gone.
2026-10-23 00:32:08 -04:00
quoije 069e90cf8e Docs: post-deployment checklist and service notes
Instructor runbook now covers what we learned the hard way: snapshot before
use, the wordlist lives on the Kali tool CD, DNS needs the DC prioritised on
Kali's bridge NIC, and the lab deliberately answers ICMP and offers RDP (for
instructors only — Remote Desktop Users stays empty).
2026-10-23 00:31:49 -04:00
quoije 7787bd5f84 Close the gaps that a fresh redeploy would have shipped
- install the QEMU guest agent from virtio-win: Proxmox provisions over
  qm guest exec, so without it every provision would hang waiting for the
  agent. virtio-win is now attached as ide3 on the Proxmox platform.
- restore the .url MIME mapping in fs01.ps1: the earlier patch silently
  missed, so a rebuilt FS01 would answer 404.3 for the easter-egg shortcut.
- kali install now builds a small tool ISO carrying the wordlist, so a
  fresh Kali is usable without network access to the host.

Audited by extracting the bundle and re-rendering the seeds: no unrendered
tokens, and every live fix is present in the generated role scripts.
2026-10-23 00:30:40 -04:00
quoije b5981dbe08 Restore the lab wordlist lost in the platform split
The directory move into content/scripts silently failed and scripts/ was
removed, so the list vanished from the tree while surviving in history.
kali-setup.sh has been pointing at a missing file ever since.
2026-10-23 00:26:07 -04:00
quoije 703db36381 Fix RDP never being enabled
The discoverability-flyout tweak used New-Item -Force on a protected HKLM
key, which throws UnauthorizedAccessException. With ErrorActionPreference
Stop that aborted the bootstrap before the RDP block, so TermService stayed
stopped, fDenyTSConnections stayed 1 and no RDP firewall rule was enabled.
Anyone trying 3389 got a closed port.

Use New-ItemProperty in a try/catch, and make the RDP block defensive
(start the service, enable the rule group, log failures).
2026-10-22 22:40:00 -04:00
quoije 31dae55b1f Allow ICMP echo on lab guests
Windows drops echo by default, and 'ping the DC' is the first check anyone
runs; prerequis.md tells participants to do exactly that. Adds a scoped
ICMPv4-in rule in bootstrap.ps1 (lab only, all profiles).
2026-10-22 21:30:42 -04:00
quoije 0206eb6110 Docs: platform-qualified commands; destroy stops Kali 2026-10-22 21:26:55 -04:00
quoije 608b559e51 Proxmox hardening from a dry run and stub tests
- PVE has no win2k22 ostype; Server 2022 maps to win11
- drop --startup 0, which is not a valid order value
- after install, repoint the boot order at sata0 and detach the installer
  ISO, so a stray keypress cannot re-enter Setup
- ISO storage detection falls back to storage.cfg when pvesm has no
  --content flag
- router wg0 is now 10.10.10.250/32 with the lab NIC at .251/24: two /24s on
  one host made routing ambiguous
- nft rules use the router's own interface name (WG_LAB_IFACE), not vmbr10
2026-10-22 21:26:37 -04:00
quoije 77d123a9cf Add optional Kali attacker VM and DHCP for the lab bridge
lab.sh kali install|up|down|reset|status extracts the official Kali QEMU
image once, keeps it as a read-only base with a throwaway overlay, and
boots two NICs: the lab bridge (for the exercise) and user networking (so
apt works without opening the isolation policy).

DC01 now serves DHCP on 10.10.10.100-200 with DNS and domain options but no
router: devices on the bridge configure themselves while the lab stays
isolated. A reservation pins 10.10.10.101 to the Kali MAC.

Also fixed backend_stop, which still called the pre-refactor WinRM helper
and fell back to killing the VMs.
2026-10-22 19:55:15 -04:00
quoije b077d2c7d5 Easter egg: The Outfield - Your Love (1985)
A hidden _archives/1985 folder in the Public share with a README and a .url
shortcut that opens the official video, a TXT record on the domain
(nslookup -type=TXT yourlove.norbourg.lab), and a breadcrumb in the home
page source. No copyrighted media is stored: the shortcut is a link.

IIS has no MIME mapping for .url, so fs01.ps1 adds one.
2026-10-22 19:38:49 -04:00
quoije 523a6f4881 Fix setup-network path after the move; rebuild bundles 2026-10-22 19:23:42 -04:00