From 253db764b7695af8b82c3c5951abb15959cba1ff Mon Sep 17 00:00:00 2001 From: Chick3nman Date: Thu, 5 Sep 2019 05:27:39 -0500 Subject: [PATCH] Fixed issue where multiple hashes with the same salt would fail to crack in module/kernel for 9500. Remove unused include in module for 9600. --- OpenCL/m09500-pure.cl | 11 +++++++---- src/modules/module_09500.c | 10 ++++++++-- src/modules/module_09600.c | 1 - 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/OpenCL/m09500-pure.cl b/OpenCL/m09500-pure.cl index b2ebe70d9..77b1d8e55 100644 --- a/OpenCL/m09500-pure.cl +++ b/OpenCL/m09500-pure.cl @@ -271,12 +271,15 @@ KERNEL_FQ void m09500_comp (KERN_ATTR_TMPS_ESALT (office2010_tmp_t, office2010_t AES128_set_decrypt_key (ks, ukey, s_te0, s_te1, s_te2, s_te3, s_td0, s_td1, s_td2, s_td3); + const u32 digest_cur = digests_offset + loop_pos; + u32 data[4]; - data[0] = esalt_bufs[digests_offset].encryptedVerifier[0]; - data[1] = esalt_bufs[digests_offset].encryptedVerifier[1]; - data[2] = esalt_bufs[digests_offset].encryptedVerifier[2]; - data[3] = esalt_bufs[digests_offset].encryptedVerifier[3]; + data[0] = esalt_bufs[digest_cur].encryptedVerifier[0]; + data[1] = esalt_bufs[digest_cur].encryptedVerifier[1]; + data[2] = esalt_bufs[digest_cur].encryptedVerifier[2]; + data[3] = esalt_bufs[digest_cur].encryptedVerifier[3]; + u32 out[4]; diff --git a/src/modules/module_09500.c b/src/modules/module_09500.c index 328bdeea4..ee2a7ac9a 100644 --- a/src/modules/module_09500.c +++ b/src/modules/module_09500.c @@ -21,7 +21,8 @@ static const char *HASH_NAME = "MS Office 2010"; static const u64 KERN_TYPE = 9500; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE | OPTI_TYPE_SLOW_HASH_SIMD_LOOP; -static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE; +static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_DEEP_COMP_KERNEL; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; static const char *ST_HASH = "$office$*2010*100000*128*16*34170046140146368675746031258762*de5bc114991bb3a5679a6e24320bdb09*1b72a4ddffba3dcd5395f6a5ff75b126cb832b733c298e86162028ca47a235a9"; @@ -56,6 +57,11 @@ typedef struct office2010_tmp static const char *SIGNATURE_OFFICE2010 = "$office$"; +u32 module_deep_comp_kernel (MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const u32 salt_pos, MAYBE_UNUSED const u32 digest_pos) +{ + return KERN_RUN_3; +} + u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { const u64 esalt_size = (const u64) sizeof (office2010_t); @@ -265,7 +271,7 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_benchmark_mask = MODULE_DEFAULT; module_ctx->module_benchmark_salt = MODULE_DEFAULT; module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; - module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; + module_ctx->module_deep_comp_kernel = module_deep_comp_kernel; module_ctx->module_dgst_pos0 = module_dgst_pos0; module_ctx->module_dgst_pos1 = module_dgst_pos1; module_ctx->module_dgst_pos2 = module_dgst_pos2; diff --git a/src/modules/module_09600.c b/src/modules/module_09600.c index f9adb9e7f..7fbd4c5da 100644 --- a/src/modules/module_09600.c +++ b/src/modules/module_09600.c @@ -9,7 +9,6 @@ #include "bitops.h" #include "convert.h" #include "shared.h" -#include "memory.h" static const u32 ATTACK_EXEC = ATTACK_EXEC_OUTSIDE_KERNEL; static const u32 DGST_POS0 = 0;