CmdID

CmdID / Rules / Windows

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

its detection, as SigmaHQ writes it
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

everyday examples from tldr-pages, CC BY 4.0, each read by CmdID

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 /clearIdentify

To 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 /yIdentify

To remove the per-user audit policy for user mikedan by name, type on the page for auditpol remove

auditpol /remove /user:mikedanIdentify

To 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}Identify

To remove the per-user audit policy for all users, type on the page for auditpol remove

auditpol /remove /allusersIdentify

To remove all global resource SACL entries for files or folders on the page for auditpol resourcesacl

auditpol /resourceSACL /type:File /clearIdentify

To 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}Identify

To 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.csvIdentify

To 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

Programs and files it names

their pages here

ATT&CK

the techniques it is tagged with
T1685.001Disable or Modify Tools: Disable or Modify Windows Event Log