Mimikatz
Mimikatz is a post-exploitation tool that can extract plaintext passwords, hashes, PINs, and Kerberos tickets from memory. It can also perform pass-the-hash, pass-the-ticket, and build Golden Tickets.
TL;DR Credential Dumping Checklist
Important Notes
- Debug Privilege: Most Mimikatz operations require
privilege::debugto access LSASS memory - Administrator Required: Mimikatz typically needs administrator privileges to function
- LSASS Access: Many operations read from LSASS memory, which is protected by Windows
- Detection: Mimikatz is heavily flagged by security products and EDR solutions
- Pass the Hash: When using
sekurlsa::pth, a new window will open - run commands in that new window - Golden Tickets: Golden Tickets are valid until the KRBTGT account password is changed (typically 180 days by default)
- Ticket Files: Exported Kerberos tickets use
.kirbiformat - Domain Syntax: Use “.” for domain when targeting local machine accounts
Basic Usage & Privilege Escalation
Credential Dumping
LSASS Memory (sekurlsa)
Dump All Credentials:
Dump WDigest Plaintext Credentials:
Dump Specific Hash Types:
Export Kerberos Tickets:
Extract AES Keys:
SAM Database
LSA Secrets
Dump Specific Account:
DCSync
Might require runas.
Pass the Hash (PtH)
Pass the Hash allows you to authenticate using an NTLM hash instead of a plaintext password.
Alternative Syntax:
Pass the Key (PtK) / OverPass the Hash (OtH)
Concept: Request a Kerberos Ticket (TGT) using an NTLM hash or AES Key, rather than using the NTLM protocol directly.
Extract AES Keys First:
Pass the Key with AES:
Pass the Ticket (PtT)
Pass the Ticket allows you to use stolen Kerberos tickets to authenticate as another user.
Export Tickets:
Inject Ticket:
Golden & Silver Ticket Attack
A Golden Ticket is a forged Kerberos TGT that allows you to impersonate any user in the domain, including domain administrators.
A Silver Ticket is a forged Kerberos TGS that allows you to impersonate any user on a single machine.
Step 1: Get KRBTGT Hash & SID
Method A (On DC):
Method B (Remote DCSync):
Step 2: Create & Inject Ticket
/ptt- This flag tells Mimikatz to inject the ticket directly into the session, meaning it is ready to be used./endin- The ticket lifetime. By default, Mimikatz generates a ticket that is valid for 10 years. The default Kerberos policy of AD is 10 hours (600 minutes)/renewmax- The maximum ticket lifetime with renewal. By default, Mimikatz generates a ticket that is valid for 10 years. The default Kerberos policy of AD is 7 days (10080 minutes)/user: can use any value including non-existent users
Step 3: Launch Shell
Credential Manager
Dump credentials stored in Windows Credential Manager:
DPAPI (Data Protection API)
Decrypt data protected by Windows DPAPI, such as browser credentials: