cuMD5 - another MD5 cracker...

Hi all!

Yes, I know, that there are already some CUDA-based MD5 crackers, but I want to show you mine. It can crack only one hash at a time, and the strings’ length is limited to a maximum of 16.

I wanted to minimize memcopies between the host and the gpu, so the strings are generated on the gpu, too (from a unique id, calculated from block/thread-ids… more details in the source code).

On a 8800GTX, it can compute 150-240 million hashes per second. In my solution speed heaviliy depends on string length, that is why the huge gap between those numbers exist (240 million is for string length 4-5, 150 million is for length 16).

You can find the source code (VS2005, and Linux), and binaries (XP32, Vista32, Linux32) on my page (at the bottom): HERE

I will appreciate any suggestions/error reports.

Hi sghctoma,

Thanks for your code,

I tried it.

It appears the following error messages, when cuMD5CUDA.cu is compiled at vc 2005 express:

Compiling…

cuMD5CUDA.cu

C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\xutility(870): internal error:

      assertion failed at:

      "D:/Bld/rel/gpgpu/toolkit/r2.0/compiler/edg/EDG_3.9/src/lower_name.c"

      , line 4179

1 catastrophic error detected in the compilation of “C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/tmpxft_00000c88_00000000-6_cuMD5CUDA.cpp1.ii”.

Compilation aborted.

This application has requested the Runtime to terminate it in an unusual way.

Please contact the application’s support team for more information.

Besides, There is a warning:

project: warning PRJ0018 : can not find following environmental variable:

$(CUDA_COMMON_INC_PATH)

hi ledeguang,

first of all, thank you for trying the code…

I have VS2005 Professional, so I haven’t tried to buid the project with Express… I will download it, and try to figure out, what the problem is… besides, I don’t even know what that “D:/Bld/rel/gpgpu/toolkit/r2.0/compiler/edg/EDG_3.9/src/lower_name.c” is, in the error message…

about the environment variable: I thought, that it has been set by the CUDA SDK/Toolkit, but this appears to be wrong… I am using the CUDA VS2005 Wizard… this wizard adds two environment variables, $(CUDA_COMMON_LIB_PATH) and $(CUDA_COMMON_INC_PATH)… the first is common/lib directory in the CUDA SDK folder, and the second is the common/inc… you either have to install the wizard, or have to set these environment variables manually in order to successfully build the source…

Hi sghctoma,

Thanks for your reply.

I compiled the codes through vs2005. However, it has the same problem.

What do you think?

Thanks!

With best regards,

Deguang

Hi sghctoma,

There is no corresponding build rule.

Could you please provide it?

Thanks!

hi ledeguang,

as I’ve said, I am using the CUDA VS2005 Wizard… I suggest, that you install it, it has the proper build rule file… if you don’t want to install it, you can still extract the build rule from the installer…

best regards,
sghctoma

Hi sghctoma,

Thank you very much!

I followed your suggestion: vs2005+CUDA VS2005 Wizard+your codes (i.e. cuMD5).

However it has the same problem as I mentioned above.

Do you think it is because of the CUDA toolkit or CUDA SDK?

My version installed in my computer is CUDA 2.0 BETA2.

Thanks!

With best regards,

Deguang

sghctoma,

If possible, kindly send an e-mail to him with the executable!

OR

Post the executable in the forum!

Hi Sarnath,

Have you tried sghctoma’s codes?

If you did, did you meet any problems about sghctoma’s codes?

Thanks!

With best regards,

Deguang

Hi Deguang,

I did not! Instead of getting the code and trying to find why it is NOT working, I thought it would be good to have the executable posted here!

Won’t an executable help your cause? If I did compile it, I would have posted it here though :-)

hi!

I have the CUDA 2.0 BETA2 too, so this should not be a problem…

I am sorry, but I don’t have a clue, what can couse the error… I’ve tried

to build the project on one of my friends computer, and it succeded…

Do you know, what that “D:/Bld/rel/gpgpu/toolkit/r2.0/compiler/edg/EDG_3.9/src/lower_name.c” in the error message, you posted? That source file has nothing to do with with my project (I don’t even have a lower_name.c on my machine), so I don’t understand, how it can appear in the error message…

hello Sarnath,

you can download the compiled binaries (for XP, Vista, and Linux) from my site… here is the link (I’ve posted the same link in the original post): http://people.inf.elte.hu/sghctoma/allentries.html#cumd5_en

Hi sghctoma,

There is no “D:/Bld/rel/gpgpu/toolkit/r2.0/compiler/edg/EDG_3.9/src/lower_name.c” at all in my computer. I also don"t know why it appears this error message.

There is additional dialog box that shows “cudafe.exe has some problem and is closed” when I compile the code.

Therefore, I think it is the reasion of cudafe.exe from CUDA Toolkit.

Could you please provide me your cudafe.exe? Thanks!

With best regards,

Deguang

FYI, I’ve just added your cracker to my MD5 benchmarks page, [url=“World Fastest MD5 cracker BarsWF : Svarichevsky Mikhail”]http://3.14.by/en/md5[/url]

I was getting the same error (albeit with a different cuda program), and installing the VS2005 SP1 solved the problem.

I’m getting following errors while making cuMD5:

cuMD5.cpp: In constructor ‘cuMD5::cuMD5(int, char**)’:
cuMD5.cpp:28: error: ‘memset’ was not declared in this scope
cuMD5.cpp: In member function ‘void cuMD5::Crack()’:
cuMD5.cpp:142: error: ‘memset’ was not declared in this scope
make: *** [obj/release/cuMD5.cpp_o] Error 1

I’m using openSUSE 11.0 and tried various g++ from repositories but nothing helped.

Adding #include in cuMD5.h leads to other errors like “__builtin_memchr is undefined” etc.

What is your linux distribution?

Many thanks and sorry for my English.

I was trying to add some STL code in a .cu file and bumped on this crazy problem!

Installing VS2005 SP1 solves the problem! Thanks to this thread! I was able to fix it.

APart from this, to avoid linker problems with (libcmt.lib and the likes), one needs to give proper host-compiler options to NVCC. Especially the /MDd, /MD options and the likes…

The best way is to find out what VC++ uses ( from the prperty pages) for the “build configuration (debug/release)” and use them as they are in host-compiler option of nvcc… The only exception is the /TC and /TP options – NVCC uses /TC to call for C compilation and /TP for C++ compilation. So, stay away from that option. Conflicting options passed to CL can cause your compile to break. I have seen it happen.

One example:

"

nvcc -v -Xcompiler “/Gm,/Zi,/D WIN32,/D _DEBUG,/D _CONSOLE, /D _UNICODE,/D UNICODE,/EHsc, /errorReport:prompt,/c,/RTC1,/Od,/MDd,/W3,/nologo,/Wp64” -o $(ConfigurationName)\test_xutility_bug.obj -c test_xutility_bug.cu"

The “MDd” option is the one that avoids linker errors during compilation. Check MSDN for documentation of this option.

This is for debug configuration. See the /Od flag (Optimiz disabled) there. You may want to use what VC++ uses for its release configuration.

This will remove all the linker errors… but i still get warnings from “istream” – not sure why. but the EXE file works…

Hope this helps some1.

but still, A guarantee from NVIDIA would be great on this issue.

well … i find a bug in cuMD5 … was something curious but still …

using you provided binary because can’t compile from source under linux i got this:

echo -n “FqSKsN” | md5sum
5a5cb12c36e40724a6b726de6a77bb8f -

echo -n “HaX_0r” | md5sum
456a1da80bc4e241f239d111c10ecc21 -

but then:

./cuMD5 -verbose --start=6 --stop=6 456a1da80bc4e241f239d111c10ecc21
Using GeForce 8600 GTS as CUDA device
Actual length is 6.
Total time: 602.236ms - 33554432 keys have been tried in this pass.
Total time: 1206.24ms - 67108864 keys have been tried in this pass.
.
blablabla
.
Total time: 647353ms - 35970351104 keys have been tried in this pass.
Total time: 647957ms - 36003905536 keys have been tried in this pass.
Total time: 648561ms - 36037459968 keys have been tried in this pass.

Hash has been cracked! Keyword is: FqSKsN

lolz! :">
using this:
[url=“http://sghctoma.extra.hu/downloads/cumd5/cuMD5_Linux32_binary.zip”]http://sghctoma.extra.hu/downloads/cumd5/c...ux32_binary.zip[/url]
binary …

other tests was ok:

### cuMD5 test ###

************************************************************

******************************

First test. Parameters: -verbose --start=1 --stop=5 832e8f2cbdf84ecbe56c354b2c2be6d1

Using GeForce 8600 GTS as CUDA device

Actual length is 1.

	Total time: 432.746ms	-	33554432 keys have been tried in this pass.

Actual length is 2.

	Total time: 899.18ms	-	33554432 keys have been tried in this pass.

Actual length is 3.

	Total time: 1399.85ms	-	33554432 keys have been tried in this pass.

Actual length is 4.

	Total time: 1932.19ms	-	33554432 keys have been tried in this pass.

Actual length is 5.

	Total time: 2500.39ms	-	33554432 keys have been tried in this pass.

	Total time: 3070.65ms	-	67108864 keys have been tried in this pass.

	Total time: 3639.81ms	-	100663296 keys have been tried in this pass.

	Total time: 4210.26ms	-	134217728 keys have been tried in this pass.

	Total time: 4778.57ms	-	167772160 keys have been tried in this pass.

	Total time: 5349.28ms	-	201326592 keys have been tried in this pass.

	Total time: 5918.89ms	-	234881024 keys have been tried in this pass.

	Total time: 6489.84ms	-	268435456 keys have been tried in this pass.

	Total time: 7058.59ms	-	301989888 keys have been tried in this pass.

	Total time: 7628.6ms	-	335544320 keys have been tried in this pass.

	Total time: 8198.68ms	-	369098752 keys have been tried in this pass.

	Total time: 8770.16ms	-	402653184 keys have been tried in this pass.

	Total time: 9339.38ms	-	436207616 keys have been tried in this pass.

	Total time: 9909.87ms	-	469762048 keys have been tried in this pass.

	Total time: 10479.3ms	-	503316480 keys have been tried in this pass.

	Total time: 11050.1ms	-	536870912 keys have been tried in this pass.

	Total time: 11619.8ms	-	570425344 keys have been tried in this pass.

	Total time: 12190.7ms	-	603979776 keys have been tried in this pass.

	Total time: 12760.6ms	-	637534208 keys have been tried in this pass.

	Total time: 13330.7ms	-	671088640 keys have been tried in this pass.

	Total time: 13900.9ms	-	704643072 keys have been tried in this pass.

	Total time: 14472.3ms	-	738197504 keys have been tried in this pass.

	Total time: 15042.7ms	-	771751936 keys have been tried in this pass.

	Total time: 15613.2ms	-	805306368 keys have been tried in this pass.

	Total time: 16183.9ms	-	838860800 keys have been tried in this pass.

	Total time: 16754.6ms	-	872415232 keys have been tried in this pass.

	Total time: 17323.2ms	-	905969664 keys have been tried in this pass.

	Total time: 17893.6ms	-	939524096 keys have been tried in this pass.

Hash has been cracked!	Keyword is:	t0M49

************************************************************

******************************

Second test. Parameters: -verbose --start=8 --stop=8 9a2a6d9b9f2564a56c3e5b0b79a73a22

Using GeForce 8600 GTS as CUDA device

Actual length is 8.

	Total time: 668.347ms	-	33554432 keys have been tried in this pass.

Hash has been cracked!	Keyword is:	abbaaaaa

************************************************************

******************************

Third test. Parameters: -verbose --start=16 --stop=16 c208d39194fcac5bbec375e58d603c2a

Using GeForce 8600 GTS as CUDA device

Actual length is 16.

	Total time: 971.638ms	-	33554432 keys have been tried in this pass.

Hash has been cracked!	Keyword is:	abbaaaaaaaaaaaaa

and

=====

start_crack = vineri 1 ianuarie 2010, 10:04:02 +0200

pwd_to_crack = t1st

md5_pwd = 2d0e79a978805814f5e6cd56bd5dd2bf -

./cuMD5 -verbose --start=4 --stop=4 2d0e79a978805814f5e6cd56bd5dd2bf - | tee -a ../cuMD5_set_002_log

Using GeForce 8600 GTS as CUDA device

Actual length is 4.

	Total time: 532.442ms	-	33554432 keys have been tried in this pass.

Hash has been cracked!	Keyword is:	t1st

stop_crack = vineri 1 ianuarie 2010, 10:04:03 +0200

=====

start_crack = vineri 1 ianuarie 2010, 10:04:19 +0200

pwd_to_crack = round

md5_pwd = 9bbd993d9da7df60b3fd4a4ed721b082 -

./cuMD5 -verbose --start=5 --stop=5 9bbd993d9da7df60b3fd4a4ed721b082 - | tee -a ../cuMD5_set_002_log

Using GeForce 8600 GTS as CUDA device

Actual length is 5.

	Total time: 568.306ms	-	33554432 keys have been tried in this pass.

	Total time: 1138.57ms	-	67108864 keys have been tried in this pass.

Hash has been cracked!	Keyword is:	round

stop_crack = vineri 1 ianuarie 2010, 10:04:21 +0200

=====

start_crack = vineri 1 ianuarie 2010, 10:07:09 +0200

pwd_to_crack = HaX0r

md5_pwd = 94698ac65d1aa7f5bb0f99a602fc5346 -

./cuMD5 -verbose --start=5 --stop=5 94698ac65d1aa7f5bb0f99a602fc5346 - | tee -a ../cuMD5_set_002_log

Using GeForce 8600 GTS as CUDA device

Actual length is 5.

	Total time: 568.287ms	-	33554432 keys have been tried in this pass.

	Total time: 1138.57ms	-	67108864 keys have been tried in this pass.

	Total time: 1707.75ms	-	100663296 keys have been tried in this pass.

	Total time: 2278.19ms	-	134217728 keys have been tried in this pass.

	Total time: 2846.47ms	-	167772160 keys have been tried in this pass.

	Total time: 3417.18ms	-	201326592 keys have been tried in this pass.

	Total time: 3986.82ms	-	234881024 keys have been tried in this pass.

	Total time: 4557.78ms	-	268435456 keys have been tried in this pass.

Hash has been cracked!	Keyword is:	HaX0r

stop_crack = vineri 1 ianuarie 2010, 10:07:14 +0200

and so on …

until now only HaX_0r bring an error response … External Image

anyone else can confirm this error with HaX_0r password test?

Hm, perhaps it’s the underscore? Maybe the app only checks alphanumeric symbols and not all 256 possible values of unsigned char to speed things up.