Safeguard
Application Security•

Detecting Port Monitor Persistence on Windows (T1547.010)

A port monitor DLL loaded by the print spooler runs as SYSTEM at boot. MITRE T1547.010 explained, with the registry path and spoolsv.exe signals worth monitoring.

Safeguard Security Team
2 min read

Port Monitors is a Windows persistence and privilege escalation technique, tracked as T1547.010 under Boot or Logon Autostart Execution.

How attackers use it

A port monitor can be registered with the AddMonitor API call so that a DLL loads at startup. The DLL can sit in C:\Windows\System32, and it is loaded by the print spooler service, spoolsv.exe, which runs with SYSTEM level permissions at boot.

MITRE also documents a registry route. If permissions allow it, an arbitrary DLL can be loaded by writing its fully qualified path into the Driver value of an existing or new subkey under HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors. That key normally holds entries such as Local Port, Standard TCP/IP Port, USB Monitor and WSD Port.

How to detect it

MITRE's detection strategy brings three signals together.

  • Registry modifications under HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\*\Driver.
  • DLL loads by spoolsv.exe of non-standard or unsigned modules.
  • Use of the AddMonitor API by processes that are not installers.

Add a fourth: new files in C:\Windows\System32 that are not tied to a known patch or install. Together these make a strong pattern for a hidden DLL waiting for the next boot.

How to reduce the risk

MITRE states that this technique cannot be easily mitigated with preventive controls, because it abuses a system feature. That puts weight on detection and on a known-good list of monitors on your standard images.

If a server does not print, consider whether the spooler needs to run at all. That is a general hardening step rather than a MITRE mitigation, so test it before rollout.

Quick check

Which process loads a registered port monitor DLL?

The print spooler service, spoolsv.exe, running as SYSTEM.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.