Detection rules › Sigma

Shared printer creation (PrintNightmare vulnerability - CVE-2021-36958)

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

Detects scenarios where an attacker exploit the PrintNightmare vulnerability by exposing a vulnerable shared printer. At any case, any new printer share creation should be carefully monitored.

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Shared printer creation (PrintNightmare vulnerability - CVE-2021-36958)
description: Detects scenarios where an attacker exploit the PrintNightmare vulnerability by exposing a vulnerable shared printer. At any case, any new printer share creation should be carefully monitored.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0008-Lateral%20Movement/T1021.002%20-SMB%20Windows%20Admin%20Shares
- 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-printnightmare-cve-2021-1675-34527-vulnerability-using-exabeam/
tags:
- attack.lateral_movement
- attack.t1021.002
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category: security
detection:
  selection:
    EventID:
      - 5142 # file share created
      - 5143 # file share modified
  selection_path:
    - ShareName:
      - \\*\print$
      - \\*\Kiwi Legit Printer # Name can be changed in code
    - ShareLocalPath|endswith: '\system32\spool\drivers'
  condition: selection and selection_path
falsepositives:
- print server, printer shared by a user
level: medium

Stages and Predicates

Stage 0: condition

selection and selection_path

Stage 1: selection

selection:
  EventID:
    - 5142
    - 5143

Stage 2: selection_path

selection_path:
  - ShareName:
    - \\*\print$
    - \\*\Kiwi Legit Printer
  - ShareLocalPath|endswith: '\system32\spool\drivers'

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
ShareLocalPathends_with
  • \system32\spool\drivers
ShareNamewildcard
  • \\*\Kiwi Legit Printer
  • \\*\print$