Skip to main content

Kerberos Tickets

Explore Kerberos authentication mechanics hands-on, from ticket requests to encryption types.

Task 1: Introduction

Task 2: What Is Kerberos?

Task 3: KDC, krbtgt, and SPNs

Task 4: AS Exchange: AS-REQ and AS-REP

Task 5: TGS Exchange: TGS-REQ and TGS-REP

Task 6: Inside the Ticket: The PAC

Task 7: RC4 vs. AES Encryption Types

Task 8: Conclusion

Back to all walkthroughs
Room Icon

Kerberos Tickets

Max room.

Explore Kerberos authentication mechanics hands-on, from ticket requests to encryption types.

medium

60 min

50

User profile photo.
User profile photo.

To access material, start machines and answer questions login.

An analyst who only knows the Event , without knowing what a normal ticket exchange actually looks like under the hood, ends up pattern matching against a checklist instead of understanding what they are looking at. That gap is exactly where real investigations stall.

This room goes deep on how Kerberos actually works. You will generate your own Kerberos traffic against the domain and read the exact event each exchange produces straight from the domain controller's own Security log, alongside your own ticket cache in klist.

Learning Objectives

  • Explain why Kerberos exists as a trusted-third-party protocol, and describe how the KDC's AS and TGS services, krbtgt, and SPNs work together to issue and validate tickets.
  • Identify the fields inside the AS-REQ/AS-REP and -REQ/TGS-REP exchanges.
  • Understand what pre-authentication, tickets, and authenticators protect against.
  • Describe the components of a Kerberos ticket, including the PAC, and explain why a ticket is opaque to the client carrying it.
  • Compare RC4 and AES Kerberos encryption types, and determine which one an account will use based on its msDS-SupportedEncryptionTypes attribute.
  • Interpret real Kerberos authentication events (Event IDs 4768 and 4769) and ticket cache output from klist
  • Recognize the major Kerberos abuse techniques and the protocol property each one exploits.

Prerequisites

  • Basic Active Directory concepts (users, computers, domain controllers), or complete the Active Directory Basics room

Lab Setup

Start the machines by clicking the Start Machine button(s) below and give them a few minutes to finish booting, then open the DefenseBox.

Set up your virtual environment

To successfully complete this room, you'll need to set up your virtual environment. This involves starting both your DefenseBox and Lab Machines, ensuring you're equipped with the necessary tools and access to tackle the challenges ahead.
Defender machine
Status:Off
Lab machine
Status:Off

Note: DefenseBox is your workstation for this room, and it is not joined to the domain. You will need to perform the following configuration and open PowerShell as a domain user before starting.

Pointing Your Machine at the Domain Controller

DefenseBox is not a member of the domain, so it has none of the automatic discovery a domain-joined machine gets. Before you can do anything with Kerberos, your machine needs to know two specific things: how to resolve the name THM-DC, and how to find the Kerberos realm's Key Distribution Center. Task 2 is about to spend real time on the trusted third party, and this is the first step toward reaching it.

Run this once, right after opening on the DefenseBox:

$kdcIP = "MACHINE_IP"
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "`n$kdcIP`tTHM-DC THM-DC.tryhatmestudios.thm"
ipconfig /flushdns
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Domains" -Name "TRYHATMESTUDIOS.THM" -Force
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Domains\TRYHATMESTUDIOS.THM" -Name "KdcNames" -Value $kdcIP -PropertyType MultiString -Force

The first three lines let your machine resolve THM-DC by name. The last two tell Kerberos specifically where to find the KDC for TRYHATMESTUDIOS.THM, since a non-domain machine has no other way to locate it. You will not need to touch this again for the rest of the room.

Opening a Terminal as a Domain User

Now that your machine can see the domain controller, in the same PowerShell tab, you can open a new session using an account connected to the domain. You will use this terminal session for the entire room:

runas /netonly /user:luke.sullivan@tryhatmestudios.thm powershell

Use the password Secure!.

Answer the questions below

I have successfully set up the lab and I'm ready to learn Kerberos!