Pass the Ticket from Windows

Kerberos

Here's your Markdown Notes version of the full content, properly structured, titled, and formatted for clarity and reuse:


Pass the Ticket (PtT) - Windows

Overview

Pass the Ticket (PtT) is a lateral movement technique in Active Directory where a stolen Kerberos ticket is used to authenticate, as opposed to using an NTLM password hash.


πŸ” Kerberos Protocol Refresher

  • Kerberos is a ticket-based authentication system.

  • Instead of passwords, it uses tickets:

    • TGT (Ticket Granting Ticket): Used to request TGS.

    • TGS (Ticket Granting Service): Grants access to specific resources.

Authentication Flow

  1. User authenticates by encrypting a timestamp with their password hash.

  2. Domain Controller (KDC) validates and returns a TGT.

  3. To access a service (e.g., MSSQL), a TGS is requested using the TGT.

  4. The TGS is then used for service authentication.

Refer to the "Kerberos, DNS, LDAP, MSRPC"arrow-up-right section for foundational knowledge.


πŸ›  Scenario

In a post-compromise scenario, we:

  • Gain admin access on a phished user's Windows machine.

  • Use tools like Mimikatz and Rubeus to extract and manipulate tickets.


🎟 Harvesting Kerberos Tickets (Windows)

πŸ“₯ Using Mimikatz

  • Exports .kirbi ticket files.

  • Tickets with $ β†’ Computer account.

  • Tickets with service krbtgt β†’ TGT.

πŸ“₯ Using Rubeus

  • Dumps base64 encoded tickets.

  • Useful when Mimikatz exports invalid tickets (e.g., incorrect encryption).


πŸ”‘ Extracting Kerberos Keys

Mimikatz - sekurlsa::ekeys

  • Extracts hashes/keys:

    • aes256_hmac

    • rc4_hmac_nt, rc4_md4, etc.


πŸ§ͺ OverPass the Hash (Pass the Key)

Mimikatz

  • Spawns a new cmd.exe session.

  • Injects user identity with the provided NTLM hash.

Rubeus

  • Requests a TGT using user’s key/hash.

  • The /ptt flag submits the ticket into the session.

Note: Mimikatz requires admin rights, Rubeus does not.


🎫 Pass the Ticket (PtT) with Rubeus

Method 1: Request and Submit TGT

Method 2: Import .kirbi File

Method 3: Use Base64 Encoded Ticket

Convert .kirbi to Base64 with PowerShell


🎫 Pass the Ticket (PtT) with Mimikatz

Alternative: Launch a new session with the ticket:


πŸ’» PowerShell Remoting + PtT

Prerequisites:

  • Admin or Remote Management Users group membership.

  • Remoting enabled on target (TCP/5985 or TCP/5986).

Mimikatz Flow:

Rubeus Flow:

  1. Create sacrificial process:

  1. Inside new cmd.exe:

  1. Launch PowerShell session:


Last updated