1. Resources
  2. Detection rules
  3. Authentication Coercion (PetitPotam, PrinterBug, DFSCoerce)

Authentication Coercion (PetitPotam, PrinterBug, DFSCoerce) detection rules

RPC interfaces such as EFSRPC, the print spooler and DFS namespace management can be called to make a domain controller authenticate to an attacker, who relays or captures it. Named-pipe access on IPC$ (5145) is the trace.

Platform
Active Directory
Severity
High
Log source
Windows Security event log
Last updated
MITRE ATT&CK technique
T1187Forced Authentication
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Network access to the target over SMB, usually with any domain account, and a relay target that accepts the machine's authentication or a host with unconstrained delegation.
Impact
Relaying a domain controller's coerced authentication commonly ends with a certificate or ticket for its machine account, which allows DCSync and full domain compromise.
Response
Isolate the host that received the coerced authentication, disable the account that opened the pipe, and revoke any certificate issued for the domain controller's machine account.
Mitigation
Disable the Print Spooler service on domain controllers, and remove relay targets with SMB signing, LDAP signing and channel binding, and Extended Protection on AD CS web enrollment.
Event ID
5145
Threat groups
DarkHydrusDragonfly

How the attack works

Several Windows RPC interfaces accept a UNC path from the caller and make the server connect to it with its machine account. Calling them against a domain controller forces the DC to authenticate to a host the attacker controls. Well-known examples are MS-EFSR (PetitPotam), the print spooler's MS-RPRN (PrinterBug), MS-DFSNM (DFSCoerce) and MS-FSRVP (ShadowCoerce).

The coerced authentication is then relayed, for example to AD CS web enrollment to obtain a certificate for the domain controller, or captured by a host with unconstrained delegation to steal the DC's TGT. Over SMB the attacker first opens the interface's named pipe on the target's IPC$ share. With "Audit Detailed File Share" enabled, the domain controller logs this in event 5145 with the pipe name in RelativeTargetName (efsrpc, spoolss, netdfs, FssagentRpc).

What an attacker needs

  • Network access to the target over SMB. Most coercion methods need any domain account; unpatched systems may accept anonymous calls.
  • The relevant service running on the target, such as Print Spooler for PrinterBug, DFS Namespaces for DFSCoerce or the File Server VSS Agent for ShadowCoerce.
  • A relay target that accepts the machine's authentication (for example AD CS HTTP enrollment, or LDAP without signing and channel binding), or a host with unconstrained delegation.

Impact

Coercing a domain controller and relaying its authentication commonly ends with a certificate or ticket for the DC's machine account, which allows DCSync and full domain compromise.

Detection rules

Named Pipe Used for Authentication Coercion Opened over SMB

Detects access over SMB (5145, IPC$ share) to the named pipes of RPC interfaces commonly abused to coerce authentication: efsrpc (MS-EFSR, PetitPotam), spoolss (MS-RPRN, PrinterBug), netdfs (MS-DFSNM, DFSCoerce) and FssagentRpc (MS-FSRVP, ShadowCoerce). Deploy on domain controllers and other Tier 0 servers with "Audit Detailed File Share" enabled; on print servers spoolss access is normal.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: Named Pipe Used for Authentication Coercion Opened over SMB
id: 5168eb11-b0c7-4320-8fef-33c692c59964
status: experimental
description: >-
  Detects access over SMB (5145, IPC$ share) to the named pipes of RPC
  interfaces commonly abused to coerce authentication: efsrpc (MS-EFSR,
  PetitPotam), spoolss (MS-RPRN, PrinterBug), netdfs (MS-DFSNM, DFSCoerce) and
  FssagentRpc (MS-FSRVP, ShadowCoerce). Deploy on domain controllers and other
  Tier 0 servers with "Audit Detailed File Share" enabled; on print servers
  spoolss access is normal.
references:
  - https://attack.mitre.org/techniques/T1187/
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5145
  - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-efsr/1baaad2f-7a84-4238-b113-f32827a39cd2
  - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rprn/848b8334-134a-4d02-aea4-03b673d6c515
  - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dfsnm/af348786-37e1-47a7-90f9-25727c350c38
  - https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fsrvp/92d20000-dcbc-4ec1-bf10-9a38c828436d
author: Forestall
date: 2026-11-10
tags:
  - attack.credential-access
  - attack.t1187
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5145
    ShareName|endswith: '\IPC$'
    RelativeTargetName:
      - efsrpc
      - spoolss
      - netdfs
      - FssagentRpc
  condition: selection
falsepositives:
  - Print management against a domain controller that is also a print server (spoolss), DFS namespace administration (netdfs) and shadow copy backups of file shares (FssagentRpc). Exclude the management and backup hosts by IpAddress.
level: medium

False positives

  • Print management against a domain controller that is also a print server (spoolss), DFS namespace administration (netdfs) and shadow copy backups of file shares (FssagentRpc). Exclude the management and backup hosts by IpAddress.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Coercion pipe opened on a domain controller, then its account authenticates to another host

Detection hypothesisSequence of eventsJoins two logsNeeds your own lists

The pipe access shows only that an abusable interface was called. The coercion has worked when the domain controller's own account then authenticates to another system: over NTLM to a relay that passes it on, or over Kerberos to a host trusted for unconstrained delegation. The pipe event followed within minutes by such an authentication of the same domain controller's account confirms the coercion and names the receiving host.

  1. A coercion pipe is opened: event 5145 on a domain controller with ShareName ending in IPC$ and RelativeTargetName efsrpc, spoolss, netdfs or FssagentRpc. Keep the domain controller in Computer, SubjectUserName and IpAddress.
  2. Within 5 minutes, look for the account of that domain controller (its name followed by a dollar sign) as TargetUserName of event 4624 with LogonType 3 on any computer that is not a domain controller.
  3. In the same window, look for it as UserName of NTLM operational event 8004 on the domain controllers, where SChannelName names the server the authentication came through.
  4. Look on the domain controllers for event 4769 whose TargetUserName is that account and whose ServiceName is a computer that is not a domain controller, and for event 4768 for that account with a CertThumbprint that is not empty.
  5. Report each match with the receiving host. It is the relay, a host with unconstrained delegation, or the certificate authority that received the relayed request.

Events51454624800447694768

LimitsDomain controllers sign in to some member servers for their own work, so build the list of hosts they normally reach. Coercion through the lsarpc, samr or netlogon pipes has no matching 5145 event. A logon on the attacker's own machine is never in the logs, which is why the domain controller side counts. Event 8004 exists only with NTLM auditing enabled. The 5 minutes are a starting point.

Triage

  • Identify the caller (SubjectUserName, IpAddress). Remote access to these pipes on a domain controller from a workstation or by an ordinary user is unusual.
  • Look for an outbound authentication by the domain controller to that or another unusual host right after the event, such as DC machine account logons on member servers, NTLM authentications or AD CS certificate requests for the DC.
  • Check whether the DC's machine account then requested a TGT from an unexpected IP address or appears in a certificate issued by AD CS.
  • EFSRPC can also be reached through the lsarpc, samr, netlogon and lsass pipes, which normal clients use constantly; this rule does not cover those paths, so review EFSRPC exposure separately.

Response

Once the attack is confirmed:

  1. Isolate the host that received the coerced authentication and disable the account that opened the pipe on the domain controller.
  2. If the authentication of the domain controller was relayed to AD CS, revoke the certificate that was issued for its machine account. Such a certificate allows DCSync, so respond as for DCSync if it was issued or used.
  3. If the authentication was captured by a host with unconstrained delegation, treat that host as compromised and the domain controller's ticket as stolen, and remove the delegation setting from the host.
  4. Close the interface and the relay target that were used in this incident first, then work through the rest of the mitigation list.
  5. Review domain controllers for replication requests and logons made with the coerced machine account from an address that is not the domain controller's own.

Mitigation

  • Disable the Print Spooler service on domain controllers and other Tier 0 servers.
  • Remove relay targets. Require HTTPS with Extended Protection for Authentication on AD CS web enrollment (KB5005413), enforce LDAP signing and channel binding, and require SMB signing.
  • Keep domain controllers on current security updates for EFSRPC and other coercible interfaces, and filter RPC interfaces that are not needed.
  • Remove unconstrained delegation from every computer that is not a domain controller.

Frequently asked questions

Does the rule see coercion through every pipe an attacker can use?

No. It matches the pipes efsrpc, spoolss, netdfs and FssagentRpc. EFSRPC can also be reached through the lsarpc, samr, netlogon and lsass pipes, which normal clients use constantly, so the rule leaves them out. Coercion that takes one of those paths is not detected here and has to be found through what follows it.

Is an alert proof that the domain controller was coerced?

No. The event shows that a caller opened the named pipe of an interface that can be abused. Print management, DFS namespace administration and shadow copy backups open the same pipes. Coercion is confirmed by what follows, such as an outbound authentication of the domain controller to an unusual host or a certificate request for its machine account.

Where does the rule have to run and what does it depend on?

It reads event 5145 on the machine whose pipe is opened, so it has to run on domain controllers and other Tier 0 servers, each with the audit subcategory Audit Detailed File Share enabled. A coerced server without that subcategory, or whose Security log is not collected, produces no alert. On print servers access to spoolss is normal and needs an exclusion.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.