TExcelTAD
Home › Windows & Active Directory Security › The PAC, Encryption Types and the End of RC4

The PAC, Encryption Types and the End of RC4

Two details of Microsoft's Kerberos decide how dangerous a stolen key or a captured ticket is. The first is the PAC, the block of authorization data inside every ticket that tells a server who the user is and which groups they belong to: if it can be forged or swapped, so can privileges. The second is the encryption type: a ticket encrypted with RC4 uses the account's unsalted NT hash as its key, so it can be guessed fast and attacked with a stolen hash, while AES keys are salted and derived slowly. This lesson computes the real AES key derivation of RFC 3962, compares it with RC4's, and maps the settings and events that move a domain from RC4 to AES.

The PAC

Microsoft's Privilege Attribute Certificate (MS-PAC) travels in the authorization-data field of every TGT and service ticket. Its main buffers:

Buffer Content Protects against
PAC_LOGON_INFO the user's SID, group RIDs, extra SIDs (other domains, SID history), logon times, flags (data, not protection)
server signature checksum with the service's key a client tampering with the PAC
KDC signature checksum with krbtgt's key over the server signature a service (or someone with only its key) forging a PAC the KDC would accept
PAC_REQUESTOR the requesting account's SID (added with the November 2021 updates, KB5008380) name-confusion attacks such as CVE-2021-42287 / CVE-2021-42278 ("noPac"), where a ticket for one account was reissued as another
ticket signature a krbtgt-keyed checksum over the ticket (December 2020 updates, KB4598347, CVE-2020-17049 "Bronze Bit") a service that holds its own key changing ticket fields outside the PAC, such as the forwardable flag
full PAC signature a krbtgt-keyed checksum over the whole PAC (November 2022 updates, KB5020805, CVE-2022-37967) tampering with the PAC by someone who holds only a service key

When a DC processes a TGS-REQ it checks the KDC signatures in the TGT's PAC and copies the PAC into the service ticket. A service checks only its own server signature unless it asks the DC to validate the KDC signature (PAC validation, which most services skip for performance). That asymmetry is why a forged service ticket (silver ticket) is accepted by the service but not by the KDC.

Encryption types

etype Name Key Status
0x1, 0x3 DES-CBC-CRC, DES-CBC-MD5 56-bit off by default since Windows 7 / Server 2008 R2; must stay off
0x17 (23) RC4-HMAC the NT hash, no salt, no iterations deprecated; since the April 2026 updates DCs no longer issue it by default to accounts without an explicit setting
0x11 (17) AES128-CTS-HMAC-SHA1-96 PBKDF2-HMAC-SHA1, salt = realm + principal, 4096 iterations, then DK supported since Server 2008
0x12 (18) AES256-CTS-HMAC-SHA1-96 as above, 256-bit the default for modern accounts

Which etype a ticket uses depends on what the client asks for, what the account's msDS-SupportedEncryptionTypes attribute says (a bit mask: 0x1 DES-CRC, 0x2 DES-MD5, 0x4 RC4, 0x8 AES128, 0x10 AES256), whether AES keys exist for the account at all (they are created when the password is set on a DC that supports AES, so accounts whose passwords predate 2008-level DCs may have only RC4 keys), and the DC's defaults.

Computing the keys

RFC 3962 derives an AES key in two steps: tkey = PBKDF2-HMAC-SHA1(password, salt, iterations, keylen), then key = DK(tkey, "kerberos"), where DK encrypts an "n-folded" form of the constant with AES. The program implements both steps, checks them against the RFC's own test vector and the n-fold vector of RFC 3961, and then derives the AD keys for two lab users who share a password.

python · try it yourself
from functools import reduce
from math import gcd
from Crypto.Hash import MD4
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes

def nfold(data: bytes, n: int) -> bytes:                       # RFC 3961, section 5.1
    def rotr(b, bits):
        k, r = (bits // 8) % len(b), bits % 8
        return bytes(((b[i - k] >> r) | (b[i - k - 1] << (8 - r))) & 0xFF for i in range(len(b)))
    def add(a, b):                                              # ones' complement addition
        v = [x + y for x, y in zip(a, b)]
        while any(x > 0xFF for x in v):
            v = [(v[i - len(v) + 1] >> 8) + (v[i] & 0xFF) for i in range(len(v))]
        return bytes(v)
    lcm = n * len(data) // gcd(n, len(data))
    big = b"".join(rotr(data, 13 * i) for i in range(lcm // len(data)))
    return reduce(add, (big[p:p + n] for p in range(0, lcm, n)))

def aes_block(key, block):
    enc = Cipher(algorithms.AES(key), modes.ECB()).encryptor()
    return enc.update(block) + enc.finalize()

def string_to_key(password: str, salt: str, keylen: int, iterations=4096) -> bytes:
    tkey = PBKDF2HMAC(hashes.SHA1(), keylen, salt.encode(), iterations).derive(password.encode())
    out, block = b"", nfold(b"kerberos", 16)
    while len(out) < keylen:                                    # DK = DR for AES (the key-from-bits step is identity)
        block = aes_block(tkey, block)
        out += block
    return out[:keylen]

print("n-fold('kerberos', 128 bits):", nfold(b"kerberos", 16).hex(),
      nfold(b"kerberos", 16).hex() == "6b65726265726f737b9b5b2b93132b93")
k = string_to_key("password", "ATHENA.MIT.EDUraeburn", 16, iterations=1)
print("RFC 3962 vector, AES128, 1 iteration:", k.hex(), k.hex() == "42263c6e89f4fc28b8df68ee09799f15")

print()
for user in ["alice", "bob"]:                                  # same lab password, same realm
    aes = string_to_key("Winter2026!", "CORP.LAB.TEST" + user, 32)
    rc4 = MD4.new("Winter2026!".encode("utf-16-le")).hexdigest()
    print(f"{user:5}  AES256 {aes.hex()[:32]}...  RC4 {rc4}")
n-fold('kerberos', 128 bits): 6b65726265726f737b9b5b2b93132b93 True
RFC 3962 vector, AES128, 1 iteration: 42263c6e89f4fc28b8df68ee09799f15 True

alice  AES256 5bb54a6b22afccaa173c313156c5e6e4...  RC4 186f5176db2c519a7b29b47a5437a4ad
bob    AES256 cf041fc8708a5378b3ba21f95e72b591...  RC4 186f5176db2c519a7b29b47a5437a4ad

Both checks print True, so the code is the real algorithm. The last two lines are the point: with AES, alice and bob get different keys because the salt includes their names, and every guess costs 4,096 HMAC iterations. With RC4 they get the same key, which is also their NT hash: precomputed tables work across every domain, a stolen NT hash is directly usable as a Kerberos key ("overpass-the-hash"), and guessing is thousands of times faster.

Moving off RC4

Microsoft has been closing RC4 in steps: the November 2022 updates (CVE-2022-37966) made AES the default session key type for accounts without an explicit msDS-SupportedEncryptionTypes, and the CVE-2026-20833 changes (KB5073381) went further: the January 2026 updates added audit events (KDCSVC 201–209 in the System log), the April 14, 2026 updates changed the DCs' default DefaultDomainSupportedEncTypes to AES only (0x18), and the July 2026 updates removed the temporary rollback switch. Accounts that still need RC4 must now have it set explicitly in msDS-SupportedEncryptionTypes, so those explicit settings are what to hunt for. The steps below apply in any case:

  1. Inventory: 4768 and 4769 events with Ticket Encryption Type: 0x17, grouped by account and service. Each one is a client, a service or an account that still needs RC4.
  2. Fix accounts without AES keys: reset the password of service accounts (and, carefully, twice for krbtgt) whose passwords were last set before AES existed in the domain; then their AES keys exist.
  3. Set msDS-SupportedEncryptionTypes to 0x18 (AES128 + AES256) on service accounts and computers, or 0x10 for AES256 only.
  4. Disable RC4 in the domain policy "Network security: Configure encryption types allowed for Kerberos", first on clients and servers, then on DCs, watching the inventory for failures.

How it is detected

  • RC4 tickets in an AES domain: 4769 with encryption type 0x17 for a service whose account supports AES is the classic Kerberoasting signal (attack tools ask for RC4 because it is faster to guess); 4768 with 0x17 for a user who normally gets AES suggests overpass-the-hash with a stolen NT hash.
  • PAC problems: after the 2021–2022 hardening, DCs log System events from source Kerberos-Key-Distribution-Center for tickets with missing or invalid PAC signatures or requestors (IDs in the 35–38 range for PAC_REQUESTOR issues in the 2021 update guidance); these point at forged or very old tickets, or at unpatched DCs.
  • RC4 dependencies: the KDCSVC audit events 201–209 in the DCs' System log name RC4-only clients, services without AES keys and DCs whose DefaultDomainSupportedEncTypes still allows RC4.
  • DES anywhere (0x1, 0x3): accounts with USE_DES_KEY_ONLY, or very old devices.

How it is hardened

  • AES only, as above; remove USE_DES_KEY_ONLY and RC4 bits from accounts.
  • Keep DCs fully patched so PAC signatures and requestor checks are enforced (the enforcement phases of KB5008380 and KB5020805 are past; a DC still in compatibility mode is a finding).
  • Enable PAC validation for services that matter where performance allows, and prefer services that run as computer accounts or gMSAs, whose keys can't be guessed.

Pitfalls

  • Assuming AES because the domain is "new". Old service accounts migrated in may have only RC4 keys until their passwords are reset.
  • Setting msDS-SupportedEncryptionTypes to AES on an account without AES keys: authentication to it fails until the password is reset.
  • Confusing ticket and session-key encryption types. Event fields show the ticket's; the session key may differ. Both should be AES.
  • Thinking AES fixes weak passwords. It slows guessing; a password like Summer2026 still falls quickly.

Practice

1. Decode msDS-SupportedEncryptionTypes = 0x1C.

0x10 + 0x8 + 0x4: AES256, AES128 and RC4. Remove 0x4 to make it AES-only (0x18).

2. What salt would AD use for the AES keys of the user svc-sql in corp.lab.test?

The upper-case realm followed by the user name as stored (case-sensitive): CORP.LAB.TESTsvc-sql. Computer accounts use a different form (CORP.LAB.TESThost + the lower-case host name + .corp.lab.test).

3. A 4769 shows Service Name: svc-sql, Ticket Encryption Type: 0x17, requested by bob. svc-sql has msDS-SupportedEncryptionTypes = 0x18. Why is that odd?

The account is configured for AES only, yet an RC4 ticket was issued: either the DC isn't honouring the setting (old DC, policy override) or the event is from before the change. If the attribute were not set, an RC4 ticket would mean the DC still allows RC4 by default (an unpatched DC, or an explicit DefaultDomainSupportedEncTypes that includes RC4), which is what Kerberoasting tools rely on. Either way, investigate bob's activity.

Test yourself

What is the Kerberos RC4-HMAC key of an account?

  1. A random value
  2. Its NT hash
  3. PBKDF2 of the password with a salt
  4. The krbtgt key

Which signature in the PAC can only the KDC produce?

  1. The server signature
  2. The KDC signature, made with krbtgt's key
  3. The client's authenticator
  4. The TLS signature

Which value in a 4769 event indicates an RC4 ticket?

  1. 0x12
  2. 0x11
  3. 0x17
  4. 0x1

Why do two users with the same password get different AES keys?

  1. AES adds a random IV to the key
  2. The salt is the realm plus the user name
  3. Each DC uses its own key
  4. They don't