Detection logic
Original SigmaHQ detection and related fields from the pinned file. The source file includes its full metadata.
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection_action:
# Whole words only: as plain substrings, 'ls' and 'gci' also match words such as 'false' or 'credentials'
ScriptBlockText|re|i: '\b(?:get-childitem|gci|ls|dir)\b'
selection_recurse:
ScriptBlockText|contains: '-recurse'
selection_file:
ScriptBlockText|contains:
- '.pass'
- '.kdbx'
- '.kdb'
condition: all of selection_*
falsepositives:
- Unknown