AD CS Web Enrolment Vulnerable to NTLM Relay (ESC8)
An AD CS web enrolment endpoint accepts NTLM authentication without relay protection, so coerced or intercepted authentication can be relayed to obtain certificates.
| Severity | High |
| CVSS 3.1 | 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 8.7 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-294: Authentication Bypass by Capture-replay |
| OWASP Top 10 | A07:2025 Authentication Failures |
| MITRE ATT&CK | T1557 Adversary-in-the-Middle, T1649 Steal or Forge Authentication Certificates, T1187 Forced Authentication |
| Category | Security Misconfiguration |
Description
Active Directory Certificate Services (AD CS) can offer HTTP-based enrolment interfaces: the Certification Authority Web Enrolment pages, normally at /certsrv/, and the Certificate Enrolment Web Service. When such an endpoint accepts NTLM authentication over plain HTTP, or over HTTPS without Extended Protection for Authentication (EPA), it cannot tell whether the authentication it receives has been relayed from another connection. An attacker who receives NTLM authentication from a computer or user can therefore relay it to the endpoint and request a certificate in the victim's name from any template the victim may use, such as the default templates for computers and domain controllers.
The attack needs network access to the endpoint and a source of NTLM authentication. It is usually combined with authentication coercion, in which any domain user makes a server, often a domain controller, connect to a host the attacker controls through RPC interfaces such as MS-EFSR (PetitPotam) or the print spooler's MS-RPRN. Authentication captured by poisoning name resolution, from a position on the local network, can be relayed in the same way.
Relaying a domain controller's authentication yields a certificate for its computer account, which the attacker can use to obtain a Kerberos ticket for that account through PKINIT and then replicate every password hash in the domain with DCSync, amounting to full control of the domain. Relaying other computers or users gives control of those accounts in the same way. The certificate stays valid for the template's validity period, often a year, even if the account's password is changed, so it also provides persistence.
The weakness is identified by finding certification authorities with the web interfaces installed and checking whether each endpoint offers NTLM, through a WWW-Authenticate: NTLM or Negotiate challenge, over HTTP or over HTTPS without channel binding. It is documented as ESC8 in the Certified Pre-Owned research, Certipy reports vulnerable web enrolment as ESC8, and the relay can be demonstrated with Impacket's ntlmrelayx in its AD CS mode or with Certipy's relay command.
Remediation
- Remove the Certification Authority Web Enrolment role and the Certificate Enrolment Web Service wherever they are not needed. Domain-joined clients normally enrol through autoenrolment over RPC and do not use the web interfaces.
- Where the web interfaces are needed, follow Microsoft's guidance in KB5005413: in IIS Manager, set Extended Protection to Required in the Advanced Settings of Windows Authentication for the
CertSrvapplication and for the enrolment web service, and select Require SSL so that plain HTTP is refused. The enrolment web service also needs the matching extended protection setting in itsweb.configfile, as the article describes. EPA binds the authentication to the TLS session, so relayed authentication fails. - Disable NTLM on these sites where clients can use Kerberos, for example by removing the NTLM provider from Windows Authentication in IIS, or by applying Network security: Restrict NTLM: Incoming NTLM traffic to the certification authority servers.
- Reduce the sources of relayable authentication: keep domain controllers up to date, disable the Print Spooler service on them and address the other coercion routes.
- Review recently issued certificates for requests that were not expected, especially certificates for domain controller accounts issued outside normal autoenrolment, and revoke any that were not legitimately requested.
Confirm the fix by repeating the relay against each endpoint, which should be refused, and by checking that no endpoint offers NTLM over plain HTTP.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.