Mimikatz

mimikatz is a powerful post-exploitation tool used to extract plaintext passwords, hashes, PINs, and Kerberos tickets from memory on Windows systems. It is commonly used by penetration testers and attackers to escalate privileges and move laterally within networks. It has a binary as well as a .ps1 implementation.

Modules

LSADump

The lsadump module dumps credentials from the Local Security Authority (LSA) framework. Most of these commands require either debug rights (privlege::debug) or local System (token::elevate). By default, the Administrators group has the SeDebugPrivilege.

Command
Description

Extracts LSA secrets from the SECURITY hive or memory

Dumps local account hashes from the SAM hive

lsadump::secrets

Parses the decrypted LSA secrets

lsadump::cache

Gets MSCache (cached domain logons)

Simulates a DC and pulls secrets over LDAP

SekurLSA

The sekurlsa module is used to extract credentials from the protected Local Security Authority Subsystem Service (LSASS) memory. Similarly to the lsadump module, it requires either debug rights (privlege::debug) or local System (token::elevate).

# Enable the SeDebugPrivilege
privilege::debug

# Escalate privileges to SYSTEM
token::elevate
Command
Description

Extracts all available credentials from LSASS: NTLM hashes, plaintext passwords (if available), Kerberos tickets, etc.

Dumps all tickets in all sessions from LSASS

Extracts Kerberos tickets (TGTs, TGs) for current user from LSASS

sekurlsa::ekeys

Extracts Kerberos encryption keys (aes256, rc4)

sekurlsa::wdigest

Retrieves plaintext passwords if WDigest is enabled

sekurlsa::ssp

Extracts credentials used by Security Support Provider packages

sekurlsa::livessp

Targets LiveSSP credentials (rare)

sekurlsa::tspkg

Dumps credentials from the Terminal Services package

Dumps credentials from the MSV1_0 package (local logons and NTLM hashes)

Lateral Movement

Pass-the-Hash

For more info about this attack, see here.

Overpass-the-Hash

For more info about this attack, see here.

Pass-the-Ticket

For more info about this attack, see here.

Silver Ticket

For more info about this attack, see here.

DCSync

For more info about this attack, see here.

SSP Injection

For more info about this attack, see here.

Persistence

Golden Ticket

For more info about this attack, see here.

Mimikatz via WinRM

When using mimikatz via a WinRM session it won't run as expected because it’s launched in a non-interactive session. This prevents it from creating or accessing a console. This results in repeated prompts and no actual output. The solution to this issue is to run it with a non-interactive command:

SafetyKatz

To evade detection, tools like Mimikatz are often executed in-memory using .NET-based PE loaders such as PELoader. For example, sekurlsa::ekeys or sekurlsa::logonpasswords can be run directly from memory without writing the Mimikatz binary to disk.

SafetyKatz integrates this approach, combining a modified Mimikatz with an embedded loader. It first generates a minidump of LSASS via the MiniDumpWriteDump API (typically to C:\Windows\Temp\debug.bin), then loads the dump and parses credentials in-memory before cleaning up artifacts.

Resources

  • The Unofficial Guide to Mimikatz & Command Reference by AD Security (article)

Last updated

Was this helpful?