Word list mode is the simplest cracking mode. We need to specify the word list. The specified word list will we mangled according to default rules. Which means the words in the word list will be changed for usage.
Word list should not contain duplicates which will bring down efficiency. To make thing more efficient word list can be provided in a sorted manner.
Sorting Word List
Word list can be sorted like below to make John faster.
$ tr A-Z a-z < SOURCE | sort -u > TARGET
We well use word list to crack our shadow file.
$ john --wordlist wordlist.txt unshadowed
Warning: detected hash type "sha512crypt", but the string is also recognized as "crypt"
Use the "--format=crypt" option to force loading these as that type instead
Using default input encoding: UTF-8
Loaded 2 password hashes with 2 different salts (sha512crypt, crypt(3) $6$ [SHA512 128/128 SSE2 2x])
Press 'q' or Ctrl-C to abort, almost any other key for status
<span class="crayon-cn">123456</span> <span class="crayon-sy">(</span><span class="crayon-v">ismail</span><span class="crayon-sy">)</span>
- –wordlist will set word list file. -w can be used for abbreviation.
Start John on Background
Cracking passwords can take huge time. Some times we may want to close terminal where john runs but want to john run. The solution for this in linux is running john in background like below.
$ john --wordlist=all.lst --rules mypasswd &
- & runs john in background detaching from terminal
To see status of john while running in background.
$ john --status
0g :00:00:03 2/3 0g/s 285.0p/s 285.0c/s 285.0C/s
- –status show status of the John in the background