crackmapexec
Enumerate and exploit Windows/AD networks via SMB, WinRM, MSSQL, RDP, SSH, FTP. Supports pass-the-hash, Kerberos, and modules for credential dumping and share crawling.
Instructions
Swiss army knife for pentesting Windows/Active Directory environments. Enumerates and exploits SMB, WinRM, MSSQL, RDP, SSH, and FTP services across multiple hosts. Supports pass-the-hash, Kerberos auth, and module execution (lsassy, mimikatz, spider_plus, etc.). Use as the PRIMARY post-exploitation tool against Windows networks when you have credentials. For interactive WinRM shells, use evil_winrm. For detailed SMB enumeration, use enum4linux. Output: per-host results with authentication status, shares, logged-on users, and module output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| opts | No | Additional crackmapexec options (e.g. '--local-auth' for local accounts, '-k' for Kerberos) | |
| user | No | Username or path to user file for authentication | |
| module | No | Module to execute on successful auth (e.g. 'lsassy' for LSASS dump, 'mimikatz', 'spider_plus' for share crawling) | |
| target | Yes | Target IP, CIDR range, or hostname (e.g. 10.0.0.0/24, dc01.corp.local) | |
| password | No | Password or path to password file for authentication | |
| protocol | No | Protocol to test. Default: smb. Options: smb, winrm, mssql, ssh, ftp, rdp, ldap | |
| ntlm_hash | No | NTLM hash for pass-the-hash authentication |