Active Directory Certificate Services (AD CS) is Microsoft's PKI implementation - and it's a goldmine of vulnerabilities. The "Certified Pre-Owned" research by SpecterOps revealed that most AD environments have certificate template misconfigurations enabling domain takeover.
Think of certificates as VIP ID cards. Normally, you can only get a card with your own photo. But misconfigured templates let you get a card with someone else's photo - and that card works everywhere.
Widespread Vulnerability
Certificate attacks (ESC1-ESC8+) affect most AD environments. Unlike traditional attacks, certificates can provide persistence for years and often go undetected.
AD CS Basics
Enumerating AD CS
ESC1 - Misconfigured Certificate Templates
Exploiting ESC1
Certificate = Long-term Persistence
Certificates are valid for years by default. Even if the user changes their password, the certificate still works. Extract Administrator cert = persistent DA access.
ESC2 - Any Purpose EKU
ESC3 - Enrollment Agent Abuse
ESC4 - Template ACL Abuse
ESC6 - EDITF_ATTRIBUTESUBJECTALTNAME2
ESC7 - CA ACL Abuse
ESC8 - NTLM Relay to Web Enrollment
DC Certificate = Domain Compromise
Getting a DC's certificate means you can authenticate as the DC. From there: DCSync all hashes, create , game over.
Related
Golden Tickets
CVE-2022-26923 (Certifried)
Detection & Defense
Certificate Attack Methodology
AD CS Attack Flow
1
EnumerateFind CAs and templates with Certify/certipy
2
Identify VulnsCheck for ESC1-ESC8 conditions
3
Request CertGet certificate for target user
4
AuthenticateUse certificate for TGT or NT hash
5
PersistCertificate works for years
6
EscalateUse access for DCSync/Golden Ticket
Knowledge Check
Challenges
Key Takeaways
- AD CS misconfigurations affect most environments
- ESC1 (SAN specification) is most common and easiest
- Certificates provide long-term persistence
- ESC8 combines NTLM relay with certificate issuance
- Use Certify.exe or certipy for enumeration
- Certificate-based auth survives password changes