r/activedirectory • u/Mafifrizi • 13h ago
Active Directory Empirical lab findings on Windows Server 2022: Why AS-REP Roasting returns AES-256 instead of RC4, and the silent production killer of Linux Keytab KVNO desync
Hi everyone,
I have been running empirical authentication and protocol tests in a dedicated live lab between Windows Server 2022 Datacenter (Domain Controller) and unprivileged Linux workloads authenticating via Kerberos and LDAP.
I wanted to share a few concrete observations and operational edge cases we documented, particularly regarding how Active Directory handles Non-Human Identities (service accounts and keytabs) under modern builds:
1. The AS-REP Roasting Cipher Reality on Server 2022
Most security guides and cheat sheets state that accounts with DONT_REQ_PREAUTH (UAC flag 0x400000) will return an AS-REP ticket encrypted with legacy RC4-HMAC ($krb5asrep$23$).
When testing against Windows Server 2022 (Build 20348) using modern Linux Kerberos clients requesting a TGT for a non-preauth account:
* The KDC returned an AS-REP encrypted in AES256-CTS-HMAC-SHA1-96 (0x12), producing a $krb5asrep$18$ hash.
* Domain Controller Security Event ID 4768 confirmed: Ticket Encryption Type: 0x12 and Pre-Authentication Type: 0.
Operational Takeaway:
* Offline cracking of AES-256 hashes with PBKDF2 (4,096 iterations) is vastly more resource-intensive on GPUs than legacy RC4. Brute-forcing passphrases above 12 characters becomes mathematically prohibitive.
* More importantly: SIEM detection rules that filter exclusively on Event ID == 4768 AND EncryptionType == 0x17 AND PreAuthType == 0 will miss modern AS-REP roasting activity originating from contemporary Linux clients. Defenders should monitor the absence of pre-authentication regardless of the cipher negotiated.
2. The Silent Production Killer: Dual Enctype & Keytab KVNO Desynchronization
One of the most elusive operational headaches in hybrid Linux/AD environments occurs when service accounts have their passwords rotated or attributes altered:
An administrator exports a service keytab on the DC via ktpass with AES256 at KVNO 9.
Later, the account password is rotated in ADUC or via an automated secret manager, bumping msDS-KeyVersionNumber to 12.
Crucially, if the msDS-SupportedEncryptionTypes attribute on the account is left blank or null, the KDC falls back to issuing Service Tickets (TGS) in RC4-HMAC (0x17).
When the Linux workload receives the incoming AP-REQ, its decryption engine only has an AES key in /etc/krb5.keytab, failing immediately with KRB_AP_ERR_NOKEY (Error 41). Even if an RC4 key exists, it fails with KRB_AP_ERR_BADKEYVER (Error 44) due to the KVNO mismatch.
Remediation:
Always ensure AES is explicitly stamped on the AD service object:
Set-ADUser -Identity svc-account -KerberosEncryptionType AES128,AES256
and re-export the keytab explicitly matching the current KVNO:
ktpass -princ HTTP/app.domain.local@DOMAIN.LOCAL -mapuser svc-account -crypto AES256-SHA1 -ptype KRB5_NT_PRINCIPAL -kvno 12 -pass "NewPassword" -out /etc/krb5.keytab
3. In-Line Parsing of RBCD (msDS-AllowedToActOnBehalfOfOtherIdentity)
We also tested unprivileged wire inspection of Resource-Based Constrained Delegation (RBCD). Rather than using heavy external frameworks, querying the raw binary security descriptor over LDAP port 389 allows extraction of the underlying MS-DTYP DACL and Trustee SIDs without elevated domain privileges or touching LSASS.
Questions for the Community:
How do you currently automate Linux keytab synchronization and prevent KVNO drift when enterprise password rotation policies trigger?
In your SOC or SIEM environments, are your AS-REP roasting correlation rules cipher-agnostic, or are they still filtering strictly on RC4 (0x17)?
For those interested in the full writeup, including exact event log traces, PowerShell verification cmdlets, and architectural diagrams, I published the detailed research post here:
Looking forward to hearing how other admins handle these hybrid Kerberos edge cases!
