ShellSpells
  • 🧙‍♂️Welcome!
    • ShellSpells
    • FAQs
    • License & Disclaimer
  • 🐧Linux
    • System Ops
      • Transcripts
      • Help
      • System Info
        • Date/Time
        • System Details
        • Patches & Updates
        • Init System Identification
        • Hostname / Host ID
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Shares
        • Packages
        • Connected Devices
        • Kernel Modules (Drivers)
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Jobs
        • Enumerate
        • Modify
      • Processes
        • Enumerate
        • Modify
        • Custom Script and Shared Object
        • Process I/O Redirection
      • Services
        • Enumerate
        • Modify
        • Create a Service
      • Startup/Boot Scripts
        • Enumerate
        • Modify
      • Security
        • Antivirus
        • Firewall
        • SSH Keys
      • History & Logs
        • History
        • Logs
    • File Ops
      • Search
        • Filename
        • Content
        • Users (Owners)
        • Time
        • Size
        • Permission
        • Hidden Files
        • Inode
        • Find + Exec
        • Notes
      • Enumerate Metadata
      • Modify Metadata
      • Read Content
      • Modify Content
      • Extract Content
      • Sort / Compare / Count
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
    • Terminal Ops
      • Keyboard Shortcuts
      • Tmux Shortcuts
  • 🪟Windows
    • System Ops
      • Transcripts
      • Help
      • System Info
        • One-liners
        • Date/Time
        • System Details
        • Hotfixes
        • Domain or Workgroup
        • Data Execution Prevention
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Installed Software
        • Drivers
        • Shares
      • Registry
        • Enumerate
        • Modify
        • Forensically Relevant Keys
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Tasks
      • Processes
        • Enumerate
        • Modify
      • Services
        • Enumerate
        • Modify
      • Autorun / Startup
        • Enumerate
        • Modify
      • Security
        • Permissions
          • Enumerate
          • Page
        • Antivirus
        • Firewall
          • Enumerate
          • Modify
        • Audit Policies
        • Remoting
          • Enumerate
          • Modify
          • Registry Locations
        • Stored Credentials
      • Remote Command Execution
      • Active Directory
        • Enumerate
        • Modify
      • History & Logs
        • History
        • Logs
      • PowerShell Config
      • Scripting
      • WMIC Notes
    • File Ops
      • Search
        • Filename
        • Time
        • Size
        • Permissions
        • Attributes
        • Wildcarding
      • Enumerate Metadata
        • One Liners
        • Users (Owners)
        • Timestamps
        • Size
        • Permissions
        • Attributes
      • Modify Metadata
        • Change Owner
        • Timestamps
        • Size
        • Attributes
      • Read Content
      • Modify Content
        • Overwrite
        • Insert
        • Append
        • Replace / Remove
        • Convert Case
        • Alternate Data Streams
      • Extract Content
      • Sort / Compare / Count
        • Sort
        • Count
        • Compare
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
      • Output Formatting / Filtering
      • File Formatting
      • Operators
  • ⛓️Network
    • Traffic Manipulation
      • iptables
        • Option List
        • General Commands
        • Filter Tables
        • NAT
        • Mangle
        • Filter for SSH Traffic (Example)
      • nftables
    • Packet Capture
      • Syntax
      • TCPDump Examples
    • Packet Analysis
      • Wireshark
  • 🚗Maneuver
    • SSH
    • Control Sockets
    • RDP
    • Windows Port Proxy
  • 🛩️Data Transfer
    • SCP
    • FTP
    • Netcat
      • Netcat Relays
    • Server Interactions
    • Alternate Methods
  • 🪄REGEX
    • Examples
Powered by GitBook
On this page
  • Enumerate
  • Modify
  • Audit Policy Categories and Sub-Categories
  • Account Logon
  • Account Management
  • Detailed Tracking
  • DS Access
  • Logon/Logoff
  • Object Access
  • Policy Change
  • Privilege Use
  • System
  • Global Object Access Auditing

Was this helpful?

  1. Windows
  2. System Ops
  3. Security

Audit Policies

Enumerate

auditpol /get /category:*

Current audit policy settings for all categories.

auditpol /get /User:UserName / Category:*

Current audit policy settings for user, all audit categories.

auditpol /List /User /V

All user-level audit policy settings.

auditpol (auditpol /get /category:*)

Check policies <auditusr on xp/2003>

Get-AuditPolicy

Gets the audit policy for one or more audit subcategories.

wevtutil gp Microsoft-Windows-Security-Auditing /ge:true

Gets the audit policy settings for the Security log using wevtutil.

secedit /export /cfg C:\auditpolicy.txt

Exports the security settings, including audit policies, to a text file.

Get-GPOReport -All -ReportType Xml -Path C:\GPOAuditReport.xml

Generates a report of all Group Policy Objects, including audit policy settings, in XML.

gpresult /H C:\GPOReport.html /SCOPE COMPUTER

Generates an HTML report that includes the results of Group Policy application, which covers audit policies for the computer.

Shows the logging settings for the current firewall profile, which can indirectly relate to auditing network activities:

netsh advfirewall show currentprofile logging

Filters the Security event log for events with ID 4719, which indicate changes to audit policy settings.

Get-WinEvent -LogName "Security" | Where-Object { $_.Id -eq 4719 }

Retrieves the 50 most recent security events with Event ID 4719, indicating changes to audit policies.

Get-EventLog -LogName Security -Newest 50 | Where-Object { $_.EventID -eq 4719 }

Modify

Disables auditing for all subcategories under Logon/Logoff:

auditpol /set /category:"Account Logon" /success:disable /failure:disable

Enables both success and failure auditing for the Logon events:

auditpol /set /subcategory:"Credential Validation" /success:enable /failure:enable

Deletes (resets) audit policy settings for all subcategories to default values.

auditpol /delete /subcategory:"*"

Uses PowerShell to enable success auditing and disable failure auditing for Account Management.

Set-AuditPolicy -Category "Account Logon" -Success Enable -Failure Disable

Sets success and failure auditing for the Logon subcategory using PowerShell:

Set-AuditPolicy -SubCategory "Credential Validation" -Success Failure

Enables auditing for all subcategories for both success and failure events using PowerShell:

Set-AuditPolicy -All -Success:enable -Failure:enable

Backs up the current audit policy settings to a file.

auditpol /backup /file:C:\auditpol_backup.txt

Restores audit policy settings from a backup file.

auditpol /restore /file:C:\audit_policy_backup.txt

Audit Policy Categories and Sub-Categories

The audit categories and subcategories in Windows are part of the Advanced Audit Policy Configuration, which allows administrators to get more granular with their audit policies.

Here's a summary of the main categories and some of their subcategories as of my last update:

Account Logon

Credential Validation

Kerberos Service Ticket Operations

Kerberos Authentication Service

Other Account Logon Events

Account Management

Computer Account Management

Security Group Management

Distribution Group Management

Application Group Management

Other Account Management Events

User Account Management

Detailed Tracking

DPAPI Activity

Process Creation

Process Termination

RPC Events

DS Access

Directory Service Access

Directory Service Changes

Directory Service Replication

Detailed Directory Service Replication

Logon/Logoff

Account Lockout

IPsec Main Mode

IPsec Quick Mode

IPsec Extended Mode

Special Logon

Logoff

Logon

Network Policy Server

Other Logon/Logoff Events

User / Device Claims

Object Access

Application Generated

Certification Services

Detailed File Share

File Share

File System

Filtering Platform Connection

Filtering Platform Packet Drop

Handle Manipulation

Kernel Object

Other Object Access Events

Registry

SAM

Policy Change

Audit Policy Change

Authentication Policy Change

Authorization Policy Change

MPSSVC Rule-Level Policy Change

Filtering Platform Policy Change

Other Policy Change Events

Privilege Use

Non-Sensitive Privilege Use

Other Privilege Use Events

Sensitive Privilege Use

System

IPsec Driver

Other System Events

Security State Change

Security System Extension

System Integrity

Global Object Access Auditing

File System

Registry

Each category and subcategory provides specific events that can be audited to give administrators insight into the security and operations of a Windows environment.

The availability of certain categories and subcategories can depend on the version of Windows you are using.

PreviousModifyNextRemoting

Last updated 1 year ago

Was this helpful?

🪟