Skip to content
Home

CrackMapExec: Windows protocol swiss-army knife

Brute-force, pass-the-hash, and remote command execution across SMB, WinRM, SSH, MSSQL and more.

bash·1 min read··INE Certification

CrackMapExec is the tool for when you already have some valid credentials and want to know to what extent you can use them, where and how. It integrates several protocols with the same syntax, which is what makes it faster than juggling protocol-specific tools one at a time.

SMB

crackmapexec smb <target> -u <username> -p <password>
crackmapexec smb <target> -u <username> -H <ntlm_hash>     # pass-the-hash, no cleartext needed

WinRM

crackmapexec winrm <target> -u username.txt -p passwords.txt
crackmapexec winrm <target> -u <username> -p <password> -x "whoami"   # run a command through WinRM

Flags

FlagMeaning
-u / -pUsername/password — accepts a single string or a file
-HAuthenticate with an NTLM hash directly (pass-the-hash)
-xExecute a command once authentication succeeds

Supported protocols: smb, winrm, ssh, mssql, ftp, ldap, rdp. Flags stay consistent across all of them. It’s equally useful for the initial brute-force and for confirming persistence later.