Active Directory Certificate Services – ESC2

๐Ÿ”’ ๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ฒ ๐—•๐—ถ๐˜๐˜€ ๐Ÿ’ก

๐—˜๐—ฆ๐—– ๐˜ƒ๐˜‚๐—น๐—ป๐—ฒ๐—ฟ๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐—ถ๐—ฒ๐˜€: ๐—Ÿ๐—ฒ๐˜โ€™๐˜€ ๐—น๐—ผ๐—ผ๐—ธ ๐—ฎ๐˜ ๐—˜๐—ฆ๐—–๐Ÿฎ

Last time we covered ESC1. Today, another dangerousย ๐—”๐—ฐ๐˜๐—ถ๐˜ƒ๐—ฒ ๐——๐—ถ๐—ฟ๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ๐˜† ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ ๐—ฆ๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฐ๐—ฒ๐˜€ (๐—”๐—— ๐—–๐—ฆ)misconfiguration.

๐ŸŽฏ ๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐—˜๐—ฆ๐—–๐Ÿฎ?

ESC2 involves certificate templates with overly broad usage, specifically templates where theย Extended Key Usage (EKU) is set to Any Purpose or no EKU is specified.

A template is vulnerable when these conditions come together:

๐Ÿงจ Low-privileged users have enrollment permissions

๐Ÿงจ Manager approval is not required

๐Ÿงจ No authorized signatures are required

๐Ÿงจ EKU isย Any Purposeย orย not specified

A certificate issued from such a template can potentially be used for many purposes, including authentication.

โš ๏ธ ๐—ง๐—ต๐—ฒ๐—ฟ๐—ฒ ๐—ถ๐˜€ ๐—ฎ๐—ป ๐—ถ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜๐—ฎ๐—ป๐˜ ๐—น๐—ถ๐—บ๐—ถ๐˜๐—ฎ๐˜๐—ถ๐—ผ๐—ป.

Unlike ESC1, ESC2 does not simply let the requester specify another userโ€™s identity and immediately authenticate as them. But ESC2 can become much more dangerous when combined with other AD CS configurations, for example when the certificate can be abused as anย enrollment agentย to request a certificate on behalf of another user.

๐Ÿ› ๏ธ ๐—›๐—ผ๐˜„ ๐˜๐—ผ ๐—ฐ๐—ต๐—ฒ๐—ฐ๐—ธ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ฒ๐—ป๐˜ƒ๐—ถ๐—ฟ๐—ผ๐—ป๐—บ๐—ฒ๐—ป๐˜?

Just like with ESC1, run ๐—Ÿ๐—ผ๐—ฐ๐—ธ๐˜€๐—บ๐—ถ๐˜๐—ต ๐Ÿฎ by Jake Hildreth. Quick and straightforward.

๐Ÿ”— https://github.com/jakehildreth/locksmith2

Next time,ย ๐—˜๐—ฆ๐—–๐Ÿฏ.

๐—ฃ๐—ฆ: And yes, that AD CS course might be coming sooner or laterโ€ฆ ๐Ÿ‘€