Detection rules › Sigma

Potential PowerShell Execution Via DLL

Severity
high
Author
Markus Neis, Nasreddine Bencherchali (Nextron Systems)
Source
upstream

Detects potential PowerShell execution from a DLL instead of the usual PowerShell process as seen used in PowerShdll. This detection assumes that PowerShell commands are passed via the CommandLine.

MITRE ATT&CK coverage

TacticTechniques
Defense EvasionT1218.011 System Binary Proxy Execution: Rundll32

Event coverage

ProviderEvent IDTitle
Sysmon1Process creation

Stages and Predicates

Stage 1: all of selection_img

or:
Image|endswith: '\InstallUtil.exe'
Image|endswith: '\RegAsm.exe'
Image|endswith: '\RegSvcs.exe'
Image|endswith: '\regsvr32.exe'
Image|endswith: '\rundll32.exe'
OriginalFileName: InstallUtil.exe
OriginalFileName: REGSVR32.EXE
OriginalFileName: RUNDLL32.EXE
OriginalFileName: RegAsm.exe
OriginalFileName: RegSvcs.exe

Stage 2: all of selection_cli

or:
CommandLine|contains: Default.GetString
CommandLine|contains: DownloadString
CommandLine|contains: FromBase64String
CommandLine|contains: 'ICM '
CommandLine|contains: 'IEX '
CommandLine|contains: Invoke-Command
CommandLine|contains: Invoke-Expression

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
  • Default.GetString
  • DownloadString corpus 5 (sigma 5)
  • FromBase64String corpus 7 (sigma 7)
  • ICM
  • IEX
  • Invoke-Command corpus 2 (sigma 2)
  • Invoke-Expression corpus 2 (sigma 2)
Imageends_with
  • \InstallUtil.exe corpus 5 (sigma 5)
  • \RegAsm.exe corpus 3 (sigma 3)
  • \RegSvcs.exe corpus 2 (sigma 2)
  • \regsvr32.exe corpus 57 (sigma 57)
  • \rundll32.exe corpus 76 (sigma 76)
OriginalFileNameeq
  • InstallUtil.exe corpus 5 (sigma 5)
  • REGSVR32.EXE corpus 10 (sigma 10)
  • RUNDLL32.EXE corpus 28 (sigma 25, splunk 3)
  • RegAsm.exe corpus 6 (sigma 6)
  • RegSvcs.exe corpus 5 (sigma 5)