Audit Policy Tampering Via Auditpol
A Sigma rule for process creation on Windows, by Janantha Marasinghe (https://github.com/blueteam0ps).
high 1 ATT&CK technique 2 programs it names 9 everyday examples trip it
What it looks for
detection:
selection_cli:
CommandLine|contains:
- 'disable'
- 'clear'
- 'remove'
- 'restore'
selection_img:
- Image|endswith: '\auditpol.exe'
- OriginalFileName: 'AUDITPOL.EXE'
condition: all of selection_*
The rule’s detection, its selections and fields in order of name. The whole rule, with its references and false positives, is on SigmaHQ, by Janantha Marasinghe (https://github.com/blueteam0ps), under the Detection Rule License 1.1. CmdID evaluates it on a command line alone: a test on what a command line cannot show, such as the parent process or the user, is not met.
Command lines that trip it
To delete the per-user audit policy for all users, reset (disable) the system audit policy for all subcategories, and set all the audit policy settings to disabled, at a confirmation prompt, type on the page for auditpol clear
auditpol /clearIdentifyTo delete the per-user audit policy for all users, reset the system audit policy settings for all subcategories, and set all the audit policy settings to disabled, without a confirmation prompt, type on the page for auditpol clear
auditpol /clear /yIdentifyTo remove the per-user audit policy for user mikedan by name, type on the page for auditpol remove
auditpol /remove /user:mikedanIdentifyTo remove the per-user audit policy for user mikedan by SID, type on the page for auditpol remove
auditpol /remove /user:{S-1-5-21-397123471-12346959}IdentifyTo remove the per-user audit policy for all users, type on the page for auditpol remove
auditpol /remove /allusersIdentifyTo remove all global resource SACL entries for files or folders on the page for auditpol resourcesacl
auditpol /resourceSACL /type:File /clearIdentifyTo remove all global resource SACL entries for a particular user from files or folders on the page for auditpol resourcesacl
auditpol /resourceSACL /remove /type:File /user:{S-1-5-21-56248481-1302087933-1644394174-1001}IdentifyTo restore system audit policy settings, per-user audit policy settings for all users, and all auditing options from a file named auditpolicy.csv that was created by using the /backup command, type on the page for auditpol restore
auditpol /restore /file:c:\auditpolicy.csvIdentifyTo set the system audit policy for the Object Access and System categories (which is implied because subcategories are listed) and subcategories specified by GUIDs for the suppression of failed attempts and the auditing of successful attempts, type on the page for auditpol set
auditpol /set /subcategory:{0ccee9210-69ae-11d9-bed3-505054503030},{0ccee9211-69ae-11d9-bed3-505054503030}, /failure:disable /success:enableIdentify