Detection rules › Sigma

Spool process spawned a CMD shell (PrintNightmare vulnerability - CVE-2021-36958)

Status
experimental
Severity
high
Log source
product windows, category process_creation
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker exploits the PrintNightmare vulnerability and obtained a CMD shell.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Spool process spawned a CMD shell (PrintNightmare vulnerability - CVE-2021-36958)
description: Detects scenarios where an attacker exploits the PrintNightmare vulnerability and obtained a CMD shell.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0004-Privilege%20Escalation/T1574-DLL%20side-loading
- https://github.com/GossiTheDog/SystemNightmare
- https://github.com/outflanknl/PrintNightmare
- https://github.com/cube0x0/CVE-2021-1675
- https://github.com/xbufu/Mimispool
- https://github.com/gentilkiwi/mimikatz/tree/master/mimispool
- https://www.theregister.com/2021/09/21/microsoft_printnightmare/
- https://www.exabeam.com/information-security/detecting-the-printnightmre-cve-2021-1675-34527-vulnerability-using-exabeam/
- https://tdm.socprime.com/tdm/info/JCBHD21ATmuT/#sigma
tags:
- attack.privilege_escalation
- attack.t1574.002
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category: process_creation
detection:
  selection_native:
    EventID: 4688
    Version: 2  # parent process name is available starting Windows 10 / Server 2016 and higher
    ParentProcessName|endswith: \spoolsv.exe
    NewProcessName|endswith: \cmd.exe

  selection_sysmon:
    EventID: 1
    ParentImage|endswith: \spoolsv.exe
    Image|endswith: \cmd.exe
  condition: selection_native or selection_sysmon
falsepositives:
- none
level: high

Stages and Predicates

Stage 0: condition

selection_native or selection_sysmon

Stage 1: selection_native

selection_native:
  EventID: 4688
  Version: 2
  ParentProcessName|endswith: \spoolsv.exe
  NewProcessName|endswith: \cmd.exe

Stage 2: selection_sysmon

selection_sysmon:
  EventID: 1
  ParentImage|endswith: \spoolsv.exe
  Image|endswith: \cmd.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
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
NewProcessNameends_with
  • \cmd.exe corpus 130 (sigma 130)
ParentImageends_with
  • \spoolsv.exe corpus 5 (sigma 5)
ParentProcessNameends_with
  • \spoolsv.exe
Versioneq
  • 2 corpus 7 (sigma 7)