☼
⌃
☰

Kerberos

Table of Contents

Kerberos

Description

Kerberos is a trusted third-party authentication service designed by MIT to provide secure communication over a non-secure network. It is the primary authentication mechanism used in large-scale enterprise environments, most notably in Microsoft Active Directory (AD). The goal of Kerberos is to prevent the transmission of user passwords across the network for every service request, which significantly improves security.

How Kerberos Works (The Three-Headed og)

The name Kerberos is derived from the three-headed dog of Greek mythology because the protocol relies on three parties:

  1. Client (User/Workstation): The entity requesting access.
  2. Server (Service): The resource the client wants to access (e.g., mail server, database server).
  3. Key Distribution Center (KDC): The trusted third party, typically hosted on the Domain Controller (DC) in an AD environment, responsible for issuing tickets.

The Kerberos process is a multi-step exchange of tickets, requiring three main steps:

  1. Authentication Service (AS) Exchange: The client sends its username to the KDC. The KDC verifies the user's identity and returns an encrypted Ticket-Granting Ticket (TGT). This TGT is the user's proof of identity on the network.
  2. Ticket-Granting Service (TGS) Exchange: When the client needs to access a service, it presents its TGT to the KDC (TGS portion). The KDC then issues a Service Ticket that is specific to the requested network service.
  3. Client/Server (CS) Exchange: The client presents the Service Ticket to the target Service Server. The server verifies the ticket and grants the client access to the requested resource.

Key Security Features

  • Single Sign-On (SSO): Users only need to enter their password once during the initial AS exchange to receive the TGT. The TGT is then used to silently request Service Tickets for all subsequent resources.
  • Symmetric Encryption: All tickets are encrypted using secret keys known only to the KDC and the target entity (user or service), ensuring the tickets cannot be forged.
  • Time Stamps: Tickets have a strict expiration time, limiting the window during which a stolen ticket can be misused.

Examples

Kerberos is a background protocol, meaning users rarely interact with its commands directly, but it underpins common administrative and offensive security actions.

. Verification and Troubleshooting (Windows)

While the tickets are usually managed automatically, administrators can view ticket information on a Windows machine.

SH
# Command to purge (delete) all currently cached Kerberos tickets
klist purge

# Command to list all Kerberos tickets currently held by the user
klist

2. Offensive Security (TGT Abuse)

The protocol's reliance on tickets makes it a primary target for advanced persistent threats (APTs):

  • Golden Ticket Attack: An attacker compromises the KDC's master key (or the krbtgt account hash) to forge a Ticket-Granting Ticket (TGT) for any user, granting them permanent, unrestricted Domain Administrator access.
  • Silver Ticket Attack: An attacker forges a Service Ticket (not a TGT) for a specific service (like a file share). This gives them full access to that specific service without needing to interact with the KDC again.
  • Kerberoasting: An attacker requests a Service Ticket for a service account to steal its hash and crack its password offline.