Detection rules › Sigma

WMI spwaning PowerShell process - WMImplant

Status
experimental
Severity
high
Log source
product windows, category process_creation
Author
Markus Neis/@Karneades, adapted by mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker WMIimplant

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: WMI spwaning PowerShell process - WMImplant
description: Detects scenarios where an attacker WMIimplant
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0002-Execution/T1047-Windows%20Management%20Instrumentation
- https://github.com/FortyNorthSecurity/WMImplant/
- https://www.darkoperator.com/blog/2017/10/14/basics-of-tracking-wmi-activity
- Inspired from https://github.com/SigmaHQ/sigma/blob/7bca85e40618126643b9712b80bd663c21908e26/rules/windows/process_creation/win_wmi_spwns_powershell.yml
tags:
- attack.execution
- attack.t1047
author: Markus Neis/@Karneades, adapted by mdecrevoisier
status: experimental
logsource:
  product: windows
  category: process_creation
detection:

  selection_basic:
    EventID: 4688
    Version: 2
    ParentProcessName|endswith: \WmiPrvSE.exe
    NewProcessName|endswith:
      - \powershell.exe
      - \pwsh.exe # PowerShell v6
      - \powershell_ise.exe # Development GUI


  selection_sysmon:
    EventID: 1
    ParentImage|endswith: \WmiPrvSE.exe
    Image|endswith|endswith:
      - \powershell.exe
      - \pwsh.exe # PowerShell v6
      - \powershell_ise.exe # Development GUI

  filter:
    CommandLine: "-" # Exclude empty command line

  condition: (selection_basic or selection_sysmon) and not filter
falsepositives:
- Unknown
level: high

Stages and Predicates

Stage 0: condition

(selection_basic or selection_sysmon) and not filter

Stage 1: selection_basic

selection_basic:
  EventID: 4688
  Version: 2
  ParentProcessName|endswith: \WmiPrvSE.exe
  NewProcessName|endswith:
    - \powershell.exe
    - \pwsh.exe
    - \powershell_ise.exe

Stage 2: selection_sysmon

selection_sysmon:
  EventID: 1
  ParentImage|endswith: \WmiPrvSE.exe
  Image|endswith|endswith:
    - \powershell.exe
    - \pwsh.exe
    - \powershell_ise.exe

Stage 3: not filter

filter:
  CommandLine: "-"

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLineeq-

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 182 (sigma 182)
  • \powershell_ise.exe corpus 41 (sigma 41)
  • \pwsh.exe corpus 168 (sigma 168)
NewProcessNameends_with
  • \powershell.exe corpus 182 (sigma 182)
  • \powershell_ise.exe corpus 41 (sigma 41)
  • \pwsh.exe corpus 168 (sigma 168)
ParentImageends_with
  • \WmiPrvSE.exe corpus 8 (sigma 8)
ParentProcessNameends_with
  • \WmiPrvSE.exe corpus 2 (sigma 2)
Versioneq
  • 2 corpus 7 (sigma 7)