Detection rules › Sigma

PowerShell Script Dropped Via PowerShell.EXE

Severity
low
Author
frack113
Source
upstream

Detects PowerShell creating a PowerShell file (.ps1). While often times this behavior is benign, sometimes it can be a sign of a dropper script trying to achieve persistence.

Event coverage

ProviderEvent IDTitle
Sysmon11FileCreate

Stages and Predicates

Stage 1: selection

or:
Image|endswith: '\powershell.exe'
Image|endswith: '\pwsh.exe'
TargetFilename|endswith: .ps1

Stage 2: not 1 of filter_main_*

or:
TargetFilename|contains: '\AppData\Local\Temp\'
TargetFilename|startswith: 'C:\Users\'
TargetFilename|contains: __PSScriptPolicyTest_
TargetFilename|startswith: 'C:\Windows\Temp\'

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
Imageends_with
  • \powershell.exe corpus 143 (sigma 143)
  • \pwsh.exe corpus 140 (sigma 140)
TargetFilenameends_with
  • .ps1 corpus 15 (sigma 15)
TargetFilenamematch
  • \AppData\Local\Temp\ corpus 11 (sigma 11)
  • __PSScriptPolicyTest_ corpus 2 (sigma 2)
TargetFilenamestarts_with
  • C:\Users\ corpus 12 (sigma 12)
  • C:\Windows\Temp\ corpus 4 (sigma 4)