Cracking MD5 Hashes with the Webtionary
… or “Using Google and Yahoo to Light-Force An (Almost) Infinite Dictionary”
I read an article recently about using Google to search for plaintext equivalents of MD5 hashes. Basically, you search for the hash (something like, “5f4dcc3b5aa765d61d8327deb882cf99″) and look through the results for the plaintext equivalent (in this case, “5f4dcc3b5aa765d61d8327deb882cf99″ is equal to “password”).
It got me thinking about when I wore the Grey Hat in the old days, and I would download dozens of wordlists to use for my brute-force attempts at cracking Windows NT passwords (for educational purposes only). If you consider the *illions of pages in the internet, you can essentially utilize them as a massive wordlist, or “webtionary”, for cracking.
Using PHP, I whipped up a script that searches both Google and Yahoo for the MD5 hash, then takes the results, sorts them by frequency of word, and hashes each word to try to match to the original query.
There are sites that let you search their huge databases of MD5 hashes and their plaintext-equivalents, but that’s not the point here. The point is using search results and sifting through a few hundred words of search results–which is more efficient that searching a few million rows, though not as successful. But, I was surprised at how many times the script quickly deciphered a hash. Try it yourself, and send me any improvements that could be made to the code to make it even more efficient.
3 Comments + Add Comment
Got anything to say? Go ahead and leave a comment!
Archives
- January 2012
- December 2011
- November 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2010
- December 2009
- September 2009
- August 2009
- April 2009
- February 2009
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- May 2007
- April 2007
- March 2007
- January 2007
- December 2006
- October 2006
- August 2006



Posted under:
[...] published in this quarter’s edition. The article is from one of my January blog posts, Cracking MD5 Hashes With The Webtionary. You can buy the magazine now at most major book [...]
Nice write up! did you write the article in the current 2600 as well?
Yes I wrote both, thank you for the read.