Inside AD CS Escalation: Unpacking Advanced Misuse Techniques and Tools

Source: Unit 42

Author: Stav Setty, Tom Fakterman and Shachar Roitman

URL: https://origin-unit42.paloaltonetworks.com/active-directory-certificate-services-exploitation/

ONE SENTENCE SUMMARY:

AD CS misconfigurations enable stealthy certificate-based privilege escalation and persistence, detectable through correlated telemetry, behavioral analytics, and targeted Windows event monitoring.

MAIN POINTS:

  1. AD CS underpins PKI authentication and encryption but often ships with insecure defaults.
  2. Misconfigured certificate templates can grant unintended, long-lived privileged authentication capabilities.
  3. Adversaries exploit native issuance workflows rather than zero-days or malware.
  4. Under-monitoring and configuration complexity create persistent blind spots for defenders.
  5. Attack lifecycle spans initial access, discovery, exploitation, escalation, lateral movement, and persistence.
  6. ESC1 abuses templates allowing low-privileged enrollment with SAN control and auth EKUs.
  7. Shadow credentials persist by adding attacker keys to msDS-KeyCredentialLink for passwordless access.
  8. PKINIT enables Kerberos ticket requests using certificates, facilitating impersonation and lateral movement.
  9. Tools like Certify, Certipy, Whisker, and PKINITtools industrialize AD CS exploitation.
  10. Detection requires correlating certificate events, LDAP reconnaissance, directory changes, and Kerberos activity.

TAKEAWAYS:

  1. Harden templates by removing broad enrollment rights and disabling ENROLLEE_SUPPLIES_SUBJECT where unnecessary.
  2. Investigate mismatches between requester identity and issued certificate subject as strong abuse indicators.
  3. Monitor Event IDs 4886/4887/4898/5136/4768/4769 plus LDAP client/server query logs.
  4. Treat unusual LDAP enumeration of pKICertificateTemplate and msDS-KeyCredentialLink as early warning.
  5. Combine posture management with behavior-based detection to catch stealthy, certificate-driven persistence.