Commit Graph
16 Commits
Author SHA1 Message Date
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
quoije 890dd58700 Split into qemu and proxmox platforms over a shared content tree
platforms/qemu and platforms/proxmox each have their own lab.sh and
lab.conf; content/ holds everything shared (roles, seed, site, helpers).
The dispatcher, preflight and command implementations are common and take
platform differences from the backend.

Proxmox backend: qm create with q35/SATA/e1000, ISOs and seed ISOs in an
ISO storage, provisioning over qm guest exec (no Python packages needed on
the host), template + clone for reset, and peers/ to emit WireGuard configs.
The role scripts now ride on the seed ISO, so provisioning transfers nothing.

build-bundle.sh produces a self-contained tarball per platform, for hosts
that cannot reach the git server.

Both configs are generic: no absolute path from this machine remains.
2026-10-22 19:23:16 -04:00
quoije 538fb9a117 Re-baseline support, WS01 SMB, docs refresh
snapshot --update commits the working overlay into the base so deliberate
changes survive reset. The eval image ships with File and Printer Sharing
disabled; the bootstrap enables it, otherwise the workstation is invisible
to an SMB scan.

README and instructor runbook now document the real command set.
2026-10-21 20:21:02 -04:00
quoije d34981d279 Add doctor health check and Kali setup script
doctor verifies bridge, per-VM SMB/WinRM, DNS SRV records, the site and the
leaked credential in one pass — the instructor's first move when something
looks wrong.

Start order now boots dc01 first and waits for WinRM: a member that wins the
race loses its machine-account channel (NO_LOGON_SERVERS on every logon).
2026-10-21 20:13:18 -04:00
quoije 71e05d6aa6 Phase 8: baseline snapshot and reset; validated attack path
snapshot freezes each golden disk into images/base/ and boots a thin
overlay; reset recreates the overlay in about a second. Shutdown now asks
the guest over WinRM because ACPI powerdown is ignored by Server 2022.

dc01-post: grant GenericAll with dsacls (the .NET ACL API reported success
but never persisted the ACE) and set MinPasswordAge to zero, without which
the ACL reset fails.

Attack path validated end to end against the live lab: web -> SMB creds ->
AS-REP -> Kerberoast -> WinRM -> GenericAll reset -> DCSync.
2026-10-21 20:10:06 -04:00
quoije 645adea875 Provisioning fixes: auth-based readiness, domain join guards, site push
- wait for WinRM with an authenticated call, not a TCP probe: the port opens
  before the service can authenticate
- skip promotion/join when the machine is already there, so provision is
  idempotent
- probe the domain with System.DirectoryServices: Get-ADDomain needs RSAT,
  which a member server does not have
- passwords must not contain the account name (Legault2024! is rejected)
- Web-Dir-Browsing is the real feature name
- push the site over SMB from C$: WinRM caps the command line at 8 KB
2026-10-21 20:02:43 -04:00
quoije bb8a6a6eb0 Run role scripts as a scheduled task; add workshop docs
A Start-Process child dies with the WinRM shell, so the promotion never
completed. Role scripts now run under the Task Scheduler as SYSTEM, which
survives the disconnect and the reboot. Uploads retry on transient auth
errors while a guest is busy installing features.

Docs: participant guide, instructor runbook, blue-team debrief, and an
instructor wordlist sized for a two-minute crack.
2026-10-21 19:45:38 -04:00
quoije 279f4cc547 Phase 5: AD role scripts, WinRM provisioning and lab wordlist
dc01 promotes the forest then runs a startup-scheduled post stage for OUs,
users, groups, the SPN on svc_backup, pre-auth disabled on j.contractor,
GenericAll over t.smith, the www A record, flags and advanced audit policy.
fs01 installs IIS, shares the web root's public/ as \\FS01\Public and joins.
ws01 joins, then adds WS Admins to local Administrators.

provision uploads over WinRM, starts scripts detached, waits on a .done
marker and survives the promotion reboot.
2026-10-21 19:29:51 -04:00
quoije a38acd3946 Fix MAC generator (5 octets) and silence the discoverability flyout
QEMU rejects a five-byte ethernet address, so every VM would have failed
to start with 'invalid ethernet address'. Caught by booting the installer
against a scratch disk with user-mode networking: the unattended file was
picked up, image index 2 copied, and once=d handed off to the disk.
2026-10-21 19:00:46 -04:00
quoije c66b5641b6 Phase 3: unattended install, seed ISOs and VM lifecycle
autounattend template (q35/AHCI/e1000, no virtio injection), per-VM seed
ISOs with a bootstrap that configures the static IP, enables WinRM/RDP and
chains into the role script. build --dry-run, up/down/status/vnc verbs.

Static addressing happens in PowerShell rather than in the unattend file:
Microsoft-Windows-TCPIP matches adapters by connection name and fails
silently when the name differs.
2026-10-21 18:46:31 -04:00
quoije 5a8f988f30 Phase 7 (part 1): assemble the archived site and apply the seed layer
prepare_site.py rebuilds web/site/ from site-src/: rebuilt home page,
repaired images, Wayback links resolved to local files or neutralised,
hit counter removed, crawler metadata dropped, home page breadcrumb.
Link check fails the build on dangling references.

Seed layer adds public/IT-inventaire.txt and robots.txt.
2026-10-21 18:43:42 -04:00
quoije 32b4cebf92 Phase 2: isolated br-lab, bridge helper access and firewalld policy
One-time root script: NetworkManager bridge portless on 10.10.10.230/24,
allow br-lab in /etc/qemu/bridge.conf, ip_forward via sysctl.d, and a
firewalld zone + policy that permits participant->lab on AD/web/WinRM
ports only. Reverse direction falls through to the default drop.

Includes --dry-run, --verify and --remove.
2026-10-21 18:35:29 -04:00
quoije fb06ee5a52 Phase 1: scaffold lab.sh, config and preflight checks
Move the archived 2002 site into site-src/ so the lab README can take the
repo root. Add lab.conf, the lab.sh dispatcher, a qemu backend and the
check/init verbs. No VM is created yet.
2026-10-21 18:34:22 -04:00