Cracking password hashes with a wordlist
In this recipe, we will crack hashes using John the Ripper and the password lists. We will also work with a local shadow
file from a Linux machine and we will try to recover passwords based off wordlists.
Getting ready
Let's ensure the following prerequisites:
- Your Kali machine is powered up
- You have some sample users and passwords setup on your Linux machine
- You copied the
shadow
file to your Kaliroot
directory
How to do it...
We will now attempt to crack passwords using a pre-defined wordlist:
- Verify you have the
shadow
file copied in theroot
directory:

Directory listing
- Let's extract the
rockyou
password list:
gunzip /usr/share/wordlists/rockyou.txt.gz
- Let's use John the Ripper with the password file that we just extracted against the
shadow
file. You will note that we have some passwords that we recovered that appear like very simple passwords:
cd john --rules -w=/usr/share/wordlists/rockyou.txt shadow john --show shadow

John the Ripper output screen