Suspicious Kerberos Ticket Request via PowerShell
Detection logic for PowerShell scripts leveraging the .NET KerberosRequestorSecurityToken class to illicitly request Kerberos tickets, a common step in Kerberoasting.
This threat brief focuses on the exploitation of native .NET classes within PowerShell to perform unauthorized Kerberos ticket requests. Attackers frequently leverage the 'System.IdentityModel.Tokens.KerberosRequestorSecurityToken' class to interface with the Windows authentication stack and request service tickets for specific Service Principal Names (SPNs). This technique is a core component of 'Kerberoasting', where the resulting ticket can be exported and cracked offline to recover service account passwords. Detection depends on the visibility of PowerShell Script Block logging to capture the execution of these specific .NET method calls.
Attack Chain
- Attacker establishes an initial foothold on a domain-joined host.
- Attacker enumerates available services or user accounts via Active Directory queries.
- Attacker identifies targets with Service Principal Names (SPNs) registered.
- Attacker crafts a PowerShell script using 'System.IdentityModel.Tokens.KerberosRequestorSecurityToken'.
- Attacker executes the script in the context of the current session to initiate a ticket request.
- The .NET assembly interacts with the Kerberos Key Distribution Center (KDC).
- The KDC issues the service ticket, which is stored in the memory of the current process.
- Attacker extracts the service ticket for offline decryption (Kerberoasting).
Impact
Successful execution of this technique facilitates credential theft of high-privileged service accounts. Offline brute-forcing of these tickets allows attackers to obtain cleartext credentials, potentially leading to full domain compromise and lateral movement within the network.
Recommendation
Deploy the provided Sigma rule to your SIEM to monitor for the abuse of Kerberos request classes. Ensure PowerShell Script Block logging (Event ID 4104) is enabled globally across the enterprise, as this is the primary telemetry source for detecting this behavior.
- Deploy the Sigma rule below to detect unauthorized usage of the 'KerberosRequestorSecurityToken' class.
- Enable 'Log PowerShell Script Blocks' via Group Policy to ensure visibility into the specific .NET classes instantiated by scripts.
- Audit accounts with SPNs, specifically focusing on those with excessive privileges or service account permissions.
Immediate actions
Deploy Sigma rule for Kerberos ticket requests.
Mitigations
Enable PowerShell Script Block logging.
T1558.003
Detection coverage 1
Detect Suspicious Kerberos Ticket Request via PowerShell
highDetects the use of System.IdentityModel.Tokens.KerberosRequestorSecurityToken in PowerShell scripts, which is indicative of Kerberoasting attempts.
Detection queries are available on the platform. Get full rules →