T1558.004

AS-REP Roasting

Adversaries may reveal credentials of accounts that have disabled Kerberos preauthentication by password cracking Kerberos AS-REP messages. When preauthentication is disabled on an account (userAccountControl flag DONT_REQ_PREAUTH), an attacker can send an AS-REQ message without an encrypted timestamp and receive an AS-REP response containing a TGT encrypted with the target account's password hash. This encrypted blob can be taken offline and cracked with tools like Hashcat or John the Ripper. The attack is commonly executed with Rubeus (asreproast module) or Impacket's GetNPUsers.py. Unlike Kerberoasting, AS-REP Roasting does not require a valid domain account to initiate — an unauthenticated attacker can send AS-REQ messages directly to the KDC. Successfully cracked credentials enable persistence, privilege escalation, and lateral movement via valid account access.

Microsoft Sentinel / Defender
kusto
// Detection 1: AS-REP Roasting via Event ID 4768 — No Preauthentication Required
SecurityEvent
| where TimeGenerated > ago(1h)
| where EventID == 4768
| extend EventXml = parse_xml(EventData)
| extend TargetUserName = tostring(EventXml.EventData.Data[0]["#text"])
| extend TargetDomainName = tostring(EventXml.EventData.Data[1]["#text"])
| extend TicketOptions = tostring(EventXml.EventData.Data[4]["#text"])
| extend Status = tostring(EventXml.EventData.Data[5]["#text"])
| extend TicketEncryptionType = tostring(EventXml.EventData.Data[6]["#text"])
| extend PreAuthType = tostring(EventXml.EventData.Data[7]["#text"])
| extend IpAddress = tostring(EventXml.EventData.Data[9]["#text"])
| extend IpPort = tostring(EventXml.EventData.Data[10]["#text"])
// PreAuthType 0x0 = no preauthentication required (DONT_REQ_PREAUTH set)
| where PreAuthType == "0" or PreAuthType == "0x0"
// Exclude machine accounts — they typically have preauthentication disabled legitimately
| where not (TargetUserName endswith "$")
// Flag RC4 encryption requests (0x17=23) which are preferred for offline cracking
| extend WeakEncryption = TicketEncryptionType in ("0x17", "23", "0x18", "24")
| extend EncryptionLabel = case(
    TicketEncryptionType == "0x17" or TicketEncryptionType == "23", "RC4-HMAC (crackable)",
    TicketEncryptionType == "0x18" or TicketEncryptionType == "24", "RC4-HMAC-EXP (crackable)",
    TicketEncryptionType == "0x12" or TicketEncryptionType == "18", "AES256-CTS (crackable offline)",
    TicketEncryptionType == "0x11" or TicketEncryptionType == "17", "AES128-CTS",
    "Unknown"
  )
| project TimeGenerated, Computer, TargetUserName, TargetDomainName, IpAddress, IpPort,
           PreAuthType, TicketEncryptionType, EncryptionLabel, WeakEncryption, Status, TicketOptions
| sort by TimeGenerated desc
// --
// Detection 2: Bulk AS-REP Roasting — Multiple Accounts Requested From Single Source
// Run separately for bulk enumeration alerting
// SecurityEvent
// | where TimeGenerated > ago(1h)
// | where EventID == 4768
// | extend EventXml = parse_xml(EventData)
// | extend TargetUserName = tostring(EventXml.EventData.Data[0]["#text"])
// | extend PreAuthType = tostring(EventXml.EventData.Data[7]["#text"])
// | extend IpAddress = tostring(EventXml.EventData.Data[9]["#text"])
// | where PreAuthType == "0" or PreAuthType == "0x0"
// | where not (TargetUserName endswith "$")
// | summarize AccountsRoasted=dcount(TargetUserName), Accounts=make_set(TargetUserName), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated) by IpAddress
// | where AccountsRoasted >= 3
// | sort by AccountsRoasted desc
high severity high confidence

Data Sources

DS0026: Active Directory — Active Directory Credential Request Windows Security Event Log — Event ID 4768 Domain Controller Security Auditing

Required Tables

SecurityEvent

False Positives

  • Service accounts or application accounts that have preauthentication deliberately disabled for legacy application compatibility (older Kerberos implementations)
  • Vulnerability scanners (Tenable, Qualys, Rapid7) performing Kerberos configuration assessments against the domain
  • Privileged Access Workstations or jump servers legitimately authenticating to accounts where preauthentication is disabled for operational reasons
  • Kerberos monitoring tools or identity security products (CrowdStrike Identity, Semperis) that enumerate account configurations for reporting

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections