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.
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
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.
- A coercion pipe is opened: event 5145 on a domain controller with
ShareNameending in IPC$ andRelativeTargetNameefsrpc, spoolss, netdfs or FssagentRpc. Keep the domain controller inComputer,SubjectUserNameandIpAddress. - Within 5 minutes, look for the account of that domain controller (its name followed by a dollar sign) as
TargetUserNameof event 4624 withLogonType3 on any computer that is not a domain controller. - In the same window, look for it as
UserNameof NTLM operational event 8004 on the domain controllers, whereSChannelNamenames the server the authentication came through. - Look on the domain controllers for event 4769 whose
TargetUserNameis that account and whoseServiceNameis a computer that is not a domain controller, and for event 4768 for that account with aCertThumbprintthat is not empty. - 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:
- Isolate the host that received the coerced authentication and disable the account that opened the pipe on the domain controller.
- 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.
- 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.
- Close the interface and the relay target that were used in this incident first, then work through the rest of the mitigation list.
- 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
- MITRE ATT&CK T1187: Forced Authentication
- Event 5145: A network share object was checked to see whether client can be granted desired access
- [MS-EFSR] 1.9 Standards Assignments (efsrpc and lsarpc pipes)
- [MS-RPRN] 1.9 Standards Assignments (spoolss pipe)
- [MS-DFSNM] 2.1 Transport (netdfs pipe)
- [MS-FSRVP] 2.1 Transport (FssagentRpc pipe)
- Event 4624: An account was successfully logged on
- Event 4769: A Kerberos service ticket was requested
- Event 4768: A Kerberos authentication ticket (TGT) was requested
- Network security: Restrict NTLM: Audit NTLM authentication in this domain (event 8004)
- KB5005413: Mitigating NTLM Relay Attacks on Active Directory Certificate Services (AD CS)
- Defender for Identity: Disable Print spooler service on domain controllers