Detection rules › Sigma

PowerShell Download and Execution Cradles

Severity
high
Author
Florian Roth (Nextron Systems)
Source
upstream

Detects PowerShell download and execution cradles.

MITRE ATT&CK coverage

TacticTechniques
ExecutionT1059 Command and Scripting Interpreter

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation
Security-Auditing4688A new process has been created.

Stages and Predicates

Stage 1: all of selection_download

or:
CommandLine|contains: '.DownloadFile('
CommandLine|contains: '.DownloadString('
CommandLine|contains: 'Invoke-RestMethod '
CommandLine|contains: 'Invoke-WebRequest '
CommandLine|contains: 'irm '
CommandLine|contains: 'iwr '

Stage 2: all of selection_iex

or:
CommandLine|contains: ';iex $'
CommandLine|contains: 'IEX ('
CommandLine|contains: 'IEX('
CommandLine|contains: 'IE`X'
CommandLine|contains: 'I`EX'
CommandLine|contains: 'I`E`X'
CommandLine|contains: Invoke-Expression
CommandLine|contains: 'iex '
CommandLine|contains: '| IEX'
CommandLine|contains: '|IEX '

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • .DownloadFile( corpus 3 (sigma 3)
  • .DownloadString( corpus 3 (sigma 3)
  • ;iex $
  • IEX (
  • IEX(
  • IE`X
  • I`EX
  • I`E`X
  • Invoke-Expression corpus 2 (sigma 2)
  • Invoke-RestMethod corpus 2 (sigma 2)
  • Invoke-WebRequest corpus 4 (sigma 4)
  • iex corpus 3 (sigma 3)
  • irm corpus 3 (sigma 3)
  • iwr corpus 8 (sigma 8)
  • | IEX
  • |IEX