1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 08:08:10 +00:00

fixes #928: new mode -m 1411 = SSHA-256(Base64), LDAP {SSHA256}

This commit is contained in:
philsmd 2017-01-31 12:40:43 +01:00
parent 16beac5b07
commit ed74ce1aca
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF
8 changed files with 142 additions and 6 deletions

View File

@ -11,6 +11,7 @@
## Algorithms ## Algorithms
## ##
- Added hash-mode 1411 = SSHA-256(Base64), LDAP {SSHA256}
- Added hash-mode 4520 = sha1($salt.sha1($pass)) - Added hash-mode 4520 = sha1($salt.sha1($pass))
- Added hash-mode 4522 = PunBB - Added hash-mode 4522 = PunBB
- Added hash-mode 7000 = Fortigate (FortiOS) - Added hash-mode 7000 = Fortigate (FortiOS)

View File

@ -176,7 +176,7 @@ _hashcat ()
{ {
local VERSION=3.30 local VERSION=3.30
local HASH_MODES="0 10 11 12 20 21 22 23 30 40 50 60 100 101 110 111 112 120 121 122 124 130 131 132 133 140 141 150 160 200 300 400 500 501 900 1000 1100 1400 1410 1420 1421 1430 1440 1441 1450 1460 1500 1600 1700 1710 1711 1720 1722 1730 1731 1740 1750 1760 1800 2100 2400 2410 2500 2600 2611 2612 2711 2811 3000 3100 3200 3710 3711 3800 4300 4400 4500 4520 4521 4522 4700 4800 4900 5000 5100 5200 5300 5400 5500 5600 5700 5800 6000 6100 6211 6212 6213 6221 6222 6223 6231 6232 6233 6241 6242 6243 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200 7300 7400 7500 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 9100 9200 9300 9400 9500 9600 9700 9710 9720 9800 9810 9820 9900 10000 10100 10200 10300 10400 10410 10420 10500 10600 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11700 11800 11900 12000 12100 12200 12300 12400 12500 12600 12700 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 13900 14000 14100 14700 14800 14900" local HASH_MODES="0 10 11 12 20 21 22 23 30 40 50 60 100 101 110 111 112 120 121 122 124 130 131 132 133 140 141 150 160 200 300 400 500 501 900 1000 1100 1400 1410 1411 1420 1421 1430 1440 1441 1450 1460 1500 1600 1700 1710 1711 1720 1722 1730 1731 1740 1750 1760 1800 2100 2400 2410 2500 2600 2611 2612 2711 2811 3000 3100 3200 3710 3711 3800 4300 4400 4500 4520 4521 4522 4700 4800 4900 5000 5100 5200 5300 5400 5500 5600 5700 5800 6000 6100 6211 6212 6213 6221 6222 6223 6231 6232 6233 6241 6242 6243 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200 7300 7400 7500 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 9100 9200 9300 9400 9500 9600 9700 9710 9720 9800 9810 9820 9900 10000 10100 10200 10300 10400 10410 10420 10500 10600 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11700 11800 11900 12000 12100 12200 12300 12400 12500 12600 12700 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 13900 14000 14100 14700 14800 14900"
local ATTACK_MODES="0 1 3 6 7" local ATTACK_MODES="0 1 3 6 7"
local OUTFILE_FORMATS="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" local OUTFILE_FORMATS="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
local OPENCL_DEVICE_TYPES="1 2 3" local OPENCL_DEVICE_TYPES="1 2 3"

View File

@ -1187,6 +1187,8 @@ typedef enum display_len
DISPLAY_LEN_MAX_133 = 28, DISPLAY_LEN_MAX_133 = 28,
DISPLAY_LEN_MIN_141 = 14 + 0 + 1 + 28, DISPLAY_LEN_MIN_141 = 14 + 0 + 1 + 28,
DISPLAY_LEN_MAX_141 = 14 + 44 + 1 + 28, DISPLAY_LEN_MAX_141 = 14 + 44 + 1 + 28,
DISPLAY_LEN_MIN_1411 = 9 + 44 + 0,
DISPLAY_LEN_MAX_1411 = 9 + 44 + 68,
DISPLAY_LEN_MIN_1441 = 14 + 0 + 1 + 43, DISPLAY_LEN_MIN_1441 = 14 + 0 + 1 + 43,
DISPLAY_LEN_MAX_1441 = 14 + 24 + 1 + 43, DISPLAY_LEN_MAX_1441 = 14 + 24 + 1 + 43,
DISPLAY_LEN_MIN_1711 = 9 + 86 + 0, DISPLAY_LEN_MIN_1711 = 9 + 86 + 0,
@ -1698,6 +1700,7 @@ int luks_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_bu
int itunes_backup_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig); int itunes_backup_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int skip32_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig); int skip32_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int fortigate_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig); int fortigate_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int sha256b64s_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
/** /**
* hook functions * hook functions

View File

@ -6,7 +6,7 @@
#include "common.h" #include "common.h"
#include "benchmark.h" #include "benchmark.h"
const unsigned int DEFAULT_BENCHMARK_ALGORITHMS_CNT = 148; const unsigned int DEFAULT_BENCHMARK_ALGORITHMS_CNT = 149;
const unsigned int DEFAULT_BENCHMARK_ALGORITHMS_BUF[] = const unsigned int DEFAULT_BENCHMARK_ALGORITHMS_BUF[] =
{ {
@ -79,6 +79,7 @@ const unsigned int DEFAULT_BENCHMARK_ALGORITHMS_BUF[] =
1421, 1421,
101, 101,
111, 111,
1411,
1711, 1711,
3000, 3000,
1000, 1000,

View File

@ -249,6 +249,7 @@ static const char HT_00131[] = "MSSQL(2000)";
static const char HT_00132[] = "MSSQL(2005)"; static const char HT_00132[] = "MSSQL(2005)";
static const char HT_00133[] = "PeopleSoft"; static const char HT_00133[] = "PeopleSoft";
static const char HT_00141[] = "EPiServer 6.x < v4"; static const char HT_00141[] = "EPiServer 6.x < v4";
static const char HT_01411[] = "SSHA-256(Base64), LDAP {SSHA256}";
static const char HT_01421[] = "hMailServer"; static const char HT_01421[] = "hMailServer";
static const char HT_01441[] = "EPiServer 6.x > v4"; static const char HT_01441[] = "EPiServer 6.x > v4";
static const char HT_01711[] = "SSHA-512(Base64), LDAP {SSHA512}"; static const char HT_01711[] = "SSHA-512(Base64), LDAP {SSHA512}";
@ -349,6 +350,7 @@ static const char SIGNATURE_SEVEN_ZIP[] = "$7z$";
static const char SIGNATURE_SHA1AIX[] = "{ssha1}"; static const char SIGNATURE_SHA1AIX[] = "{ssha1}";
static const char SIGNATURE_SHA1B64[] = "{SHA}"; static const char SIGNATURE_SHA1B64[] = "{SHA}";
static const char SIGNATURE_SHA256AIX[] = "{ssha256}"; static const char SIGNATURE_SHA256AIX[] = "{ssha256}";
static const char SIGNATURE_SHA256B64S[] = "{SSHA256}";
static const char SIGNATURE_SHA256CRYPT[] = "$5$"; static const char SIGNATURE_SHA256CRYPT[] = "$5$";
static const char SIGNATURE_SHA512AIX[] = "{ssha512}"; static const char SIGNATURE_SHA512AIX[] = "{ssha512}";
static const char SIGNATURE_SHA512B64S[] = "{SSHA512}"; static const char SIGNATURE_SHA512B64S[] = "{SSHA512}";
@ -13923,6 +13925,58 @@ int fortigate_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_
return (PARSER_OK); return (PARSER_OK);
} }
int sha256b64s_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig)
{
if ((input_len < DISPLAY_LEN_MIN_1411) || (input_len > DISPLAY_LEN_MAX_1411)) return (PARSER_GLOBAL_LENGTH);
if (memcmp (SIGNATURE_SHA256B64S, input_buf, 9)) return (PARSER_SIGNATURE_UNMATCHED);
u32 *digest = (u32 *) hash_buf->digest;
salt_t *salt = hash_buf->salt;
u8 tmp_buf[120] = { 0 };
const int tmp_len = base64_decode (base64_to_int, (const u8 *) input_buf + 9, input_len - 9, tmp_buf);
if (tmp_len < 32) return (PARSER_HASH_LENGTH);
memcpy (digest, tmp_buf, 32);
digest[0] = byte_swap_32 (digest[0]);
digest[1] = byte_swap_32 (digest[1]);
digest[2] = byte_swap_32 (digest[2]);
digest[3] = byte_swap_32 (digest[3]);
digest[4] = byte_swap_32 (digest[4]);
digest[5] = byte_swap_32 (digest[5]);
digest[6] = byte_swap_32 (digest[6]);
digest[7] = byte_swap_32 (digest[7]);
digest[0] -= SHA256M_A;
digest[1] -= SHA256M_B;
digest[2] -= SHA256M_C;
digest[3] -= SHA256M_D;
digest[4] -= SHA256M_E;
digest[5] -= SHA256M_F;
digest[6] -= SHA256M_G;
digest[7] -= SHA256M_H;
const int salt_len = tmp_len - 32;
salt->salt_len = salt_len;
memcpy (salt->salt_buf, tmp_buf + 32, salt->salt_len);
if (hashconfig->opts_type & OPTS_TYPE_ST_ADD80)
{
u8 *ptr = (u8 *) salt->salt_buf;
ptr[salt->salt_len] = 0x80;
}
return (PARSER_OK);
}
/** /**
* hook functions * hook functions
*/ */
@ -14339,6 +14393,7 @@ char *strhashtype (const u32 hash_mode)
case 1300: return ((char *) HT_01300); case 1300: return ((char *) HT_01300);
case 1400: return ((char *) HT_01400); case 1400: return ((char *) HT_01400);
case 1410: return ((char *) HT_01410); case 1410: return ((char *) HT_01410);
case 1411: return ((char *) HT_01411);
case 1420: return ((char *) HT_01420); case 1420: return ((char *) HT_01420);
case 1421: return ((char *) HT_01421); case 1421: return ((char *) HT_01421);
case 1430: return ((char *) HT_01430); case 1430: return ((char *) HT_01430);
@ -15148,6 +15203,26 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const size_t out_le
snprintf (out_buf, out_len - 1, "%s", hash_buf); snprintf (out_buf, out_len - 1, "%s", hash_buf);
} }
else if (hash_mode == 1411)
{
// the encoder is a bit too intelligent, it expects the input data in the wrong BOM
digest_buf[0] = byte_swap_32 (digest_buf[0]);
digest_buf[1] = byte_swap_32 (digest_buf[1]);
digest_buf[2] = byte_swap_32 (digest_buf[2]);
digest_buf[3] = byte_swap_32 (digest_buf[3]);
digest_buf[4] = byte_swap_32 (digest_buf[4]);
digest_buf[5] = byte_swap_32 (digest_buf[5]);
digest_buf[6] = byte_swap_32 (digest_buf[6]);
digest_buf[7] = byte_swap_32 (digest_buf[7]);
memcpy (tmp_buf, digest_buf, 32);
memcpy (tmp_buf + 32, salt.salt_buf, salt.salt_len);
base64_encode (int_to_base64, (const u8 *) tmp_buf, 32 + salt.salt_len, (u8 *) ptr_plain);
snprintf (out_buf, out_len - 1, "%s%s", SIGNATURE_SHA256B64S, ptr_plain);
}
else if (hash_mode == 1421) else if (hash_mode == 1421)
{ {
u8 *salt_ptr = (u8 *) salt.salt_buf; u8 *salt_ptr = (u8 *) salt.salt_buf;
@ -18727,6 +18802,28 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
hashconfig->dgst_pos3 = 6; hashconfig->dgst_pos3 = 6;
break; break;
case 1411: hashconfig->hash_type = HASH_TYPE_SHA256;
hashconfig->salt_type = SALT_TYPE_EMBEDDED;
hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL;
hashconfig->opts_type = OPTS_TYPE_PT_GENERATE_BE
| OPTS_TYPE_ST_ADD80
| OPTS_TYPE_ST_ADDBITS15;
hashconfig->kern_type = KERN_TYPE_SHA256_PWSLT;
hashconfig->dgst_size = DGST_SIZE_4_8;
hashconfig->parse_func = sha256b64s_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_APPENDED_SALT
| OPTI_TYPE_RAW_HASH;
hashconfig->dgst_pos0 = 3;
hashconfig->dgst_pos1 = 7;
hashconfig->dgst_pos2 = 2;
hashconfig->dgst_pos3 = 6;
break;
case 1420: hashconfig->hash_type = HASH_TYPE_SHA256; case 1420: hashconfig->hash_type = HASH_TYPE_SHA256;
hashconfig->salt_type = SALT_TYPE_INTERN; hashconfig->salt_type = SALT_TYPE_INTERN;
hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL; hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL;

View File

@ -225,6 +225,7 @@ static const char *USAGE_BIG[] =
" 1421 | hMailServer | HTTP, SMTP, LDAP Server", " 1421 | hMailServer | HTTP, SMTP, LDAP Server",
" 101 | nsldap, SHA-1(Base64), Netscape LDAP SHA | HTTP, SMTP, LDAP Server", " 101 | nsldap, SHA-1(Base64), Netscape LDAP SHA | HTTP, SMTP, LDAP Server",
" 111 | nsldaps, SSHA-1(Base64), Netscape LDAP SSHA | HTTP, SMTP, LDAP Server", " 111 | nsldaps, SSHA-1(Base64), Netscape LDAP SSHA | HTTP, SMTP, LDAP Server",
" 1411 | SSHA-256(Base64), LDAP {SSHA256} | HTTP, SMTP, LDAP Server",
" 1711 | SSHA-512(Base64), LDAP {SSHA512} | HTTP, SMTP, LDAP Server", " 1711 | SSHA-512(Base64), LDAP {SSHA512} | HTTP, SMTP, LDAP Server",
" 11500 | CRC32 | Checksums", " 11500 | CRC32 | Checksums",
" 3000 | LM | Operating-Systems", " 3000 | LM | Operating-Systems",

View File

@ -46,7 +46,7 @@ my $hashcat = "./hashcat";
my $MAX_LEN = 55; my $MAX_LEN = 55;
my @modes = (0, 10, 11, 12, 20, 21, 22, 23, 30, 40, 50, 60, 100, 101, 110, 111, 112, 120, 121, 122, 125, 130, 131, 132, 133, 140, 141, 150, 160, 200, 300, 400, 500, 900, 1000, 1100, 1300, 1400, 1410, 1420, 1430, 1440, 1441, 1450, 1460, 1500, 1600, 1700, 1710, 1711, 1720, 1730, 1740, 1722, 1731, 1750, 1760, 1800, 2100, 2400, 2410, 2500, 2600, 2611, 2612, 2711, 2811, 3000, 3100, 3200, 3710, 3711, 3300, 3500, 3610, 3720, 3800, 3910, 4010, 4110, 4210, 4300, 4400, 4500, 4520, 4521, 4522, 4600, 4700, 4800, 4900, 5000, 5100, 5300, 5400, 5500, 5600, 5700, 5800, 6000, 6100, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7000, 7100, 7200, 7300, 7400, 7500, 7700, 7800, 7900, 8000, 8100, 8200, 8300, 8400, 8500, 8600, 8700, 8900, 9100, 9200, 9300, 9400, 9500, 9600, 9700, 9800, 9900, 10000, 10100, 10200, 10300, 10400, 10500, 10600, 10700, 10800, 10900, 11000, 11100, 11200, 11300, 11400, 11500, 11600, 11900, 12000, 12100, 12200, 12300, 12400, 12600, 12700, 12800, 12900, 13000, 13100, 13200, 13300, 13400, 13500, 13600, 13800, 13900, 14000, 14100, 14400, 14700, 14800, 14900, 99999); my @modes = (0, 10, 11, 12, 20, 21, 22, 23, 30, 40, 50, 60, 100, 101, 110, 111, 112, 120, 121, 122, 125, 130, 131, 132, 133, 140, 141, 150, 160, 200, 300, 400, 500, 900, 1000, 1100, 1300, 1400, 1410, 1411, 1420, 1430, 1440, 1441, 1450, 1460, 1500, 1600, 1700, 1710, 1711, 1720, 1730, 1740, 1722, 1731, 1750, 1760, 1800, 2100, 2400, 2410, 2500, 2600, 2611, 2612, 2711, 2811, 3000, 3100, 3200, 3710, 3711, 3300, 3500, 3610, 3720, 3800, 3910, 4010, 4110, 4210, 4300, 4400, 4500, 4520, 4521, 4522, 4600, 4700, 4800, 4900, 5000, 5100, 5300, 5400, 5500, 5600, 5700, 5800, 6000, 6100, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7000, 7100, 7200, 7300, 7400, 7500, 7700, 7800, 7900, 8000, 8100, 8200, 8300, 8400, 8500, 8600, 8700, 8900, 9100, 9200, 9300, 9400, 9500, 9600, 9700, 9800, 9900, 10000, 10100, 10200, 10300, 10400, 10500, 10600, 10700, 10800, 10900, 11000, 11100, 11200, 11300, 11400, 11500, 11600, 11900, 12000, 12100, 12200, 12300, 12400, 12600, 12700, 12800, 12900, 13000, 13100, 13200, 13300, 13400, 13500, 13600, 13800, 13900, 14000, 14100, 14400, 14700, 14800, 14900, 99999);
my %is_unicode = map { $_ => 1 } qw(30 40 130 131 132 133 140 141 1000 1100 1430 1440 1441 1730 1740 1731 5500 5600 8000 9400 9500 9600 9700 9800 11600 13500 13800); my %is_unicode = map { $_ => 1 } qw(30 40 130 131 132 133 140 141 1000 1100 1430 1440 1441 1730 1740 1731 5500 5600 8000 9400 9500 9600 9700 9800 11600 13500 13800);
my %less_fifteen = map { $_ => 1 } qw(500 1600 1800 2400 2410 3200 6300 7400 10500 10700); my %less_fifteen = map { $_ => 1 } qw(500 1600 1800 2400 2410 3200 6300 7400 10500 10700);
@ -2429,6 +2429,8 @@ sub verify
{ {
($hash_in, $word) = split ":", $line; ($hash_in, $word) = split ":", $line;
next unless (exists ($db->{$hash_in}) and (! defined ($db->{$hash_in})));
my $index1 = index ($hash_in, '*'); my $index1 = index ($hash_in, '*');
next unless ($index1 == 15); next unless ($index1 == 15);
@ -2526,6 +2528,27 @@ sub verify
$param3 = $dpsl; $param3 = $dpsl;
} }
} }
# base64 and salt embedded SSHA256, salt length = total length - 32
elsif ($mode == 1411)
{
# split hash and plain
my $index = index ($line, ":");
next if $index < 1;
$hash_in = substr ($line, 0, $index);
$word = substr ($line, $index + 1);
next unless (exists ($db->{$hash_in}) and (! defined ($db->{$hash_in})));
# remove signature
my $plain_base64 = substr ($hash_in, 9);
# base64 decode to extract salt
my $decoded = decode_base64 ($plain_base64);
$salt = substr ($decoded, 32);
}
else else
{ {
print "ERROR: hash mode is not supported\n"; print "ERROR: hash mode is not supported\n";
@ -2926,7 +2949,7 @@ sub passthrough
{ {
$tmp_hash = gen_hash ($mode, $word_buf, ""); $tmp_hash = gen_hash ($mode, $word_buf, "");
} }
elsif ($mode == 10 || $mode == 20 || $mode == 23 || $mode == 30 || $mode == 40 || $mode == 50 || $mode == 60 || $mode == 110 || $mode == 120 || $mode == 130 || $mode == 140 || $mode == 150 || $mode == 160 || $mode == 1410 || $mode == 1420 || $mode == 1430 || $mode == 1440 || $mode == 1450 || $mode == 1460 || $mode == 1710 || $mode == 1711 || $mode == 1720 || $mode == 1730 || $mode == 1740 || $mode == 1750 || $mode == 1760 || $mode == 3610 || $mode == 3710 || $mode == 3711 || $mode == 3720 || $mode == 3800 || $mode == 3910 || $mode == 4010 || $mode == 4110 || $mode == 4210 || $mode == 4900 || $mode == 8900 || $mode == 10000 || $mode == 10200 || $mode == 10900 || $mode == 11900 || $mode == 12000 || $mode == 12100) elsif ($mode == 10 || $mode == 20 || $mode == 23 || $mode == 30 || $mode == 40 || $mode == 50 || $mode == 60 || $mode == 110 || $mode == 120 || $mode == 130 || $mode == 140 || $mode == 150 || $mode == 160 || $mode == 1410 || $mode == 1411 || $mode == 1420 || $mode == 1430 || $mode == 1440 || $mode == 1450 || $mode == 1460 || $mode == 1710 || $mode == 1711 || $mode == 1720 || $mode == 1730 || $mode == 1740 || $mode == 1750 || $mode == 1760 || $mode == 3610 || $mode == 3710 || $mode == 3711 || $mode == 3720 || $mode == 3800 || $mode == 3910 || $mode == 4010 || $mode == 4110 || $mode == 4210 || $mode == 4900 || $mode == 8900 || $mode == 10000 || $mode == 10200 || $mode == 10900 || $mode == 11900 || $mode == 12000 || $mode == 12100)
{ {
my $salt_len = get_random_num (1, 15); my $salt_len = get_random_num (1, 15);
@ -3387,7 +3410,7 @@ sub single
} }
} }
} }
elsif ($mode == 10 || $mode == 20 || $mode == 23 || $mode == 30 || $mode == 40 || $mode == 50 || $mode == 60 || $mode == 110 || $mode == 120 || $mode == 121 || $mode == 130 || $mode == 140 || $mode == 150 || $mode == 160 || $mode == 1410 || $mode == 1420 || $mode == 1430 || $mode == 1440 || $mode == 1450 || $mode == 1460 || $mode == 1710 || $mode == 1711 || $mode == 1720 || $mode == 1730 || $mode == 1740 || $mode == 1750 || $mode == 1760 || $mode == 2410 || $mode == 3610 || $mode == 3710 || $mode == 3711 || $mode == 3720 || $mode == 3910 || $mode == 4010 || $mode == 4110 || $mode == 4210 || $mode == 8900 || $mode == 10000 || $mode == 10200 || $mode == 10900 || $mode == 11900 || $mode == 12000 || $mode == 12100) elsif ($mode == 10 || $mode == 20 || $mode == 23 || $mode == 30 || $mode == 40 || $mode == 50 || $mode == 60 || $mode == 110 || $mode == 120 || $mode == 121 || $mode == 130 || $mode == 140 || $mode == 150 || $mode == 160 || $mode == 1410 || $mode == 1411 || $mode == 1420 || $mode == 1430 || $mode == 1440 || $mode == 1450 || $mode == 1460 || $mode == 1710 || $mode == 1711 || $mode == 1720 || $mode == 1730 || $mode == 1740 || $mode == 1750 || $mode == 1760 || $mode == 2410 || $mode == 3610 || $mode == 3710 || $mode == 3711 || $mode == 3720 || $mode == 3910 || $mode == 4010 || $mode == 4110 || $mode == 4210 || $mode == 8900 || $mode == 10000 || $mode == 10200 || $mode == 10900 || $mode == 11900 || $mode == 12000 || $mode == 12100)
{ {
my $salt_len = get_random_num (1, 15); my $salt_len = get_random_num (1, 15);
@ -4633,6 +4656,16 @@ sub gen_hash
$tmp_hash = sprintf ("%s:%s", $hash_buf, $salt_buf); $tmp_hash = sprintf ("%s:%s", $hash_buf, $salt_buf);
} }
elsif ($mode == 1411)
{
$hash_buf = sha256_hex ($word_buf . $salt_buf);
my $base64_buf = encode_base64 (pack ("H*", $hash_buf) . $salt_buf);
$base64_buf =~ s/[ \n]//g;
$tmp_hash = sprintf ("{SSHA256}%s", $base64_buf);
}
elsif ($mode == 1420) elsif ($mode == 1420)
{ {
$hash_buf = sha256_hex ($salt_buf . $word_buf); $hash_buf = sha256_hex ($salt_buf . $word_buf);

View File

@ -9,7 +9,7 @@ TDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# missing hash types: 5200,6251,6261,6271,6281 # missing hash types: 5200,6251,6261,6271,6281
HASH_TYPES="0 10 11 12 20 21 22 23 30 40 50 60 100 101 110 111 112 120 121 122 125 130 131 132 133 140 141 150 160 200 300 400 500 900 1000 1100 1300 1400 1410 1420 1430 1440 1441 1450 1460 1500 1600 1700 1710 1711 1720 1722 1730 1731 1740 1750 1760 1800 2100 2400 2410 2500 2600 2611 2612 2711 2811 3000 3100 3200 3710 3711 3800 4300 4400 4500 4520 4521 4522 4700 4800 4900 5000 5100 5300 5400 5500 5600 5700 5800 6000 6100 6211 6212 6213 6221 6222 6223 6231 6232 6233 6241 6242 6243 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200 7300 7400 7500 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8900 9100 9200 9300 9400 9500 9600 9700 9800 9900 10000 10100 10200 10300 10400 10500 10600 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11900 12000 12100 12200 12300 12400 12600 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 14000 14100 14400 14600 14700 14800 14900 99999" HASH_TYPES="0 10 11 12 20 21 22 23 30 40 50 60 100 101 110 111 112 120 121 122 125 130 131 132 133 140 141 150 160 200 300 400 500 900 1000 1100 1300 1400 1410 1411 1420 1430 1440 1441 1450 1460 1500 1600 1700 1710 1711 1720 1722 1730 1731 1740 1750 1760 1800 2100 2400 2410 2500 2600 2611 2612 2711 2811 3000 3100 3200 3710 3711 3800 4300 4400 4500 4520 4521 4522 4700 4800 4900 5000 5100 5300 5400 5500 5600 5700 5800 6000 6100 6211 6212 6213 6221 6222 6223 6231 6232 6233 6241 6242 6243 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200 7300 7400 7500 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8900 9100 9200 9300 9400 9500 9600 9700 9800 9900 10000 10100 10200 10300 10400 10500 10600 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11900 12000 12100 12200 12300 12400 12600 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 14000 14100 14400 14600 14700 14800 14900 99999"
#ATTACK_MODES="0 1 3 6 7" #ATTACK_MODES="0 1 3 6 7"
ATTACK_MODES="0 1 3 7" ATTACK_MODES="0 1 3 7"