Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / ACTIVE DIRECTORY / COERCION

Printer Bug

This note documents detection patterns related to Printer Bug within Active Directory environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4624Successful logonHighAuthentication from coerced machine account to attacker-controlled host or relay target.
Security4769Kerberos service ticket requestHighService tickets generated during coerced authentication.
Security4776NTLM authenticationCriticalMachine account authentication triggered via coercion.
Security5140Network share accessedMediumSMB authentication attempts triggered by coercion.
Sysmon3Network connectionCriticalConnection from coerced host to attacker system on SMB (445) or HTTP relay endpoints.
Sysmon1Process creationMediumExecution of tools triggering Printer Bug attack.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Authentication from machine accountComputer account authenticating unexpectedlyCriticalPrinter Bug coerces machine authentication.
Outbound authentication from serverServer authenticating to unusual hostHighCommon relay scenario indicator.
SMB connections initiated by domain controllersDC initiating outbound SMB authenticationCriticalOften indicates coercion attempt.
Execution of coercion toolsProcesses related to PrinterBug or SpoolSampleCriticalDirect evidence of exploitation.
NTLM authentication followed by relay activityAuthentication immediately used against other serviceHighIndicates NTLM relay chain.

Common Tools

ToolUsage
SpoolSampleTriggers Printer Bug coercion via MS-RPRN protocol.
PrinterBug.pyImpacket script exploiting printer service authentication.
ntlmrelayxRelays coerced authentication to other services.
CoercerFramework automating coercion attacks.
CrackMapExecUsed together with relay attacks.

Relevant Artifacts

  • Domain controller Security logs (4624, 4769, 4776)
  • SMB authentication logs
  • Network traffic logs showing outbound SMB connections
  • Sysmon logs (1, 3)
  • EDR telemetry identifying coercion tools
  • Prefetch artifacts for PrinterBug or SpoolSample
  • Authentication logs on relay target systems
  • NTLM relay artifacts

MITRE ATT&CK References

  • T1187 Forced Authentication
  • T1557 Adversary-in-the-Middle
  • T1557.001 LLMNR/NBT-NS Poisoning and SMB Relay

Decision Tree

  1. Is the suspicious event present?
    • Identify machine account authentication events.
  2. What host generated the event?
    • Determine which server initiated authentication.
  3. Is the authentication expected?
    • Investigate whether machine normally authenticates to destination.
  4. Pivot:
    • Source host → inspect execution of coercion tools.
    • Destination host → analyze relay attempts.
    • Network → inspect SMB authentication flows.
  5. Confirm exploitation
    • Determine whether coerced authentication was relayed to escalate privileges.

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4776
| where TargetUserName endswith "$"
DeviceNetworkEvents
| where RemotePort == 445
| summarize count() by RemoteIP, InitiatingProcessAccountName, bin(TimeGenerated,5m)

EQL

any where event.code == "4776"

Sigma

title: Suspicious Machine Account Authentication
id: printerbug-coercion-detection
status: experimental
description: Detects machine account authentication that may indicate Printer Bug coercion
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4776
  condition: selection
fields:
  - TargetUserName
  - Workstation
falsepositives:
  - Legitimate machine authentication
level: medium
tags:
  - attack.lateral_movement
  - attack.t1187

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Spooler serviceDisable Print Spooler on domain controllersCriticalPrevents exploitation of printer protocol.
NTLM restrictionsDisable or restrict NTLM authenticationHighReduces relay attack surface.
SMB signingRequire SMB signing across domainHighPrevents NTLM relay.
MonitoringAlert on machine account outbound authenticationHighDetects coercion attempts.
Network segmentationLimit SMB communication between serversMediumReduces relay opportunities.
RegistryRegisterSpoolerRemoteRpcEndPoint set to 2<br><br>reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Printers" /v RegisterSpoolerRemoteRpcEndPoint /t REG_DWORD /d 2 /f<br><br>Requires machine restart!<br><br>CriticalDisables Printer Spooler