Ofen

Oven cooking: roasting, baking and sheet-pan meals

In this article
  1. Background: Kerberos and Active Directory
  2. How AS‑REP Roasting Works
  3. Hash Types Extracted by AS‑REP Roasting
  4. Choosing the Right Tool and Mode
  5. Common Problems and How to Fix Them
  6. Comparison with Kerberoasting
  7. Legal and Ethical Considerations
  8. Alternatives and Complementary Techniques
  9. Frequently Asked Questions

What Hash Type Does AS-REP Roasting Use?

· 6 min read · Roasting

AS-REP roasting extracts a Kerberos 5 AS‑REP hash, which can be RC4‑HMAC (etype 23) or AES (etype 17/18) depending on the target account’s supported encryption types.

Background: Kerberos and Active Directory

Kerberos is the default authentication protocol for Windows domains. When a user logs on, the client sends a request to the Key Distribution Center (KDC) for a Ticket‑Granting Ticket (TGT). The KDC replies with an Authentication Service Response (AS‑REP) that is encrypted with the user’s secret key – usually derived from the password hash. In a typical deployment the KDC requires pre‑authentication, meaning the client must first prove knowledge of the password before receiving the AS‑REP.

Some accounts, however, have the “Do not require Kerberos pre‑authentication” flag set. This flag is often left on service accounts, legacy machines, or mis‑configured users. When this flag is present, the KDC will issue an AS‑REP without first verifying the password, exposing an encrypted blob that can be captured by an attacker.

How AS‑REP Roasting Works

  1. Identify accounts that have the “Do not require pre‑authentication” flag. Tools such as BloodHound, SharpHound, or ldapsearch can enumerate this attribute.
  2. Send an AS‑REQ for each target account. Because pre‑authentication is disabled, the KDC returns an AS‑REP immediately.
  3. Save the AS‑REP. The response contains the encrypted part (the ticket) and metadata that includes the encryption type (etype) used.
  4. Convert the captured data into a hash format recognized by cracking tools. For Hashcat this is mode 18200, which looks like $krb5asrep$USERNAME:checksum:encrypted_data.
  5. Run a password‑cracking attack (dictionary, rule‑based, or GPU‑accelerated brute force) against the hash.

The crucial point is that the hash type is not a single algorithm; it mirrors the encryption type the KDC used for that account.

Hash Types Extracted by AS‑REP Roasting

Active Directory supports three primary Kerberos encryption types for user keys:

  • RC4‑HMAC (etype 23) – the legacy encryption used by older Windows versions and by many accounts that have not been migrated to AES. The resulting hash is a 16‑byte RC4 key derived from the NTLM hash of the password.
  • AES‑128‑CTS‑HMAC‑SHA1 (etype 17) – the newer 128‑bit AES algorithm. The key is derived from the password hash using the PBKDF2‑SHA1 function with a fixed salt.
  • AES‑256‑CTS‑HMAC‑SHA1 (etype 18) – the strongest default algorithm in modern AD environments. It uses a 256‑bit key derived in the same way as AES‑128 but with a larger output.

When you capture an AS‑REP, the etype field tells you which of these three algorithms protects the ticket. The hash format used by cracking tools includes that etype number, so the tool knows whether to treat the data as RC4‑HMAC or AES.

Choosing the Right Tool and Mode

Most penetration‑testing frameworks have built‑in modules for AS‑REP roasting, but the actual cracking step is usually performed with a dedicated password‑cracking engine. The two most common choices are:

  • Hashcat – supports mode 18200 (Kerberos 5 AS‑REP). It automatically detects the etype from the hash string and applies the appropriate algorithm. Example command:
    hashcat -m 18200 -a 0 captured.hash /usr/share/wordlists/rockyou.txt
  • John the Ripper – the jumbo version includes a krb5asrep format. Use john --format=krb5asrep captured.hash to start a crack.

When selecting a tool, consider the GPU resources you have, the size of your wordlist, and whether you need rule‑based mutations. RC4‑HMAC hashes are generally faster to crack than AES because the underlying algorithm is less computationally intensive.

Common Problems and How to Fix Them

Even experienced attackers run into pitfalls when performing AS‑REP roasting. Below are the most frequent issues and practical solutions:

  1. Missing or incorrect etype – Some capture scripts truncate the etype field, leaving Hashcat to guess. Verify the raw AS‑REP (use klist or openssl asn1parse) and ensure the hash string includes $krb5asrep$ followed by the correct number (17, 18, or 23).
  2. Account does not have the flag set – If the target account requires pre‑authentication, the KDC will reject the request with a KDC_ERR_PREAUTH_REQUIRED error. Double‑check the enumeration step; use Get-ADUser -Properties DoesNotRequirePreAuth in PowerShell to confirm.
  3. Kerberos signing/encryption policies – Some domains enforce “Kerberos armoring” or require stronger encryption. In those environments the KDC may refuse to issue an AS‑REP without additional signatures, making roasting impossible. Look for the SupportedEncryptionTypes attribute on the domain controller to see if RC4 is disabled.
  4. Hashcat crashes or runs out of memory – Large AES‑256 hashes consume more GPU memory. Reduce the workload size (lower -w value) or split the hash list into smaller batches.
  5. False positives from duplicate captures – Capturing the same AS‑REP multiple times yields identical hashes. De‑duplicate your list before cracking to save time.

Comparison with Kerberoasting

Both AS‑REP roasting and Kerberoasting are “offline” password‑cracking techniques that target Kerberos tickets, but they differ in several key ways:

  • Target object – AS‑REP roasting works against user accounts with disabled pre‑authentication; Kerberoasting targets service‑principal‑names (SPNs) on service accounts.
  • Hash source – AS‑REP provides a TGT encrypted with the user’s key; Kerberoasting provides a service ticket (TGS) encrypted with the service account’s key.
  • Encryption types – Kerberoasting can only retrieve RC4‑HMAC hashes for accounts that still support that algorithm; AS‑REP can yield AES‑128, AES‑256, or RC4 depending on the account’s configuration.
  • Detection – Kerberoasting generates a large number of TGS requests that can be logged by the KDC; AS‑REP roasting typically produces a single AS‑REQ per target, making it harder to spot.

Because AS‑REP roasting does not require an SPN, it can be used against regular user accounts, which often have higher‑privilege passwords. However, the number of accounts with the “no pre‑auth” flag is usually smaller than the number of service accounts with SPNs, so the attack surface differs.

AS‑REP roasting is a legitimate penetration‑testing technique when performed with explicit authorization. Unauthorized use against production networks constitutes illegal hacking under many jurisdictions. Always obtain a written scope, limit the number of requests to avoid denial‑of‑service, and store captured hashes securely. If you discover accounts with the flag enabled, advise the organization to enable pre‑authentication or enforce stronger encryption policies.

Alternatives and Complementary Techniques

If AS‑REP roasting is not feasible (e.g., no accounts have the flag set), consider these other methods to obtain password hashes from Active Directory:

  • Kerberoasting – request service tickets for SPNs and crack the resulting RC4 hashes.
  • Password Spraying – try a few common passwords against many accounts to avoid lockout thresholds.
  • Credential Dumping – use tools like lsass extraction, Mimikatz, or DCShadow when you have lateral movement.
  • Pass‑the‑Hash – reuse captured NTLM hashes to authenticate to other services without cracking.

Often a combination of these techniques yields the best results in a red‑team engagement.

Frequently Asked Questions

What encryption type is most common in AS‑REP hashes?

In mixed‑environment domains, RC4‑HMAC (etype 23) is still the most common because many legacy accounts have not been migrated to AES. However, newer Windows 10/Server 2016+ deployments increasingly default to AES‑256 (etype 18).

Can I crack an AES‑256 AS‑REP hash on a consumer‑grade GPU?

Yes, but it will be slower than RC4. Modern GPUs (e.g., RTX 3080 or higher) can still achieve several hundred thousand guesses per second on AES‑256, making dictionary attacks feasible if the password is weak.

Is it possible to force an account to issue an AS‑REP without pre‑authentication?

No. The flag must be set on the account object. Attackers can only discover existing mis‑configurations; they cannot toggle the flag without already having privileged access.

Do I need the user’s full name in the hash string?

The hash format includes the SAM account name (or UPN) before the colon. While the name is not required for cracking, it helps you map cracked passwords back to the original account.

How does Hashcat know which algorithm to use for a given hash?

The hash string begins with $krb5asrep$ followed by the etype number (17, 18, or 23). Hashcat parses this number and selects the corresponding decryption routine automatically.

Will enabling “Kerberos pre‑authentication required” protect against AS‑REP roasting?

Yes. When the flag is cleared, the KDC will reject unauthenticated AS‑REQs, preventing the attacker from obtaining the encrypted ticket.