How to Use John the Ripper in Kali Linux
John the Ripper is a popular and free password-cracking tool that is included in Kali Linux. It allows you to perform dictionary attacks or brute force attacks on hashed passwords. Using John the Ripper can help you recover lost passwords or test the strength of account passwords.
What is John the Ripper
John the Ripper is an open-source password-cracking tool first developed in 1996. It can crack passwords by performing dictionary attacks, brute force attacks, or through its own rule-based cracker.
Some key features of John the Ripper:
Cracks hashed passwords through dictionary attacks or brute force
Supports a wide range of hashing algorithms like MD5, SHA, etc
Can detect password lengths and character sets
Performs fast parallel cracking using multiple cores
Why Use John the Ripper
Here are some common reasons for using John the Ripper:
Recover lost or forgotten passwords
Test account password strength
Perform security audits by cracking hashed passwords
Educational purposes to understand password security
As it comes pre-installed with Kali Linux, it provides an easy way for ethical hackers and security professionals to test password systems.
Installing John the Ripper in Kali
John the Ripper comes pre-installed with Kali Linux. To confirm, open a terminal and type:
This will display the currently installed version of John the Ripper.
If for some reason John the Ripper is not installed, you can install it with:
sudo apt install john
Using John the Ripper to Crack Passwords
Here is a simple step-by-step process to use John the Ripper to crack account passwords in Kali Linux:
Collect password hashes
Use tools like pwdump, fgdump, etc to extract password hashes from systems like Linux and Windows
Prepare hashes for cracking
If needed, convert hashes to formats recognizable by John
Create dictionary file
Create a password dictionary file with possible passwords
Run John with the hashed passwords and dictionary file
Analyze cracks and view results
John will print cracked passwords or export them to a text file
Example Cracking Session
Here is an example session cracking some Windows LM password hashes with a dictionary file:
john --format=lm --wordlist=password.lst lm-hashes.txt
Using default input encoding: UTF-8
Loaded 2 password hashes with no different salts (LM DES [128/128 SSE2-16])
Warning: no OpenMP support for this hash type, consider --fork=4
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 DONE 2/3 (2023-02-25 23:49) 0g/s 10240p/s 10240c/s 10240C/s 123456..123456
Use the "--show --format=LM" options to display all of the cracked passwords reliably
In this example, John was able to crack 2 out of 3 LM password hashes using the dictionary file.
The cracked passwords can then be viewed or dumped into a file for further analysis.
Tips for Effective Password Cracking
Here are some tips to crack passwords more effectively using John the Ripper in Kali Linux:
Use large password dictionaries related to the account context
Create custom rule sets for intelligent brute force
Take advantage of parallel cracking on multi-core CPUs
Use marks, chains and moderate masks to refine brute-force sessions
Analyze already cracked passwords to guide further sessions
Increase runtime for difficult password hashes
By following these best practices, you can significantly improve your success at cracking passwords with John the Ripper.
John the Ripper is a versatile password-cracking tool included with Kali Linux that can help recover lost passwords or analyze the strength of password systems.
With affordable computing power these days, password security is more important than ever. Using tools like John properly for authorized security testing helps identify weaknesses before attackers exploit them.