Hunting for Kerberoasting Attacks
Last updated
Last updated
Kerberoasting is a post-exploitation technique attackers use to extract and crack service account credentials in Active Directory (AD) environments. By exploiting Kerberos service tickets, attackers can gain unauthorized access to critical resources, often leveraging weakly secured service account passwords.
Service Account Enumeration
Attackers identify service accounts by searching for accounts with Service Principal Names (SPNs).
Tool Example:
Request Service Ticket
Using tools like Rubeus, attackers request Kerberos service tickets for enumerated SPNs.
Command Example:
Hash Extraction and Offline Cracking
The extracted ticket hashes are saved and cracked offline using tools like John the Ripper or Hashcat.
Detecting Kerberoasting is challenging because it resembles legitimate Kerberos activity. However, certain Windows Security Event Logs provide critical indicators.
Event ID 4768:
Triggered when a Ticket Granting Ticket (TGT) is requested.
Indicator: Look for Encryption Type 0x17 (RC4).
Event ID 4769:
Triggered when a service ticket is requested.
Indicators:
Encryption Type: 0x17
(RC4).
Service Name: Unusual or newly requested SPNs.
Account Name: Non-service accounts making unexpected service ticket requests.
Indicators of Attack
Spikes in Event ID 4769: Multiple service ticket requests for a single user in a short timeframe.
Non-Service Accounts Requesting Service Tickets: Regular user accounts requesting service tickets.
Offline Brute-Forcing Behavior: Time gaps between service ticket requests and subsequent network activity.
Require complex and lengthy passwords for all service accounts.
Ensure passwords resist offline brute-forcing attempts.
Limit the privileges of service accounts to the minimum necessary for their functions.
Change passwords periodically to reduce the risk of long-term exploitation.
Set up SIEM alerts for:
Event ID 4768 and 4769 with Encryption Type 0x17.
Unusual patterns in service ticket requests.
Use stronger encryption algorithms (e.g., AES) for Kerberos tickets to reduce the risk of cracking.
Kerberoasting is a stealthy attack that allows adversaries to compromise service account credentials, often leading to lateral movement and privilege escalation.
Detection and Mitigation Steps:
Monitor Kerberos Events (4768, 4769) for unusual patterns and anomalies.
Enforce robust password policies and regularly rotate passwords.
Limit service account permissions to reduce the attack surface.
By implementing strong monitoring and proactive security practices, organizations can minimize the risk of Kerberoasting and protect their Active Directory environments.