Skip to content

Lesson 5 of 13 · 10m

AS-REP Roasting and DONT_REQ_PREAUTH

How a single account flag turns the AS-REP into an offline password oracle — and why the fix is an LDAP query, not a patch.

Kerberos pre-authentication exists so the KDC only issues a TGT after the client proves it holds the password — the encrypted timestamp in AS-REQ. One flag on the user account removes the requirement: DONT_REQ_PREAUTH, bit 0x400000 in userAccountControl. Set it and the KDC will answer AS-REQ for that account without proof. The AS-REP contains a chunk encrypted with the user's password-derived key. That chunk is an offline oracle for anyone who asks.

The mechanism

With preauth required, the attacker gets nothing useful — the encrypted timestamp must be constructed first, and a wrong guess yields KRB_ERROR (24): Pre-authentication information was invalid. With the flag set, the attacker just requests. No prior credential, no foothold, no foothold needed — AS-REP replies are issued to unauthenticated requesters by design.

Impacket GetNPUsers.py corp.local/ -usersfile users.txt -dc-ip 10.0.0.1 -no-pass enumerates roastable accounts and harvests hashes in Hashcat mode 18200 format. Rubeus asreproast does the same from inside, and its /format:hashcat output drops straight into a cracking rig. The crack economics mirror kerberoasting: the AS-REP chunk is RC4-keyed on the NT hash, so it is one MD4 per guess. A weak password on a flagged account is not a matter of if — just GPU hours.

The wrong mental model: "asreproastable accounts are a configuration edge case I won't have." They appear constantly — created by old provisioning scripts, by net user /add-era tooling, by admins who toggled the flag to fix a broken Linux Kerberos client and never toggled back. The flag survives audits precisely because it sits in userAccountControl bit 0x400000, a bitmask most reporting tools never expand. Some accounts legitimately need it: certain non-Windows Kerberos clients and legacy smartcard setups historically required it, and embedded devices authenticating to AD sometimes ship with the requirement baked in. The flag is a real feature; the exposure is real too.

There is a quieter version of the same problem: accounts with no password complexity and no lockout — AS-REQ attempts against preauth-enabled accounts are also a password oracle, just an online one. 4771 events record every failed preauth; a spray of KRB_ERROR (24) failures across distinct usernames from one IP is the signature. Lockout policy (accountLockoutThreshold) and fine-grained password policies are the counterweight — which is why spraying tools honor lockout counts and rotate IPs.

Finding them is a one-liner

Get-ADUser -Filter {DoesNotRequirePreAuth -eq $true} -Properties DoesNotRequirePreAuth

or LDAP (userAccountControl:1.2.840.113556.1.4.803:=4194304). Every hit is an account whose password is one unauthenticated request away from an offline crack. The fix for each is unset the bit — Set-ADUser <acct> -DoesNotRequirePreAuth $false — and reset the password if the account is old enough that its AS-REP may already be in a breach corpus.

The defensive position

Run the LDAP query quarterly and after any provisioning-tool change. Treat flagged accounts as "credential exposed" for incident purposes if the account is privileged: anyone on the internet-facing VPN concentrator or old enough to have been dumped could already hold the hash. For the rare service that genuinely needs the flag, compensate: a 30+ character password, Protected Users membership where compatible (note Protected Users doesn't block AS-REP roasting — it blocks NTLM and RC4; the AS-REP oracle remains), and alerting on event 4768 for that account with ticket encryption 0x17 or repeated TGT issuance from new sources.

Detection signature: 4768 events for accounts that historically never request TGTs — the roast shows up as a TGT issued for the flagged account with no corresponding interactive logon after it. One subtlety: harvesting tools request AS-REPs across a list, so watch for 4768s for multiple flagged accounts in a tight window from one source IP — the same burst pattern as kerberoasting, one layer earlier in the exchange.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.