Gonzalez Posted October 7, 2006 Report Posted October 7, 2006 Patching John The Ripper (JTR) for raw md5 (raw md5 hashes like those you got from some sql-injectionsJohn is the best known (and in my humble opinion the best cracker ever). How to obtain both the source code for john and the patch, see below.First, JTR is *NOT* a GUI, JTR runs in a shell, therefore no time delays for slow GUI-components. JTR can be run from windows, with cygwin.If you want to crack raw md5 (like the one's you could rip from sql-injections) with JTR you must patch the source code first, since raw md5 isn't supported as default. This is at a first glance maybe hard and/or impossible. That's why I decided to write a short tutorial on this subject.This tutorial was tested on Linux with john version 1.7.2 but should work on any other system john can be built for (including windows with cygwin), with just some aspect to OS-dependent commands and characteristics.1.)First download both source and patch.2.)Unzip the tarball: tar -zxvf john-1.7.2.tar.gz3.)Copy the john-1.6.39-rawmd5-pomd5-1.diff.gz /your/path/to/john-1.7.2/src/myJohnMd5Patch.diff4.)Change dir to the src: cd /your/path/to/john/src5.)Open the .diff with an editor of your choice, find and replace all 1.6.39 with 1.7.2 otherwise the diff would not apply to the source code.6.)Now it's time to patch: patch < myJohnMd5Patch.diff7.)Time to compile, type : make in the src-dir and you will get something like this: (I have truncated the output, only a few SYSTEM:s shows here) In my case I would type: make clean linux-x86-any--------------------------To build John the Ripper, type: make clean SYSTEMwhere SYSTEM can be one of the following:linux-x86-sse2 Linux, x86 with SSE2 (best)linux-x86-mmx Linux, x86 with MMXlinux-x86-any Linux, x86..macosx-ppc32 Mac OS X, PowerPC 32-bitmacosx-ppc64 Mac OS X 10.4+, PowerPC 64-bitmacosx-x86-sse2 Mac OS X, x86 with SSE2..win32-cygwin-x86-sse2 Win32, Cygwin, x86 with SSE2 (best)win32-cygwin-x86-mmx Win32, Cygwin, x86 with MMXwin32-cygwin-x86-any Win32, Cygwin, x86..generic Any other Unix-like system with gcc-----------------------------------------------------------8.) After the build, look in /your/path/to/john-1.7.2/run , and there you will find JTR, ready to rock!!!9.) To test john on some real password hashes, make a file that contains the following hashes:root:82663f314ed363be75d6efd9c9d7d6cdpeter:78a9a9a1ced32ee5e32b26b05a5565e8admin:78ffa6ce96c5b837258212a580056fe2john:7ed9453ae9a92c37ee7309f84a5dbd6blucky:eb6d7343c5634cbcd4020bd77e67a4easmith:7007ea8947c841a67fee07267fd3713dcarol:21232f297a57a5a743894a0e4a801fc3tristan:9224abe81c87767664f0712060449d16scott:6b34d70bee747e7d6341ff9f03b318aeSave the file as HelloJohn.passwdin your run-dir, type: ./john -i /your/path/to/HelloJohn.passwdand you should see something like this:Loaded 9 password hashes with no different salts (Raw MD5 [raw-md5])So go and grab a cup of coffee and wait, some passwords may show up in a short time, others may never show up. You can tweak JTR with wordlists, charsets, and a lot more, but this tutorial don't cover that. You can read more in the documentation for JTR.By hitting spacebar john print out current run-infoSome note about the hash format. It must be something like user:md5hashIf you got a huge file with a lot of other crap inside you might try gawk (availbe for windows and *nix)gawk "{if (length($0)==32) print "1:"$0}" temp.txt > myJohnFile.passwdThe file should then look something like this:1:82663f314ed363be75d6efd9c9d7d6cd1:78a9a9a1ced32ee5e32b26b05a5565e81:78ffa6ce96c5b837258212a580056fe21:7ed9453ae9a92c37ee7309f84a5dbd6b...etc, etc, etcGood luck and happy cracking!!Ps. there is a Jumbo patch that includes a lot of patches, that may suite your needs better.John can be found here: The'>http://www.openwall.com/john/The raw md5 patch can be found here: The'>http://www.openwall.com/john/contrib/john-1.6.39-rawmd5-pomd5-1.diff.gzThe jumbo patch for 1.7 including many useful patches(requires OpenSSL 0.9.7+) can be found here: Credit:'>http://www.openwall.com/john/contrib/john-1.7.2-all-2.diff.gzCredit: ANARCH Quote