Description
A published certificate template allows a standard domain user to request a certificate that authenticates as any account, including a domain administrator. This is the ESC1 misconfiguration: the template permits requesters to supply the subject name and enables client authentication.
Evidence
PS> Certify.exe find /vulnerable
[!] Vulnerable Certificate Template : CorpComputer
Enrollment Rights : CORP\Domain Users
msPKI-Certificate-Name-Flag : ENROLLEE_SUPPLIES_SUBJECT
pkiExtendedKeyUsage : Client Authentication
PS> Certify.exe request /template:CorpComputer /altname:CORP\Administrator
[*] Certificate issued for CORP\Administrator
A standard user account was able to request a certificate that authenticates as the domain Administrator.
Impact
Any user who can log in, including one an attacker has just phished, can become a domain administrator in minutes. From there the attacker controls every account, server and file share in the domain. There is no exploit code or missing patch here, only a misconfigured template, which is why it is so often missed.
Remediation
Remove the ENROLLEE_SUPPLIES_SUBJECT flag from the template, or restrict enrolment to a small, trusted group and require manager approval. Audit every template for the same pattern, and enable the certificate authority logging that records these requests so future abuse is visible.