Adversaries may abuse print processors to run malicious DLLs during system boot for persistence and/or privilege escalation. Print processors are DLLs that are loaded by the print spooler service, spoolsv.exe, during boot.[1]
Adversaries may abuse the print spooler service by adding print processors that load malicious DLLs at startup. A print processor can be installed through the AddPrintProcessor API call with an account that has SeLoadDriverPrivilege enabled. Alternatively, a print processor can be registered to the print spooler service by adding the HKLM\SYSTEM\[CurrentControlSet or ControlSet001]\Control\Print\Environments\[Windows architecture: e.g., Windows x64]\Print Processors\[user defined]\Driver Registry key that points to the DLL.
For the malicious print processor to be correctly installed, the payload must be located in the dedicated system print-processor directory, that can be found with the GetPrintProcessorDirectory API call, or referenced via a relative path from this directory.[2] After the print processors are installed, the print spooler service, which starts during boot, must be restarted in order for them to run.[3]
The print spooler service runs under SYSTEM level permissions, therefore print processors installed by an adversary may run under elevated privileges.
| ID | Name | Description |
|---|---|---|
| G1006 | Earth Lusca |
Earth Lusca has added the Registry key |
| S0666 | Gelsemium |
Gelsemium can drop itself in |
| S0501 | PipeMon |
The PipeMon installer has modified the Registry key |
| ID | Mitigation | Description |
|---|---|---|
| M1018 | User Account Management |
Limit user accounts that can load or unload device drivers by disabling |
| ID | Data Source | Data Component | Detects |
|---|---|---|---|
| DS0027 | Driver | Driver Load |
Monitor for unusual kernel driver installation activity that may abuse print processors to run malicious DLLs during system boot for persistence and/or privilege escalation. |
| DS0022 | File | File Creation |
Monitor for newly constructed files that may abuse print processors to run malicious DLLs during system boot for persistence and/or privilege escalation. |
| DS0011 | Module | Module Load |
Monitor for abnormal DLLs that are loaded by |
| DS0009 | Process | OS API Execution |
Monitor process API calls to |
| DS0024 | Windows Registry | Windows Registry Key Modification |
Monitor Registry writes to |