Detection of PowerView Kerberoasting via Get-DomainSPNTicket
This brief documents the use of the PowerView PowerShell cmdlet Get-DomainSPNTicket to conduct Kerberoasting, a technique that extracts Kerberos service tickets for offline password cracking.
The PowerView tool, a widely used PowerShell-based framework for Active Directory enumeration and exploitation, includes the Get-DomainSPNTicket cmdlet specifically designed to facilitate Kerberoasting. Kerberoasting is a well-documented technique where attackers request Kerberos service tickets for services associated with Service Principal Names (SPNs). Because the service ticket is encrypted with the service account's NTLM hash, it can be exported from memory and subjected to offline brute-force attacks to recover the cleartext password.
This activity is commonly observed during the post-exploitation phase of an intrusion, enabling attackers to escalate privileges or move laterally by compromising service accounts that often possess high-level permissions. Detection relies on monitoring PowerShell Script Block Logging (Event ID 4104) for the execution of specific PowerView commandlets, which provides visibility into the intent of the attacker even when commands are obfuscated or run in-memory.
Attack Chain
- Attacker achieves initial execution on an endpoint within the Active Directory domain.
- Attacker loads the PowerView framework into the current PowerShell session.
- Attacker identifies targets by enumerating SPNs within the domain.
- Attacker executes
Get-DomainSPNTicketto request service tickets from the Domain Controller. - The Domain Controller issues the requested service tickets to the compromised endpoint.
- Attacker exports the received tickets from the local cache or memory using tools like Mimikatz or built-in PowerShell commands.
- Attacker exfiltrates the tickets to an attacker-controlled machine.
- Attacker performs offline cracking of the extracted hashes to recover service account credentials.
Impact
Successful Kerberoasting can lead to the compromise of highly privileged service accounts, such as those running MSSQL or other critical infrastructure services. This often results in full domain compromise, as these accounts frequently possess high-level privileges in Active Directory. The technique is a common precursor to ransomware deployment and large-scale data exfiltration, as observed in various incidents including the Rhysida ransomware campaigns.
Recommendation
- Enable PowerShell Script Block Logging (Event ID 4104) across all domain-joined endpoints to capture command execution details.
- Deploy the provided Sigma rule to detect the execution of
Get-DomainSPNTicketwithin your SIEM environment. - Proactively monitor for unauthorized use of PowerView by administrators and investigate alerts generated by the use of this toolkit by non-admin accounts.
- Implement strict password policies and consider transitioning to Group Managed Service Accounts (gMSA) to mitigate the impact of Kerberoasting, as these accounts use long, complex, and automatically rotated passwords.
Immediate actions
Deploy Sigma rule to monitor for Get-DomainSPNTicket execution.
Threat Hunt
Search for historical Event ID 4104 logs containing PowerView cmdlets.
Data: Event ID 4104 logs
Mitigations
Transition to Group Managed Service Accounts (gMSA).
Kerberoasting TTP
Detection coverage 1
Detect PowerView Get-DomainSPNTicket Execution
mediumDetects the execution of the Get-DomainSPNTicket PowerView cmdlet via PowerShell Script Block Logging to identify potential Kerberoasting attempts.
Detection queries are available on the platform. Get full rules →