Pentest Monkey is a great resource for a lot of things. One of which is this:
I used it, plus a bit of bash fu to try to figure out some hashes that I was trying to crack.
Step 1: Create file of supported hash types. For me, that was simple I just threw the following in ‘supported_types.txt’ in the same directory as john.
Then it’s as simple as issuing:
cat supported_types.txt | xargs -t -I type ./john --pot=unknownhash.pot --wordlist=shortlist.txt --format=type hashfile.txt
That will essentially try each of the types on the hash file. It’s important to use a wordlist, and probably a small one initially because if you don’t john will not finish once it gets to the first hash type that it accepts, which may not actually be correct.
You can take this a step further and create a hash mangler script that takes a clean hash and adds the few prefixs and suffixs that are common on Pentest Monkey’s list to get the most odds at John picking it up.