Title picture
Reliable Software
MSDN Library
The Spanner
Buhera Blog

RSS - posts
RSS - comments
sghctoma at gmail dot com
Creative Commons License

Another GPGPU MD5 cracker..

As I promised yesterday, I am now releasing the source code of my OpenCL-based MD5 hash cracker. A Mach-O binary can also be downloaded, and as soon as I get home (possibly this weekend), I will compile it for Windows and Linux, too.

Let me say some words about the development. My CUDA-based cracker, cuMD5 was the starting point, because I thought, porting it would be a nice way to learn OpenCL. Meanwhile, I rethinked some stuff, so oclcrack is not merely a port. Unlike cuMD5, this can crack more hashes at once, not just one. In fact, oclcrack was developed with large amounts of MD5 hashes in mind (during development, I was testing with a list of approximately 2200 hashes).

My first approach was to do everything on the GPU, but the comparing of the hashes was way too slow. So I choose to do it on the CPU, using a hash table. I was too lazy to implement an own hash table, so I used the not-yet-standard unordered_map from the TR1 namespace. Sorry, If your compiler does not know it.

Now I am thinking about implementing the hash table on the GPU, it could result in a speed increase. Also, using pinned memory, and fine-tune the hash table's hash function could be an optimization. Speaking of speed: I was able to test the program only on a HP 8510w laptop with a Core2Duo T7500 processor, and an nVidia Quadro FX570m VGA. With the list of 2200 hashes, oclcrack was able to do 1.84e10 comparisons per second. I think it is a pretty good number for this GPU. I hope I can find somebody to test it on much more powerful VGA cards :)

OK, now about the usage of oclcrack:
oclcrack [options] hash_file

hash_file is the name of the file containing the hashes (one in a line) in the following form: username:hash The username is optional. An example file, and a little Bash script to generate test files are included in the package.

The available options are:

*it will increase, as soon as I write some fast big integer representation :)

OK, now something a bit off-topic: I have written a Cocoa based app, called OpenCL Info Browser, that displays information about OpenCL devices on your system. It was written for myself to make OpenCL development more comfortable, but I have no reason not to share it. So it can be downloaded too; the link is in the next paragraph. For those who speak Hungarian, an OpenCL tutorial is also available, here: [link]

And finally, the downloads:

sghctoma, 2009-10-07 22:37:18

hnk, 2010-01-04 21:07:58

nice work, can't compile the xcode project, binary works perfectly.

sghctoma, 2010-01-24 20:21:15

thx, and sorry for the late answer; I didn't notice your post until now.. I should probably subscribe to my own RSS feeds :)
about the compilation: is the OpenCL SDK properly installed on your system? if yes, it should work.. could you please send me (sghctoma at gmail dot com) the compile output?

, 2010-02-02 14:28:27

grimmlin, 2010-02-28 13:44:09


I've been trying to compile your project on linux amd64 but the source archive is missing the MD5_cl.h file.
Also, a Makefile would be awesome! :-)

sghctoma, 2010-03-03 20:06:12

Hi, grimmlin,

The MD5_cl.h file is missing because it is generated by a script before compilation (Xcode allows you to set up scripts to run at any phase of the build process). The missing file contains only the content of the file MD5.cl as a C string (const char * kernelSource = "<content of MD5.cl>"). This may seem awkward, but editing the kernel source is much more easy if it is not wrapped in "s - this way I get syntax highlight and code completion.
Right now I am pretty busy, but I can promise that I will try to build this thing on a Linux box, and provide a Makefile this week.

brutus, 2010-03-13 18:47:43

can i have some benchmarks?

, 2011-10-23 08:31:43

learn how to hack, 2012-01-20 05:55:41

Thanks for sharing experience.it should be very helpful and informative blog.
<a href="http://www.learn-how-to-hack.com/">learn how to hack</a>

Maurits, 2012-08-29 09:07:13

AlexDudin, 2015-03-11 10:29:04

http://gazeta.ru http://tvrain.ru - информацию. <a href=http://www.webalta.ru>информацию.</a>



Reload Image
Captcha code: