Active Directory Certificate Services ESC4

๐Ÿ”’ย Secure Bitsย ๐Ÿ’ก
Letโ€™s keep ๐˜๐—ต๐—ฒ ๐—˜๐—ฆ๐—– ๐˜€๐—ฒ๐—ฟ๐—ถ๐—ฒ๐˜€ย going โ€” today weโ€™re diving intoย ๐—˜๐—ฆ๐—–๐Ÿฐ, a misconfiguration thatโ€™sย easy to overlook, butย critical to lock down.

If you missed ESC1, ESC2 or ESC3 โ€” ๐˜€๐—ฐ๐—ฟ๐—ผ๐—น๐—น ๐—ฏ๐—ฎ๐—ฐ๐—ธ ๐—ฎ๐—ป๐—ฑ ๐—ฐ๐—ต๐—ฒ๐—ฐ๐—ธ ๐˜๐—ต๐—ฒ๐—บ ๐—ผ๐˜‚๐˜. Each one highlights how attackers abuse AD CS to escalate privileges in ways that bypass traditional defenses.

๐—˜๐—ฆ๐—–๐Ÿฐ = Misconfigured Template ACLs
Think your certificate templates are locked down?
If youโ€™re not auditing ACLs on your templates โ€” they might beย wide open.

๐Ÿ”“ย ๐—˜๐—ฆ๐—–๐Ÿฐ ๐—ฎ๐—น๐—น๐—ผ๐˜„๐˜€ ๐—ฎ๐˜๐˜๐—ฎ๐—ฐ๐—ธ๐—ฒ๐—ฟ๐˜€ ๐˜๐—ผ ๐—ฒ๐—ฑ๐—ถ๐˜ ๐—ฐ๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ ๐˜๐—ฒ๐—บ๐—ฝ๐—น๐—ฎ๐˜๐—ฒ๐˜€, ๐—ด๐—ถ๐˜ƒ๐—ถ๐—ป๐—ด ๐˜๐—ต๐—ฒ๐—บ ๐—ณ๐˜‚๐—น๐—น ๐—ฐ๐—ผ๐—ป๐˜๐—ฟ๐—ผ๐—น ๐˜๐—ผ:
โ–ช๏ธ Add dangerous EKUs (like Client Authentication or Certificate Request Agent)
โ–ช๏ธ Enable SAN field enrollment
โ–ช๏ธ Remove manager approval requirements
โ–ช๏ธ Change issuance permissions to include themselves

๐—ง๐—ต๐—ฒ ๐—ฟ๐—ฒ๐˜€๐˜‚๐—น๐˜?
โžก๏ธ They turn a benign template into anย ๐—˜๐—ฆ๐—–๐Ÿญ, ๐—˜๐—ฆ๐—–๐Ÿฎ, ๐—ผ๐—ฟ ๐—ฒ๐˜ƒ๐—ฒ๐—ป ๐—˜๐—ฆ๐—–๐Ÿฏย path โ€” and issue certs that let themย impersonate Domain Admins.

๐—›๐—ผ๐˜„ ๐—ฑ๐—ผ๐—ฒ๐˜€ ๐—˜๐—ฆ๐—–๐Ÿฐ ๐—ต๐—ฎ๐—ฝ๐—ฝ๐—ฒ๐—ป?
Simple: someone misconfigured ACLs on a certificate template. This means the wrong users or groups have:
โœ…ย Writeย orย Full Controlย rights
โœ… Ability to modify critical attributes (like EKUs, security settings, issuance policy)

๐Ÿ”Ž ๐—–๐—ต๐—ฒ๐—ฐ๐—ธ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ ๐—ง๐—ฒ๐—บ๐—ฝ๐—น๐—ฎ๐˜๐—ฒ๐˜€ manually through the console:
โ–ช๏ธ Onlyย authorized PKI adminsย have write or full control.
โ–ช๏ธ No unexpected groups (like Authenticated Users, Domain Users, etc.) have unnecessary elevated rights.

๐—ข๐—ฟ ๐˜†๐—ผ๐˜‚ ๐—ฐ๐—ฎ๐—ป ๐˜‚๐˜€๐—ฒ ๐˜๐—ผ๐—ผ๐—น๐˜€ ๐—น๐—ถ๐—ธ๐—ฒ:
๐Ÿ”น ADProbe (my security auditing tool)
๐Ÿ”น Locksmith by Jake Hildreth
๐Ÿ”น Certipy
๐Ÿ”น …

๐Ÿ“‰ ๐—˜๐—ฆ๐—–๐Ÿฐ doesnโ€™t directly issue dangerous certificates. But it lets an attackerย modify templatesย toย createย ESC1, ESC2, or ESC3 conditions. That makes it a silent enabler โ€” and extremely dangerous.

๐Ÿ’ฌ Did you ever check the ACLs on your cert templates?