T1558

Steal or Forge Kerberos Tickets

Adversaries may attempt to subvert Kerberos authentication by stealing or forging Kerberos tickets to enable Pass the Ticket (T1550.003). In Active Directory environments, Kerberos is the primary authentication protocol. Adversaries exploit it through multiple sub-techniques: Kerberoasting (T1558.003) requests service tickets for accounts with SPNs using RC4 encryption for offline hash cracking; AS-REP Roasting (T1558.004) targets accounts with pre-authentication disabled to obtain crackable AS-REP responses; Golden Ticket attacks (T1558.001) use a stolen KRBTGT hash to forge TGTs granting unrestricted domain access; Silver Ticket attacks (T1558.002) forge service tickets using a service account hash for targeted service access; and Ccache file theft (T1558.005) targets Linux/macOS Kerberos credential cache files. Common offensive tools include Rubeus, Mimikatz (kerberos modules), Kekeo, and the Impacket suite (GetUserSPNs.py, GetNPUsers.py, ticketer.py). Detection leverages Windows Security Kerberos event IDs 4768, 4769, and 4771 for protocol-level anomalies such as RC4 encryption downgrade requests in AES-enforced environments, and process telemetry for offensive tool signatures.

Microsoft Sentinel / Defender
kusto
// T1558: Steal or Forge Kerberos Tickets — Multi-pattern detection
// Covers Kerberoasting (4769+RC4), AS-REP Roasting (4768+PreAuth=0),
// Golden Ticket indicators (RC4 TGT), and attack tool process signatures
let LookbackWindow = 24h;

// Pattern 1: Kerberoasting — RC4 TGS requests via EventID 4769
// In AES-enforced environments, any 0x17 service ticket request is high-fidelity
let Kerberoasting = SecurityEvent
| where TimeGenerated > ago(LookbackWindow)
| where EventID == 4769
| where TicketEncryptionType in ("0x17", "0x18")  // RC4-HMAC and RC4-HMAC-EXP
| where ServiceName !endswith "$"                   // Exclude machine account SPNs
| where ServiceName !in~ ("krbtgt", "kadmin/changepw")
| where IpAddress !in ("::1", "127.0.0.1", "-")
| where Status == "0x0"                              // Successful ticket grants only
| summarize
    RequestCount = count(),
    UniqueServices = dcount(ServiceName),
    Services = make_set(ServiceName, 20),
    FirstSeen = min(TimeGenerated),
    LastSeen = max(TimeGenerated)
    by AccountName, IpAddress, Computer
| extend AttackPattern = "Kerberoasting"
| extend RiskLevel = iff(UniqueServices >= 3 or RequestCount >= 5, "Critical", "High");

// Pattern 2: AS-REP Roasting — TGT for account with pre-auth disabled (EventID 4768)
let ASREPRoasting = SecurityEvent
| where TimeGenerated > ago(LookbackWindow)
| where EventID == 4768
| where PreAuthType == "0"                           // Pre-authentication not required
| where TicketEncryptionType in ("0x17", "0x18")    // Attacker requests RC4 for offline cracking
| where Status == "0x0"
| where IpAddress !in ("::1", "127.0.0.1", "-")
| project TimeGenerated, AccountName, IpAddress, Computer, TicketEncryptionType, PreAuthType
| extend AttackPattern = "AS-REP Roasting"
| extend RiskLevel = "High";

// Pattern 3: Golden Ticket indicator — RC4 TGT request (EventID 4768)
// Legitimate AES-only domains should not produce 0x17 TGT events
let GoldenTicketIndicators = SecurityEvent
| where TimeGenerated > ago(LookbackWindow)
| where EventID == 4768
| where TicketEncryptionType in ("0x17", "0x18")    // RC4 TGT is abnormal in AES-enforced domains
| where IpAddress !in ("::1", "127.0.0.1", "-")
| project TimeGenerated, AccountName, IpAddress, Computer, TicketEncryptionType, Status
| extend AttackPattern = "Potential Golden Ticket (RC4 TGT)"
| extend RiskLevel = "Critical";

// Pattern 4: Kerberos attack tool detection via process command line telemetry
let KerberosTools = DeviceProcessEvents
| where Timestamp > ago(LookbackWindow)
| where ProcessCommandLine has_any (
    "Rubeus", "kerberoast", "asreproast", "tgtdeleg", "asktgt", "asktgs",
    "harvest", "monitor", "s4u",
    "sekurlsa::tickets", "kerberos::golden", "kerberos::silver",
    "kerberos::ptt", "kerberos::list", "kerberos::purge", "kerberos::tgt",
    "GetUserSPNs", "GetNPUsers", "ticketer.py"
  )
  or FileName in~ ("Rubeus.exe", "Kekeo.exe")
  or ProcessCommandLine has ".kirbi"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine
| extend AttackPattern = "Kerberos Attack Tool"
| extend RiskLevel = "Critical";

// Unified output across all patterns
union
    (Kerberoasting
     | project TimeGenerated = LastSeen, Computer, AccountName, IpAddress,
         AttackPattern, RiskLevel,
         Details = strcat("RequestCount=", RequestCount, " UniqueServices=", UniqueServices, " SPNs=", tostring(Services))),
    (ASREPRoasting
     | project TimeGenerated, Computer, AccountName, IpAddress,
         AttackPattern, RiskLevel,
         Details = strcat("EncType=", TicketEncryptionType, " PreAuth=", PreAuthType)),
    (GoldenTicketIndicators
     | project TimeGenerated, Computer, AccountName, IpAddress,
         AttackPattern, RiskLevel,
         Details = strcat("EncType=", TicketEncryptionType, " Status=", Status)),
    (KerberosTools
     | project TimeGenerated = Timestamp, Computer = DeviceName, AccountName,
         IpAddress = "N/A (host-based)", AttackPattern, RiskLevel,
         Details = ProcessCommandLine)
| sort by TimeGenerated desc
high severity high confidence

Data Sources

Authentication: Authentication Active Directory: Active Directory Credential Request Process: Process Creation Microsoft Sentinel SecurityEvent Microsoft Defender for Endpoint

Required Tables

SecurityEvent DeviceProcessEvents

False Positives

  • Legacy applications that still negotiate RC4 for Kerberos due to compatibility requirements — older Java-based apps (JDK < 17 defaults to AES but may fall back), older Linux Kerberos clients with krb5 library versions that prefer RC4, and applications where 'arcfour-hmac' is listed in krb5.conf etypes
  • IT inventory and vulnerability scanning tools such as Tenable Nessus, Qualys, and CyberArk that enumerate service principal names as part of Active Directory discovery modules
  • Backup and monitoring software (Veeam Backup, CommVault, SolarWinds) using service accounts with registered SPNs running on older server OS versions where RC4 is the negotiated cipher
  • Domain environments in mixed-mode with Windows Server 2008 R2 domain controllers, which still advertise RC4 support by default and can cause clients to negotiate 0x17 during normal Kerberos exchanges

Unlock Pro Content

Get the full detection package for T1558 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections