Full SigmaHQ catalog

Author
Austin Songer @austinsonger
Rule ID
bde47d4b-9987-405c-94c7-b080410e8ea7
Collection
Core
Log source
windows / ps_script
Severity
high
Maturity
test
First published
2021-11-25
Updated
2022-12-25
MITRE ATT&CK
T1070, T1070.003

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:
    selection1:
        ScriptBlockText|contains: Clear-History
    selection2a:
        ScriptBlockText|contains:
            - Remove-Item
            - rm
    selection2b:
        ScriptBlockText|contains:
            - ConsoleHost_history.txt
            - (Get-PSReadlineOption).HistorySavePath
    condition: selection1 or selection2a and selection2b
falsepositives:
    - Unknown