New to Claude Skills? Learn how to install them →

mukul975 on GitHub

Detecting Golden Ticket Attacks

Free

Identify Kerberos Golden Ticket anomalies in AD logs.

Get this skill

Free · Opens the source repo

What Detecting Golden Ticket Attacks does

Detecting Golden Ticket Attacks in Kerberos Logs is a specialized skill designed for cybersecurity professionals who need to identify and respond to potential Kerberos ticket forgery in Active Directory environments. This skill leverages Splunk and KQL queries to analyze domain controller event logs for signs of Golden Ticket attacks, which can allow unauthorized persistent access to domain resources. By monitoring for specific anomalies, such as mismatched encryption types and suspicious ticket lifetimes, users can effectively hunt for signs of credential abuse and unauthorized access.

The skill operates by implementing a structured workflow that includes monitoring Ticket Granting Ticket (TGT) requests, detecting anomalies in encryption types, and checking for tickets with implausible lifetimes. Users will also look for non-existent Security Identifiers (SIDs) and track the age of the KRBTGT password to identify potential compromises. With the ability to validate PAC signatures and detect service tickets issued without prior TGT requests, this skill provides a comprehensive approach to threat hunting in Active Directory.

This skill is particularly useful in scenarios where there is a suspicion of KRBTGT account hash compromise, such as after a DCSync attack or during post-breach assessments. It is aimed at security analysts and incident responders who require a systematic method for identifying Golden Ticket attacks and mitigating their impact on organizational security. By utilizing the provided detection queries, users can quickly implement monitoring strategies tailored to their specific Active Directory configurations.

In addition to the detection capabilities, the skill offers clear output formatting to streamline reporting and incident response processes. This ensures that security teams can efficiently communicate findings and take appropriate actions based on the detected anomalies.

When to use it

Use this skill when you suspect KRBTGT account compromise or need to investigate suspicious Kerberos authentication patterns.

When not to use it

This skill may not be suitable for environments without Active Directory or those not using Kerberos for authentication.

What you can build with it

Post-DCSync Investigation

After a DCSync attack, use this skill to identify forged Kerberos tickets that may have been created using the compromised KRBTGT hash.

Detecting RC4 Downgrade Attacks

Monitor for Golden Tickets forged with RC4 encryption in an environment that enforces AES encryption, indicating a potential attack.

Cross-Domain Ticket Forgery

Utilize this skill to identify forged inter-realm TGTs that attackers may use to pivot between different Active Directory domains.

How to install Detecting Golden Ticket Attacks

View source

1. Install with the skills CLI

npx skills add mukul975/anthropic-cybersecurity-skills/detecting-golden-ticket-attacks-in-kerberos-logs --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mukul975

Detecting Golden Ticket Attacks in Kerberos Logs

When to Use

  • When KRBTGT account hash may have been compromised via DCSync or NTDS.dit extraction
  • When hunting for forged Kerberos tickets used for persistent domain access
  • After incident response reveals credential theft at the domain level
  • When investigating impossible logon patterns (users logging in from multiple locations simultaneously)
  • During post-breach assessment to determine if Golden Tickets are in use

Prerequisites

  • Windows Security Event IDs 4768, 4769, 4771 on domain controllers
  • Kerberos policy configuration knowledge (max ticket lifetime, encryption types)
  • Domain controller audit policy enabling Kerberos Service Ticket Operations
  • SIEM with ability to correlate Kerberos events across multiple DCs

Workflow

  1. Monitor TGT Requests (Event 4768): Track Kerberos authentication service requests. Golden Tickets bypass the AS-REQ/AS-REP exchange entirely, so the absence of 4768 before 4769 is suspicious.
  2. Detect Encryption Type Anomalies: Golden Tickets often use RC4 (0x17) encryption. If your domain enforces AES (0x12), any RC4 TGT is a red flag. Monitor TicketEncryptionType in Event 4769.
  3. Check Ticket Lifetime Anomalies: Default Kerberos TGT lifetime is 10 hours with 7-day renewal. Golden Tickets can be forged with 10-year lifetimes. Detect tickets with durations exceeding policy.
  4. Hunt for Non-Existent SIDs: Golden Tickets can include arbitrary SIDs (including non-existent accounts or groups). Correlate TGS requests against known AD SID inventory.
  5. Detect TGS Without Prior TGT: When a service ticket (4769) appears without a preceding TGT request (4768) from the same IP/account, this may indicate a pre-existing Golden Ticket.
  6. Monitor KRBTGT Password Age: Track when KRBTGT was last reset. If KRBTGT hash hasn't changed since a known compromise, Golden Tickets from that period remain valid.
  7. Validate PAC Signatures: With KB5008380+ and PAC validation enforcement, domain controllers reject forged PACs. Monitor for Kerberos failures indicating PAC validation errors.

Detection Queries

Splunk -- RC4 Encryption in Kerberos TGS

index=wineventlog EventCode=4769
| where TicketEncryptionType="0x17"
| where ServiceName!="krbtgt"
| stats count by TargetUserName ServiceName IpAddress TicketEncryptionType Computer
| where count > 5
| sort -count

Splunk -- TGS Without Prior TGT

index=wineventlog (EventCode=4768 OR EventCode=4769)
| stats earliest(_time) as first_tgt by TargetUserName IpAddress EventCode
| eventstats earliest(eval(if(EventCode=4768, first_tgt, null()))) as tgt_time by TargetUserName IpAddress
| where EventCode=4769 AND (isnull(tgt_time) OR first_tgt < tgt_time)
| table TargetUserName IpAddress first_tgt tgt_time

KQL -- Golden Ticket Indicators

SecurityEvent
| where EventID == 4769
| where TicketEncryptionType == "0x17"
| where ServiceName != "krbtgt"
| summarize Count=count() by TargetUserName, IpAddress, ServiceName
| where Count > 5

Common Scenarios

  1. Post-DCSync Golden Ticket: After extracting KRBTGT hash, attacker forges TGT with Domain Admin SID, valid for months until KRBTGT is rotated twice.
  2. RC4 Downgrade: Golden Ticket forged with RC4 encryption in an AES-only environment, detectable by encryption type mismatch.
  3. Cross-Domain Golden Ticket: Forged inter-realm TGT used to pivot between AD domains/forests.
  4. Persistence After Remediation: Golden Tickets surviving password resets because KRBTGT was only rotated once (both current and previous hashes are valid).

Output Format

Hunt ID: TH-GOLDEN-[DATE]-[SEQ]
Suspected Account: [Account using forged ticket]
Source IP: [Client IP]
Target Service: [SPN accessed]
Encryption Type: [RC4/AES128/AES256]
Anomaly: [No prior TGT/RC4 in AES environment/Extended lifetime]
KRBTGT Last Reset: [Date]
Risk Level: [Critical]

Frequently asked questions about Detecting Golden Ticket Attacks

Similar skills