Do you run Active Directory Certificate Services (AD CS)?

๐Ÿ› ๏ธย Practical Bits

๐——๐—ผ ๐˜†๐—ผ๐˜‚ ๐—ฟ๐˜‚๐—ป ๐—”๐—ฐ๐˜๐—ถ๐˜ƒ๐—ฒ ๐——๐—ถ๐—ฟ๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ๐˜† ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ ๐—ฆ๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ๐˜€ (๐—”๐—— ๐—–๐—ฆ)?

When was the last time you checked it for vulnerabilities?

In security assessments this isย ๐—ฒ๐˜ƒ๐—ฒ๐—ฟ๐—ด๐—ฟ๐—ฒ๐—ฒ๐—ปย โ€” itโ€™s common to find at least one certificate template that gives a ๐Ÿšจstraight path toย ๐——๐—ผ๐—บ๐—ฎ๐—ถ๐—ป ๐—”๐—ฑ๐—บ๐—ถ๐—ป.

โžก๏ธ Set asideย one hourย and scan your AD CS. Itโ€™s one of the ๐—ต๐—ถ๐—ด๐—ต๐—ฒ๐˜€๐˜-๐—ถ๐—บ๐—ฝ๐—ฎ๐—ฐ๐˜ โ€œquick winsโ€ you can do.

๐Ÿฏ ๐—ฝ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ฐ๐—ฎ๐—น ๐˜„๐—ฎ๐˜†๐˜€ ๐˜๐—ผ ๐—ฐ๐—ต๐—ฒ๐—ฐ๐—ธ:

1๏ธโƒฃ ๐— ๐—ฎ๐—ป๐˜‚๐—ฎ๐—น ๐—ฟ๐—ฒ๐˜ƒ๐—ถ๐—ฒ๐˜„ (slow, but educational)

Start with templates whereย non-privileged groupsย have permissions and then verify whether itโ€™s dangerous. Watch for things like:

โ–ช๏ธ Configurable SAN

โ–ช๏ธ Authentication purpose EKU,ย Any Purpose, orย empty EKU

โ–ช๏ธ EDITF_ATTRIBUTESUBJECTALTNAME2

โ–ช๏ธ There are nowย 10+ ESCย cases, so only do this if youโ€™re ready to go through each one.

2๏ธโƒฃ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ๐—ฆ๐—ต๐—ฒ๐—น๐—น ๐—ฐ๐—ต๐—ฒ๐—ฐ๐—ธ๐˜€ (no tooling, fast)

Use prepared PowerShell queries โ€” or take inspiration fromย ๐—”๐——๐—ฃ๐—ฟ๐—ผ๐—ฏ๐—ฒย (it checksย ESC1, ESC2, ESC3, ESC4, ESC6, ESC8). Since itโ€™s โ€œjust PowerShellโ€, you can reuse the exact parts you need without running it whole.

3๏ธโƒฃ ๐—Ÿ๐—ผ๐—ฐ๐—ธ๐˜€๐—บ๐—ถ๐˜๐—ต (quick confidence check)

If you want the โ€œtell me whatโ€™s wrongโ€ option:ย ๐—Ÿ๐—ผ๐—ฐ๐—ธ๐˜€๐—บ๐—ถ๐˜๐—ตย byย Jake Hildrethย can identifyย ESC1โ€“ESC16, and it can also suggest fixes (or apply them, depending on how you run it).

Whatever method you pick โ€”ย pick one. AD CS is too often the easiest escalation path sitting in plain sight.