CrackMapExec
Swiss army knife for pentesting Windows/Active Directory environments. Enumerates users, shares, executes attacks, and dumps credentials using native WinAPI calls.
Description
CrackMapExec is a pure Python tool for pentesting networks, particularly Windows/Active Directory setups. It handles tasks from enumerating logged-on users and spidering SMB shares to executing psexec-style attacks, auto-injecting Mimikatz/Shellcode/DLLs via Powershell, and dumping NTDS.dit.
Key advantages include fully concurrent threading, no external tools required, and opsec safety by avoiding binary uploads for credential dumping or shellcode injection. It uses only native WinAPI calls for discovering sessions, users, and dumping SAM hashes.
A database stores used/dumped credentials, correlating admin credentials to hosts for situational awareness in large environments. Supports protocols like MSSQL, WinRM, RDP, LDAP, SMB, SSH, and FTP.
How It Works
Operates as a fully concurrent Python script using native WinAPI calls for session discovery, user enumeration, and SAM/NTDS.dit dumping without uploading binaries. Supports multiple protocols (mssql, winrm, rdp, ldap, smb, ssh, ftp) for authentication, execution, and post-exploitation. Includes a database (cmedb) for credential tracking and host correlation. Features threading, timeouts, jitter for evasion, and opsec-safe memory injection via Powershell.
Installation
sudo apt install crackmapexecFlags
Examples
crackmapexec -hcmedb -hcrackmapexec smb //target -u user -p passcrackmapexec winrm target -u user -p passcrackmapexec ldap dc.example.com -u user -p passcrackmapexec mssql mssql-server -u sa -p passcrackmapexec rdp target -t 50 --verbose