Created
July 7, 2020 13:34
-
-
Save AlbertVeli/3a2983e16e173c894e4d39e84cd3992c to your computer and use it in GitHub Desktop.
CorrectHorseBatteryStaple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create xkcd hash | |
echo -n "CorrectHorseBatteryStaple" | md5sum | awk '{ print $1 }' > md5.hash | |
cat md5.hash | |
f6f9b174745fa4651f750c36957d674c | |
# Get 20k wordlist (containing all 4 words) | |
wget https://raw.githubusercontent.com/first20hours/google-10000-english/master/20k.txt | |
# Pick 2k top words to speed up attack: | |
head -2000 20k.txt > 2k.txt | |
grep correct 2k.txt | |
correct | |
grep horse 2k.txt | |
horse | |
grep battery 2k.txt | |
battery | |
grep staple 2k.txt | |
# Add the missing word so this will work | |
echo staple >> 2k.txt | |
# Capitalize words | |
cat 2k.txt | hashcat --stdout -j c > capitalized_2k.txt | |
# Double words | |
hashcat -a 1 --stdout capitalized_2k.txt capitalized_2k.txt > double.txt | |
ls -lh double.txt | |
-rw-r--r-- 1 albert albert 49M Jul 7 15:21 double.txt | |
# Crack it with hashcat | |
hashcat -O --potfile-path hc.pot -m 0 md5.hash -a 1 double.txt double.txt | |
p | |
... | |
Time.Estimated...: Tue Jul 7 19:17:29 2020 (*3 hours, 53 mins*) | |
Speed.#1.........: 1142.8 MH/s (13.52ms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmm, markdown didn't work. Let's see if it works in the comments.
Create xkcd hash
Get 20k wordlist (containing all 4 words)
Pick 2k top words to speed up attack:
Add the missing word so this will work
Capitalize words
Double words
Crack it with hashcat
p
...
Time.Estimated...: Tue Jul 7 19:17:29 2020 (3 hours, 53 mins)
Speed.#1.........: 1142.8 MH/s (13.52ms)