From 111889d3fc63554382b99fe3893f63e58ba96b83 Mon Sep 17 00:00:00 2001 From: jsteube Date: Wed, 13 Mar 2019 19:02:24 +0100 Subject: [PATCH] Keep Guessing: No longer automatically activate --keep-guessing for modes 9720, 9820, 14900 and 18100 --- docs/changes.txt | 1 + include/types.h | 1 + src/interface.c | 12 ++++++++++++ src/modules/module_09720.c | 2 +- src/modules/module_09820.c | 2 +- src/modules/module_14900.c | 2 +- src/modules/module_18100.c | 2 +- 7 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 1904fc415..cece708c2 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -48,6 +48,7 @@ ## - Binary Distribution: Removed 32 bit binary executables +- Keep Guessing: No longer automatically activate --keep-guessing for modes 9720, 9820, 14900 and 18100 * changes v5.0.0 -> v5.1.0 diff --git a/include/types.h b/include/types.h index a49ee194f..b4d381285 100644 --- a/include/types.h +++ b/include/types.h @@ -410,6 +410,7 @@ typedef enum opts_type OPTS_TYPE_PT_ADD06 = (1ULL << 40), OPTS_TYPE_KEYBOARD_MAPPING = (1ULL << 41), OPTS_TYPE_DEEP_COMP_KERNEL = (1ULL << 42), // if we have to iterate through each hash inside the comp kernel, for example if each hash has to be decrypted separately + OPTS_TYPE_SUGGEST_KG = (1ULL << 43), // suggest keep guessing for modules the user maybe wants to use --keep-guessing } opts_type_t; diff --git a/src/interface.c b/src/interface.c index 95b305134..557a3c9ea 100644 --- a/src/interface.c +++ b/src/interface.c @@ -348,6 +348,18 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) { hashconfig->opts_type |= OPTS_TYPE_PT_NEVERCRACK; } + else + { + if ((hashconfig->opti_type & OPTS_TYPE_SUGGEST_KG) == 0) + { + if (user_options->quiet == false) + { + event_log_warning (hashcat_ctx, "This hash-mode is known to emit multiple valid password candidates for the same hash."); + event_log_warning (hashcat_ctx, "Use --keep-guessing to prevent hashcat from shutdown after the hash has been cracked."); + event_log_warning (hashcat_ctx, NULL); + } + } + } hashconfig->has_optimized_kernel = false; hashconfig->has_pure_kernel = false; diff --git a/src/modules/module_09720.c b/src/modules/module_09720.c index b37c540a7..738412031 100644 --- a/src/modules/module_09720.c +++ b/src/modules/module_09720.c @@ -25,7 +25,7 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_PT_ADD80 | OPTS_TYPE_PT_UTF16LE - | OPTS_TYPE_PT_NEVERCRACK; + | OPTS_TYPE_SUGGEST_KG; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; static const char *ST_HASH = "$oldoffice$0*55045061647456688860411218030058*e7e24d163fbd743992d4b8892bf3f2f7*493410dbc832557d3fe1870ace8397e2:91b2e062b9"; diff --git a/src/modules/module_09820.c b/src/modules/module_09820.c index d64ea720c..9a7b555aa 100644 --- a/src/modules/module_09820.c +++ b/src/modules/module_09820.c @@ -25,7 +25,7 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_BE | OPTS_TYPE_PT_ADD80 | OPTS_TYPE_PT_UTF16LE - | OPTS_TYPE_PT_NEVERCRACK; + | OPTS_TYPE_SUGGEST_KG; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; static const char *ST_HASH = "$oldoffice$3*83328705222323020515404251156288*2855956a165ff6511bc7f4cd77b9e101*941861655e73a09c40f7b1e9dfd0c256ed285acd:b8f63619ca"; diff --git a/src/modules/module_14900.c b/src/modules/module_14900.c index f40afae56..f5a047936 100644 --- a/src/modules/module_14900.c +++ b/src/modules/module_14900.c @@ -21,7 +21,7 @@ static const char *HASH_NAME = "Skip32 (PT = $salt, key = $pass)"; static const u64 KERN_TYPE = 14900; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE - | OPTS_TYPE_PT_NEVERCRACK; + | OPTS_TYPE_SUGGEST_KG; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat!!!"; static const char *ST_HASH = "7090b6b9:04223875"; diff --git a/src/modules/module_18100.c b/src/modules/module_18100.c index 9acac9945..a7c9a6b71 100644 --- a/src/modules/module_18100.c +++ b/src/modules/module_18100.c @@ -25,7 +25,7 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_BE | OPTS_TYPE_PT_ADD80 | OPTS_TYPE_PT_ADDBITS15 - | OPTS_TYPE_PT_NEVERCRACK; + | OPTS_TYPE_SUGGEST_KG; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; static const char *ST_PASS = "hashcat"; static const char *ST_HASH = "597056:3600";