Detection rules › Sigma
Spool process spawned a CMD shell (PrintNightmare vulnerability - CVE-2021-36958)
Detects scenarios where an attacker exploits the PrintNightmare vulnerability and obtained a CMD shell.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1574.002 Hijack Execution Flow: DLL Side-Loading |
| Stealth | T1574.002 Hijack Execution Flow: DLL Side-Loading |
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: 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_sysmonStage 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.
| Field | Kind | Values |
|---|---|---|
Image | ends_with |
|
NewProcessName | ends_with |
|
ParentImage | ends_with |
|
ParentProcessName | ends_with |
|
Version | eq |
|