AD CS/Template Discovery
Finding the Active Directory Certificate Service (AD CS) server is as simple as querying a domain controller on the target domain using Lightweight Directory Access Protocol (LDAP).
This is made even easier as several tools already exist to do this easily!
netexec ldap -u [username] -p [password] -M adcsCertify.exe cas /domain:[domain] certutil.exe -config - -pingFinding Vulnerable Templates
Similar to finding the AD CS server, we can use LDAP to query the AD CS server for information about what templates are available, as well as information about the template, such as permissions required to obtain a certificate.
certipy find -u [username]@[domain] -p [password] -dc-ip [DC IP] -vulnerableCertify.exe find /vulnerable /domain:[domain]Get-ADObject -LDAPFilter '(objectCategory=pKIEnrollmentService)' -SearchBase "CN=Configuration,DC=Weelee,DC=local"These tools will output a list of templates potentially vulnerable to AD CS exploits known as ESC1 through ESC11.
Last updated