From 10d9918bb19958285fe6d1618c3f5fd8a8225d08 Mon Sep 17 00:00:00 2001 From: jsteube Date: Wed, 19 Jul 2017 12:35:54 +0200 Subject: [PATCH] Remove password minimum length for -m 112 and -m 3100 --- src/interface.c | 4 ++-- tools/test.pl | 45 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/interface.c b/src/interface.c index 16f833aa7..df16dcd05 100644 --- a/src/interface.c +++ b/src/interface.c @@ -266,6 +266,7 @@ static char ST_HASH_15600[] = "$ethereum$p*1024*38353131353831333338313138363430 static char ST_HASH_15700[] = "$ethereum$s*1024*1*1*3033363133373132373638333437323331383637383437333631373038323434*69eaf081695cf971ef7ee5a49997c1a3922e7efef59068109e83853755ee31c3*64a1adec1750ee4416b22b81111dd2a3c2fede820d6da8bf788dca2641d5b181"; static char ST_HASH_99999[] = "hashcat"; +static const char OPTI_STR_OPTIMIZED_KERNEL[] = "Optimized-Kernel"; static const char OPTI_STR_ZERO_BYTE[] = "Zero-Byte"; static const char OPTI_STR_PRECOMPUTE_INIT[] = "Precompute-Init"; static const char OPTI_STR_PRECOMPUTE_MERKLE[] = "Precompute-Merkle-Demgard"; @@ -15759,6 +15760,7 @@ char *stroptitype (const u32 opti_type) { switch (opti_type) { + case OPTI_TYPE_OPTIMIZED_KERNEL: return ((char *) OPTI_STR_OPTIMIZED_KERNEL); case OPTI_TYPE_ZERO_BYTE: return ((char *) OPTI_STR_ZERO_BYTE); case OPTI_TYPE_PRECOMPUTE_INIT: return ((char *) OPTI_STR_PRECOMPUTE_INIT); case OPTI_TYPE_PRECOMPUTE_MERKLE: return ((char *) OPTI_STR_PRECOMPUTE_MERKLE); @@ -24578,13 +24580,11 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) switch (hashconfig->hash_mode) { - case 112: hashconfig->pw_min = 8; break; // https://www.toadworld.com/platforms/oracle/b/weblog/archive/2013/11/12/oracle-12c-passwords case 2500: hashconfig->pw_min = 8; break; // WPA min RFC case 2501: hashconfig->pw_min = 64; break; // WPA PMK fixed case 9710: hashconfig->pw_min = 5; break; // RC4-40 fixed case 9810: hashconfig->pw_min = 5; break; // RC4-40 fixed case 10410: hashconfig->pw_min = 5; break; // RC4-40 fixed - case 12300: hashconfig->pw_min = 9; break; // https://www.toadworld.com/platforms/oracle/b/weblog/archive/2013/11/12/oracle-12c-passwords case 14000: hashconfig->pw_min = 8; break; // DES fixed case 14100: hashconfig->pw_min = 24; break; // 3DES fixed case 14900: hashconfig->pw_min = 10; break; // Skip32 fixed diff --git a/tools/test.pl b/tools/test.pl index ee8cebf21..a4608915e 100755 --- a/tools/test.pl +++ b/tools/test.pl @@ -3277,7 +3277,7 @@ sub passthrough my $tmp_hash; - if ($mode == 0 || $mode == 100 || $mode == 101 || $mode == 133 || $mode == 200 || $mode == 300 || $mode == 600 || $mode == 900 || $mode == 1000 || $mode == 1300 || $mode == 1400 || $mode == 1700 || $mode == 2400 || $mode == 2600 || $mode == 3500 || $mode == 4300 || $mode == 4400 || $mode == 4500 || $mode == 4600 || $mode == 4700 || $mode == 5000 || $mode == 5100 || $mode == 6000 || $mode == 6100 || $mode == 6900 || $mode == 5700 || $mode == 9900 || $mode == 10800 || $mode == 11500 || $mode == 13300 || $mode == 15400 || $mode == 99999) + if ($mode == 0 || $mode == 100 || $mode == 101 || $mode == 133 || $mode == 200 || $mode == 300 || $mode == 600 || $mode == 900 || $mode == 1000 || $mode == 1300 || $mode == 1400 || $mode == 1700 || $mode == 2400 || $mode == 2600 || $mode == 3500 || $mode == 4300 || $mode == 4400 || $mode == 4500 || $mode == 4600 || $mode == 4700 || $mode == 5000 || $mode == 5100 || $mode == 6000 || $mode == 6100 || $mode == 6900 || $mode == 5700 || $mode == 9900 || $mode == 10800 || $mode == 11500 || $mode == 13300 || $mode == 99999) { $tmp_hash = gen_hash ($mode, $word_buf, ""); } @@ -3287,7 +3287,7 @@ sub passthrough $tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, $salt_len)); } - elsif ($mode == 11 || $mode == 12 || $mode == 12300) + elsif ($mode == 11 || $mode == 12) { $tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 32)); } @@ -3307,6 +3307,8 @@ sub passthrough } elsif ($mode == 112) { + next if length ($word_buf) > 30; + $tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 20)); } elsif ($mode == 121) @@ -3391,6 +3393,8 @@ sub passthrough } elsif ($mode == 3100) { + next if length ($word_buf) > 30; + $tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 10)); } elsif ($mode == 3200 || $mode == 5800 || $mode == 6400 || $mode == 6500 || $mode == 6700 || $mode == 7400 || $mode == 3300 || $mode == 8000 || $mode == 9100 || $mode == 12001 || $mode == 12200 || $mode == 15600) @@ -3616,6 +3620,10 @@ sub passthrough $tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, $salt_len)); } + elsif ($mode == 12300) + { + $tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 32)); + } elsif ($mode == 12400) { $tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 4)); @@ -3718,6 +3726,12 @@ sub passthrough $tmp_hash = gen_hash ($mode, $word_buf, $salt_buf); } + elsif ($mode == 15400) + { + next if length ($word_buf) != 32; + + $tmp_hash = gen_hash ($mode, $word_buf, ""); + } elsif ($mode == 15500) { $tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 40)); @@ -3776,7 +3790,7 @@ sub single } } } - elsif ($mode == 11 || $mode == 12 || $mode == 12300) + elsif ($mode == 11 || $mode == 12) { for (my $i = 1; $i < 32; $i++) { @@ -3820,7 +3834,7 @@ sub single } elsif ($mode == 112) { - for (my $i = 1; $i < 32; $i++) + for (my $i = 1; $i < 31; $i++) { if ($len != 0) { @@ -3898,8 +3912,6 @@ sub single for (my $i = 8; $i < 16; $i++) { - my $generate_from_len = 0; - if ($len != 0) { if ($len < 8) @@ -3989,7 +4001,7 @@ sub single } elsif ($mode == 3100) { - for (my $i = 1; $i < 32; $i++) + for (my $i = 1; $i < 31; $i++) { if ($len != 0) { @@ -4423,6 +4435,20 @@ sub single } } } + elsif ($mode == 12300) + { + for (my $i = 1; $i < 32; $i++) + { + if ($len != 0) + { + rnd ($mode, $len, 32); + } + else + { + rnd ($mode, $i, 32); + } + } + } elsif ($mode == 12400) { for (my $i = 1; $i < 32; $i++) @@ -4629,10 +4655,7 @@ sub single } elsif ($mode == 14900) { - for (my $i = 1; $i < 8; $i++) - { - rnd ($mode, 10, 8); - } + rnd ($mode, 10, 8); } elsif ($mode == 15100) {