From e30cb02f10e58ae2767ce720e3debbcf15e458a1 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sat, 12 Aug 2023 20:59:01 +0000 Subject: [PATCH] Mark -m 7400 and -m 500 a compatible kernel for OPTS_TYPE_DEEP_COMP_KERNEL --- src/modules/module_00500.c | 10 ++++++++-- src/modules/module_07400.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/modules/module_00500.c b/src/modules/module_00500.c index e2e6bba93..dad794f1b 100644 --- a/src/modules/module_00500.c +++ b/src/modules/module_00500.c @@ -21,7 +21,8 @@ static const char *HASH_NAME = "md5crypt, MD5 (Unix), Cisco-IOS $1$ (MD5)"; static const u64 KERN_TYPE = 500; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; static const u64 OPTS_TYPE = OPTS_TYPE_STOCK_MODULE - | OPTS_TYPE_PT_GENERATE_LE; + | 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 = "$1$38652870$DUjsu4TTlTsOe/xxZ05uf/"; @@ -50,6 +51,11 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } +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_tmp_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 tmp_size = (const u64) sizeof (md5crypt_tmp_t); @@ -256,7 +262,7 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_benchmark_charset = 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_deprecated_notice = MODULE_DEFAULT; module_ctx->module_dgst_pos0 = module_dgst_pos0; module_ctx->module_dgst_pos1 = module_dgst_pos1; diff --git a/src/modules/module_07400.c b/src/modules/module_07400.c index b4f82ed16..f1961c3c4 100644 --- a/src/modules/module_07400.c +++ b/src/modules/module_07400.c @@ -21,7 +21,8 @@ static const char *HASH_NAME = "sha256crypt $5$, SHA256 (Unix)"; static const u64 KERN_TYPE = 7400; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; static const u64 OPTS_TYPE = OPTS_TYPE_STOCK_MODULE - | OPTS_TYPE_PT_GENERATE_LE; + | 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 = "$5$7777657035274252$XftMj84MW.New1/ViLY5V4CM4Y7EBvfETaZsCW9vcJ8"; @@ -52,6 +53,11 @@ typedef struct sha256crypt_tmp static const u32 ROUNDS_SHA256CRYPT = 5000; static const char *SIGNATURE_SHA256CRYPT = "$5$"; +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; +} + static void sha256crypt_decode (u8 digest[32], const u8 buf[43]) { int l; @@ -371,7 +377,7 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_benchmark_charset = 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_deprecated_notice = MODULE_DEFAULT; module_ctx->module_dgst_pos0 = module_dgst_pos0; module_ctx->module_dgst_pos1 = module_dgst_pos1;