PrintNightmare (CVE-2021-34527) abused the spooler’s driver installation RPC calls so an authenticated user could make the SYSTEM-level spooler load an attacker-controlled DLL, giving local privilege escalation and, on exposed hosts, remote code execution (T1068). Microsoft shipped fixes and later changed Point and Print defaults, but unpatched hosts, weakened registry settings and spooler enabled on domain controllers still appear in real environments.
Signals at a Glance
| Signal | Where | ATT&CK |
|---|---|---|
| spoolsv.exe spawning cmd, PowerShell, rundll32 or other interpreters | Sysmon 1, 4688 | T1068 |
| DLL written under the spool drivers directory by spoolsv.exe | Sysmon 11, EDR file events | T1068 |
| Spooler failed to load a plug-in module | PrintService/Admin event 808 | T1068 |
| Point and Print restrictions disabled in policy registry keys | Sysmon 13, config audit | T1562.001 |
| Remote AddPrinterDriverEx style RPC calls from a non-admin to a server or DC | Zeek DCE-RPC, network sensors | T1210 |
Process and File Artifacts
Exploit success is visible in two places on the host. The spooler is a long-lived service that should rarely start children, and it should only write signed driver files into its driver store. Either breach of those norms is high confidence:
title: Print Spooler Spawning Suspicious Child Process
logsource:
product: windows
category: process_creation
detection:
selection:
ParentImage|endswith: '\spoolsv.exe'
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\rundll32.exe'
- '\regsvr32.exe'
- '\mshta.exe'
- '\wscript.exe'
filter_driver_helper:
CommandLine|contains: 'PrintUI.dll'
condition: selection and not filter_driver_helper
level: high
# tune/validate: some print drivers launch helper processes; confirm against your driver set.
// Microsoft Defender (KQL) - DLLs written into the spool driver store DeviceFileEvents | where InitiatingProcessFileName =~ "spoolsv.exe" | where FolderPath has "spool" and FolderPath has "drivers" | where FileName endswith ".dll" | project Timestamp, DeviceName, FolderPath, FileName, SHA256, InitiatingProcessAccountName // Follow up: image-load events where spoolsv.exe loaded that SHA256.
Configuration and Exposure
The strongest control is not running the spooler where it is not needed, and verifying that Point and Print has not been weakened. Check both on a schedule and alert on drift:
# Is the spooler running on servers and domain controllers that should not print? Get-Service Spooler | Select-Object Name, Status, StartType # Point and Print settings that weaken the mitigation Get-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint' -ErrorAction SilentlyContinue | Select-Object NoWarningNoElevationOnInstall, UpdatePromptSettings, RestrictDriverInstallationToAdministrators # tune/validate: NoWarningNoElevationOnInstall = 1 or UpdatePromptSettings = 0 is a finding.
- Disable the spooler on domain controllers and other servers that do not print. This also removes coercion techniques that abuse the spooler to force authentication.
- Keep RestrictDriverInstallationToAdministrators enforced, so ordinary users cannot install drivers through RPC.
- Check patch level against the July 2021 fixes and later Windows updates; treat a missing patch on any host with the spooler running as a finding in its own right.
Use Microsoft’s guidance for CVE-2021-34527, the SigmaHQ spooler and PrintService rules, Elastic’s prebuilt rules for spooler child processes and driver DLL loads, and Atomic Red Team where available for validation. Baseline your own environment — print servers have the most legitimate spooler activity.
Build Detections That Fire
Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.
- Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
- Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
- 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Stay ahead of emerging threats. Get notified when we publish new intelligence reports and advisories.
Subscribe to Alerts