Hashcat Reference Guide
Quick tips for the world's most popular password cracker.
Personal reference guide for using hashcat.
Identify the Hash Type
Find that hash from this list that’s in the same format: https://hashcat.net/wiki/doku.php?id=example_hashes
Choose an Attack Mode
# | Mode | Word Generation Method |
---|---|---|
0 | Straight | use a wordlist |
1 | Combination | combine words from two wordlists |
3 | Brute Force | try every possibility given a char set |
6 | Hybrid Wordlist + Mask | |
7 | Hybrid Mask + Wordlist |
Brute Force / Mask Attack
Wiki page: https://hashcat.net/wiki/doku.php?id=mask_attack
Built-in Charsets
Code | Chararcter Set |
---|---|
?l | abcdefghijklmnopqrstuvwxyz |
?u | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
?d | 0123456789 |
?h | 0123456789abcdef |
?H | 0123456789ABCDEF |
?s | «space»!”#$%&’()*+,-./:;<=>?@[\]^_`{|}~ |
?a | ?l?u?d?s |
?b | 0x00 - 0xff |
Custom Charsets
You can also use -1
, -2
, -3
, and -4
on the command line to specify a custom charset.
Example charsets:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
command: -a 3 ?l?l?l?l?l?l?l?l
keyspace: aaaaaaaa - zzzzzzzz
command: -a 3 -1 ?l?d ?1?1?1?1?1
keyspace: aaaaa - 99999
command: -a 3 password?d
keyspace: password0 - password9
command: -a 3 -1 ?l?u ?1?l?l?l?l?l19?d?d
keyspace: aaaaaa1900 - Zzzzzz1999
command: -a 3 -1 ?dabcdef -2 ?l?u ?1?1?2?2?2?2?2
keyspace: 00aaaaa - ffZZZZZ
command: -a 3 -1 efghijklmnop ?1?1?1
keyspace: eee - ppp
Examples
- Candidates
password0
throughpassword9
hashcat -m [hashtype] -a 3 password?d
Wordlist + Mask
- Candidates wordlist with 0-9 appended:
hashcat -m [hashtype] -a 6 [wordlist] ?d
Mask + Wordlist
- Prepend mask to every word from wordlist:
hashcat -m [hashtype] -a 7 ?d [wordlist]
Extra
- Hashcat Cheatsheet is a nice reference.
This post is licensed under CC BY 4.0 by the author.