This is the hashcat reference I actually keep open while cracking. Set your hash file, wordlist, mode, and mask once at the top, and every command below rewrites itself with your values so you can copy and run it. Under that is the full flag reference grouped by what you are trying to do, the mask charset table, and the common -m modes. New to the tool? Start with how to use hashcat. Everything here was verified on hashcat 7.1.2.
Set your values once
Set these once. Every command below picks up your values, and clearing a field drops it from the commands so you can copy exactly what you mean to run. Hash mode and mask are searchable: type to filter, or pick from the list. Hash mode covers all 581 of hashcat’s modes; for a mask, type your own or choose a common one.
hashcat reads several dictionaries in order. Add as many as you like.
Each rule file becomes its own -r. A bare name resolves under rules/; a path is used as-is.
Optional flags (appear only when set)
Ready-to-run attack commands
Dictionary attack (your default first move). Hash every word in the wordlist:
hashcat -m 0 -a 0 hashes.txt rockyou.txt -w 3Dictionary + rules (the highest-yield real attack). Mutate each word with a rules file. Add more than one rule file and each becomes its own -r; clear them all and the -r drops away:
hashcat -m 0 -a 0 hashes.txt rockyou.txt -r rules/best66.rule -w 3Mask attack (smart brute force). Try every string matching the mask. Turn on --increment above to also try shorter lengths:
hashcat -m 0 -a 3 hashes.txt '?u?l?l?l?l?d?d?d' -w 3Hybrid: wordlist + mask (the password123 pattern, a word then your mask as a suffix):
hashcat -m 0 -a 6 hashes.txt rockyou.txt '?u?l?l?l?l?d?d?d' -w 3Hybrid: mask + wordlist (your mask as a brute-forced prefix, then a word):
hashcat -m 0 -a 7 hashes.txt '?u?l?l?l?l?d?d?d' rockyou.txt -w 3Combination attack (every word in your first list joined to every word in the second). Add a second wordlist above to use a different right-hand list:
hashcat -m 0 -a 1 hashes.txt rockyou.txt rockyou.txt -w 3Show what you have cracked (read results from the potfile):
hashcat -m 0 hashes.txt --showBenchmark this hash mode (raw speed on your hardware):
hashcat -b -m 0The full flag reference
Grouped by what you are actually doing. Copy and adapt.
Hashcat Flag Reference
Every flag organised by task. Tested on hashcat 7.1.2.
Mask charset table (the regex of cracking)
A mask is a pattern, one token per character position. These are the built-in charsets, verified against hashcat --help:
| Token | Expands to | Set |
|---|---|---|
?l | abcdefghijklmnopqrstuvwxyz | lowercase |
?u | ABCDEFGHIJKLMNOPQRSTUVWXYZ | uppercase |
?d | 0123456789 | digits |
?h | 0123456789abcdef | lowercase hex |
?H | 0123456789ABCDEF | uppercase hex |
?s | space plus all keyboard punctuation (shown below) | special |
?a | ?l?u?d?s | all printable ASCII |
?b | byte 0x00 to 0xff | every byte |
The ?s special set, exactly as hashcat defines it (a leading space, then):
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~Custom charsets with -1 through -8, then reference them as ?1..?8:
| Example | Meaning |
|---|---|
-1 ?l?u ?1?1?1?1?1?1 | six chars, each a mixed-case letter |
-1 ?l?d -2 ?u ?2?1?1?1?1?d?d | one upper, four lower-or-digit, two digits |
password?d?d?d | literal password then 000 to 999 |
--increment ?a?a?a?a?a?a?a?a | all-printable, length 1 up to 8 |
The full mask strategy, including keyspace maths, is in the hashcat mask attack.
Common hash modes (-m)
A quick lookup for the modes you will reach for. The complete list is hashcat --example-hashes.
| Algorithm | -m | Speed | Crack guide |
|---|---|---|---|
| MD5 | 0 | Fast | Crack MD5 |
| SHA-1 | 100 | Fast | |
| SHA-256 | 1400 | Fast | |
| NTLM | 1000 | Fast | Crack NTLM |
| NetNTLMv2 | 5600 | Fast | |
| Kerberos AS-REP / TGS-REP | 18200 / 13100 | Fast | |
md5crypt $1$ | 500 | Slow | |
sha256crypt $5$ | 7400 | Slow | |
sha512crypt $6$ (Linux) | 1800 | Slow | |
bcrypt $2*$ | 3200 | Slow | Crack bcrypt |
| Argon2 (i/d/id) | 34000 | Slow | |
| WPA (PMKID+EAPOL) | 22000 | Slow | Crack WPA2 |
| KeePass | 13400 | Slow | |
| MS Office 2013 | 9600 | Slow | Crack files |
| 7-Zip / RAR5 | 11600 / 13000 | Slow | Crack files |
Where to go next
- The other half of the toolkit: John the Ripper cheat sheet.
- Pick the right attack: dictionary vs brute force vs mask vs hybrid.
- The two techniques that do the most work: rules and wordlists.
- Faster: hashcat optimisation.
- The full picture: how password cracking works.
hashcat -m <mode> -a <attack> <hashfile> <wordlist-or-mask> [options]. The two numbers that matter most are -m (which algorithm) and -a (which attack). Set your values in the panel above and the commands fill themselves in.hashcat --identify hashes.txt to have hashcat guess, or hashcat --example-hashes to browse every mode with an example. See how to identify a hash type for the full method.-w 3 (high) on a machine dedicated to cracking, -w 4 on a headless rig you do not touch, and -w 1 on a desktop you are actively using so it stays responsive. Default is -w 2.--session=name, and if it stops, resume with hashcat --session=name --restore. hashcat checkpoints the keyspace position, so you continue where you left off rather than starting over.Sources
Authoritative references this article was fact-checked against.
- hashcat wiki, core usage (official)hashcat.net
- hashcat, mask attack (official)hashcat.net
- hashcat, rule-based attack (official)hashcat.net





