Show Menu
Cheatography

Basic Mimikatz Usage Cheat Sheet by

This is a breakdown of common usages of Mimikatz tool regarding cyber security and penetration testing

MODULES

standard
This is the main module of mimikatz, it contains quick commands to operate with the tool. For this particular one, no need to prefix command by the module name (but it works too), eg: exit is the same as standa­rd:­:exit.
privilege
This module provides some commands to manipulate privilege on mimikatz process.
crypto
This module, one of the oldest, plays with CryptoAPI functions. Basically it's a little certutil that benefit of token impers­ona­tion, patch legacy CryptoAPI functions and patch CNG key isolation service.
sekurlsa
This module extracts passwords, keys, pin codes, tickets from the memory of lsass (Local Security Authority Subsystem Service)
kerberos
This module can be used without any privilege. It permits to play with official Microsoft Kerberos API and to create offline 'Golden tickets', free, long duration TGT tickets for any users
lsadump
This module interacts with the Windows Local Security Authority (LSA) to extract creden­tials. Most of these commands require either debug rights (privl­ege­::d­ebug) or local System. By default, the Admini­str­ators group has Debug rights. Debug still has to be “activ­ated” by running “privi­leg­e::­debug”.
vault
This module dumps passwords saved in the Windows Vault.
token
This module deals with the Windows tokens (who does not really like elevating to NT AUTHORITY\ SYSTEM).
event
This module deals with the Windows Event logs (to clear footprints after compro­mise).
ts
This module deals with the Terminal Services. It can be an altern­ative for getting clear-text passwords.
process
This module deals with Windows processes. It can also be used for process injection and parent process spoofing.
service
This module can interact with Windows services plus installing the mimika­tzsvc service.
net
some functi­ona­lities in this module are similar to the Windows net commands. Enumer­ating sessions and servers configured with different types of Kerberos delega­tions is also included.
misc
This module is kind of a catch-all for commands that don’t quite fit elsewhere. The most well known commands in this module are MISC::­AddSID, MISC::­MemSSP, and MISC::­Ske­leton.

CRYPTO

providers
This command list all providers: CryptoAPI, then CNG if available (NT 6).
stores
This command lists logical store in a system store.
sc
This command lists smartc­ard­/token reader(s) on, or deported to, the system. When the CSP is available, it tries to list keys on the smartcard.
scauth
This command creates a client certif­icate for smartcard authen­tic­ation, signed by a Certif­icate Authority
certif­icates
This command lists certif­icates and properties of theirs keys. It can export certif­icates too.
keys
This command lists keys, by provider. It can export keys too.
capi
This patch modify a CryptoAPI function, in the mimikatz process, in order to make unexpo­rtable keys, exportable (no specifig right other than access to the private key is needed) This is only useful when the keys provider is one of: Microsoft Base Crypto­graphic Provider v1.0, Microsoft Enhanced Crypto­graphic Provider v1.0, Microsoft Enhanced RSA and AES Crypto­graphic Provider, Microsoft RSA SChannel Crypto­graphic Provider, Microsoft Strong Crypto­graphic Provider
cng
This patch modify KeyIso service, in LSASS process, in order to make unexpo­rtable keys, export­able. This is only useful when the keys provider is Microsoft Software Key Storage Provider (you do not need to patch CNG for other provid­ers).

VAULT

cred
Enumerates vault creden­tials
list
Lists saved creden­tials in the Windows Vault such as scheduled tasks, RDP, Internet Explorer for the current user

TS

multirdp
(exper­ime­ntal) Patch Terminal Server service to allow multiple users
sessions
List TS/RDP sessions.
 

STANDARD

exit
Quits mimikatz, after cleaning routines.
cls
Clears screen, by filling the console window with spaces.
answer
Gives the Answer to the Ultimate Question of Life, the Universe, and Everyt­hing.
coffee
Because everyone deserves a good coffee.
sleep
Sleeps an amount of millis­econds (1000 ms by default).
log
Logs all outputs to a file (mimik­atz.log by default).
base64
Switches from file writing on the disk, to Base64 output instead.
version
Displays versions of mimikatz and Windows
cd
Change or display current directory

SEKURLSA

logonp­ass­words
Lists all available provider creden­tials. This usually shows recently logged on user and computer creden­tials.
pth
Pass-t­he-Hash and Over-P­ass­-th­e-Hash (aka pass the key).
tickets
List and export Kerberos tickets of all sessions.
ekeys
List Kerberos encryption keys
dpapi
Read masterkeys from memory
minidump
Switch to LSASS minidump process context
process
Switches (or reinits) to LSASS process context
search­pas­swords
Present username and passwords available in memory
msv
Respon­sible for collecting password hashes from the LSASS address space
wdigest
List WDigest creden­tials
kerberos
List Kerberos creden­tials for all authen­ticated users (including services and computer account)
tspkg
Used for Terminal Server authen­tic­ation
krbtg
Get Domain Kerberos service account (KRBTG­T)p­assword data
ssp
Lists Security Support Provider creden­tials
credman
List Creden­tials Manager

EVENT

clear
Clear an event log
drop
(exper­ime­ntal) Patch Events service to avoid new events
Run privil­ege­::debug then event:­:drop to patch the event log. Then run Event:­:Clear to clear the event log without any log cleared event (1102) being logged.

SERVICE

+ (plus sign)
Install Mimikatz service (‘mimi­kat­zsvc’)
- (minus sign)
Uninstall Mimikatz service (‘mimi­kat­zsvc’)
list
List Services
preshu­tdown
Pre-shuts down a specified service by sending a SERVIC­E_C­ONT­ROL­_PR­ESH­UTDOWN signal
remove
Removes the specified service (It must be used with caution)
resume
Resumes a specified service, after successful suspen­ding, by sending a SERVIC­E_C­ONT­ROL­_CO­NTINUE signal
shutdown
Shuts down a specified service by sending a SERVIC­E_C­ONT­ROL­_SH­UTDOWN signal
start
Start a service
stop
Stops a specified service by sending a SERVIC­E_C­ONT­ROL­_STOP signal
suspend
Suspend the service. It sends a SERVIC­E_C­ONT­ROL­_PAUSE signal

MISC

aadcookie
Can be used to dump the Azure Panel's session cookie from login.m­ic­ros­oft­onl­ine.com
clip
Monitors clipboard. CTRL+C stops the monitoring
cmd
Launches the command prompt
compress
Performs a self compre­ssion of mimikatz
detours
(Exper­ime­ntal) Tries to enumerate all modules with Detour­s-like hooks
efs
Mimikatz's implem­ent­ation of the MS-EFSR abuse (Petit­Potam), an authen­tic­ation coercion technique
lock
Locks the screen. It can come in handy with misc::­memssp
memssp
Patches LSASS by injecting a new Security Support Provider (a DLL is regist­ered)
mflt
Identifies Windows minifi­lters inside mimikatz, without using fltmc.exe. It can also assist in finger­pri­nting security products, by altitude too (Gathers details on loaded drivers, including driver altitude)
ncroutemon
Displays Juniper network connect (without route monito­ring)
ngcsign
Can be used to dump the NGC key (Windows Hello keys) signed with the symmetric pop key.
printn­igh­tmare
Can be used to exploit the PrintN­igh­tMare vulner­ability in both [MS-RPRN RpcAdd­Pri­nte­rDr­iverEx] and [MS-PAR AddPri­nte­rDr­ive­rEx].
regedit
Launches the registry editor
sccm
Decrypts the password field in the SC_Use­rAc­count table in the SCCM database
shadow­copies
Used to list the available shadow copies on the system
skeleton
Injects a "­Ske­leton Key" into the LSASS process on the domain controller
spooler
Mimikat's implem­ent­ation of the MS-RPRN abuse (Print­erBug), an authen­tic­ation coercion technique
taskmgr
Launches the task manager
wp
Sets up a wallpaper
xor
Performs XOR decodi­ng/­enc­oding on a provided file with 0x42 default key
 

PRIVILEGE

debug
Ask for debug privilege for mimikatz process.
The debug privilege allows someone to debug a process that they wouldn’t otherwise have access to. For example, a process running as a user with the debug privilege enabled on its token can debug a service running as local system.
Remark: ERROR kuhl_m­_pr­ivi­leg­e_s­imple ; RtlAdj­ust­Pri­vilege (20) c0000061 means that the required privilege is not held by the client

LSADUMP

sam
This command dumps the Security Account Managers (SAM) database. It contains NTLM, and sometimes LM hash, of users passwords.
secrets
Get the SysKey to decrypt SECRETS entries (from registry or hives).
setntlm
Used to perform a password reset without knowing the user's current password. It can be useful during an active directory Access Control (ACL) abuse scenario
lsa
Ask LSA Server to retrieve SAM/AD enterprise (normal, patch on the fly or inject). Use to dump all Active Directory domain creden­tials from a Domain Controller or lsass.dmp dump file. Also used to get specific account credential such as krbtgt with the parameter /name: “/name­:kr­btgt”
dcsync
Ask a DC to synchr­onize an object (get password data for account). No need to run code on DC.
trust
Ask LSA Server to retrieve Trust Auth Inform­ation (normal or patch on the fly). Dumps trust keys (passw­ords) for all associated trusts (domai­n/f­orest).
backupkeys
Dumps the DPAPI backup keys from the Domain Controller
cache
Can be used to enumerate Domain Cached Creden­tials from registry. It does so by acquiring the SysKey to decrypt NL$KM (binary protected value) and then MSCach­e(v­1/v2)
changentlm
Used to change the password of a user
zerologon
Detects and exploits the ZeroLogon vulner­ability

KERBEROS

ptt
Pass-t­he-­Ticket. Typically used to inject a stolen or forged Kerberos ticket (golde­n/s­ilv­er/­trust).
golden / silver
This command create Kerberos ticket, a TGT or a TGS with arbitrary data, for any user you want, in groups you want
tgt
Displays inform­ations about the TGT of the current session.
list
Lists and export Kerberos tickets (TGT and TGS) of the current session.
purge
Purges all tickets of the current session.

TOKEN

elevate
Used to impers­onate a token. Used to elevate permis­sions to SYSTEM (default) or find a domain admin token on the box using the Windows API.
list
List all tokens of the system
revert
Revert to previous token
run
Executes a process with its token
whoami
Display current identity

PROCESS

exports
Lists all the exported functions from the DLLs each running process is using. If a /pid is not specified, then exports for mimika­tz.exe will be displayed
imports
Lists all the imported functions from the DLLs each running process is using. If a /pid is not specified, then imports for mimika­tz.exe will be displayed
list
Lists all running processes. It uses the NtQuer­ySy­ste­mIn­for­mation Windows Native API function
resume
Resumes a suspended process by using the NtResu­meP­rocess Windows Native API function
start
Starts a process by using the Create­Process Win32 API function. The PID of the process is also displayed
stop
Terminates a process by using the NtTerm­ina­teP­rocess Windows Native API function. The Win32 API equal one is Termin­ate­Process
suspend
Suspends a process by using the NtSusp­end­Process Windows Native API function
run
Creates a process by using the Create­Pro­ces­sAsUser Win32 API function. The Create­Env­iro­nme­ntBlock is also utilized
runp
Runs a subprocess under a parent process (Default parent process is LSASS.e­xe). It can also be used for lateral movement and process spoofing

NET

alias
Displays more inform­ation about the local group member­ships including Remote Desktop Users, Distri­buted COM Users, etc
deleg
Checks for Kerberos delega­tions
group
Displays the local groups
if
Displays the available local IP addresses and the hostname
serverinfo
Displays inform­ation about the logged in server
session
Displays the active sessions through NetSes­sio­nEnum() Win32 API function
share
Displays the available shares
stats
Displays when the target was booted
tod
Displays the current time
trust
Displays inform­ation for the active directory forest trust(s)
user
Displays the local users
wsession
Displays the active sessions through NetWks­taU­ser­Enum() Win32 API function
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          15_Kryptologie Cheat Sheet