Source: CQURE Academy
Author: Daniel
URL: https://cqureacademy.com/blog/cqure-hacks-83-attack-on-active-directory-certificate-services-ad-cs-esc16/
ONE SENTENCE SUMMARY:
ESC16 exploits missing SID extensions and weak mapping to impersonate accounts via UPN changes, enabling domain compromise through AD CS.
MAIN POINTS:
- ESC16 arises when a CA omits the SID security extension in certificates.
- SID extension normally binds certificates strongly to specific Active Directory accounts.
- Without SID binding, weak certificate mapping can rely on UPN identity fields.
- A low-privileged user, bob, can modify his own userPrincipalName attribute.
- Bob changes his UPN to Administrator before requesting a standard user certificate.
- The CA issues a certificate embedding Administrator UPN, yet tied to Bob’s SID.
- Bob restores his original UPN after obtaining the misbound certificate.
- KDC maps the certificate to the real Administrator account during authentication.
- Attacker obtains an Administrator TGT and recovers the Administrator NT hash.
- With Domain Admin rights, DCSync retrieves the krbtgt account hash.
TAKEAWAYS:
- Enforce SID security extension issuance to prevent ambiguous certificate-to-account binding.
- Disable weak certificate mapping behaviors that allow UPN-based identity confusion.
- Restrict permissions to modify identity attributes like userPrincipalName.
- Audit AD CS templates, CA settings, and KDC mapping configurations regularly.
- Minor PKI misconfigurations can cascade into full Active Directory domain compromise.