Detect AS-REP Roasting in IBM QRadar
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.
MITRE ATT&CK
- Tactic
- Credential Access
- Technique
- T1558 Steal or Forge Kerberos Tickets
- Sub-technique
- T1558.004 AS-REP Roasting
- Canonical reference
- https://attack.mitre.org/techniques/T1558/004/
QRadar Detection Query
-- Detection 1: AS-REP Roasting via Event 4768 — No Preauthentication Required
-- Requires Windows Security DSM with PreAuthType parsed as a custom property,
-- or the field is accessible via the parsed event data from the Microsoft Windows DSM.
SELECT
DATEFORMAT(deviceTime, 'YYYY-MM-dd HH:mm:ss') AS "EventTime",
sourceip AS "SourceIP",
sourceport AS "SourcePort",
username AS "TargetUserName",
QIDNAME(qid) AS "EventName",
CATEGORYNAME(category) AS "EventCategory",
LOGSOURCENAME(logsourceid) AS "LogSource",
"TargetDomainName",
"TicketEncryptionType",
"PreAuthType",
"Status",
"TicketOptions"
FROM events
WHERE
LOGSOURCETYPENAME(logsourceid) = 'Microsoft Windows Security Event Log'
AND QIDNAME(qid) LIKE '%Kerberos Authentication Service%'
AND ("PreAuthType" = '0' OR "PreAuthType" = '0x0')
AND username NOT LIKE '%$'
AND deviceTime > NOW() - 3600000
ORDER BY deviceTime DESC
START '1 HOURS AGO'
-- Detection 2: Bulk Enumeration — 3+ Unique Accounts from Single Source in 10-Minute Bucket
-- SELECT
-- sourceip AS "SourceIP",
-- COUNT(DISTINCT username) AS "UniqueAccountsRoasted",
-- COUNT(*) AS "TotalRequests",
-- MIN(DATEFORMAT(deviceTime, 'YYYY-MM-dd HH:mm:ss')) AS "FirstSeen",
-- MAX(DATEFORMAT(deviceTime, 'YYYY-MM-dd HH:mm:ss')) AS "LastSeen"
-- FROM events
-- WHERE
-- LOGSOURCETYPENAME(logsourceid) = 'Microsoft Windows Security Event Log'
-- AND QIDNAME(qid) LIKE '%Kerberos Authentication Service%'
-- AND ("PreAuthType" = '0' OR "PreAuthType" = '0x0')
-- AND username NOT LIKE '%$'
-- AND deviceTime > NOW() - 3600000
-- GROUP BY sourceip,
-- TRUNCATE(LONG(deviceTime) / 600000)
-- HAVING COUNT(DISTINCT username) >= 3
-- ORDER BY "UniqueAccountsRoasted" DESC
-- START '1 HOURS AGO' Detects AS-REP Roasting in IBM QRadar AQL by querying Windows Security Event 4768 from the Microsoft Windows Security Event Log DSM, filtering on PreAuthType=0 to identify Kerberos AS-REQ without preauthentication. Uses QIDNAME to match the Kerberos Authentication Service event category and excludes machine accounts. Bulk enumeration variant groups by source IP in 10-minute windows. Requires Windows Security DSM custom property extraction for PreAuthType and TicketEncryptionType fields.
Data Sources
Required Tables
False Positives & Tuning
- Accounts with DONT_REQ_PREAUTH intentionally enabled for legacy Kerberos client compatibility — MIT Kerberos on Linux, macOS enterprise AD environments — generating expected events from known infrastructure IPs
- Enterprise middleware platforms (SAP NetWeaver, Oracle WebLogic) with service accounts configured for non-Windows Kerberos authentication that routinely generate Event 4768 with PreAuthType=0 from consistent server IPs
- Authorised internal vulnerability scanning tools (Tenable Nessus, Qualys, Rapid7 InsightVM) running AD health checks that enumerate accounts with DONT_REQ_PREAUTH set
Other platforms for T1558.004
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1AS-REP Roasting with Rubeus
Expected signal: Domain Controller Security Event ID 4768 for each roasted account with PreAuthType=0x0 and TicketEncryptionType=0x17 (RC4). Source IpAddress will be the attacking machine's IP. Sysmon Event ID 1 on attacking host: Process Create for Rubeus.exe with CommandLine containing 'asreproast'. Sysmon Event ID 3: network connections from Rubeus.exe to DC port 88 (Kerberos).
- Test 2AS-REP Roasting with Impacket GetNPUsers.py
Expected signal: Domain Controller Security Event ID 4768 for the target account with PreAuthType=0x0 and TicketEncryptionType=0x17. Source IpAddress will be the Linux/external attacking host's IP. No process creation event on the DC itself. If the attack originates from outside the domain, IpAddress will be a non-domain IP, which is a high-confidence indicator.
- Test 3PowerShell LDAP Enumeration of DONT_REQ_PREAUTH Accounts
Expected signal: Sysmon Event ID 1: PowerShell process creation with CommandLine containing 'DoesNotRequirePreAuth' or '4194304'. Domain Controller Event ID 4662 with ObjectType containing 'user' and AccessMask 0x10 (read property) — may generate many events. PowerShell ScriptBlock Log Event ID 4104 with the LDAP filter content.
- Test 4Manual AS-REQ without Preauthentication via PowerShell
Expected signal: Domain Controller Security Event ID 4768 for 'df00tech-asrep-test' with PreAuthType=0x0 and TicketEncryptionType=0x17. Security Event ID 4738 when preauthentication is disabled/re-enabled on the account. Rubeus.exe process creation (Sysmon Event ID 1) and network connection to DC port 88 (Sysmon Event ID 3).
References (10)
- https://attack.mitre.org/techniques/T1558/004/
- https://blog.harmj0y.net/activedirectory/roasting-as-reps/
- https://blog.stealthbits.com/cracking-active-directory-passwords-with-as-rep-roasting/
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4768
- https://social.technet.microsoft.com/wiki/contents/articles/23559.kerberos-pre-authentication-why-it-should-not-be-disabled.aspx
- https://blogs.technet.microsoft.com/motiba/2018/02/23/detecting-kerberoasting-activity-using-azure-security-center/
- https://github.com/GhostPack/Rubeus
- https://github.com/fortra/impacket/blob/master/examples/GetNPUsers.py
- https://adsecurity.org/?p=2293
- https://redsiege.com/kerberoast-slides
Unlock Pro Content
Get the full detection package for T1558.004 including response playbook, investigation guide, and atomic red team tests.