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:
- --start=X : minimal string length is X (default is 1)
- --start=X : maximal string length is X (default and maximum* is 10)
- --charset=abc : set the charset to "abc" (default is the capital and non-capital english letters and the digits)
- --verbose : prints some statistics to standard out
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