Detection rules › Sigma

Obfuscated PowerShell OneLiner Execution

Severity
high
Author
@Kostastsale, TheDFIRReport
Source
upstream

Detects the execution of a specific OneLiner to download and execute powershell modules in memory.

MITRE ATT&CK coverage

TacticTechniques
ExecutionT1059.001 Command and Scripting Interpreter: PowerShell
Defense EvasionT1562.001 Impair Defenses: Disable or Modify Tools

Event coverage

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

Stages and Predicates

Stage 1: selection

CommandLine|contains: '%{(IRM $_)}'
CommandLine|contains: Invoke
CommandLine|contains: 'http://127.0.0.1'
Image|endswith: '\powershell.exe'

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
  • %{(IRM $_)}
  • Invoke
  • http://127.0.0.1
Imageends_with
  • \powershell.exe corpus 143 (sigma 143)