squirrelworks

Systems Architecture > Identity & Access Management

Kerberos Protocol Architecture: TGT Exchange, SPNs & Replay Drift Thresholds

Kerberos serves as the core ticket-based authentication protocol powering Active Directory and enterprise SSO boundaries. Here is an engineering breakdown of Key Distribution Center (KDC) ticket exchanges, Service Principal Name (SPN) binding, Kerberos ticket caching, and how time skew triggers ticket validation failures.

KDC Ticket Exchange SPN Routing Replay Attack Prevention

1. The KDC Ticket Granting Mechanism

Kerberos relies on a trusted third party—the Key Distribution Center (KDC), hosted on Active Directory Domain Controllers—to negotiate ticket exchanges between clients and target services without transmitting password hashes over the wire.

Phase Handshake Step Cryptographic Payload
KRB_AS_REQ / REP Authentication Service Exchange Client authenticates against KDC. Receives Ticket Granting Ticket (TGT) encrypted with krbtgt account key.
KRB_TGS_REQ / REP Ticket Granting Service Exchange Client presents valid TGT to request Service Ticket (ST) for a specific Service Principal Name (SPN).
KRB_AP_REQ / REP Application Server Exchange Client presents Service Ticket directly to target host/application to grant authenticated access.
Tech Fact Icon
Security Advantage

Because Service Tickets are encrypted using the target service account's secret key, the application server never needs to communicate directly with the Domain Controller to validate user identity during the KRB_AP_REQ stage.

2. Service Principal Names & Clock Skew Guardrails

Kerberos authentication issues usually stem from two specific infrastructure failures: missing/duplicate SPN mappings or time synchronization collapse.

1. Service Principal Name (SPN) Binding

An SPN is a unique identifier associated with a service account or machine account in Active Directory (e.g., HTTP/web.ad.squirrelworks.dev). If an SPN is missing, clients automatically fall back to legacy NTLM authentication. If duplicate SPNs exist across multiple accounts, ticket requests fail outright with decrypt errors.

2. Replay Protection & The 5-Minute Skew Window

To prevent attackers from capturing valid Kerberos tickets off the wire and replaying them later, Kerberos authenticators include a timestamp encrypted with the session key. The NTP Connection: Active Directory enforces a default maximum tolerance of 5 minutes for computer clock synchronization. If a client or target server clock drifts beyond 5 minutes relative to the KDC, ticket requests return error KRB_AP_ERR_SKEW and authentication breaks completely.

3. Kerberos Diagnostics & Cache Inspection Tools

Windows Environment (`klist` & `setspn`)
# Display active Kerberos tickets cached in client LSA memory
klist

# Purge local Kerberos ticket cache to force fresh KDC requests
klist purge

# Query registered SPNs for a specific host or service account
setspn -L APP1

# Scan Active Directory domain for duplicate SPNs across accounts
setspn -X
Linux Environment (`kinit` & `klist`)
# Request TGT ticket from Active Directory KDC via SSSD/MIT Kerberos
kinit adminuser@AD.SQUIRRELWORKS.DEV

# Inspect cached Linux Kerberos ticket credentials and expiration times
klist


Accessibility
 --overview

API
 --REST best practices
 --REST demo
 --REST vs RPC
 --Wikipedia API

Blockchain
 --overview

Blog
 --The 'Brute Force' Mistake
 --The Bezosian Protocol: Eliminating Learned Helplessness
 --The Humility Protocol: Reality Over Reputation
 --The Jobsian Protocol: Systems Analysis as a War on Entropy
 --The Jordan Framework: Engineering a Competitive Edge
 --Time Management as an Operational System: The Tracy Framework
 --Tracy on Goals: Vector Alignment & Execution

Cloud
 --AWS overview

CSS/HTML
 --Admissions Portal Simulation Lab
 --Bootstrap carousel
 --Grid demo
 --markdown demo

DevOps
 --Agile Principles
 --DevOps overview
 --Drupal, containerized
 --Prometheus & Grafana
 --RKE2: Deploying the Rancher Kubernetes Engine

Encoding
 --Overview

Ergonomics
 --Desk configuration
 --Device fleet
 --Input device array
 --keystroke mechanics
 --Phones & RSI

ERP
 --Anthology overview
 --Ellucian Banner
 --Higher Ed ERP Simulation Lab
 --PeopleSoft Campus Solutions
 --PESC standards
 --Slate data model

Git
 --Automating Production Deployments via Bare Git Repositories & Hooks
 --syntax overview
 --troubleshooting libcrypto

Hardware
 --Device fleet
 --Electricity fundamentals
 --Homelab diagram

Identity & Access
 --Deploying Entra Connect
 --Foundations
 --OIDC Integration
 --Provisioning Okta Dev Tenant

Java
 --Fundamentals

Javascript
 --Advanced Interaction: jQuery & UI Frameworks
 --input prompt demo
 --misc demo
 --Time and Date functions
 --Vue demo

Linux
 --Auditing the live interface state using ethtool
 --grep demo
 --HCI and Proxmox
 --Persistent Infrastructure Telemetry: TMUX
 --Proxmox install
 --xammp ftp server

Mail flow
 --DKIM, SPF, DMARC
 --MAPI

Microsoft
 --AZ-800: Administering Windows Server Hybrid Core Infrastructure
 --BAT scripting
 --Group Policy
 --IIS
 --robocopy
 --Server 2022 setup - Virtualbox

Misc
 --Applications
 --Field Notes: RainPoint Bluetooth Hose Timer
 --regex
 --Resources
 --Sustainable Computing
 --Terminology
 --Tribute to Computer Scientists

Networks
 --BGP Peering & Security Hardening Lab
 --CCNA Lammle Study Guide
 --Cisco 1921/K9 router
 --NGFW vs. Legacy
 --routing protocols
 --throughput calculations

PHP/SQL
 --Cookies
 --database interaction
 --demo, OSI Layers quiz
 --Foreign key constraint demo
 --fundamentals
 --MySQL and PHPmyAdmin setup
 --pagination
 --security
 --session variables
 --SQL fundamentals
 --structures
 --Tables display

Python
 --fundamentals

Security
 --Kerberos: Protocol Architecture
 --NTP Overview
 --Overview- GRC (Governance, Risk, and Compliance)
 --Security Blog
 --SSH fundamentals

Serialization
 --JSON demo
 --YAML demo