Using NTH and Hashcat(dictionary attack)
Name-that-hash(nth)
This tool finds the hashing type.
To Download the tool:
git clone https://github.com/HashPals/Name-That-Hash
pip3 install name-that-hash && nth
How to using Name-that-hash?
nth — text (hash text)
example:
nth — text 620a71f90d5dbf8c9a80939d2cbc1eba
As you see we find the hashing type.So type of hash most likely MD5,MD4 etc.
now let’s crack password using hashcat.
How to use hashcat?
Hashcat has many attack mode
1.dictionary attack (attack mode code-0)
2.combinator attack (attack mode code-1)
3.brute-force attack (attack mode code-3)
4.hybrid attack (attack mode code-7)
Today we learn about dictionary attack.
Dictionary attack
hashcat -a (attack mode code) -m(code of hash type) (hashing text or file) (wordlist file)
code of hash type ?
To see the code of the hash type:
hashcat — help
After typing, see the hash mode section
example attack
hashcat -a 0 -m 0 620a71f90d5dbf8c9a80939d2cbc1eba /root/Desktop/password.txt
password.txt content:
What are hashcat wordlist rules
Some rules should be written for enriching the word list (sample book -> BOOK, BOOK, BOOK, BOOK,etc.)
example:
: -simple
l -all letters are uppercase
u -all letter are lowercase
c -first letter uppercase. next letter lowercase
Write all the rules in a file and save as (name.rule)
To learn more rules:
https://www.4armed.com/blog/hashcat-rule-based-attack/
example attack:
hashcat -a 0 -m 0 -r /root/Desktop/rules.rule e2c1499ef13ff645d82883ae0996d81e /root/Desktop/password.txt