Full SigmaHQ catalog

Author
Nasreddine Bencherchali (Nextron Systems), Swachchhanda Shrawan Poudel (Nextron Systems)
Rule ID
0f017df3-8f5a-414f-ad6b-24aff1128278
Collection
Core
Log source
windows / ps_script
Severity
medium
Maturity
test
First published
2022-09-12
Updated
2025-10-06
MITRE ATT&CK
T1685.005

Detection logic

Original SigmaHQ detection and related fields from the pinned file. The source file includes its full metadata.

Sigma YAML
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        - ScriptBlockText|contains:
              - 'Clear-EventLog '
              - 'Remove-EventLog '
              - 'Limit-EventLog '
              - 'Clear-WinEvent '
        - ScriptBlockText|contains|all:
              - 'Eventing.Reader.EventLogSession' # [System.Diagnostics.Eventing.Reader.EventLogSession]::GlobalSession.ClearLog($_.LogName)
              - 'ClearLog'
        - ScriptBlockText|contains|all:
              - 'Diagnostics.EventLog'
              - 'Clear'
    condition: selection
falsepositives:
    - Rare need to clear logs before doing something. Sometimes used by installers or cleaner scripts. The script should be investigated to determine if it's legitimate