The idea
Vikram runs an authorised penetration test for Pentland Observatory and has captured two account hashes. They
are plain MD5 — the weak kind — and yet rockyou, the 14-million-password leak that tore through a table of hashes
in the last lab, gets nowhere on either one.
The reason is not strength, it is coverage. rockyou holds passwords people reused across the internet; it does not hold a word a small observatory coined for itself. When a password is built from local vocabulary — a telescope name, a project, a year — no off-the-shelf list contains it, and cracking stalls on hashes that are otherwise weak.
The fix is a wordlist built from the target: cewl to scrape the observatory's own words,
john rules to reshape each word into the house pattern, and crunch to fill the predictable
tail. A few dozen aimed guesses beat fourteen million generic ones.
Vikram only points these tools at Pentland Observatory because it has authorised this test in writing. Running a cracker against a system whose owner has not authorised you in writing is a crime, not a lab exercise.
Steps
-
Two hashes rockyou will not give up
You're on your Kali box,
kali, with the two captured hashes saved at/home/kali/loot/portal.txt, oneusername:hashrow each. Both are plain MD5 — already named, because naming the hash was the previous lab's job — so the only question left is which word each digest came from.Reach for
rockyoufirst, the way you would for any fast hash: hand john the format, the wordlist and a short time cap, and let it run the whole 14-million-word list. On a raw MD5 that takes about a second.kali:~# cat /home/kali/loot/portal.txt kali:~# john --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt --max-run-time=25 --pot=/tmp/generic.pot /home/kali/loot/portal.txt kali:~# john --show --format=raw-md5 --pot=/tmp/generic.pot /home/kali/loot/portal.txt
-
Scrape the observatory's own words with cewl
cewl(the Custom Word List generator) crawls a website and prints every distinct word it finds. Point it at the observatory's public site — reachable on the lab LAN athttp://10.0.1.20/— and it harvests the vocabulary the staff see every day: the telescope names, the place names, the project words.Use
-d 1to follow links one level deep and-m 5to keep only words of five letters or more, which drops the filler ("the", "and") and leaves the names worth guessing.-wwrites them to a file you'll feed a cracker.kali:~# cewl -d 1 -m 5 -w /home/kali/loot/site.txt http://10.0.1.20/ kali:~# sort /home/kali/loot/site.txt
-
The bare word is not the password
Try the scraped list as it stands: point john at the two hashes with
--wordlist=/home/kali/loot/site.txtand the sameraw-md5format. The list now holds Allermuir and Threipmuir, so if either password were the bare word it would fall here.It will not. A real password is rarely the raw word — people add a capital, a digit, a year to clear the "must contain a number" rule. The scraped word is the base; the password is the base plus a predictable twist.
kali:~# john --format=raw-md5 --wordlist=/home/kali/loot/site.txt --pot=/tmp/raw.pot /home/kali/loot/portal.txt kali:~# john --show --format=raw-md5 --pot=/tmp/raw.pot /home/kali/loot/portal.txt
-
Mangle the words with rules — the first account falls
john's--rulesoption runs each wordlist word through a set of transformations before it hashes the guess: capitalise the first letter, append a digit, swap letters for look-alike symbols, and dozens more. One scraped word becomes hundreds of realistic variants, so Allermuir is now tried asAllermuir1,Allermuir!,Allermuir7and the rest of the house pattern.Run the same command as before with
--rulesadded. The list is still tiny; the rules multiply it into the shapes people actually choose.kali:~# john --format=raw-md5 --wordlist=/home/kali/loot/site.txt --rules --pot=/tmp/crack.pot /home/kali/loot/portal.txt kali:~# john --show --format=raw-md5 --pot=/tmp/crack.pot /home/kali/loot/portal.txt
-
Spray the house year with crunch — the second account falls
The rules took
j.lennoxbecause its twist was a single digit.s.aitkenresisted, so the twist is longer — and the most common long twist is a year. Rules do not spray every four-digit year, butcrunchdoes: it generates every string matching a pattern you give it.j.lennoxbuilt a password on one telescope name, so try the other — Threipmuir, the survey array, the second name all over the site.crunch 14 14 -t Threipmuir%%%%builds every 14-character string that is that word followed by four digits (%means a digit), fromThreipmuir0000toThreipmuir9999— 10,000 candidates, the base word from your scrape with the predictable tail filled in. Feed that list to john.kali:~# crunch 14 14 -t Threipmuir%%%% -o /home/kali/loot/years.txt kali:~# john --format=raw-md5 --wordlist=/home/kali/loot/years.txt --pot=/tmp/crack.pot /home/kali/loot/portal.txt kali:~# john --show --format=raw-md5 --pot=/tmp/crack.pot /home/kali/loot/portal.txt
Run these steps on real machines