Detection rules › Sigma
Suspicious PowerShell Invocations - Specific - ProcessCreation
Detects suspicious PowerShell invocation command parameters
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | No specific technique |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
title: Suspicious PowerShell Invocations - Specific - ProcessCreation
id: 536e2947-3729-478c-9903-745aaffe60d2
related:
- id: fce5f582-cc00-41e1-941a-c6fabf0fdb8c
type: obsolete
- id: ae7fbf8e-f3cb-49fd-8db4-5f3bed522c71
type: similar
- id: 8ff28fdd-e2fa-4dfa-aeda-ef3d61c62090
type: similar
status: test
description: Detects suspicious PowerShell invocation command parameters
references:
- Internal Research
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-05
tags:
- attack.stealth
logsource:
category: process_creation
product: windows
detection:
selection_convert_b64:
CommandLine|contains|all:
- '-nop'
- ' -w '
- 'hidden'
- ' -c '
- '[Convert]::FromBase64String'
selection_iex:
CommandLine|contains|all:
- ' -w '
- 'hidden'
- '-noni'
- '-nop'
- ' -c '
- 'iex'
- 'New-Object'
selection_enc:
CommandLine|contains|all:
- ' -w '
- 'hidden'
- '-ep'
- 'bypass'
- '-Enc'
selection_reg:
CommandLine|contains|all:
- 'powershell'
- 'reg'
- 'add'
- '\software\'
selection_webclient:
CommandLine|contains|all:
- 'bypass'
- '-noprofile'
- '-windowstyle'
- 'hidden'
- 'new-object'
- 'system.net.webclient'
- '.download'
selection_iex_webclient:
CommandLine|contains|all:
- 'iex'
- 'New-Object'
- 'Net.WebClient'
- '.Download'
filter_chocolatey:
CommandLine|contains:
- "(New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1"
- 'Write-ChocolateyWarning'
condition: 1 of selection_* and not 1 of filter_*
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
1 of selection_* and not 1 of filter_*Stage 1: selection_convert_b64
selection_convert_b64:
CommandLine|contains|all:
- '-nop'
- ' -w '
- 'hidden'
- ' -c '
- '[Convert]::FromBase64String'
Stage 2: selection_iex
selection_iex:
CommandLine|contains|all:
- ' -w '
- 'hidden'
- '-noni'
- '-nop'
- ' -c '
- 'iex'
- 'New-Object'
Stage 3: selection_enc
selection_enc:
CommandLine|contains|all:
- ' -w '
- 'hidden'
- '-ep'
- 'bypass'
- '-Enc'
Stage 4: selection_reg
selection_reg:
CommandLine|contains|all:
- 'powershell'
- 'reg'
- 'add'
- '\software\'
Stage 5: selection_webclient
selection_webclient:
CommandLine|contains|all:
- 'bypass'
- '-noprofile'
- '-windowstyle'
- 'hidden'
- 'new-object'
- 'system.net.webclient'
- '.download'
Stage 6: selection_iex_webclient
selection_iex_webclient:
CommandLine|contains|all:
- 'iex'
- 'New-Object'
- 'Net.WebClient'
- '.Download'
Stage 7: not filter_chocolatey
filter_chocolatey:
CommandLine|contains:
- "(New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1"
- 'Write-ChocolateyWarning'
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
CommandLine | match | (New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1 |
CommandLine | match | Write-ChocolateyWarning |
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.
| Field | Kind | Values |
|---|---|---|
CommandLine | match |
|