Repository navigation
Windows: audit coverage true-up, Server profile, per-object audit rules - #4
Merged
Merged
Conversation
…rules - Turn on SAM, Other Policy Change, MPSSVC Rule-Level Policy Change, DPAPI Activity and Group Membership auditing. - Add audit-server.csv (Kerberos, Directory Service) applied automatically on Windows Server SKUs; -AuditProfile overrides. - Add sacls.psd1 and per-object audit rules (SACLs) on persistence and tampering registry keys and folders, so the File System and Registry categories actually produce events. Recorded in state and removed by -Revert; -SkipObjectAuditing opts out. WinLogs.Acl.ps1 holds the helpers (registry SACLs need SeSecurityPrivilege and a Win32 key open). - Size/enable more channels (NTLM, Security-Mitigations, PrintService, SmbClient, AppLocker, Diagnosis-Scripted, DriverFrameworks, PowerShellCore, and DC/DNS channels on Server). - Tests assert profile-specific audit settings, SACL add/remove, and that 4657 and 4663 events fire; CI adds a windows-11-arm client job. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ClaySecAI
added a commit
that referenced
this pull request
Oct 17, 2026
Windows: audit coverage true-up, Server profile, per-object audit rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to the Windows modernization: widen what is audited so the logs are useful for defense and operations work, not only malware analysis.
More audit categories on: SAM, Other Policy Change Events, MPSSVC Rule-Level Policy Change (firewall rule changes), DPAPI Activity, Group Membership. Handle Manipulation, Non Sensitive/Other Privilege Use and Packet Drop stay off because they are very noisy.
Server profile: windows/audit-server.csv adds Kerberos Authentication Service / Service Ticket Operations, Directory Service Access and Replication. Applied automatically on Windows Server SKUs (-AuditProfile Auto|Workstation|Server overrides). Windows 10/11 skip these because they only generate events on a domain controller.
Per-object audit rules (SACLs): the File System and Registry categories log nothing without them. windows/sacls.psd1 (editable) adds success-audit rules on persistence and tamper-prone keys (Run/RunOnce incl. WOW6432Node, Winlogon, IFEO, SilentProcessExit, Services, Session Manager, Lsa, WDigest/SecurityProviders, Defender policy) and folders (all-users StartUp, System32\Tasks, System32\drivers, hosts). -Revert removes exactly what was added; -SkipObjectAuditing opts out. Per-user HKCU hives are not covered.
More channels sized/enabled: NTLM, Security-Mitigations, PrintService, SmbClient Security, AppLocker (4 logs), Diagnosis-Scripted, DriverFrameworks-UserMode, PowerShellCore; plus Directory Service / DNS Server / DFS Replication on Server when the role exists.
windows/WinLogs.Acl.ps1 holds the SACL helpers. Registry SACLs need SeSecurityPrivilege switched on and a key opened with the Win32 API, because Get-Acl -Audit and .NET's OpenSubKey both fail on them (CI found this).
Testing
tests/Test-WinLogs.ps1 now also checks the client/server audit difference, that SACLs are added and removed, and that real events fire (4657 for a Run-key value, 4663 for a file in the StartUp folder). CI passes on windows-2022, windows-2025 and windows-11-arm (a client SKU on ARM64, so this covers the Windows 10/11 profile) under Windows PowerShell 5.1 and PowerShell 7.
Not tested: a real domain controller (the Kerberos/DS categories are applied and verified via auditpol, but no DC events were generated), x64 Windows 10/11 client builds, and the air-gapped path on a machine with no internet.
Notes
This branch edits .github/workflows/windows-test.yml. The Linux PR renames that workflow to test.yml, so whichever merges second needs a trivial conflict fix (keep the windows-11-arm matrix entry).