Skip to content
WETNav

Credential accessHigh

AS-REP Roasting

How AS-REP roasting shows up on a DC: 4768 ticket requests with PreAuthType 0, and 4738 enabling the account's Don't Require Preauth flag.

Signals in the logs

  1. 01Security4768A Kerberos authentication ticket (TGT) was requestedDomain controller

    A ticket-granting ticket request that completed without pre-authentication, which only happens for accounts with the flag set.

    PreAuthType
    0 (no pre-authentication performed)
    ServiceName
    krbtgt
    TicketEncryptionType
    0x17 (RC4) is the crackable case; AES types are far harder to attack offline
  2. 02Security4738A user account was changedDomain controller

    An account change that turns on the Do not require Kerberos preauthentication flag, pre-staging a target.

    UserAccountControl
    lists 'Don't Require Preauth' - Enabled
    TargetUserName
    the account that became roastable

What happens

AS-REP roasting targets accounts configured not to require Kerberos pre-authentication. For such an account the domain controller returns an authentication reply whose encrypted portion is derived from the account's password, and it does so before verifying that the requester knows that password. An adversary can collect that reply and attempt to recover the password offline. The domain controller logs the initial ticket request, where the absence of pre-authentication is visible, and the dangerous account setting itself appears as an account-change event when the flag is first enabled.

Logging you need

  • Audit subcategory Account Logon > Kerberos Authentication Service = Success on domain controllers (for 4768).
  • Audit subcategory Account Management > User Account Management = Success on domain controllers (for 4738). This is on by default.

Hunt queries

Starting points. Tune thresholds and exclusions to your environment before alerting on them.

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4768} | ForEach-Object {
    $x = [xml]$_.ToXml()
    $d = @{}; $x.Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
    [pscustomobject]@{ Time=$_.TimeCreated; User=$d['TargetUserName']; PreAuth=$d['PreAuthType']; Enc=$d['TicketEncryptionType']; Ip=$d['IpAddress'] }
} | Where-Object { $_.PreAuth -eq '0' }

Benign look-alikes

  • A small number of legacy accounts and appliances legitimately run without pre-authentication; baseline them so the PreAuthType 0 signal stands out.
  • Certificate (PKINIT) logons also record PreAuthType values other than the normal timestamp type; confirm the CertIssuerName fields are empty before treating a 4768 as AS-REP roasting.
  • Administrative tooling that toggles account flags during provisioning can produce 4738 flag changes that are routine.

Notes

  • Unlike Kerberoasting, AS-REP roasting needs no prior valid credential: the reply is returned to an unauthenticated requester, so a burst of PreAuthType 0 requests from one source is high signal.

References