HackTheBox Academy - Password Attacks

Updated 10-04-2026

This module is designed to help you understand and learn the basic concepts of different password attacks.

Password Cracking Techniques

John

  • Single crack mode is a rule-based cracking technique that generates password candidates based on the victim’s username, home directory name, and GECOS values (full name, room number, phone number, etc.)
  • Wordlist mode is used to crack passwords with a dictionary attack, meaning it attempts all passwords in a supplied wordlist against the password hash
  • Incremental mode generates candidate passwords based on a statistical model (Markov chains); it is designed to test all character combinations defined by a specific character set
  • 2john tools can be used to crack files
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# single crack mode
john --single passwd

# wordlist mode
john --wordlist=<wordlist_file> <hash_file>

# incremental mode
john --incremental <hash_file>
# customize incremental mode
grep '# Incremental modes' -A 100 /etc/john/john.conf

# identify hash format
hashid -j 193069ceb0461e1d40d216e32c79c704

# --format to set format of target hash
john --format=afs [...] <hash_file>

# cracking files using 2john tools
<tool> <file_to_crack> > file.hash
pdf2john
ssh2john

# see all 2john tools
locate *2john*