1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

Added hash-mode 15200 = Blockchain, My Wallet, V2

Fixes https://github.com/hashcat/hashcat/issues/109
This commit is contained in:
Jens Steube 2017-04-16 13:19:23 +02:00
parent e3cef832be
commit 26a345334f
10 changed files with 258 additions and 6 deletions

View File

@ -1,4 +1,10 @@
* changes v3.40 -> 3.5.x: * changes v3.5.0 -> 3.x.x:
##
## Algorithms
##
- Added hash-mode 15200 = Blockchain, My Wallet, V2
## ##
## Features ## Features

View File

@ -212,6 +212,7 @@ NVIDIA GPUs require "NVIDIA Driver" (367.x or later)
- Lotus Notes/Domino 8 - Lotus Notes/Domino 8
- Bitcoin/Litecoin wallet.dat - Bitcoin/Litecoin wallet.dat
- Blockchain, My Wallet - Blockchain, My Wallet
- Blockchain, My Wallet, V2
- 1Password, agilekeychain - 1Password, agilekeychain
- 1Password, cloudkeychain - 1Password, cloudkeychain
- LastPass - LastPass

View File

@ -176,7 +176,7 @@ _hashcat ()
{ {
local VERSION=3.5.0 local VERSION=3.5.0
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 3910 4010 4110 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 12001 12100 12200 12300 12400 12500 12600 12700 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 13900 14000 14100 14700 14800 14900 15000 15100" 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 3910 4010 4110 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 12001 12100 12200 12300 12400 12500 12600 12700 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 13900 14000 14100 14700 14800 14900 15000 15100 15200"
local ATTACK_MODES="0 1 3 6 7" local ATTACK_MODES="0 1 3 6 7"
local HCCAPX_MESSAGE_PAIR="0 1 2 3 4 5" local HCCAPX_MESSAGE_PAIR="0 1 2 3 4 5"
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"

View File

@ -445,6 +445,7 @@ ALIAS_Apple_Iris * 13000 1 1
ALIAS_Apple_Iris * 13200 1 1 1 ALIAS_Apple_Iris * 13200 1 1 1
ALIAS_Apple_Iris * 14700 1 1 1 ALIAS_Apple_Iris * 14700 1 1 1
ALIAS_Apple_Iris * 14800 1 1 1 ALIAS_Apple_Iris * 14800 1 1 1
ALIAS_Apple_Iris * 15200 1 1 10
ALIAS_Apple_Iris_Pro * 5000 1 8 8 ALIAS_Apple_Iris_Pro * 5000 1 8 8
ALIAS_Apple_Iris_Pro * 6100 1 4 16 ALIAS_Apple_Iris_Pro * 6100 1 4 16

View File

@ -1186,6 +1186,8 @@ typedef enum display_len
DISPLAY_LEN_MAX_15000 = 128 + 1 + 64, DISPLAY_LEN_MAX_15000 = 128 + 1 + 64,
DISPLAY_LEN_MIN_15100 = 6 + 3 + 1 + 8 + 1 + 28, DISPLAY_LEN_MIN_15100 = 6 + 3 + 1 + 8 + 1 + 28,
DISPLAY_LEN_MAX_15100 = 6 + 6 + 1 + 8 + 1 + 28, DISPLAY_LEN_MAX_15100 = 6 + 6 + 1 + 8 + 1 + 28,
DISPLAY_LEN_MIN_15200 = 1 + 10 + 1 + 2 + 1 + 1 + 1 + 1 + 1 + 64,
DISPLAY_LEN_MAX_15200 = 1 + 10 + 1 + 2 + 1 + 8 + 1 + 5 + 1 + 20000,
DISPLAY_LEN_MIN_99999 = 1, DISPLAY_LEN_MIN_99999 = 1,
DISPLAY_LEN_MAX_99999 = 55, DISPLAY_LEN_MAX_99999 = 55,
@ -1569,6 +1571,7 @@ typedef enum rounds_count
ROUNDS_BSDICRYPT = 2900, ROUNDS_BSDICRYPT = 2900,
ROUNDS_RAR3 = 262144, ROUNDS_RAR3 = 262144,
ROUNDS_MYWALLET = 10, ROUNDS_MYWALLET = 10,
ROUNDS_MYWALLETV2 = 5000,
ROUNDS_MS_DRSR = 100, ROUNDS_MS_DRSR = 100,
ROUNDS_ANDROIDFDE_SAMSUNG = 4096, ROUNDS_ANDROIDFDE_SAMSUNG = 4096,
ROUNDS_RAR5 = (1 << 15), ROUNDS_RAR5 = (1 << 15),
@ -1734,6 +1737,7 @@ int rar3hp_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_bu
int rar5_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig); int rar5_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int cf10_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig); int cf10_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int mywallet_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig); int mywallet_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int mywalletv2_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int ms_drsr_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig); int ms_drsr_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int androidfde_samsung_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig); int androidfde_samsung_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int axcrypt_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig); int axcrypt_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);

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 = 149; const unsigned int DEFAULT_BENCHMARK_ALGORITHMS_CNT = 150;
const unsigned int DEFAULT_BENCHMARK_ALGORITHMS_BUF[] = const unsigned int DEFAULT_BENCHMARK_ALGORITHMS_BUF[] =
{ {
@ -157,6 +157,7 @@ const unsigned int DEFAULT_BENCHMARK_ALGORITHMS_BUF[] =
8200, 8200,
11300, 11300,
12700, 12700,
15200,
13400, 13400,
125 125
}; };

View File

@ -238,6 +238,7 @@ static const char HT_14800[] = "iTunes backup >= 10.0";
static const char HT_14900[] = "Skip32 (PT = $salt, key = $pass)"; static const char HT_14900[] = "Skip32 (PT = $salt, key = $pass)";
static const char HT_15000[] = "FileZilla Server >= 0.9.55"; static const char HT_15000[] = "FileZilla Server >= 0.9.55";
static const char HT_15100[] = "Juniper/NetBSD sha1crypt"; static const char HT_15100[] = "Juniper/NetBSD sha1crypt";
static const char HT_15200[] = "Blockchain, My Wallet, V2";
static const char HT_99999[] = "Plaintext"; static const char HT_99999[] = "Plaintext";
static const char HT_00011[] = "Joomla < 2.5.18"; static const char HT_00011[] = "Joomla < 2.5.18";
@ -331,6 +332,7 @@ static const char SIGNATURE_MSSQL[] = "0x0100";
static const char SIGNATURE_MSSQL2012[] = "0x0200"; static const char SIGNATURE_MSSQL2012[] = "0x0200";
static const char SIGNATURE_MYSQL_AUTH[] = "$mysqlna$"; static const char SIGNATURE_MYSQL_AUTH[] = "$mysqlna$";
static const char SIGNATURE_MYWALLET[] = "$blockchain$"; static const char SIGNATURE_MYWALLET[] = "$blockchain$";
static const char SIGNATURE_MYWALLETV2[] = "$blockchain$v2$";
static const char SIGNATURE_NETSCALER[] = "1"; static const char SIGNATURE_NETSCALER[] = "1";
static const char SIGNATURE_OFFICE2007[] = "$office$"; static const char SIGNATURE_OFFICE2007[] = "$office$";
static const char SIGNATURE_OFFICE2010[] = "$office$"; static const char SIGNATURE_OFFICE2010[] = "$office$";
@ -13073,6 +13075,102 @@ int mywallet_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_U
return (PARSER_OK); return (PARSER_OK);
} }
int mywalletv2_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig)
{
if ((input_len < DISPLAY_LEN_MIN_15200) || (input_len > DISPLAY_LEN_MAX_15200)) return (PARSER_GLOBAL_LENGTH);
if (memcmp (SIGNATURE_MYWALLETV2, input_buf, 15)) return (PARSER_SIGNATURE_UNMATCHED);
u32 *digest = (u32 *) hash_buf->digest;
salt_t *salt = hash_buf->salt;
/**
* parse line
*/
u8 *iter_pos = input_buf + 1 + 10 + 1 + 2 + 1;
u8 *data_len_pos = (u8 *) strchr ((const char *) iter_pos, '$');
if (data_len_pos == NULL) return (PARSER_SEPARATOR_UNMATCHED);
u32 iter_pos_len = data_len_pos - iter_pos;
if (iter_pos_len < 1) return (PARSER_SALT_LENGTH);
if (iter_pos_len > 8) return (PARSER_SALT_LENGTH);
data_len_pos++;
u8 *data_buf_pos = (u8 *) strchr ((const char *) data_len_pos, '$');
if (data_buf_pos == NULL) return (PARSER_SEPARATOR_UNMATCHED);
u32 data_len_len = data_buf_pos - data_len_pos;
if (data_len_len < 1) return (PARSER_SALT_LENGTH);
if (data_len_len > 5) return (PARSER_SALT_LENGTH);
data_buf_pos++;
u32 data_buf_len = input_len - 1 - 10 - 1 - 2 - 1 - iter_pos_len - 1 - data_len_len - 1;
if (data_buf_len < 64) return (PARSER_HASH_LENGTH);
if (data_buf_len % 16) return (PARSER_HASH_LENGTH);
u32 data_len = atoll ((const char *) data_len_pos);
if ((data_len * 2) != data_buf_len) return (PARSER_HASH_LENGTH);
u32 iter = atoll ((const char *) iter_pos);
/**
* salt
*/
u8 *salt_pos = data_buf_pos;
if (is_valid_hex_string (salt_pos, 64) == false) return (PARSER_SALT_ENCODING);
salt->salt_buf[0] = hex_to_u32 ((const u8 *) &salt_pos[ 0]);
salt->salt_buf[1] = hex_to_u32 ((const u8 *) &salt_pos[ 8]);
salt->salt_buf[2] = hex_to_u32 ((const u8 *) &salt_pos[16]);
salt->salt_buf[3] = hex_to_u32 ((const u8 *) &salt_pos[24]);
salt->salt_buf[0] = byte_swap_32 (salt->salt_buf[0]);
salt->salt_buf[1] = byte_swap_32 (salt->salt_buf[1]);
salt->salt_buf[2] = byte_swap_32 (salt->salt_buf[2]);
salt->salt_buf[3] = byte_swap_32 (salt->salt_buf[3]);
// this is actually the CT, which is also the hash later (if matched)
salt->salt_buf[4] = hex_to_u32 ((const u8 *) &salt_pos[32]);
salt->salt_buf[5] = hex_to_u32 ((const u8 *) &salt_pos[40]);
salt->salt_buf[6] = hex_to_u32 ((const u8 *) &salt_pos[48]);
salt->salt_buf[7] = hex_to_u32 ((const u8 *) &salt_pos[56]);
salt->salt_buf[4] = byte_swap_32 (salt->salt_buf[4]);
salt->salt_buf[5] = byte_swap_32 (salt->salt_buf[5]);
salt->salt_buf[6] = byte_swap_32 (salt->salt_buf[6]);
salt->salt_buf[7] = byte_swap_32 (salt->salt_buf[7]);
salt->salt_len = 32; // note we need to fix this to 16 in kernel
salt->salt_iter = iter - 1;
/**
* digest buf
*/
digest[0] = salt->salt_buf[4];
digest[1] = salt->salt_buf[5];
digest[2] = salt->salt_buf[6];
digest[3] = salt->salt_buf[7];
return (PARSER_OK);
}
int ms_drsr_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig) int ms_drsr_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig)
{ {
if ((input_len < DISPLAY_LEN_MIN_12800) || (input_len > DISPLAY_LEN_MAX_12800)) return (PARSER_GLOBAL_LENGTH); if ((input_len < DISPLAY_LEN_MIN_12800) || (input_len > DISPLAY_LEN_MAX_12800)) return (PARSER_GLOBAL_LENGTH);
@ -15080,6 +15178,7 @@ char *strhashtype (const u32 hash_mode)
case 14900: return ((char *) HT_14900); case 14900: return ((char *) HT_14900);
case 15000: return ((char *) HT_15000); case 15000: return ((char *) HT_15000);
case 15100: return ((char *) HT_15100); case 15100: return ((char *) HT_15100);
case 15200: return ((char *) HT_15200);
case 99999: return ((char *) HT_99999); case 99999: return ((char *) HT_99999);
} }
@ -18177,6 +18276,13 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const size_t out_le
(char *) salt.salt_buf, (char *) salt.salt_buf,
ptr_plain); ptr_plain);
} }
else if (hash_mode == 15200)
{
hashinfo_t **hashinfo_ptr = hash_info;
char *hash_buf = hashinfo_ptr[digest_cur]->orighash;
snprintf (out_buf, out_len - 1, "%s", hash_buf);
}
else if (hash_mode == 99999) else if (hash_mode == 99999)
{ {
char *ptr = (char *) digest_buf; char *ptr = (char *) digest_buf;
@ -22420,6 +22526,21 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
hashconfig->dgst_pos3 = 3; hashconfig->dgst_pos3 = 3;
break; break;
case 15200: hashconfig->hash_type = HASH_TYPE_AES;
hashconfig->salt_type = SALT_TYPE_EMBEDDED;
hashconfig->attack_exec = ATTACK_EXEC_OUTSIDE_KERNEL;
hashconfig->opts_type = OPTS_TYPE_PT_GENERATE_LE
| OPTS_TYPE_HASH_COPY;
hashconfig->kern_type = KERN_TYPE_MYWALLET;
hashconfig->dgst_size = DGST_SIZE_4_5; // because kernel uses _SHA1_
hashconfig->parse_func = mywalletv2_parse_hash;
hashconfig->opti_type = OPTI_TYPE_ZERO_BYTE;
hashconfig->dgst_pos0 = 0;
hashconfig->dgst_pos1 = 1;
hashconfig->dgst_pos2 = 2;
hashconfig->dgst_pos3 = 3;
break;
case 99999: hashconfig->hash_type = HASH_TYPE_PLAINTEXT; case 99999: hashconfig->hash_type = HASH_TYPE_PLAINTEXT;
hashconfig->salt_type = SALT_TYPE_NONE; hashconfig->salt_type = SALT_TYPE_NONE;
hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL; hashconfig->attack_exec = ATTACK_EXEC_INSIDE_KERNEL;
@ -22657,6 +22778,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
case 14700: hashconfig->tmp_size = sizeof (pbkdf2_sha1_tmp_t); break; case 14700: hashconfig->tmp_size = sizeof (pbkdf2_sha1_tmp_t); break;
case 14800: hashconfig->tmp_size = sizeof (pbkdf2_sha256_tmp_t); break; case 14800: hashconfig->tmp_size = sizeof (pbkdf2_sha256_tmp_t); break;
case 15100: hashconfig->tmp_size = sizeof (pbkdf1_sha1_tmp_t); break; case 15100: hashconfig->tmp_size = sizeof (pbkdf1_sha1_tmp_t); break;
case 15200: hashconfig->tmp_size = sizeof (mywallet_tmp_t); break;
}; };
// hook_size // hook_size
@ -23253,6 +23375,8 @@ void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, vo
break; break;
case 15100: salt->salt_iter = ROUNDS_NETBSD_SHA1CRYPT - 1; case 15100: salt->salt_iter = ROUNDS_NETBSD_SHA1CRYPT - 1;
break; break;
case 15200: salt->salt_iter = ROUNDS_MYWALLETV2;
break;
} }
} }

View File

@ -345,6 +345,7 @@ static const char *USAGE_BIG[] =
" 8200 | 1Password, cloudkeychain | Password Managers", " 8200 | 1Password, cloudkeychain | Password Managers",
" 11300 | Bitcoin/Litecoin wallet.dat | Password Managers", " 11300 | Bitcoin/Litecoin wallet.dat | Password Managers",
" 12700 | Blockchain, My Wallet | Password Managers", " 12700 | Blockchain, My Wallet | Password Managers",
" 15200 | Blockchain, My Wallet, V2 | Password Managers",
" 13400 | KeePass 1 (AES/Twofish) and KeePass 2 (AES) | Password Managers", " 13400 | KeePass 1 (AES/Twofish) and KeePass 2 (AES) | Password Managers",
" 99999 | Plaintext | Plaintext", " 99999 | Plaintext | Plaintext",
"", "",

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, 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, 12001, 12100, 12200, 12300, 12400, 12600, 12700, 12800, 12900, 13000, 13100, 13200, 13300, 13400, 13500, 13600, 13800, 13900, 14000, 14100, 14400, 14700, 14800, 14900, 15000, 15100, 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, 12001, 12100, 12200, 12300, 12400, 12600, 12700, 12800, 12900, 13000, 13100, 13200, 13300, 13400, 13500, 13600, 13800, 13900, 14000, 14100, 14400, 14700, 14800, 14900, 15000, 15100, 15200, 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);
@ -2597,6 +2597,29 @@ sub verify
next unless (exists ($db->{$hash_in}) and (! defined ($db->{$hash_in}))); next unless (exists ($db->{$hash_in}) and (! defined ($db->{$hash_in})));
} }
elsif ($mode == 15200)
{
my $index1 = index ($line, ':');
next if ($index1 < 0);
$hash_in = substr ($line, 0, $index1);
$word = substr ($line, $index1 + 1);
my (undef, $signature, $version, $iter_count, $data_len, $data_buf) = split '\$', $hash_in;
next unless ($signature eq "blockchain");
next unless ($version eq "v2");
next unless (($data_len * 2) == length $data_buf);
$iter = $iter_count;
$salt = substr ($data_buf, 0, 32);
$param = substr ($data_buf, 32);
next unless (exists ($db->{$hash_in}) and (! defined ($db->{$hash_in})));
}
else else
{ {
print "ERROR: hash mode is not supported\n"; print "ERROR: hash mode is not supported\n";
@ -2938,6 +2961,40 @@ sub verify
return unless (substr ($line, 0, $len) eq $hash_out); return unless (substr ($line, 0, $len) eq $hash_out);
} }
elsif ($mode == 15200)
{
# this is very special, we can't call gen_hash () because the param part is not always the same
# we only know that it should contain the letters "guid" at the beginning of the decryted string
my $pbkdf2 = Crypt::PBKDF2->new (
hash_class => 'HMACSHA1',
iterations => 5000,
output_len => 32
);
my $salt_bin = pack ("H*", $salt);
my $key = $pbkdf2->PBKDF2 ($salt_bin, $word);
my $cipher = Crypt::CBC->new ({
key => $key,
cipher => "Crypt::Rijndael",
iv => $salt_bin,
literal_key => 1,
header => "none",
keysize => 32
});
my $param_bin = pack ("H*", $param);
my $decrypted = $cipher->decrypt ($param_bin);
my $decrypted_part = substr ($decrypted, 1, 16);
return unless ($decrypted_part =~ /"guid"/);
$hash_out = $hash_in;
}
else else
{ {
$hash_out = gen_hash ($mode, $word, $salt, $iter); $hash_out = gen_hash ($mode, $word, $salt, $iter);
@ -3448,6 +3505,10 @@ sub passthrough
{ {
$tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 8)); $tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 8));
} }
elsif ($mode == 15200)
{
$tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 32));
}
else else
{ {
print "ERROR: Unsupported hash type\n"; print "ERROR: Unsupported hash type\n";
@ -4374,6 +4435,20 @@ sub single
} }
} }
} }
elsif ($mode == 15200)
{
for (my $i = 1; $i < 32; $i++)
{
if ($len != 0)
{
rnd ($mode, $len, 32);
}
else
{
rnd ($mode, $i, 32);
}
}
}
} }
} }
@ -8033,6 +8108,45 @@ END_CODE
$tmp_hash = sprintf ("\$sha1\$%d\$%s\$%s", $iterations, $salt_buf, $hash_buf); $tmp_hash = sprintf ("\$sha1\$%d\$%s\$%s", $iterations, $salt_buf, $hash_buf);
} }
elsif ($mode == 15200)
{
my $iterations = 5000;
if (defined ($iter))
{
$iterations = $iter;
}
my $data = qq|{
"guid" : "00000000-0000-0000-0000-000000000000",
"sharedKey" : "00000000-0000-0000-0000-000000000000",
"options" : {"pbkdf2_iterations":$iterations,"fee_policy":0,"html5_notifications":false,"logout_time":600000,"tx_display":0,"always_keep_local_backup":false}|;
my $salt_buf_bin = pack ("H*", $salt_buf);
my $hasher = Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA1');
my $pbkdf2 = Crypt::PBKDF2->new (
hasher => $hasher,
iterations => $iterations,
output_len => 32
);
my $key = $pbkdf2->PBKDF2 ($salt_buf_bin, $word_buf);
my $cipher = Crypt::CBC->new ({
key => $key,
cipher => "Crypt::Rijndael",
iv => $salt_buf_bin,
literal_key => 1,
header => "none",
keysize => 32
});
my $encrypted = unpack ("H*", $cipher->encrypt ($data));
$tmp_hash = sprintf ("\$blockchain\$v2\$%d\$%s\$%s", $iterations, length ($salt_buf . $encrypted) / 2, $salt_buf . $encrypted);
}
elsif ($mode == 99999) elsif ($mode == 99999)
{ {
$tmp_hash = sprintf ("%s", $word_buf); $tmp_hash = sprintf ("%s", $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 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 3910 4010 4110 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 12001 12100 12200 12300 12400 12600 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 14000 14100 14400 14600 14700 14800 14900 15000 15100 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 3910 4010 4110 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 12001 12100 12200 12300 12400 12600 12700 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 14000 14100 14400 14600 14700 14800 14900 15000 15100 15200 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"
@ -22,7 +22,7 @@ HASHFILE_ONLY="2500"
NEVER_CRACK="11600 14900" NEVER_CRACK="11600 14900"
SLOW_ALGOS="400 500 501 1600 1800 2100 2500 3200 5200 5800 6211 6212 6213 6221 6222 6223 6231 6232 6233 6241 6242 6243 6251 6261 6271 6281 6300 6400 6500 6600 6700 6800 7100 7200 7400 7900 8200 8800 8900 9000 9100 9200 9300 9400 9500 9600 10000 10300 10500 10700 10900 11300 11600 11900 12000 12001 12100 12200 12300 12400 12500 12800 12900 13000 13200 13400 13600 14600 14700 14800 15100" SLOW_ALGOS="400 500 501 1600 1800 2100 2500 3200 5200 5800 6211 6212 6213 6221 6222 6223 6231 6232 6233 6241 6242 6243 6251 6261 6271 6281 6300 6400 6500 6600 6700 6800 7100 7200 7400 7900 8200 8800 8900 9000 9100 9200 9300 9400 9500 9600 10000 10300 10500 10700 10900 11300 11600 11900 12000 12001 12100 12200 12300 12400 12500 12700 12800 12900 13000 13200 13400 13600 14600 14700 14800 15100 15200"
OPTS="--quiet --force --potfile-disable --runtime 400 --gpu-temp-disable --weak-hash-threshold=0" OPTS="--quiet --force --potfile-disable --runtime 400 --gpu-temp-disable --weak-hash-threshold=0"