Detecting Kerberoasting attacks with Splunk
Note: The dataset used is fictional
Scenario
- Company IP address: 192.168.1.0/24
What is Kerberoasting?
Kerberoasting is an attack that exploits Kerberos Service Tickets to obtain the password hash of a service account. The attacker must first have access to a valid domain user account. Using that account, they request one or more Ticket Granting Service (TGS) tickets for Service Principal Names (SPNs). The service tickets are than extracted, and the attacker attempts to crack the encrypted service account password offline using password dictionaries or brute-force techniques.
If the password is successfully cracked, the attacker can authenticate as the compromised service account. Depending on the privileges assigned to that account, they may perform lateral movement, escalate privileges, or access additional resource within the environment.
One potential indicator of a Kerberoasting attack is an unusually high number of TGS requests recorded in Windows Security Event ID 4769 over a short period. For example, a single user requesting 10 or more different service tickets within 30 seconds may warrant investigation. However, this behavior alone is not conclusive, as legitimate administrative tools and applications can also generate multiple TGS requests.
The primary objective of a Kerberoasting attack is to compromise service account credentials by recovering their passwords from captured service tickets.
Detection
To detect potential Kerberoasting activity in Splunk, we can search for Windows Security Event ID 4769, which corresponds to Kerberos Service Ticket (TGS) requests. By counting the number of TGS requests generated by each user, we can identify accounts requesting an unusually high number of service tickets. Although this behavior does not definitively indicate a Kerberoasting attack, it is a valuable indicator that should be investigated. The following Splunk query demonstrates this detection technique.
EventCode=4769 | stats count by EventCode, AccountName | sort -count
In the following image, we can see that the user michael.williams generated 23 TGS requests. Because this exceeds the established threshold, we investigated the user's events to determine whether the activity was consistent with a Kerberoasting attack.
Investigation
To begin the investigation, we filtered the Windows Security logs for Event ID 4769 associated with the user michael.williams and sorted the results by timestamp to review the sequence.
EventCode=4769 AccountName="michael.williams" |sort Timestamp
We can see from the resulting graphs that there is more activity on the initial day.
In the following image, we can see that the IP address is 110.92.1.56.10. However, according to the scenario, the enterprise uses the 192.168.1.0/24 network. Therefore, this external IP address appears to be suspicious.
We counted 20 Event ID 4769 entries, indicating that the malicious actor made 20 TGS requests.
We used the following query to extract statistics, such as the event code and service name, from the logs
EventCode=4769 AccountName="michael.williams" | stats count by EventCode, ServiceName
The results of this query, shown in the following image, indicate that each service received two TGS requests.
By examining additional attributes, we can identify several suspicious indicators, including:
ComputerName: VIRUS-05
IPAddress: 110.92.1.56
Ticket_Encryption_Type: 0x17 (RC4)
After investigating this event, we conclude that is a suspicious Kerberoasting attack originating from an external IP address. This conclusion is supported by the presence of the external IP address and the use of the 0x17 ticket encryption type, which is no used within the enterprise environment. Therefore, the use of this encryption type is considered anomalous and may indicate malicious activity.
After that, we continue investigation the investigation to determine whether the malicious actor had executed any additional attacks or performed lateral movement. However, we did not find any evidence of further malicious activity.
Contention
For the contention we can should the following activities:
Reset the password for the michael.williams account
Rotate the passwords of all affected service account
Block or exclude the external IP address identified during the investigation
Review and strengthen the organization's password policies
Lessons
The investigation highlighted several important lessons:
Continuous monitoring of Kerberos authentications events is essential
Service accounts should use strong, complex passwords
Legacy or unexpected encryption types should be monitored
External access to internal authentication services should be restricted
Incident response procedures should be tested regularly
Conclusion
The investigation identified indicators consistent with a suspected Kerberoasting attack. analysis of Windows Security Event ID 4769 revealed multiple Ticket Granting Service (TGS) requests originating from an external IP address, along with the use of the 0x17 ticket encryption type, which is not normally used in the enterprise environment. These findings indicate an attempt to obtain service tickets for offline password cracking.
Further investigation found no evidence that the attacker successfully compromised additional systems or performed lateral movement within the network. The incident appears to have been contained before further malicious activity occurred.
Based on the investigation, containment actions were recommended, including rotating the passwords of the affected user and service accounts, blocking the suspicious external IP address, and reviewing password and authentication policies. Implementing these measures, together with enhanced monitoring of Kerberos authentication events, will reduce the likelihood of similar attacks in the future.
About the author
- Computer Science student passionate about cybersecurity, with a strong interest in Red Team operations and SOC operations. I share learnings, projects, and experiments as I progress on my path toward becoming an offensive security specialist.
Comments
Join the discussionNo comments yet. Be the first to comment.