diff --git a/src/interface_migrate.c b/src/interface_migrate.c index 65907dec6..973aab98a 100644 --- a/src/interface_migrate.c +++ b/src/interface_migrate.c @@ -14,7 +14,6 @@ " 6900 | GOST R 34.11-94 | Raw Hash", " 11700 | GOST R 34.11-2012 (Streebog) 256-bit, big-endian | Raw Hash", " 11800 | GOST R 34.11-2012 (Streebog) 512-bit, big-endian | Raw Hash", - " 20 | md5($salt.$pass) | Raw Hash, Salted and/or Iterated", " 30 | md5(utf16le($pass).$salt) | Raw Hash, Salted and/or Iterated", " 40 | md5($salt.utf16le($pass)) | Raw Hash, Salted and/or Iterated", " 3800 | md5($salt.$pass.$salt) | Raw Hash, Salted and/or Iterated", @@ -278,7 +277,6 @@ static const char *ST_PASS_HEX_16801 = "5b13d4babb3714ccc62c9f71864bc984efd6 */ static const char *ST_HASH_00012 = "93a8cf6a7d43e3b5bcd2dc6abb3e02c6:27032153220030464358344758762807"; -static const char *ST_HASH_00020 = "57ab8499d08c59a7211c77f557bf9425:4247"; static const char *ST_HASH_00021 = "e983672a03adcc9767b24584338eb378:00"; static const char *ST_HASH_00022 = "nKjiFErqK7TPcZdFZsZMNWPtw4Pv8n:26506173"; static const char *ST_HASH_00023 = "d04d74780881019341915c70d914db29:0675841"; @@ -511,7 +509,6 @@ static const char *ST_HASH_18300 = "$fvde$2$16$58778104701476542047675521040224$ static const char *ST_HASH_99999 = "hashcat"; -static const char *HT_00020 = "md5($salt.$pass)"; static const char *HT_00030 = "md5(utf16le($pass).$salt)"; static const char *HT_00040 = "md5($salt.utf16le($pass))"; static const char *HT_00050 = "HMAC-MD5 (key = $pass)"; @@ -21575,30 +21572,6 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) hashconfig->st_pass = ST_PASS_HASHCAT_PLAIN; break; - case 20: hashconfig->hash_type = HASH_TYPE_MD5; - hashconfig->salt_type = SALT_TYPE_GENERIC; - hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL; - hashconfig->opts_type = OPTS_TYPE_PT_GENERATE_LE - | OPTS_TYPE_PT_ADD80 - | OPTS_TYPE_PT_ADDBITS14; - hashconfig->kern_type = KERN_TYPE_MD5_SLTPW; - hashconfig->dgst_size = DGST_SIZE_4_4; - hashconfig->parse_func = md5s_parse_hash; - hashconfig->opti_type = OPTI_TYPE_ZERO_BYTE - | OPTI_TYPE_PRECOMPUTE_INIT - | OPTI_TYPE_PRECOMPUTE_MERKLE - | OPTI_TYPE_EARLY_SKIP - | OPTI_TYPE_NOT_ITERATED - | OPTI_TYPE_PREPENDED_SALT - | OPTI_TYPE_RAW_HASH; - hashconfig->dgst_pos0 = 0; - hashconfig->dgst_pos1 = 3; - hashconfig->dgst_pos2 = 2; - hashconfig->dgst_pos3 = 1; - hashconfig->st_hash = ST_HASH_00020; - hashconfig->st_pass = ST_PASS_HASHCAT_PLAIN; - break; - case 21: hashconfig->hash_type = HASH_TYPE_MD5; hashconfig->salt_type = SALT_TYPE_GENERIC; hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL; diff --git a/src/modules/module_00020.c b/src/modules/module_00020.c index 2069862b3..43d14ea43 100644 --- a/src/modules/module_00020.c +++ b/src/modules/module_00020.c @@ -17,7 +17,7 @@ static const u32 DGST_POS2 = 2; static const u32 DGST_POS3 = 1; static const u32 DGST_SIZE = DGST_SIZE_4_4; static const u32 HASH_CATEGORY = HASH_CATEGORY_RAW_HASH_SALTED; -static const char *HASH_NAME = "md5($salt.$pass"; +static const char *HASH_NAME = "md5($salt.$pass)"; static const u32 HASH_TYPE = HASH_TYPE_MD5; static const u64 KERN_TYPE = 20; static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE @@ -27,7 +27,8 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE | OPTI_TYPE_NOT_ITERATED | OPTI_TYPE_PREPENDED_SALT | OPTI_TYPE_RAW_HASH; -static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE +static const u64 OPTS_TYPE = OPTS_TYPE_STATE_BUFFER_LE + | OPTS_TYPE_PT_GENERATE_LE | OPTS_TYPE_PT_ADD80 | OPTS_TYPE_PT_ADDBITS14; static const u32 SALT_TYPE = SALT_TYPE_GENERIC; @@ -52,9 +53,7 @@ const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { - u32 *digest = (u32 *) hash_buf->digest; - - salt_t *salt = hash_buf->salt; + u32 *digest = (u32 *) digest_buf; token_t token; @@ -78,7 +77,7 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE token.attr[1] |= TOKEN_ATTR_VERIFY_HEX; } - const int rc_tokenizer = input_tokenizer (input_buf, input_len, &token); + const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token); if (rc_tokenizer != PARSER_OK) return (rc_tokenizer); @@ -89,13 +88,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE digest[2] = hex_to_u32 (hash_pos + 16); digest[3] = hex_to_u32 (hash_pos + 24); - if (hashconfig->opti_type & OPTI_TYPE_PRECOMPUTE_MERKLE) - { - digest[0] -= MD5M_A; - digest[1] -= MD5M_B; - digest[2] -= MD5M_C; - digest[3] -= MD5M_D; - } + decoder_apply_options (hashconfig, digest); + + decoder_apply_optimizer (hashconfig, digest); const u8 *salt_pos = token.buf[1]; const int salt_len = token.len[1]; @@ -104,13 +99,6 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE if (parse_rc == false) return (PARSER_SALT_LENGTH); - if (hashconfig->opts_type & OPTS_TYPE_ST_HASH_MD5) - { - // precompute md5 of the salt - - precompute_salt_md5 (salt->salt_buf, salt->salt_len, (u8 *) salt->salt_buf_pc); - } - return (PARSER_OK); }