Skip to content
Threat Feed
medium advisory

Windows Print Monitor Registry Abuse for Persistence

Attackers achieve persistence and privilege escalation by modifying the Print Monitors registry key to force the system to load an arbitrary malicious DLL under SYSTEM privileges.

Attackers may abuse the Windows print system to achieve persistence and privilege escalation by modifying the registry key HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors. By adding a new subkey or modifying an existing one to point to an arbitrary DLL, the attacker forces the print spooler service to load the malicious library. Because the print spooler service operates with SYSTEM-level privileges, the loaded DLL executes with the same high-level permissions. This technique is highly effective for maintaining stealthy persistence, as the malicious code is loaded automatically by the operating system upon service start or system reboot. Detection relies on monitoring registry modification events that specifically target these printer-related configuration keys, which are rarely modified by standard software after the initial OS installation.

Attack Chain

  1. Attacker gains administrative access to the target Windows system.
  2. Attacker prepares a malicious DLL containing the desired payload.
  3. Attacker drops the malicious DLL into a persistent location on the filesystem.
  4. Attacker modifies the registry key HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors by adding a new entry.
  5. The new registry entry is configured to point the Driver value to the malicious DLL path.
  6. The print spooler service (spoolsv.exe) initializes or restarts.
  7. The system automatically loads the malicious DLL into the print spooler process.
  8. The malicious code executes with SYSTEM-level privileges, ensuring persistent access for the attacker.

Impact

Successful exploitation allows attackers to establish long-term persistence that survives system reboots. Furthermore, because the execution occurs within the context of the print spooler service, the attacker effectively escalates their privileges to SYSTEM. This can lead to full system compromise, credential theft, and lateral movement within the network.

Recommendation

Prioritize monitoring for unauthorized changes to printer configuration registry hives.

  • Deploy the Sigma rule below to detect registry modifications targeting the Print Monitors path.
  • Enable Sysmon Event ID 13 (RegistryEvent: Value Set) to capture modifications to HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors.
  • Investigate any new, non-standard DLLs being loaded by the spoolsv.exe process.
  • Baseline legitimate print drivers in the environment to reduce noise during the tuning of these alerts.

Immediate actions

Deploy registry modification detection rule for Print Monitors

Detection Engineering 48h

Threat Hunt

Search for existing Print Monitors registry subkeys with non-standard DLL paths

T1547.010 high high confidence hunt now

Data: Registry audit logs

Detection coverage 1

Detect Print Monitor Registry Modification

medium

Detects additions or modifications to the Print Monitors registry key which can be used to load arbitrary DLLs as SYSTEM

sigma tactics: persistence, privilege_escalation techniques: T1547.010 sources: registry_set, windows

Detection queries are available on the platform. Get full rules →