The session.lock plus persist-before-apply design is the right call — two things worth bolting onto it from an incident-response angle. First, make the snapshot write atomic (temp file + rename, with a checksum the restore verifies) and ACL that lock/snapshot file to SYSTEM and Administrators only: a snapshot torn by the same power cut you're protecting against is worse than none, and the file is a precise map of which protections are currently off — a recon gift if it lands somewhere a standard user can read. Second, close the loop with a re-audit pass that reads the live effective state instead of trusting that the key write 'took'. Hardening gets quietly reverted by a GPO, an Intune policy, or a Windows feature-update, so a tool that reports success off the write call shows green while 445 is open again an hour later. That drift check is also most of the CIS-evidence feature the MSP asked for: once you're reading effective state per rule, exporting it with control IDs is a formatting step, not a second Event-Log engine.
Building a Safe Windows Hardening Tool: A Post-Mortem and Deep Dive
6 Comments
@[DunimeTech] Good points. The ACL thing is a real blind spot for me. I was too focused on the crash state and didn't realize a readable snapshot is basically a recon map. I'll add atomic writes and SYSTEM/Admin-only permissions in the next update.
Also, you're right about the re-audit. I was overthinking the Event Log engine. Just reading the live state and diffing it is much cleaner for GPO drift. I'll probably just add a simple live check to warn users if a rule gets reverted. Need to keep it lightweight and avoid the CIS engine bloat.
Appreciate the insight.
@[Nisse-Sec] Sounds like the right call — you can keep the live check lightweight by diffing only the specific effective-state sources you already snapshot (registry value, service start type, firewall rule, Defender setting), so "reverted" is just a mismatch, no rules engine needed. The one thing worth distinguishing in the warning is drift from a GPO/Intune refresh versus a local change, since one is re-apply and the other is investigate.
Please log in to add a comment.
Please log in to comment on this post.
More Posts
- © 2026 Coder Legion
- Feedback / Bug
- Privacy
- About Us
- Contacts
- You Tube
- Tiktok
- Premium Subscription
- Terms of Service
- Early Builders
Related Jobs
- Data Center MEP Superintendent: Lead Safety & ScheduleSuffolkconstruction · Full time · Turkey, TX
- Senior BSP/OS Software System Integrator Safety-Critical Systems (f/m/x)BMW Group · Full time · Germany
- Building SupervisorServiceMaster Clean of Moncton · Full time · Canada
Commenters (This Week)
Contribute meaningful comments to climb the leaderboard and earn badges!