Active Directory Certificate Services ESC2

๐Ÿ”’ Secure Bits ๐Ÿ’ก
๐—Ÿ๐—ฒ๐˜โ€™๐˜€ ๐—ฐ๐—ผ๐—ป๐˜๐—ถ๐—ป๐˜‚๐—ฒ ๐—ผ๐˜‚๐—ฟ ๐—ฑ๐—ฒ๐—ฒ๐—ฝ ๐—ฑ๐—ถ๐˜ƒ๐—ฒ ๐—ถ๐—ป๐˜๐—ผ ๐—˜๐—ฆ๐—– ๐˜ƒ๐˜‚๐—น๐—ป๐—ฒ๐—ฟ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐—ถ๐—ฒ๐˜€โ€ฆ

Today we look at ESC2ย โ€” another common, critical misconfiguration in Active Directory Certificate Services.

๐ŸŽฏ ๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐—˜๐—ฆ๐—–๐Ÿฎ?
ESC2 is a ๐—ฐ๐—ผ๐—บ๐—บ๐—ผ๐—ป ๐—”๐—— ๐—–๐—ฆ ๐—บ๐—ถ๐˜€๐—ฐ๐—ผ๐—ป๐—ณ๐—ถ๐—ด๐˜‚๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป where a certificate template allows any domain user to request a certificate that:
โ–ช๏ธCan be used for authentication without a password, and
โ–ช๏ธMay allow further abuse to escalate privileges โ€” including to Domain Admin.

๐—›๐—ฒ๐—ฟ๐—ฒโ€™๐˜€ ๐˜„๐—ต๐—ฒ๐—ป ๐—ฎ ๐˜๐—ฒ๐—บ๐—ฝ๐—น๐—ฎ๐˜๐—ฒ ๐—ถ๐˜€ ๐˜ƒ๐˜‚๐—น๐—ป๐—ฒ๐—ฟ๐—ฎ๐—ฏ๐—น๐—ฒ ๐˜๐—ผ ๐—˜๐—ฆ๐—–๐Ÿฎ:
๐ŸงจRegular users have enroll permissions
๐ŸงจManager approval is disabled
๐ŸงจNo authorized signature is required
๐ŸงจThe Extended Key Usage (EKU) is set to Any Purpose or left blank

When ๐—˜๐—ž๐—จ ๐—ถ๐˜€ ๐—ฏ๐—น๐—ฎ๐—ป๐—ธ, the certificate ๐—ฏ๐—ฒ๐—ต๐—ฎ๐˜ƒ๐—ฒ๐˜€ ๐—น๐—ถ๐—ธ๐—ฒ ๐—ฎ ๐˜€๐˜‚๐—ฏ๐—ผ๐—ฟ๐—ฑ๐—ถ๐—ป๐—ฎ๐˜๐—ฒ ๐—–๐—” โ€” meaning it can be used to sign new certificates for any purpose.

โš ๏ธ ๐—œ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜๐—ฎ๐—ป๐˜ ๐—ฐ๐—น๐—ฎ๐—ฟ๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป:
These subordinate CA certs are ๐—ป๐—ผ๐˜ ๐˜๐—ฟ๐˜‚๐˜€๐˜๐—ฒ๐—ฑ ๐—ณ๐—ผ๐—ฟ ๐—ฑ๐—ผ๐—บ๐—ฎ๐—ถ๐—ป ๐—น๐—ผ๐—ด๐—ผ๐—ป ๐—ฏ๐˜† ๐—ฑ๐—ฒ๐—ณ๐—ฎ๐˜‚๐—น๐˜.
Domain controllers only accept certs from CAs listed in the NTAuth store.

๐—•๐˜‚๐˜ ๐˜๐—ต๐—ถ๐˜€ ๐—ฑ๐—ผ๐—ฒ๐˜€๐—ปโ€™๐˜ ๐—บ๐—ฎ๐—ธ๐—ฒ ๐—˜๐—ฆ๐—–๐Ÿฎ ๐˜€๐—ฎ๐—ณ๐—ฒ:
โฉ Attackers can still use the cert to sign other certs, forge code signing or TLS certs, or abuse enrollment agent templates to request legitimate certificates for privileged accounts โ€” which are trusted.

This is how ESC2 can lead to ๐—ณ๐˜‚๐—น๐—น ๐—ฝ๐—ฟ๐—ถ๐˜ƒ๐—ถ๐—น๐—ฒ๐—ด๐—ฒ ๐—ฒ๐˜€๐—ฐ๐—ฎ๐—น๐—ฎ๐˜๐—ถ๐—ผ๐—ป, despite trust boundaries.

๐—ช๐—ต๐˜† ๐—ฎ๐˜๐˜๐—ฎ๐—ฐ๐—ธ๐—ฒ๐—ฟ๐˜€ ๐—น๐—ผ๐˜ƒ๐—ฒ ๐—˜๐—ฆ๐—–๐Ÿฎ:
โœ… Easy to find
โœ… No need for admin rights to exploit
โœ… Hard to detect โ€” no password guessing, no alerts
โœ… Certs are long-lived, enabling stealthy persistence

๐Ÿ› ๏ธ ๐—ช๐—ฎ๐—ป๐˜ ๐˜๐—ผ ๐˜๐—ฒ๐˜€๐˜ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ฒ๐—ป๐˜ƒ๐—ถ๐—ฟ๐—ผ๐—ป๐—บ๐—ฒ๐—ป๐˜?
Check out tools like:
๐Ÿ”น ADProbe (my security auditing tool)
๐Ÿ”น Locksmith by Jake Hildreth
๐Ÿ”น Certipy
๐Ÿ”น …

๐Ÿ’ฌ ๐——๐—ถ๐—ฑ ๐˜†๐—ผ๐˜‚ ๐—ธ๐—ป๐—ผ๐˜„ about ESC2โ€™s real risks and limitations?

Let me know if youโ€™ve encountered this in the wild โ€” or if youโ€™ve mitigated it.