From 69dad31a294f98d1f198d5140cc6f7d7c3a1f335 Mon Sep 17 00:00:00 2001 From: DoZ10 Date: Thu, 13 Apr 2017 20:45:48 -0400 Subject: [PATCH] fix: changed -m 6200 -> 600 --- OpenCL/{m06200_a3.cl => m00600_a3.cl} | 0 b2test.sh | 2 +- include/interface.h | 6 ++-- src/interface.c | 42 +++++++++++++-------------- src/usage.c | 2 +- 5 files changed, 25 insertions(+), 27 deletions(-) rename OpenCL/{m06200_a3.cl => m00600_a3.cl} (100%) diff --git a/OpenCL/m06200_a3.cl b/OpenCL/m00600_a3.cl similarity index 100% rename from OpenCL/m06200_a3.cl rename to OpenCL/m00600_a3.cl diff --git a/b2test.sh b/b2test.sh index d87ac2c91..e09a03a3b 100755 --- a/b2test.sh +++ b/b2test.sh @@ -1 +1 @@ -./hashcat -m 6200 -a 3 ?d?d?d?d?d?d b2test.hash +./hashcat -m 600 -a 3 ?d?d?d?d?d?d b2test.hash diff --git a/include/interface.h b/include/interface.h index a13681b01..e2b76a99e 100644 --- a/include/interface.h +++ b/include/interface.h @@ -910,6 +910,8 @@ typedef enum display_len DISPLAY_LEN_MIN_501 = 104, DISPLAY_LEN_MAX_500 = 3 + 1 + 8 + 22, DISPLAY_LEN_MAX_501 = 104, + DISPLAY_LEN_MIN_600 = 128, + DISPLAY_LEN_MAX_600 = 128, DISPLAY_LEN_MIN_900 = 32, DISPLAY_LEN_MAX_900 = 32, DISPLAY_LEN_MIN_910 = 32 + 1 + 0, @@ -1016,8 +1018,6 @@ typedef enum display_len DISPLAY_LEN_MAX_6000 = 40, DISPLAY_LEN_MIN_6100 = 128, DISPLAY_LEN_MAX_6100 = 128, - DISPLAY_LEN_MIN_6200 = 128, - DISPLAY_LEN_MAX_6200 = 128, DISPLAY_LEN_MIN_6300 = 6 + 1 + 8 + 22, DISPLAY_LEN_MAX_6300 = 6 + 1 + 48 + 22, DISPLAY_LEN_MIN_6400 = 9 + 2 + 1 + 16 + 1 + 43, @@ -1350,6 +1350,7 @@ typedef enum kern_type KERN_TYPE_MYSQL41 = 300, KERN_TYPE_PHPASS = 400, KERN_TYPE_MD5CRYPT = 500, + KERN_TYPE_BLAKE2B = 600, KERN_TYPE_MD4 = 900, KERN_TYPE_MD4_PWU = 1000, KERN_TYPE_MD44_PWUSLT = 1100, @@ -1406,7 +1407,6 @@ typedef enum kern_type KERN_TYPE_ANDROIDPIN = 5800, KERN_TYPE_RIPEMD160 = 6000, KERN_TYPE_WHIRLPOOL = 6100, - KERN_TYPE_BLAKE2B = 6200, KERN_TYPE_TCRIPEMD160_XTS512 = 6211, KERN_TYPE_TCRIPEMD160_XTS1024 = 6212, KERN_TYPE_TCRIPEMD160_XTS1536 = 6213, diff --git a/src/interface.c b/src/interface.c index 9499c75fc..078fb1a53 100644 --- a/src/interface.c +++ b/src/interface.c @@ -95,6 +95,7 @@ static const char HT_00300[] = "MySQL4.1/MySQL5"; static const char HT_00400[] = "phpass, WordPress (MD5), phpBB3 (MD5), Joomla (MD5)"; static const char HT_00500[] = "md5crypt, MD5 (Unix), Cisco-IOS $1$ (MD5)"; static const char HT_00501[] = "Juniper IVE"; +static const char HT_00600[] = "Blake2b"; static const char HT_00900[] = "MD4"; static const char HT_01000[] = "NTLM"; static const char HT_01100[] = "Domain Cached Credentials (DCC), MS Cache"; @@ -148,7 +149,6 @@ static const char HT_05700[] = "Cisco-IOS type 4 (SHA256)"; static const char HT_05800[] = "Samsung Android Password/PIN"; static const char HT_06000[] = "RIPEMD-160"; static const char HT_06100[] = "Whirlpool"; -static const char HT_06200[] = "Blake2b"; static const char HT_06300[] = "AIX {smd5}"; static const char HT_06400[] = "AIX {ssha256}"; static const char HT_06500[] = "AIX {ssha512}"; @@ -5263,7 +5263,7 @@ int keccak_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNU int blake2b_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig) { - if ((input_len < DISPLAY_LEN_MIN_6200) || (input_len > DISPLAY_LEN_MAX_6200)) return (PARSER_GLOBAL_LENGTH); + if ((input_len < DISPLAY_LEN_MIN_600) || (input_len > DISPLAY_LEN_MAX_600)) return (PARSER_GLOBAL_LENGTH); if (input_len % 16) return (PARSER_GLOBAL_LENGTH); @@ -14919,6 +14919,7 @@ char *strhashtype (const u32 hash_mode) case 400: return ((char *) HT_00400); case 500: return ((char *) HT_00500); case 501: return ((char *) HT_00501); + case 600: return ((char *) HT_00600); case 900: return ((char *) HT_00900); case 1000: return ((char *) HT_01000); case 1100: return ((char *) HT_01100); @@ -14984,7 +14985,6 @@ char *strhashtype (const u32 hash_mode) case 5800: return ((char *) HT_05800); case 6000: return ((char *) HT_06000); case 6100: return ((char *) HT_06100); - case 6200: return ((char *) HT_06200); case 6211: return ((char *) HT_06211); case 6212: return ((char *) HT_06212); case 6213: return ((char *) HT_06213); @@ -19255,6 +19255,23 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) hashconfig->dgst_pos3 = 3; break; + case 600: hashconfig->hash_type = HASH_TYPE_BLAKE2B; + hashconfig->salt_type = SALT_TYPE_EMBEDDED; + hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL; + hashconfig->opts_type = OPTS_TYPE_PT_GENERATE_LE + | OPTS_TYPE_PT_ADD01; + hashconfig->kern_type = KERN_TYPE_BLAKE2B; + hashconfig->dgst_size = DGST_SIZE_8_25; + hashconfig->parse_func = blake2b_parse_hash; + hashconfig->opti_type = OPTI_TYPE_ZERO_BYTE + | OPTI_TYPE_USES_BITS_64 + | OPTI_TYPE_RAW_HASH; + hashconfig->dgst_pos0 = 2; + hashconfig->dgst_pos1 = 3; + hashconfig->dgst_pos2 = 4; + hashconfig->dgst_pos3 = 5; + break; + case 900: hashconfig->hash_type = HASH_TYPE_MD4; hashconfig->salt_type = SALT_TYPE_NONE; hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL; @@ -20539,23 +20556,6 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) hashconfig->dgst_pos3 = 3; break; - case 6200: hashconfig->hash_type = HASH_TYPE_BLAKE2B; - hashconfig->salt_type = SALT_TYPE_EMBEDDED; - hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL; - hashconfig->opts_type = OPTS_TYPE_PT_GENERATE_LE - | OPTS_TYPE_PT_ADD01; - hashconfig->kern_type = KERN_TYPE_BLAKE2B; - hashconfig->dgst_size = DGST_SIZE_8_25; - hashconfig->parse_func = blake2b_parse_hash; - hashconfig->opti_type = OPTI_TYPE_ZERO_BYTE - | OPTI_TYPE_USES_BITS_64 - | OPTI_TYPE_RAW_HASH; - hashconfig->dgst_pos0 = 2; - hashconfig->dgst_pos1 = 3; - hashconfig->dgst_pos2 = 4; - hashconfig->dgst_pos3 = 5; - break; - case 6211: hashconfig->hash_type = HASH_TYPE_RIPEMD160; hashconfig->salt_type = SALT_TYPE_EMBEDDED; hashconfig->attack_exec = ATTACK_EXEC_OUTSIDE_KERNEL; @@ -23001,8 +23001,6 @@ void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, vo break; case 5800: salt->salt_len = 16; break; - case 6200: salt->salt_len = 16; - break; case 6800: salt->salt_len = 32; break; case 8400: salt->salt_len = 40; diff --git a/src/usage.c b/src/usage.c index 2429f21f1..10f1fbf38 100644 --- a/src/usage.c +++ b/src/usage.c @@ -123,7 +123,7 @@ static const char *USAGE_BIG[] = " 10800 | SHA-384 | Raw Hash", " 1700 | SHA-512 | Raw Hash", " 5000 | SHA-3 (Keccak) | Raw Hash", - " 6200 | BLAKE2B | Raw Hash", + " 600 | Blake2b | Raw Hash", " 10100 | SipHash | Raw Hash", " 6000 | RIPEMD-160 | Raw Hash", " 6100 | Whirlpool | Raw Hash",