Increasing MD5 GPU Utilization?
#1
Hi

Was hoping for some pointers with this amazing bit of software.

Running Windows 7 64 Bit ,Catalyst 14.4, oclHashcat-1.20
2x7970 GPUs

Benchmark for MD5 below;
Hashtype: MD5
Workload: 1024 loops, 256 accel

Speed.GPU.#1.: 9478.4 MH/s
Speed.GPU.#2.: 8697.6 MH/s
Speed.GPU.#*.: 18176.0 MH/s

I have a situation were the plain text for part of a string is known, with some unknown details in the middle. This isn't the real string that the hash is built from, but it performs the same way. Let's call it "Some known text?1?1?1?1?1?1?1?1more known text".

Have used the following to attempt to solve it. Have tried various lengths.

oclHashcat64.exe -a 3 -m 0 -1 ?u?l?d -n 256 -u 1024 6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5 "Some known text?1?1?1?1?1?1?1?1more known text"

This command delivered the throughput below, which I thought was good until I saw the MD5 benchmarks for my rig. The GPU util rates are not that high.

Session.Name...: oclHashcat
Status.........: Running
Input.Mode.....: Mask (Some known text?1?1?1?1?1?1?1?1more known text) [38]
Hash.Target....: 6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5
Hash.Type......: MD5
Time.Started...: Mon May 12 13:08:49 2014 (15 secs)
Time.Estimated.: Thu May 22 16:17:09 2014 (10 days, 3 hours)
Speed.GPU.#1...: 137.2 MH/s
Speed.GPU.#2...: 114.3 MH/s
Speed.GPU.#*...: 251.5 MH/s
Recovered......: 0/1 (0.00%) Digests, 0/1 (0.00%) Salts
Progress.......: 3902799872/218340105584896 (0.00%)
Skipped........: 0/3902799872 (0.00%)
Rejected.......: 0/3902799872 (0.00%)
HWMon.GPU.#1...: 80% Util, 69c Temp, 87% Fan
HWMon.GPU.#2...: 83% Util, 61c Temp, 73% Fan

Doing some testing to work out how to increase the throughput to a level comparable to those of the benchmark, I was curious as to the effect of removing the text off the front of the test string to observe the effect on GPU utilization - though it wouldn't solve the hash. I shortened the test string to

"?1?1?1?1?1?1?1?1more known text"


oclHashcat64.exe -a 3 -m 0 -1 ?u?l?d -n 256 -u 1024 6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5 "?1?1?1?1?1?1?1?1more known text"

The throughput went up massively and the GPU utilization climbed significantly.

Session.Name...: oclHashcat
Status.........: Running
Input.Mode.....: Mask (?1?1?1?1?1?1?1?1more known text) [23]
Hash.Target....: 6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5
Hash.Type......: MD5
Time.Started...: Mon May 12 13:10:08 2014 (18 secs)
Time.Estimated.: Mon May 12 16:31:33 2014 (3 hours, 21 mins)
Speed.GPU.#1...: 9545.0 MH/s
Speed.GPU.#2...: 8679.0 MH/s
Speed.GPU.#*...: 18224.0 MH/s
Recovered......: 0/1 (0.00%) Digests, 0/1 (0.00%) Salts
Progress.......: 342246817792/218340105584896 (0.16%)
Skipped........: 0/342246817792 (0.00%)
Rejected.......: 0/342246817792 (0.00%)
HWMon.GPU.#1...: 98% Util, 75c Temp, 94% Fan
HWMon.GPU.#2...: 98% Util, 66c Temp, 78% Fan

I am trying to understand why this massive change in throughput occurred, and in general, how to speed the MD5 search of a key space similar to the one below.

"Some known text?1?1?1?1?1?1?1?1more known text"

Any suggestions would be appreciated.
#2
kind of hard to explain, as this is one of those deep oclHashcat internals topics. but basically the mask is split into a left side (modifier) and a right side (base). the modifier loop is what runs on the gpu, so in order to gain full acceleration, the left keyspace has to be larger than the right keyspace. otherwise you will not be giving the gpu enough work to do on each loop iteration.
#3
you can use the known text at the beginning as a salt and use md5(salt.pass) mode.
#4
thanks to protocol for posting this question as I also was experiencing this issue as well.
(I have just one 7970 though)

my benchmark

Hashtype: MD5
Workload: 1024 loops, 256 accel
Speed.GPU.#1.: 8214.9 MH/s

in my dates based example 199?d?a?a?a?a?a?a

so if I am understanding it
modifier is the portion which varies ?d?a?a?a?a?a?a
and base is the fixed text 199

my speed issues were due to the much smaller base ?

1 - Further questions is there a way to speed up performace with large hashsets as it also slows down md5 performance to the same levels.

16K hashset

Session.Name...: oclHashcat
Status.........: Running
Input.Mode.....: Mask (199?d?a?a?a?a?a?a) [10]
Hash.Target....: File (smallhashset)
Hash.Type......: MD5
Speed.GPU.#1...: 708.4 MH/s
Recovered......: 0/16485 (0.00%) Digests, 0/1 (0.00%) Salts
Progress.......: 6406799360/7350918906250 (0.09%)
HWMon.GPU.#1...: 75% Util, 60c Temp, 51% Fan

38 MIllion hashset
Session.Name...: oclHashcat
Status.........: Running
Input.Mode.....: Mask (199?d?a?a?a?a?a?a) [10]
Hash.Target....: File (largedata)
Hash.Type......: MD5
Speed.GPU.#1...: 393.2 MH/s
Recovered......: 74/38970224 (0.00%) Digests, 0/1 (0.00%) Salts
HWMon.GPU.#1...: 85% Util, 58c Temp, 49% Fan

2- Can we stop the remove duplicate hashes stage in 1.20 as all my hashsets are already pre sorted and uniqued. It hurts performance in my loop of 50+ diff large wordlist tests.

I didnt notice any options for this.

thank you
#5
(05-12-2014, 09:51 AM)undeath Wrote: you can use the known text at the beginning as a salt and use md5(salt.pass) mode.

Thanks to epixoip and undeath for that explanations and tips.

I have re-worked it to use md5($salt.$pass) and now the time to test the key space has fallen from 10 days to 6 hours.

Session.Name...: oclHashcat
Status.........: Running
Hash.Type......: md5($salt.$pass)
Time.Started...: Tue May 13 11:40:57 2014 (1 min, 11 secs)
Time.Estimated.: Tue May 13 17:50:55 2014 (6 hours, 8 mins)
Speed.GPU.#1...: 5172.5 MH/s
Speed.GPU.#2...: 4702.6 MH/s
Speed.GPU.#*...: 9875.1 MH/s
Recovered......: 0/1 (0.00%) Digests, 0/1 (0.00%) Salts
Progress.......: 699526021120/218340105584896 (0.32%)
Skipped........: 0/699526021120 (0.00%)
Rejected.......: 0/699526021120 (0.00%)
HWMon.GPU.#1...: 99% Util, 73c Temp, 89% Fan
HWMon.GPU.#2...: 99% Util, 65c Temp, 76% Fan

CTu2y, I believe that it should be possible for you to use md5($salt.$pass) as well.

You could try modifying your hashes to the required mode 20 format, using 199 as a salt. For example;

6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5:199

then test against ?d?a?a?a?a?a?a
For me the speed increase was dramatic.
#6
Had to leave earlier but now working on this large set again.

Updated the hashset as you show above and used mode 20 for md5($salt.$pass)
It did double my speed on the large hashset which is good but still 1/4 the speed possible.

will try and run some tests to see how many I can do at once with a high 4000 MH/s speed and then split the hashset into this size pieces to optimize my time.

results
Session.Name...: oclHashcat
Status.........: Running
Input.Mode.....: Mask (?d?a?a?a?a?a?a) [7]
Hash.Target....: File (newdatafile)
Hash.Type......: md5($salt.$pass)
Time.Started...: (4 mins, 27 secs)
Time.Estimated.: (2 hours, 31 mins)
Speed.GPU.#1...: 792.2 MH/s
Recovered......: 30/38970224 (0.00%) Digests, 0/1 (0.00%) Salts
Progress.......: 209333518336/7350918906250 (2.85%)
Skipped........: 0/209333518336 (0.00%)
Rejected.......: 0/209333518336 (0.00%)
HWMon.GPU.#1...: 99% Util, 58c Temp, 100% Fan

thanks for helping everyone.
#7
your right keyspace is much larger than your left keyspace. try generating a wordlist out of 199?d and then cracking it with -a 6 as -m 0.