CtrlK

Pentest Notes / Exploitation / Password Cracking

Hashcat

Basic Syntax

hashcat -m [hash mode] -a 0 [hash_file] /usr/share/wordlists/rockyou.txt
-m: use hashid -m to get hashcat hash mode
-a: Attack mode - 0=dictionary (default)

Options

Hashcat

OptionDescription
-m [type]Hash mode
-a [mode]Attack mode. 0: dictionary, 3: mask
-r [rule_file]Rules file
--showShow cracked hashes
-o [output_file]Save output

Rule based attack

hashcat -m [hash type] -a 0 [hash file] /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best66.rule

Placeholders

PlaceholderCharacter Set
?lLowercase letters (a-z)
?uUppercase letters (A-Z)
?dDigits (0-9)
?sSpecial characters
?aAll printable ASCII

Eg: Summer2026! would be ?u?l?l?l?l?l?d?d?d?d?s

Mask attack

hashcat -m 0 -a 3 [hash file] '?l?l?l?l?l?l?l?l'