From: David Llewellyn-Jones Date: Wed, 24 Aug 2016 23:12:37 +0000 (+0000) Subject: Correct code for mode 100 mangler X-Git-Url: https://www.flypig.org.uk/git/?p=hashcat.git;a=commitdiff_plain;h=f889f963895c714f709584cb0ceb671260eb29ec Correct code for mode 100 mangler Some missing headers prevent the code from working. This fixes this. The attack 3 is currently not working as expected. --- diff --git a/OpenCL/m00100_a3_m.cl b/OpenCL/m00100_a3_m.cl index 99451fb..8145676 100644 --- a/OpenCL/m00100_a3_m.cl +++ b/OpenCL/m00100_a3_m.cl @@ -13,7 +13,7 @@ #include "inc_types.cl" #include "inc_common.cl" #include "inc_simd.cl" -#include "mangle.cl" +//#include "mangle.cl" void m00100m (u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset) { @@ -58,7 +58,8 @@ void m00100m (u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_r w3[2] = w[14]; w3[3] = w[15]; - const u32 out_len = mangle(w0, w1, pw_len); + //const u32 out_len = mangle(w0, w1, pw_len); + const u32 out_len = pw_len; append_0x80_2x4_VV (w0, w1, out_len); /** @@ -179,15 +180,12 @@ void m00100m (u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_r w9_t = rotl32 ((w6_t ^ w1_t ^ wb_t ^ w9_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, w9_t); wa_t = rotl32 ((w7_t ^ w2_t ^ wc_t ^ wa_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wa_t); wb_t = rotl32 ((w8_t ^ w3_t ^ wd_t ^ wb_t), 1u); SHA1_STEP (SHA1_F1, a, b, c, d, e, wb_t); - - //if (MATCHES_NONE_VS (e, e_rev)) continue; - wc_t = rotl32 ((w9_t ^ w4_t ^ we_t ^ wc_t), 1u); SHA1_STEP (SHA1_F1, e, a, b, c, d, wc_t); wd_t = rotl32 ((wa_t ^ w5_t ^ wf_t ^ wd_t), 1u); SHA1_STEP (SHA1_F1, d, e, a, b, c, wd_t); we_t = rotl32 ((wb_t ^ w6_t ^ w0_t ^ we_t), 1u); SHA1_STEP (SHA1_F1, c, d, e, a, b, we_t); wf_t = rotl32 ((wc_t ^ w7_t ^ w1_t ^ wf_t), 1u); SHA1_STEP (SHA1_F1, b, c, d, e, a, wf_t); - COMPARE_S_SIMD (d, e, c, b); + COMPARE_M_SIMD (d, e, c, b); } } diff --git a/OpenCL/mangle.cl b/OpenCL/mangle.cl index f672e69..9f2f6e1 100644 --- a/OpenCL/mangle.cl +++ b/OpenCL/mangle.cl @@ -1,5 +1,10 @@ +#define _MD5_ + +#include "inc_hash_constants.h" +#include "inc_hash_functions.cl" + // Domain to use for mangling -__constant u8 domain[] = "flypig.co.uk"; +__constant u8 domain[] = "linkedin.com"; __constant u32x domain_len = 12; // Characters used for base64 encoding