T1547.010 IBM QRadar · QRadar

Detect Port Monitors in IBM QRadar

Adversaries may use port monitors to run an adversary-supplied DLL during system boot for persistence or privilege escalation. A port monitor can be set through the AddMonitor API call to set a DLL to be loaded at startup. This DLL can be located in C:\Windows\System32 and will be loaded and run by the print spooler service, spoolsv.exe, under SYSTEM level permissions on boot. Alternatively, an arbitrary DLL can be loaded if permissions allow writing a fully-qualified pathname for that DLL to the Driver value of an existing or new arbitrarily named subkey of HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors.

MITRE ATT&CK

Tactic
Persistence Privilege Escalation
Technique
T1547 Boot or Logon Autostart Execution
Sub-technique
T1547.010 Port Monitors
Canonical reference
https://attack.mitre.org/techniques/T1547/010/

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT DATEFORMAT(devicetime, 'yyyy-MM-dd HH:mm:ss') AS event_time, logsourcename(logsourceid) AS log_source, username, sourceip, QIDNAME(qid) AS event_name, "TargetObject", "Details", "Image", "CommandLine"
FROM events
WHERE LOGSOURCETYPENAME(devicetype) ILIKE '%Sysmon%'
  AND ("TargetObject" ILIKE '%Control\\Print\\Monitors%'
    OR ("Image" ILIKE '%spoolsv.exe'
        AND "CommandLine" NOT ILIKE '%splwow64.exe%'
        AND "CommandLine" NOT ILIKE '%PrintIsolationHost.exe%'
        AND "CommandLine" NOT ILIKE '%printfilterpipelinesvc.exe%')
    OR ("TargetFilename" ILIKE 'C:\\Windows\\System32\\%.dll'
        AND "Image" NOT ILIKE '%TiWorker.exe'
        AND "Image" NOT ILIKE '%TrustedInstaller.exe'
        AND "Image" NOT ILIKE '%msiexec.exe'))
  AND devicetime > (NOW() - 86400000)
UNION
SELECT DATEFORMAT(devicetime, 'yyyy-MM-dd HH:mm:ss') AS event_time, logsourcename(logsourceid) AS log_source, username, sourceip, QIDNAME(qid) AS event_name, "TargetObject", "Details", "Image", "CommandLine"
FROM events
WHERE LOGSOURCETYPENAME(devicetype) ILIKE '%Windows Security%'
  AND eventid = 4657
  AND "ObjectName" ILIKE '%Control\\Print\\Monitors%'
  AND devicetime > (NOW() - 86400000)
ORDER BY event_time DESC
high severity medium confidence

Detects T1547.010 Port Monitor persistence by querying Sysmon registry modification events targeting the Print Monitors registry path, unusual child processes from spoolsv.exe, and suspicious DLL file creation in System32. Also includes Windows Security event 4657 for registry value modifications.

Data Sources

Sysmon via QRadar DSMWindows Security Event LogQRadar Universal DSM

Required Tables

events

False Positives & Tuning

  • Legitimate print server administration activities that register new port monitors for enterprise printing infrastructure
  • Software deployment tools (SCCM, Intune) pushing printer driver packages that include port monitor DLLs
  • Helpdesk or IT technician activities installing specialized printer hardware with custom spooler components
Download portable Sigma rule (.yml)

Other platforms for T1547.010


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Port Monitor Registry Key Creation

    Expected signal: Sysmon Event ID 13: Registry Value Set with TargetObject=HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\TestMonitor_df00tech\Driver, Details=localspl.dll, Image=reg.exe. Security Event ID 4688 with CommandLine containing reg add.

  2. Test 2DLL Drop in System32 Simulating Port Monitor Payload

    Expected signal: Sysmon Event ID 11: File Create with TargetFilename=C:\Windows\System32\df00tech_test_monitor.dll, Image=cmd.exe. DeviceFileEvents with ActionType=FileCreated, FolderPath starting with C:\Windows\System32.

  3. Test 3PowerShell AddMonitor API Simulation via Registry

    Expected signal: Sysmon Event ID 12: Registry Key Created for PSTestMonitor subkey. Sysmon Event ID 13: Registry Value Set for Driver value. Sysmon Event ID 1: Process Create for powershell.exe with the full command line. PowerShell ScriptBlock Log Event ID 4104 with the registry manipulation commands.

Unlock Pro Content

Get the full detection package for T1547.010 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections