Both DPAPImk v1 and v2 work for single hash, still a bug on multi-hash

Remaining this bug + tests.pl before PR
This commit is contained in:
Fist0urs
2017-05-06 16:55:36 +02:00
parent 29d331ee17
commit d537712f27
4 changed files with 1216 additions and 333 deletions
+8 -16
View File
@@ -420,14 +420,16 @@ typedef struct psafe3
} psafe3_t;
/* Fist0urs */
typedef struct dpapimk
{
u32 version;
u32 context;
u8 SID_tmp[64];
u32 SID[64];
u32 SID[32];
u32 SID_len;
u32 SID_offset;
u32 userKey[5];
u8 cipher_algo[16];
u8 hash_algo[16];
@@ -436,7 +438,6 @@ typedef struct dpapimk
u32 contents[128];
} dpapimk_t;
/* Fist0urs_end */
typedef struct pdf14_tmp
{
@@ -828,14 +829,13 @@ typedef struct keepass_tmp
} keepass_tmp_t;
/* Fist0urs */
typedef struct dpapimk_tmp
{
/* dedicated to hmac-sha1 */
u32 ipad[5];
u32 opad[5];
u32 dgst[5];
u32 out[5];
u32 dgst[10];
u32 out[10];
/* dedicated to hmac-sha512 */
u64 ipad64[8];
@@ -844,7 +844,6 @@ typedef struct dpapimk_tmp
u64 out64[16];
} dpapimk_tmp_t;
/* Fist0urs_end */
typedef struct seven_zip_hook
{
@@ -1224,10 +1223,8 @@ typedef enum display_len
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,
/* Fist0urs */
DISPLAY_LEN_MIN_15300 = 1 + 7 + 1 + 1 + 1 + 1 + 1 + 10 + 1 + 4 + 1 + 4 + 1 + 1 + 1 + 32 + 1 + 3 + 128,
DISPLAY_LEN_MAX_15300 = 1 + 7 + 1 + 1 + 1 + 1 + 1 + 100 + 1 + 6 + 1 + 6 + 1 + 10 + 1 + 32 + 1 + 4 + 1 + 512,
/* Fist0urs_end */
DISPLAY_LEN_MIN_99999 = 1,
DISPLAY_LEN_MAX_99999 = 55,
@@ -1555,9 +1552,7 @@ typedef enum kern_type
KERN_TYPE_SKIP32 = 14900,
KERN_TYPE_FILEZILLA_SERVER = 15000,
KERN_TYPE_NETBSD_SHA1CRYPT = 15100,
/* Fist0urs */
KERN_TYPE_DPAPIMK = 15300,
/* Fist0urs_end */
KERN_TYPE_PLAINTEXT = 99999,
} kern_type_t;
@@ -1628,9 +1623,7 @@ typedef enum rounds_count
ROUNDS_ITUNES102_BACKUP = 10000,
ROUNDS_ATLASSIAN = 10000,
ROUNDS_NETBSD_SHA1CRYPT = 20000,
/* Fist0urs */
ROUNDS_DPAPIMK = 24000 - 1, // can be really different but fits jtr -test
/* Fist0urs_end */
ROUNDS_DPAPIMK = 24000 - 1, // from 4000 to 24000 (possibly more)
ROUNDS_STDOUT = 0
} rounds_count_t;
@@ -1808,9 +1801,8 @@ int sha256b64s_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_bu
int filezilla_server_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int netbsd_sha1crypt_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
int atlassian_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
/* Fist0urs */
int dpapimk_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED const hashconfig_t *hashconfig);
/* Fist0urs_end */
/**
* hook functions
*/