Skip to content

Kerberos in Active Directory

A comprehensive guide to Kerberos authentication in Microsoft Windows Active Directory - how the protocol works, how to configure it securely, and how attackers exploit it.


Who This Is For

This site is written for three audiences:

  • System administrators and network engineers who manage Active Directory and need to understand what happens when a user logs in, how encryption types are negotiated, and how to harden their environment against modern attacks.
  • Security teams responsible for detecting and preventing Kerberos-based attacks, configuring encryption policies, and operating a domain after the 2026 removal of RC4 as the default Kerberos encryption type.
  • Red teamers and penetration testers who need a deep understanding of the protocol to execute and explain Kerberos attacks, and who want to understand exactly why each attack works at the protocol level.

No prior Kerberos knowledge is required. The site starts from first principles and builds up.

RC4 is no longer the default

Domain controllers with the April 2026 cumulative update or later treat accounts that have no explicit msDS-SupportedEncryptionTypes as AES-only (CVE-2026-20833), unless DefaultDomainSupportedEncTypes is set explicitly or, on the April-June 2026 updates, the temporary RC4DefaultDisablementPhase rollback was applied. If a service started failing with KDC_ERR_ETYPE_NOSUPP, or you want to confirm you are not affected, start with RC4 enforcement: am I affected?.

Already familiar with Kerberos and just need to finish moving your domain to AES? Jump straight to the Standardization Guide.


Three Sections

  • Protocol


    How Kerberos works from the ground up: the three-party model, AS/TGS/AP exchanges, ticket structure, pre-authentication, encryption types, S4U, cross-realm authentication, and delegation.

    Start here if you are new to Kerberos.

  • Security


    Configuring Kerberos for security: encryption type negotiation, key derivation, the msDS-SupportedEncryptionTypes attribute, registry and Group Policy settings, the RC4 default removal (CVE-2026-20833), and mitigations.

    New to encryption types? Start with the Quick Start Guide. Something broke after patching? Go to enforcement triage. Two interactive tools help along the way: the Encryption Type Calculator and the Event Decoder.

  • Attacks


    Every major Kerberos attack targeting key-based authentication: roasting (Kerberoast, AS-REP, AS-REQ), credential theft (pass-the-ticket, pass-the-key, spraying), ticket forgery (golden, silver, diamond, sapphire), and delegation abuse (unconstrained, constrained, RBCD, S4U, SPN-jacking). Each page covers how it works, how to defend, how to detect, and how to exploit.

    Start here if you already understand the protocol and want to focus on offensive or defensive techniques.


Key Concepts

SPN-Bearing Account Types

Five AD object types can have servicePrincipalName registered. Each type gets its msDS-SupportedEncryptionTypes value a different way, has a different password management model, and a different remediation path.

Type AD objectClass SPNs Password Who writes msDS-SET Value you usually find Target
User service account user (objectCategory=person) Manual Human-set Nobody, until an admin does Unset (0) 0x18
Computer account computer Auto at domain join Auto-rotated The machine itself, from its local Kerberos etype policy 0x1C on Windows with no etype policy1; unset on non-Windows or pre-staged objects 0x18 (via GPO)
gMSA msDS-GroupManagedServiceAccount Explicit Auto-rotated, random Set at creation; nothing maintains it afterwards 0x1C1 0x18
MSA msDS-ManagedServiceAccount Explicit Auto-rotated, random Set at creation; nothing maintains it afterwards 0x1C or unset1 0x18
dMSA msDS-DelegatedManagedServiceAccount Explicit Auto-rotated, random (Server 2025+) Set at creation; nothing maintains it afterwards Unset or 0x1C1 0x18

Vocabulary used throughout this site:

  • SPN-bearing accounts - umbrella term for all five types when discussing msDS-SET, etype management, or any context where all types apply.
  • User service accounts - user objects (objectCategory=person) with manually registered SPNs; the primary Kerberoasting target.
  • Managed service accounts - collective for gMSA, MSA, and dMSA when discussing auto-rotating passwords.
  • Computer accounts - objectCategory=computer; a Windows machine keeps its own msDS-SET in step with its Kerberos etype policy.

Self-managed vs manually-managed:

  • Self-managed: Windows computer accounts. The machine rewrites its own AD attribute from the etypes its Kerberos policy allows, so you change the policy (GPO), not the attribute. Microsoft's New-ADServiceAccount reference puts clustering in the same group: "Domain-joined Windows systems and services such as clustering manage their own msDS-SupportedEncryptionTypes attribute", and a change made by hand is overwritten.
  • Manually-managed: user service accounts, gMSA, MSA, dMSA, and computer objects that are not Windows machines (NAS filers, Linux hosts). Set msDS-SupportedEncryptionTypes explicitly on each one.

Why managed service accounts are still worth setting to 0x18

gMSA, MSA, and dMSA passwords are long and random, so Kerberoasting them is not a practical threat, and an account at 0x1C that has AES keys already receives AES256 tickets - the KDC picks the strongest etype in the set. Setting 0x18 removes what 0x1C still leaves open: an RC4 session key for a client that offers only RC4, an RC4 ticket if KdcUseRequestedEtypesForTickets is ever set to 1, and an RC4 ticket if the account ever ends up without AES keys. An account left unset is a different case: on a DC without the April 2026 update it does get RC4 tickets.


Prerequisites

To get the most out of this guide, you should be comfortable with:

  • Basic TCP/IP networking (DNS, ports, client-server communication)
  • Windows domain concepts (Active Directory, domain controllers, user accounts, group membership)
  • Command-line tools (PowerShell, Linux shell)

No cryptography background is needed - encryption concepts are explained as they come up.


Tools

Attack pages use kerbwolf and impacket for examples. See the Tools Setup page for installation instructions.

kerbwolf

kerbwolf - Kerberos roasting and TGT attack toolkit:

Tool Purpose
kw-roast TGS-REP roasting (Kerberoasting)
kw-asrep AS-REP roasting
kw-extract Offline hash extraction from pcap captures
kw-tgt TGT acquisition (pass-the-key / overpass-the-hash)

Microsoft Kerberos-Crypto

Kerberos-Crypto - Microsoft's official PowerShell scripts for assessing RC4 usage and key readiness:

Script Purpose
Get-KerbEncryptionUsage.ps1 Detect RC4 usage from Event IDs 4768/4769 across all KDCs
List-AccountKeys.ps1 List Kerberos key types stored for each account

See Detect and remediate RC4 usage in Kerberos for Microsoft's official usage guidance. They complement the audit queries in the AES Standardization Guide.

KDC registry audit script

Get-KdcKerberosRegistryAudit.ps1 - this site's read-only audit of the Kerberos registry values on every domain controller: which values are set, whether they sit at a path the KDC actually reads, and whether the DC's build enforces the RC4 default removal. See the script README for download and usage notes, and Registry Audit for the lab results behind it.

PSKerb

PSKerb - PowerShell module for reading and writing Kerberos client registry configuration on Windows:

Install-Module -Name PSKerb
Command Purpose
Get-KerbConfig Display all Kerberos client registry settings with human-readable values
Set-KerbConfig Set one or more Kerberos registry settings (e.g. -SupportedEncryptionTypes AES256-SHA96)
Clear-KerbConfig Remove registry overrides, reverting settings to defaults

Covers 22 settings under HKLM\...\Policies\System\Kerberos\Parameters including SupportedEncryptionTypes, DefaultEncryptionType, MaxTokenSize, and timeout/retry tuning. See Registry Settings for the security-relevant subset.


Authoritative References

This guide is grounded in the official protocol specifications. Inline references such as RFC 4120 §3.1 or MS-KILE §3.3.5.7 point to the source material throughout the site.

Kerberos Protocol

Document Description
RFC 4120 The Kerberos Network Authentication Service (V5) - the authoritative base protocol specification
RFC 6806 Kerberos Principal Name Canonicalization and Cross-Realm Referrals
RFC 4556 Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)
RFC 6113 A Generalized Framework for Kerberos Pre-Authentication (FAST)

Cryptographic Specifications

Document Description
RFC 3961 Encryption and Checksum Specifications for Kerberos 5 - the cryptographic framework
RFC 3962 Using AES Encryption with Kerberos 5 (AES-CTS-HMAC-SHA1-96)
RFC 6649 Deprecate DES, RC4-HMAC-EXP, and Other Weak Cryptographic Algorithms in Kerberos
RFC 7465 Prohibiting RC4 Cipher Suites - a TLS document, not a Kerberos one; listed as background on RC4
RFC 8429 Deprecate Triple-DES (3DES) and RC4 in Kerberos

Microsoft Open Specifications

Document Description
MS-KILE Kerberos Protocol Extensions - Windows-specific additions to the base protocol
MS-PAC Privilege Attribute Certificate Data Structure - the authorization data inside Kerberos tickets
MS-SFU Kerberos Protocol Extensions: Service for User and Constrained Delegation Protocol
MS-ADTS Active Directory Technical Specification - AD object classes, attributes, and protocol behavior
MS-APDS Authentication Protocol Domain Support - how domain controllers process authentication requests
MS-DRSR Directory Replication Service Remote Protocol - used by DCSync and key extraction techniques
MS-RPRN Print System Remote Protocol - abused for authentication coercion (Printer Bug)
MS-EFSR Encrypting File System Remote (EFSRPC) Protocol - abused for authentication coercion (PetitPotam)
MS-DFSNM Distributed File System (DFS): Namespace Management Protocol - abused for authentication coercion

Security Advisories

Advisory Title Impact
CVE-2021-36942 Windows LSA Spoofing (PetitPotam) Unauthenticated NTLM relay via EFS RPC coercion
CVE-2021-42287 AD Elevation of Privilege (sAMAccountName spoofing) PAC_REQUESTOR validation; noPAC attack
KB5008380 Authentication updates (CVE-2021-42287) Adds PAC_REQUESTOR and PAC_ATTRIBUTES_INFO to the PAC; the KDC checks the requestor SID on TGS requests
CVE-2022-26923 AD Domain Services Elevation of Privilege Certificate-based machine account privilege escalation
CVE-2022-37966 Windows Kerberos RC4-HMAC Elevation of Privilege KDC defaults to AES session keys; introduces DefaultDomainSupportedEncTypes
CVE-2020-17049 Kerberos KDC Security Feature Bypass (Bronze Bit) Adds the PAC ticket signature so a service cannot alter its own ticket flags
CVE-2022-37967 Windows Kerberos Elevation of Privilege Adds the full (extended KDC) PAC signature
KB5021131 Kerberos protocol changes (CVE-2022-37966) November 2022 etype behavior changes
KB5020805 How to manage Kerberos protocol changes related to CVE-2022-37967 Deployment and enforcement phases for the full PAC signature
KB5037754 How to manage PAC Validation changes related to CVE-2024-26248 and CVE-2024-29056 PAC validation hardening and its enforcement phases
CVE-2026-20833 Windows Kerberos Information Disclosure Vulnerability The fix removes RC4 as the implicit default etype for accounts without explicit msDS-SupportedEncryptionTypes
KB5073381 How to manage Kerberos KDC usage of RC4 for service account ticket issuance changes related to CVE-2026-20833 Audit and enforcement timeline; Kdcsvc events 201--209
CVE-2026-20849 Windows Kerberos Elevation of Privilege Vulnerability MS-SFU ties this update to the PhaseOutOldStyleS4U setting, under which a service sends PA-S4U-X509-USER instead of PA-FOR-USER in S4U2Self requests. Whether a patched DC rejects PA-FOR-USER is not confirmed; see S4U Extensions

  1. Typical values, not lab-verified on this site. Microsoft's KB5021131 confirms the mechanism for computers ("A computer that is running a supported version of the Windows operating system automatically sets the msds-SupportedEncryptionTypes for that machines account in Active Directory.") and that user accounts and gMSAs are not set automatically. Query your own domain rather than relying on this column. ↩↩↩↩