Skip to content

fix(lab): remove the staged installers and close the textfile directory - #1770

Merged
Gerrrt merged 1 commit into
mainfrom
gerrrt/staging-leftovers-dfsr
Nov 26, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
gerrrt/staging-leftovers-dfsr

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 26, 2026

Copy link
Copy Markdown
Owner

What changed

roles/soc_agents, exporter and sysmon delete their staged installers from C:\ProgramData\lab once installed. roles/exporter limits the windows_exporter textfile directory to SYSTEM and Administrators, with inheritance cut. verify.yml checks both on every lab guest. build-the-backup-guest.md §8 now records the nightly DFSR 5014/5004 pair on the DCs as the snapshot backup. The changelog also records today's apply of #1765, #1769 and ADR-0136's GPO to the live domain.

Why

These are the bahamut audit's last two findings.

  • 8, staging leftovers. Every guest kept the Wazuh, Velociraptor and exporter MSIs, the Sysmon zip and its unpacked folder, all readable by BUILTIN\Users. The Velociraptor MSI carries its client config: server URL, CA and enrolment nonce. BUILTIN\Users could also write into the textfile directory (inherited from ProgramData), so any local user could forge a gauge, the licence clock included. Each role decides "installed" by product code or binary version, never by the installer being on disk, so deleting the installers never triggers a reinstall.
  • 7, DFSR noise. Both DCs log 5014 then 5004 about 10 s apart every night around 05:00 UTC. The audit matched it to Saruman's 21:00 vzdump run, which freezes each guest in turn. Nothing to fix; it is written down so nobody chases it.

Refs #449.

Blast radius

The six lab guests: files under C:\ProgramData\lab, and the ACL of C:\ProgramData\windows_exporter\textfile. If the ACL were wrong, the licence-clock gauge would stop updating and LabWindowsEvaluationExpiring would have nothing fresh to read. The exporter runs as LocalSystem and the task as SYSTEM, both kept. Nothing on the network changes.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

  • --check --tags sysmon,soc,exporter on the DCs and members: only the new tasks report a change, 4 per host. No download or install.

  • Applied on leviathan only. A second --check run reported changed=0.

  • On leviathan afterwards:

    • C:\ProgramData\lab holds only sysmon\ and licence-clock.ps1.
    • The textfile directory and licence.prom grant only S-1-5-18 and S-1-5-32-544.
    • Start-ScheduledTask licence-clock returned 0 and rewrote the gauge, and :9182/metrics serves windows_eval_grace_days_remaining.
  • verify.yml --limit leviathan,titan (read-only):

    • leviathan: 35 checks hold.
    • titan: fails exactly the two new checks, as expected until the roles run there.
  • python3 scripts/check_docs.py: OK.

  • ansible-playbook --syntax-check lab-domain.yml verify.yml: OK.

  • ./scripts/lint.sh: passed with 8 checks skipped, not run: ruff, actionlint, zizmor, ansible-lint and editorconfig-checker. yamllint isn't installed here either; the 120-character limit was checked by hand. CI runs them all.

  • make validate was not run: 14 GB free on /, and the suite needs about 38 GB.

  • make validate passes

  • Deployed to the lab and confirmed working (leviathan only)

  • Docs updated (docs/, service README, or docs/roadmap.md)

🤖 Generated with Claude Code

The bahamut audit's findings 7 and 8. soc_agents, exporter and sysmon
delete their installers once installed; exporter limits the textfile
directory to SYSTEM and Administrators; verify.yml checks both. The
backup runbook records the nightly DFSR 5014/5004 pair as the snapshot
backup, and the changelog records today's apply to the live domain.

Refs #449

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt enabled auto-merge (squash) November 26, 2026 16:11
@Gerrrt
Gerrrt merged commit e8812ec into main Nov 26, 2026
12 of 13 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/staging-leftovers-dfsr branch November 26, 2026 16:12
Gerrrt added a commit that referenced this pull request Nov 27, 2026
lab-domain.yml --tags base,sysmon,soc,exporter ran on the five reachable
guests: Panther\unattend.xml removed on the four servers, and #1770's
installer and ACL changes on carbuncle. verify.yml holds on all five.
siren was unreachable. Also corrects the 2026-11-26 root-hints entry on
what cleared the DCs' in-memory hints that morning.

Refs #1099
Refs #449

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gerrrt added a commit that referenced this pull request Nov 27, 2026
…1788)

lab-domain.yml --tags base,sysmon,soc,exporter ran on the five reachable
guests: Panther\unattend.xml removed on the four servers, and #1770's
installer and ACL changes on carbuncle. verify.yml holds on all five.
siren was unreachable. Also corrects the 2026-11-26 root-hints entry on
what cleared the DCs' in-memory hints that morning.

Refs #1099
Refs #449

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Gerrrt added a commit that referenced this pull request Nov 28, 2026
…1801)

siren was stopped (--onboot 0) during the 2026-11-27 rollout. It was
started, lab-domain.yml --tags base,sysmon,soc,exporter removed its staged
installers and cut its textfile ACL, verify.yml held (28 checks), and it
was shut down again. #1778 found no unattend.xml to remove.

Refs #449
Refs #1099

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant