added -m 12001 = Atlassian (PBKDF2-HMAC-SHA1) #611

pull/1142/head
philsmd 7 years ago
parent da93d216da
commit 22d1129818
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF

@ -23,6 +23,7 @@
- Added hash-mode 4520 = sha1($salt.sha1($pass))
- Added hash-mode 4522 = PunBB
- Added hash-mode 7000 = Fortigate (FortiOS)
- Added hash-mode 12001 = Atlassian (PBKDF2-HMAC-SHA1)
- Added hash-mode 14600 = LUKS
- Added hash-mode 14700 = iTunes Backup < 10.0
- Added hash-mode 14800 = iTunes Backup >= 10.0

@ -182,6 +182,7 @@ NVidia users require "NVIDIA Driver" (367.x or later)
- Redmine
- PunBB
- OpenCart
- Atlassian (PBKDF2-HMAC-SHA1)
- Citrix Netscaler
- SAP CODVN B (BCODE)
- SAP CODVN F/G (PASSCODE)

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

@ -1232,6 +1232,8 @@ typedef enum display_len
DISPLAY_LEN_MAX_4521 = 40 + 1 + 32,
DISPLAY_LEN_MIN_4522 = 40 + 1 + 12,
DISPLAY_LEN_MAX_4522 = 40 + 1 + 12,
DISPLAY_LEN_MIN_12001 = 9 + 64,
DISPLAY_LEN_MAX_12001 = 9 + 64,
} display_len_t;
@ -1549,6 +1551,7 @@ typedef enum rounds_count
ROUNDS_ITUNES9_BACKUP = 10000,
ROUNDS_ITUNES101_BACKUP = 10000000, // wtf, i mean, really?
ROUNDS_ITUNES102_BACKUP = 10000,
ROUNDS_ATLASSIAN = 10000,
ROUNDS_STDOUT = 0
} rounds_count_t;

@ -298,6 +298,7 @@ static const char HT_13753[] = "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 1536 bit";
static const char HT_13761[] = "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 512 bit + boot-mode";
static const char HT_13762[] = "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 1024 bit + boot-mode";
static const char HT_13763[] = "VeraCrypt PBKDF2-HMAC-SHA256 + XTS 1536 bit + boot-mode";
static const char HT_12001[] = "Atlassian (PBKDF2-HMAC-SHA1)";
static const char SIGNATURE_ANDROIDFDE[] = "$fde$";
static const char SIGNATURE_AXCRYPT[] = "$axcrypt$*1";
@ -373,6 +374,7 @@ static const char SIGNATURE_ZIP2_START[] = "$zip2$";
static const char SIGNATURE_ZIP2_STOP[] = "$/zip2$";
static const char SIGNATURE_ITUNES_BACKUP[] = "$itunes_backup$";
static const char SIGNATURE_FORTIGATE[] = "AK1";
static const char SIGNATURE_ATLASSIAN[] = "{PKCS5S2}";
/**
* decoder / encoder
@ -14191,6 +14193,70 @@ int filezilla_server_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf,
return (PARSER_OK);
}
int atlassian_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig)
{
if ((input_len < DISPLAY_LEN_MIN_12001) || (input_len > DISPLAY_LEN_MAX_12001)) return (PARSER_GLOBAL_LENGTH);
if (memcmp (SIGNATURE_ATLASSIAN, input_buf, 9)) return (PARSER_SIGNATURE_UNMATCHED);
u32 *digest = (u32 *) hash_buf->digest;
salt_t *salt = hash_buf->salt;
pbkdf2_sha1_t *pbkdf2_sha1 = (pbkdf2_sha1_t *) hash_buf->esalt;
/**
* parse line
*/
u8 *base64_pos = input_buf + 9;
// base64 ($salt . $digest)
u8 tmp_buf[100] = { 0 };
int base64_decode_len = base64_decode (base64_to_int, (const u8 *) base64_pos, input_len - 9, tmp_buf);
if (base64_decode_len != (16 + 32)) return (PARSER_HASH_LENGTH);
/**
* store data
*/
// store salt
u8 *salt_buf_ptr = (u8 *) pbkdf2_sha1->salt_buf;
u32 salt_len = parse_and_store_salt (salt_buf_ptr, tmp_buf, 16, hashconfig);
if (salt_len != 16) return (PARSER_SALT_LENGTH);
salt_buf_ptr[salt_len + 3] = 0x01;
salt_buf_ptr[salt_len + 4] = 0x80;
salt->salt_len = salt_len;
salt->salt_iter = ROUNDS_ATLASSIAN - 1;
// store hash
memcpy (digest, tmp_buf + 16, 16);
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]);
// add some stuff to normal salt to make sorted happy
salt->salt_buf[0] = pbkdf2_sha1->salt_buf[0];
salt->salt_buf[1] = pbkdf2_sha1->salt_buf[1];
salt->salt_buf[2] = pbkdf2_sha1->salt_buf[2];
salt->salt_buf[3] = pbkdf2_sha1->salt_buf[3];
salt->salt_buf[4] = salt->salt_iter;
return (PARSER_OK);
}
/**
* hook functions
*/
@ -14745,6 +14811,7 @@ char *strhashtype (const u32 hash_mode)
case 11800: return ((char *) HT_11800);
case 11900: return ((char *) HT_11900);
case 12000: return ((char *) HT_12000);
case 12001: return ((char *) HT_12001);
case 12100: return ((char *) HT_12100);
case 12200: return ((char *) HT_12200);
case 12300: return ((char *) HT_12300);
@ -17336,6 +17403,15 @@ 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);
}
else if (hash_mode == 12001)
{
u32 digest_idx = salt.digests_offset + digest_pos;
hashinfo_t **hashinfo_ptr = hash_info;
char *hash_buf = hashinfo_ptr[digest_idx]->orighash;
snprintf (out_buf, out_len - 1, "%s", hash_buf);
}
else if (hash_mode == 12100)
{
u32 digest_idx = salt.digests_offset + digest_pos;
@ -21453,6 +21529,22 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
hashconfig->dgst_pos3 = 3;
break;
case 12001: hashconfig->hash_type = HASH_TYPE_PBKDF2_SHA1;
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_PBKDF2_SHA1;
hashconfig->dgst_size = DGST_SIZE_4_32;
hashconfig->parse_func = atlassian_parse_hash;
hashconfig->opti_type = OPTI_TYPE_ZERO_BYTE
| OPTI_TYPE_SLOW_HASH_SIMD;
hashconfig->dgst_pos0 = 0;
hashconfig->dgst_pos1 = 1;
hashconfig->dgst_pos2 = 2;
hashconfig->dgst_pos3 = 3;
break;
case 12100: hashconfig->hash_type = HASH_TYPE_PBKDF2_SHA512;
hashconfig->salt_type = SALT_TYPE_EMBEDDED;
hashconfig->attack_exec = ATTACK_EXEC_OUTSIDE_KERNEL;
@ -22256,6 +22348,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
case 11400: hashconfig->esalt_size = sizeof (sip_t); break;
case 11900: hashconfig->esalt_size = sizeof (pbkdf2_md5_t); break;
case 12000: hashconfig->esalt_size = sizeof (pbkdf2_sha1_t); break;
case 12001: hashconfig->esalt_size = sizeof (pbkdf2_sha1_t); break;
case 12100: hashconfig->esalt_size = sizeof (pbkdf2_sha512_t); break;
case 13000: hashconfig->esalt_size = sizeof (rar5_t); break;
case 13100: hashconfig->esalt_size = sizeof (krb5tgs_t); break;
@ -22351,6 +22444,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
case 11600: hashconfig->tmp_size = sizeof (seven_zip_tmp_t); break;
case 11900: hashconfig->tmp_size = sizeof (pbkdf2_md5_tmp_t); break;
case 12000: hashconfig->tmp_size = sizeof (pbkdf2_sha1_tmp_t); break;
case 12001: hashconfig->tmp_size = sizeof (pbkdf2_sha1_tmp_t); break;
case 12100: hashconfig->tmp_size = sizeof (pbkdf2_sha512_tmp_t); break;
case 12200: hashconfig->tmp_size = sizeof (ecryptfs_tmp_t); break;
case 12300: hashconfig->tmp_size = sizeof (oraclet_tmp_t); break;
@ -22907,6 +23001,8 @@ void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, vo
break;
case 12000: salt->salt_iter = ROUNDS_PBKDF2_SHA1 - 1;
break;
case 12001: salt->salt_iter = ROUNDS_ATLASSIAN - 1;
break;
case 12100: salt->salt_iter = ROUNDS_PBKDF2_SHA512 - 1;
break;
case 12200: salt->salt_iter = ROUNDS_ECRYPTFS - 1;

@ -211,6 +211,7 @@ static const char *USAGE_BIG[] =
" 13900 | OpenCart | Forums, CMS, E-Commerce, Frameworks",
" 4521 | Redmine | Forums, CMS, E-Commerce, Frameworks",
" 4522 | PunBB | Forums, CMS, E-Commerce, Frameworks",
" 12001 | Atlassian (PBKDF2-HMAC-SHA1) | Forums, CMS, E-Commerce, Frameworks",
" 12 | PostgreSQL | Database Server",
" 131 | MSSQL(2000) | Database Server",
" 132 | MSSQL(2005) | Database Server",

@ -46,7 +46,7 @@ my $hashcat = "./hashcat";
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, 12100, 12200, 12300, 12400, 12600, 12700, 12800, 12900, 13000, 13100, 13200, 13300, 13400, 13500, 13600, 13800, 13900, 14000, 14100, 14400, 14700, 14800, 14900, 15000, 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, 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 %less_fifteen = map { $_ => 1 } qw(500 1600 1800 2400 2410 3200 6300 7400 10500 10700);
@ -2549,6 +2549,29 @@ sub verify
$salt = substr ($decoded, 32);
}
# Atlassian (PBKDF2-HMAC-SHA1)
elsif ($mode == 12001)
{
my $index = index ($line, ":");
next if $index < 1;
$hash_in = substr ($line, 0, $index);
$word = substr ($line, $index + 1);
next unless (substr ($hash_in, 0, 9) eq '{PKCS5S2}');
# base64 buf
my $base64_buf = substr ($hash_in, 9);
my $base64_buf_decoded = decode_base64 ($base64_buf);
next if (length ($base64_buf_decoded) != (16 + 32));
$salt = substr ($base64_buf_decoded, 0, 16);
next unless (exists ($db->{$hash_in}) and (! defined ($db->{$hash_in})));
}
else
{
print "ERROR: hash mode is not supported\n";
@ -3061,7 +3084,7 @@ sub passthrough
{
$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 == 12200)
elsif ($mode == 3200 || $mode == 5800 || $mode == 6400 || $mode == 6500 || $mode == 6700 || $mode == 7400 || $mode == 3300 || $mode == 8000 || $mode == 9100 || $mode == 12001 || $mode == 12200)
{
$tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 16));
}
@ -3482,7 +3505,7 @@ sub single
}
}
}
elsif ($mode == 141 || $mode == 3300 || $mode == 1441 || $mode == 1800 || $mode == 3200 || $mode == 4800 || $mode == 6400 || $mode == 6500 || $mode == 6700 || $mode == 7400 || $mode == 8000 || $mode == 9100 || $mode == 12200)
elsif ($mode == 141 || $mode == 3300 || $mode == 1441 || $mode == 1800 || $mode == 3200 || $mode == 4800 || $mode == 6400 || $mode == 6500 || $mode == 6700 || $mode == 7400 || $mode == 8000 || $mode == 9100 || $mode == 12001 || $mode == 12200)
{
for (my $i = 1; $i < 32; $i++)
{
@ -7056,6 +7079,20 @@ END_CODE
$tmp_hash = sprintf ("sha1:%i:%s:%s", $iterations, $base64_salt_buf, $hash_buf);
}
elsif ($mode == 12001)
{
my $pbkdf2 = Crypt::PBKDF2->new
(
hasher => Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA1'),
iterations => 10000,
output_len => 32
);
my $base64_buf = encode_base64 ($salt_buf . $pbkdf2->PBKDF2 ($salt_buf, $word_buf));
$base64_buf =~ s/[\r\n]//g;
$tmp_hash = sprintf ("{PKCS5S2}%s", $base64_buf);
}
elsif ($mode == 12100)
{
my $iterations = 1000;

@ -9,7 +9,7 @@ TDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# 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 12100 12200 12300 12400 12600 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 14000 14100 14400 14600 14700 14800 14900 15000 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 12800 12900 13000 13100 13200 13300 13400 13500 13600 13800 14000 14100 14400 14600 14700 14800 14900 15000 99999"
#ATTACK_MODES="0 1 3 6 7"
ATTACK_MODES="0 1 3 7"
@ -22,7 +22,7 @@ HASHFILE_ONLY="2500"
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 12100 12200 12300 12400 12500 12800 12900 13000 13200 13400 13600 14600 14700 14800"
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"
OPTS="--quiet --force --potfile-disable --runtime 400 --gpu-temp-disable --weak-hash-threshold=0"

Loading…
Cancel
Save