Skip to content

Commit

Permalink
Merge pull request #2181 from Chick3nman/master
Browse files Browse the repository at this point in the history
Fixed bug in mode 9500
  • Loading branch information
jsteube committed Nov 5, 2019
2 parents 4078bcd + 253db76 commit 82f4766
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
11 changes: 7 additions & 4 deletions OpenCL/m09500-pure.cl
Expand Up @@ -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];

Expand Down
10 changes: 8 additions & 2 deletions src/modules/module_09500.c
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/modules/module_09600.c
Expand Up @@ -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;
Expand Down

0 comments on commit 82f4766

Please sign in to comment.