Register to stream ATT&CKcon 2.0 October 29-30

Kerberoasting

Service principal names (SPNs) are used to uniquely identify each instance of a Windows service. To enable authentication, Kerberos requires that SPNs be associated with at least one service logon account (an account specifically tasked with running a service [1]). [2] [3] [4] [5]

Adversaries possessing a valid Kerberos ticket-granting ticket (TGT) may request one or more Kerberos ticket-granting service (TGS) service tickets for any SPN from a domain controller (DC). [6] [7] Portions of these tickets may be encrypted with the RC4 algorithm, meaning the Kerberos 5 TGS-REP etype 23 hash of the service account associated with the SPN is used as the private key and is thus vulnerable to offline Brute Force attacks that may expose plaintext credentials. [7] [6] [5]

This same attack could be executed using service tickets captured from network traffic. [7]

Cracked hashes may enable Persistence, Privilege Escalation, and Lateral Movement via access to Valid Accounts. [4]

ID: T1208
Tactic: Credential Access
Platform: Windows
System Requirements: Valid domain account or the ability to sniff traffic within a domain.
Permissions Required: User
Data Sources: Windows event logs
Contributors: Praetorian
Version: 1.0

Mitigations

Mitigation Description
Encrypt Sensitive Information Enable AES Kerberos encryption (or another stronger encryption algorithm), rather than RC4, where possible. [7]
Password Policies Ensure strong password length (ideally 25+ characters) and complexity for service accounts and that these passwords periodically expire. Also consider using Group Managed Service Accounts or another third party product such as password vaulting. [7]
Privileged Account Management Limit service accounts to minimal required privileges, including membership in privileged groups such as Domain Administrators. [7]

Examples

Name Description
Empire Empire uses PowerSploit's Invoke-Kerberoast to request service tickets and return crackable ticket hashes. [10]
Impacket Impacket modules like GetUserSPNs can be used to get Service Principal Names (SPNs) for user accounts. The output is formatted to be compatible with cracking tools like John the Ripper and Hashcat. [9]
PowerSploit PowerSploit's Invoke-Kerberoast module can request service tickets and return crackable ticket hashes. [8] [5]

Detection

Enable Audit Kerberos Service Ticket Operations to log Kerberos TGS service ticket requests. Particularly investigate irregular patterns of activity (ex: accounts making numerous requests, Event ID 4769, within a small time frame, especially if they also request RC4 encryption [Type 0x17]). [1] [7]

References