Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-m 6223 broken on TrueCrypt cascaded ciphers in v3.00 #456

Closed
redongh opened this issue Aug 12, 2016 · 6 comments
Closed

-m 6223 broken on TrueCrypt cascaded ciphers in v3.00 #456

redongh opened this issue Aug 12, 2016 · 6 comments
Labels
bug

Comments

@redongh
Copy link

@redongh redongh commented Aug 12, 2016

as already posted on hashcat-forum, TrueCrypt SHA512 XTS 1536bit mode 6223 seems to be broken for cascaded ciphers.
in my tests i got valid results for plain AES but not for AES-twofish or AES-twofish-serpent.

1024 bit mode 6222 did work as expected (successfully tested AES and AES-twofish).

trying the same with cudaHashcat v2.01, mode 6223 showed a normal behaviour (working in all test-cases).

@redongh redongh changed the title -m 6223 not working on TrueCrypt cascaded ciphers in v3.00 -m 6223 broken on TrueCrypt cascaded ciphers in v3.00 Aug 12, 2016
@redongh

This comment has been minimized.

Copy link
Author

@redongh redongh commented Aug 16, 2016

re-tested all supported truecrypt modes with a little script i just created against hashcat v2.01 and v3.00-1-g67a8d97 and all example .tc files provided in the hashcat wiki.

from the scripts output (see attached files) you can see that this bug seems to only affect sha512 based cascaded ciphers in 1536 bit mode (-m6223) as all others seem to work like expected and done back in v2.01.

result_hc201.txt
result_hc300.txt
results.diff.txt

@jsteube jsteube added the bug label Aug 17, 2016
@jsteube

This comment has been minimized.

Copy link
Member

@jsteube jsteube commented Aug 17, 2016

That's very good information. I can confirm the same behaviour in my system. I'll look into this

@jsteube

This comment has been minimized.

Copy link
Member

@jsteube jsteube commented Aug 18, 2016

OK, some update here, it seems that this is actually a bug in NVIDIAs OpenCL JIT compiler (OpenCL runtime). While this always sounds like some kind of excuse, you can proof pretty easy by installing any different OpenCL runtime and run it with that. I used AMD's CPU OpenCL runtime for my fx8120 CPU. Here's the output:

Not working NV:

root@ht:~/hashcat# ./hashcat -m 6223 hashcat_sha512_aes-twofish.tc -a 3 hashca?1 -1 t 
hashcat (v3.00-86-g6f8d3d8) starting...

OpenCL Platform #1: NVIDIA Corporation  
======================================
- Device #1: GeForce GTX 750 Ti, 499/1998 MB allocatable, 5MCU

OpenCL Platform #2: The pocl project
====================================
- Device #2: pthread-AMD FX(tm)-8120 Eight-Core Processor, skipped

Hashes: 1 hashes; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Applicable Optimizers:
* Zero-Byte
* Single-Hash
* Single-Salt
* Brute-Force
* Uses-64-Bit
Watchdog: Temperature abort trigger set to 90c
Watchdog: Temperature retain trigger set to 75c

ATTENTION!                                                
  The wordlist or mask you are using is too small.
  Therefore, hashcat is unable to utilize the full parallelization power of your device(s).
  The cracking speed will drop.
  Workaround: https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#how_to_create_more_work_for_full_speed

INFO: approaching final keyspace, workload adjusted       


Session.Name...: hashcat
Status.........: Exhausted
Input.Mode.....: Mask (hashca?1) [7]
Custom.Chars...: -1 t, -2 Undefined, -3 Undefined, -4 Undefined
Hash.Target....: File (hashcat_sha512_aes-twofish.tc)
Hash.Type......: TrueCrypt PBKDF2-HMAC-SHA512 + XTS 1536 bit
Time.Started...: 0 secs
Speed.Dev.#1...:        0 H/s (0.73ms)
Recovered......: 0/1 (0.00%) Digests, 0/1 (0.00%) Salts
Progress.......: 1/1 (100.00%)
Rejected.......: 0/1 (0.00%)

Started: Thu Aug 18 13:01:03 2016
Stopped: Thu Aug 18 13:01:09 2016 

Working CPU:

root@ht:~/hashcat# ./hashcat -m 6223 hashcat_sha512_aes-twofish.tc -a 3 hashca?1 -1 t -D 1                
hashcat (v3.00-86-g6f8d3d8) starting...

OpenCL Platform #1: NVIDIA Corporation  
======================================
- Device #1: GeForce GTX 750 Ti, skipped

OpenCL Platform #2: The pocl project
====================================
- Device #2: pthread-AMD FX(tm)-8120 Eight-Core Processor, 18056/18056 MB allocatable, 8MCU

Hashes: 1 hashes; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Applicable Optimizers:
* Zero-Byte
* Single-Hash
* Single-Salt
* Brute-Force
* Uses-64-Bit
Watchdog: Temperature abort trigger set to 90c
Watchdog: Temperature retain trigger set to 75c

ATTENTION!                                                
  The wordlist or mask you are using is too small.
  Therefore, hashcat is unable to utilize the full parallelization power of your device(s).
  The cracking speed will drop.
  Workaround: https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#how_to_create_more_work_for_full_speed

INFO: approaching final keyspace, workload adjusted       

hashcat_sha512_aes-twofish.tc:hashcat                     

Session.Name...: hashcat
Status.........: Cracked
Input.Mode.....: Mask (hashca?1) [7]
Custom.Chars...: -1 t, -2 Undefined, -3 Undefined, -4 Undefined
Hash.Target....: File (hashcat_sha512_aes-twofish.tc)
Hash.Type......: TrueCrypt PBKDF2-HMAC-SHA512 + XTS 1536 bit
Time.Started...: Thu Aug 18 12:57:32 2016 (38 secs)
Speed.Dev.#2...:        0 H/s (0.46ms)
Recovered......: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
Progress.......: 1/1 (100.00%)
Rejected.......: 0/1 (0.00%)

Started: Thu Aug 18 12:57:32 2016
Stopped: Thu Aug 18 12:58:17 2016 

Note that with hashcat v2.01 we were using CUDA, not OpenCL. There's a good chance that the compiler settings in CUDA are different to OpenCL. This explains why it's working with cudaHashcat.

Reporting bugs to NVidia never helps btw, they always ignore reports, at least if it's regarding OpenCL. So the final question is how to workaround the problem. Trying to find this out is my next step.

jsteube added a commit that referenced this issue Aug 18, 2016
@jsteube

This comment has been minimized.

Copy link
Member

@jsteube jsteube commented Aug 18, 2016

I've pushed that workaround. Can you please run your script and check for results?

@jsteube

This comment has been minimized.

Copy link
Member

@jsteube jsteube commented Aug 19, 2016

I think the issue is workarounded, so I'm closing this to enable the release of hashcat v3.10. Please reopen if needed.

@jsteube jsteube closed this Aug 19, 2016
@redongh

This comment has been minimized.

Copy link
Author

@redongh redongh commented Aug 19, 2016

@jsteube Confirming that your workaround jsteube@d7f078cb45e5d0b3029c14e4d9cbf8e49c158ce2 is resolving #456 as my test-script now yields the same results as v2.01 did while maintaining the performance-level of v3.00 on my nvidia gtx 9X0 based machines.
nice work, thanks for the superfast reaction! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.