Implementing new algorithm questions
#5
(10-06-2016, 05:45 PM)atom Wrote: > pws[gid].i[0]

No, "i" is an array of u32 values. As most hashes are processed as 32 bit integers (not 8 bit chars) it faster this way. You just have to make sure to handle the endianess of the algorithm correctly. From what I can see from the above code it's simply little endian. Also note that you have 4 chars per 32 bit integer not 1. Means i[0] has chars 0, 1, 2 and 3 of the password.

Thanks for that, I was under the impression of single characters being converted to u32 not them being packed per index value. So with the string "hello" as the password, I'd get the first 4 characters/bytes right? {0x68, 0x65, 0x6c, 0x6c} or the other way around 6c 6c 65 68?

It should automatically do that. If not you do not have all the loaded hashes cracked. Maybe you marked the hash as NEVER_CRACK ?

I had "hello" in the dictionary file and was matching against it's hash as shown in the provided command line. I've implemented the new algorithm based on the RAR5 commit(with updated paths since code/files moved), made some tweaks such as min/max len and hashconfig, etc. I was modifying the RAR5 m13000.cl file but have since changed to m00200_a0.cl for reference instead, my tweaks are very similar or identical to it. Tested with "hello" and "70de51425df9d787"(MySQL323 / 200) hash and it reports cracked, tweaked the copy/pasted m00200_a0.cl with one change:

Code:
COMPARE_S_SIMD (0x70de5142, 0x5df9d787, z, z);


Run:  hashcat -a 0 -m 99000 '70de51425df9d787' test_pd2.dict --potfile-disable

Output:


Code:
[color=#000000][size=small][font=Verdana, Arial, sans-serif][color=#000000][size=small][font=Verdana, Arial, Helvetica, sans-serif][font=monospace][color=#000000]hashcat (v3.10-391-g8fdc366+) starting... [/color]

OpenCL Platform #1: NVIDIA Corporation
======================================
- Device #1: GeForce GTX 1070, 2026/8106 MB allocatable, 15MCU
- Device #1: WARNING! Kernel exec timeout is not disabled, it might cause you errors of code 702
            See the wiki on how to disable it: https://hashcat.net/wiki/doku.php?id=timeout_patch

WARN: nvmlDeviceSetPowerManagementLimit() 4 Insufficient Permissions

WARNING: Failed to set initial fan speed for device #1
Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

Applicable Optimizers:
* Zero-Byte
* Not-Iterated
* Single-Hash
* Single-Salt

Watchdog: Temperature abort trigger set to 90c
Watchdog: Temperature retain trigger set to 75c

70de51425df9d787:                                          
Cache-hit dictionary stats test_pd2.dict: 13 bytes, 2 words, 2 keyspace
[/font][/font][/size][/color][/font][/size][/color]

[color=#000000][size=small][font=Verdana, Arial, sans-serif][color=#000000][size=small][font=Verdana, Arial, Helvetica, sans-serif][font=monospace][color=#000000]Session.Name...: hashcat [/color]
Status.........: Exhausted
Input.Mode.....: File (test_pd2.dict)
Hash.Target....: 70de51425df9d787
Hash.Type......: PD2 - Payday 2
Time.Started...: 0 secs
Candidates.#1..: hello -> fellow
Speed.Dev.#1...:        0 H/s (0.00ms)
Recovered......: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
Progress.......: 2/2 (100.00%)
Rejected.......: 0/2 (0.00%)[/font][/font][/size][/color][/font][/size][/color]

Recovered at 100% suggests the hardcoded compare values matching the hash matched it as expected, but instead of a Cracked status it says Exhausted and the hash is provided above with no matched key? Without the hardcoded change it will hash "hello" into the MySQL323 hash split into a,b for the compare and report it as Cracked with the hash paired with key "hello"..


Code:
[font=monospace][color=#000000][font=monospace][color=#000000]- Device #1: GeForce GTX 1070, 2026/8106 MB allocatable, 15MCU [/color]
- Device #1: WARNING! Kernel exec timeout is not disabled, it might cause you errors of code 702
            See the wiki on how to disable it: https://hashcat.net/wiki/doku.php?id=timeout_patch

WARN: nvmlDeviceSetPowerManagementLimit() 4 Insufficient Permissions

WARNING: Failed to set initial fan speed for device #1
Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

Applicable Optimizers:
* Zero-Byte
* Not-Iterated
* Single-Hash
* Single-Salt

Watchdog: Temperature abort trigger set to 90c
Watchdog: Temperature retain trigger set to 75c

Cache-hit dictionary stats test_pd2.dict: 13 bytes, 2 words, 2 keyspace[/font][/color][/font]

[font=monospace][color=#000000]70de51425df9d787:hello                                     [/color]
                                                          
Session.Name...: hashcat
Status.........: Cracked
Input.Mode.....: File (test_pd2.dict)
Hash.Target....: 70de51425df9d787
Hash.Type......: PD2 - Payday 2
Time.Started...: 0 secs
Candidates.#1..: hello -> fellow
Speed.Dev.#1...:        0 H/s (0.01ms)
Recovered......: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
Progress.......: 2/2 (100.00%)
Rejected.......: 0/2 (0.00%)[/font]


Messages In This Thread
RE: Implementing new algorithm questions - by polarathene - 10-06-2016, 06:47 PM