mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-28 01:18:35 +00:00
Added new hash-mode 13800 = Windows 8+ phone PIN/Password
This commit is contained in:
parent
063abab3d6
commit
b9eefd9b20
@ -1021,6 +1021,12 @@ typedef struct
|
|||||||
|
|
||||||
} zip2_t;
|
} zip2_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
u32 salt_buf[32];
|
||||||
|
|
||||||
|
} win8phone_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
u32 version;
|
u32 version;
|
||||||
|
911
OpenCL/m13800_a0.cl
Normal file
911
OpenCL/m13800_a0.cl
Normal file
@ -0,0 +1,911 @@
|
|||||||
|
/**
|
||||||
|
* Author......: Jens Steube <jens.steube@gmail.com>
|
||||||
|
* License.....: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define _SHA256_
|
||||||
|
|
||||||
|
//not compatible
|
||||||
|
//#define NEW_SIMD_CODE
|
||||||
|
|
||||||
|
#include "inc_hash_constants.h"
|
||||||
|
#include "inc_vendor.cl"
|
||||||
|
|
||||||
|
#define DGST_R0 3
|
||||||
|
#define DGST_R1 7
|
||||||
|
#define DGST_R2 2
|
||||||
|
#define DGST_R3 6
|
||||||
|
|
||||||
|
#include "inc_hash_functions.cl"
|
||||||
|
#include "inc_types.cl"
|
||||||
|
#include "inc_common.cl"
|
||||||
|
#include "inc_rp.h"
|
||||||
|
#include "inc_rp.cl"
|
||||||
|
#include "inc_simd.cl"
|
||||||
|
|
||||||
|
__constant u32 k_sha256[64] =
|
||||||
|
{
|
||||||
|
SHA256C00, SHA256C01, SHA256C02, SHA256C03,
|
||||||
|
SHA256C04, SHA256C05, SHA256C06, SHA256C07,
|
||||||
|
SHA256C08, SHA256C09, SHA256C0a, SHA256C0b,
|
||||||
|
SHA256C0c, SHA256C0d, SHA256C0e, SHA256C0f,
|
||||||
|
SHA256C10, SHA256C11, SHA256C12, SHA256C13,
|
||||||
|
SHA256C14, SHA256C15, SHA256C16, SHA256C17,
|
||||||
|
SHA256C18, SHA256C19, SHA256C1a, SHA256C1b,
|
||||||
|
SHA256C1c, SHA256C1d, SHA256C1e, SHA256C1f,
|
||||||
|
SHA256C20, SHA256C21, SHA256C22, SHA256C23,
|
||||||
|
SHA256C24, SHA256C25, SHA256C26, SHA256C27,
|
||||||
|
SHA256C28, SHA256C29, SHA256C2a, SHA256C2b,
|
||||||
|
SHA256C2c, SHA256C2d, SHA256C2e, SHA256C2f,
|
||||||
|
SHA256C30, SHA256C31, SHA256C32, SHA256C33,
|
||||||
|
SHA256C34, SHA256C35, SHA256C36, SHA256C37,
|
||||||
|
SHA256C38, SHA256C39, SHA256C3a, SHA256C3b,
|
||||||
|
SHA256C3c, SHA256C3d, SHA256C3e, SHA256C3f,
|
||||||
|
};
|
||||||
|
|
||||||
|
void sha256_transform (const u32x w[16], u32x digest[8])
|
||||||
|
{
|
||||||
|
u32x a = digest[0];
|
||||||
|
u32x b = digest[1];
|
||||||
|
u32x c = digest[2];
|
||||||
|
u32x d = digest[3];
|
||||||
|
u32x e = digest[4];
|
||||||
|
u32x f = digest[5];
|
||||||
|
u32x g = digest[6];
|
||||||
|
u32x h = digest[7];
|
||||||
|
|
||||||
|
u32x w0_t = w[ 0];
|
||||||
|
u32x w1_t = w[ 1];
|
||||||
|
u32x w2_t = w[ 2];
|
||||||
|
u32x w3_t = w[ 3];
|
||||||
|
u32x w4_t = w[ 4];
|
||||||
|
u32x w5_t = w[ 5];
|
||||||
|
u32x w6_t = w[ 6];
|
||||||
|
u32x w7_t = w[ 7];
|
||||||
|
u32x w8_t = w[ 8];
|
||||||
|
u32x w9_t = w[ 9];
|
||||||
|
u32x wa_t = w[10];
|
||||||
|
u32x wb_t = w[11];
|
||||||
|
u32x wc_t = w[12];
|
||||||
|
u32x wd_t = w[13];
|
||||||
|
u32x we_t = w[14];
|
||||||
|
u32x wf_t = w[15];
|
||||||
|
|
||||||
|
#define ROUND_EXPAND() \
|
||||||
|
{ \
|
||||||
|
w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t); \
|
||||||
|
w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t); \
|
||||||
|
w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t); \
|
||||||
|
w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t); \
|
||||||
|
w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t); \
|
||||||
|
w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t); \
|
||||||
|
w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t); \
|
||||||
|
w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t); \
|
||||||
|
w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t); \
|
||||||
|
w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t); \
|
||||||
|
wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t); \
|
||||||
|
wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t); \
|
||||||
|
wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t); \
|
||||||
|
wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t); \
|
||||||
|
we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t); \
|
||||||
|
wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ROUND_STEP(i) \
|
||||||
|
{ \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, k_sha256[i + 0]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, k_sha256[i + 1]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, k_sha256[i + 2]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, k_sha256[i + 3]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, k_sha256[i + 4]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, k_sha256[i + 5]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, k_sha256[i + 6]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, k_sha256[i + 7]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, k_sha256[i + 8]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, k_sha256[i + 9]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, k_sha256[i + 10]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, k_sha256[i + 11]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, k_sha256[i + 12]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, k_sha256[i + 13]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, k_sha256[i + 14]); \
|
||||||
|
SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, k_sha256[i + 15]); \
|
||||||
|
}
|
||||||
|
|
||||||
|
ROUND_STEP (0);
|
||||||
|
|
||||||
|
#ifdef _unroll
|
||||||
|
#pragma unroll
|
||||||
|
#endif
|
||||||
|
for (int i = 16; i < 64; i += 16)
|
||||||
|
{
|
||||||
|
ROUND_EXPAND (); ROUND_STEP (i);
|
||||||
|
}
|
||||||
|
|
||||||
|
digest[0] += a;
|
||||||
|
digest[1] += b;
|
||||||
|
digest[2] += c;
|
||||||
|
digest[3] += d;
|
||||||
|
digest[4] += e;
|
||||||
|
digest[5] += f;
|
||||||
|
digest[6] += g;
|
||||||
|
digest[7] += h;
|
||||||
|
}
|
||||||
|
|
||||||
|
void memcat64c_be (u32x block[16], const u32 offset, u32x carry[16])
|
||||||
|
{
|
||||||
|
const u32 mod = offset & 3;
|
||||||
|
const u32 div = offset / 4;
|
||||||
|
|
||||||
|
u32x tmp00;
|
||||||
|
u32x tmp01;
|
||||||
|
u32x tmp02;
|
||||||
|
u32x tmp03;
|
||||||
|
u32x tmp04;
|
||||||
|
u32x tmp05;
|
||||||
|
u32x tmp06;
|
||||||
|
u32x tmp07;
|
||||||
|
u32x tmp08;
|
||||||
|
u32x tmp09;
|
||||||
|
u32x tmp10;
|
||||||
|
u32x tmp11;
|
||||||
|
u32x tmp12;
|
||||||
|
u32x tmp13;
|
||||||
|
u32x tmp14;
|
||||||
|
u32x tmp15;
|
||||||
|
u32x tmp16;
|
||||||
|
|
||||||
|
#ifdef IS_NV
|
||||||
|
const int selector = (0x76543210 >> ((offset & 3) * 4)) & 0xffff;
|
||||||
|
|
||||||
|
tmp00 = __byte_perm (carry[ 0], 0, selector);
|
||||||
|
tmp01 = __byte_perm (carry[ 1], carry[ 0], selector);
|
||||||
|
tmp02 = __byte_perm (carry[ 2], carry[ 1], selector);
|
||||||
|
tmp03 = __byte_perm (carry[ 3], carry[ 2], selector);
|
||||||
|
tmp04 = __byte_perm (carry[ 4], carry[ 3], selector);
|
||||||
|
tmp05 = __byte_perm (carry[ 5], carry[ 4], selector);
|
||||||
|
tmp06 = __byte_perm (carry[ 6], carry[ 5], selector);
|
||||||
|
tmp07 = __byte_perm (carry[ 7], carry[ 6], selector);
|
||||||
|
tmp08 = __byte_perm (carry[ 8], carry[ 7], selector);
|
||||||
|
tmp09 = __byte_perm (carry[ 9], carry[ 8], selector);
|
||||||
|
tmp10 = __byte_perm (carry[10], carry[ 9], selector);
|
||||||
|
tmp11 = __byte_perm (carry[11], carry[10], selector);
|
||||||
|
tmp12 = __byte_perm (carry[12], carry[11], selector);
|
||||||
|
tmp13 = __byte_perm (carry[13], carry[12], selector);
|
||||||
|
tmp14 = __byte_perm (carry[14], carry[13], selector);
|
||||||
|
tmp15 = __byte_perm (carry[15], carry[14], selector);
|
||||||
|
tmp16 = __byte_perm ( 0, carry[15], selector);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined IS_AMD || defined IS_GENERIC
|
||||||
|
tmp00 = amd_bytealign ( 0, carry[ 0], offset);
|
||||||
|
tmp01 = amd_bytealign (carry[ 0], carry[ 1], offset);
|
||||||
|
tmp02 = amd_bytealign (carry[ 1], carry[ 2], offset);
|
||||||
|
tmp03 = amd_bytealign (carry[ 2], carry[ 3], offset);
|
||||||
|
tmp04 = amd_bytealign (carry[ 3], carry[ 4], offset);
|
||||||
|
tmp05 = amd_bytealign (carry[ 4], carry[ 5], offset);
|
||||||
|
tmp06 = amd_bytealign (carry[ 5], carry[ 6], offset);
|
||||||
|
tmp07 = amd_bytealign (carry[ 6], carry[ 7], offset);
|
||||||
|
tmp08 = amd_bytealign (carry[ 7], carry[ 8], offset);
|
||||||
|
tmp09 = amd_bytealign (carry[ 8], carry[ 9], offset);
|
||||||
|
tmp10 = amd_bytealign (carry[ 9], carry[10], offset);
|
||||||
|
tmp11 = amd_bytealign (carry[10], carry[11], offset);
|
||||||
|
tmp12 = amd_bytealign (carry[11], carry[12], offset);
|
||||||
|
tmp13 = amd_bytealign (carry[12], carry[13], offset);
|
||||||
|
tmp14 = amd_bytealign (carry[13], carry[14], offset);
|
||||||
|
tmp15 = amd_bytealign (carry[14], carry[15], offset);
|
||||||
|
tmp16 = amd_bytealign (carry[15], 0, offset);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
carry[ 0] = 0;
|
||||||
|
carry[ 1] = 0;
|
||||||
|
carry[ 2] = 0;
|
||||||
|
carry[ 3] = 0;
|
||||||
|
carry[ 4] = 0;
|
||||||
|
carry[ 5] = 0;
|
||||||
|
carry[ 6] = 0;
|
||||||
|
carry[ 7] = 0;
|
||||||
|
carry[ 8] = 0;
|
||||||
|
carry[ 9] = 0;
|
||||||
|
carry[10] = 0;
|
||||||
|
carry[11] = 0;
|
||||||
|
carry[12] = 0;
|
||||||
|
carry[13] = 0;
|
||||||
|
carry[14] = 0;
|
||||||
|
carry[15] = 0;
|
||||||
|
|
||||||
|
switch (div)
|
||||||
|
{
|
||||||
|
case 0: block[ 0] |= tmp00;
|
||||||
|
block[ 1] = tmp01;
|
||||||
|
block[ 2] = tmp02;
|
||||||
|
block[ 3] = tmp03;
|
||||||
|
block[ 4] = tmp04;
|
||||||
|
block[ 5] = tmp05;
|
||||||
|
block[ 6] = tmp06;
|
||||||
|
block[ 7] = tmp07;
|
||||||
|
block[ 8] = tmp08;
|
||||||
|
block[ 9] = tmp09;
|
||||||
|
block[10] = tmp10;
|
||||||
|
block[11] = tmp11;
|
||||||
|
block[12] = tmp12;
|
||||||
|
block[13] = tmp13;
|
||||||
|
block[14] = tmp14;
|
||||||
|
block[15] = tmp15;
|
||||||
|
carry[ 0] = tmp16;
|
||||||
|
break;
|
||||||
|
case 1: block[ 1] |= tmp00;
|
||||||
|
block[ 2] = tmp01;
|
||||||
|
block[ 3] = tmp02;
|
||||||
|
block[ 4] = tmp03;
|
||||||
|
block[ 5] = tmp04;
|
||||||
|
block[ 6] = tmp05;
|
||||||
|
block[ 7] = tmp06;
|
||||||
|
block[ 8] = tmp07;
|
||||||
|
block[ 9] = tmp08;
|
||||||
|
block[10] = tmp09;
|
||||||
|
block[11] = tmp10;
|
||||||
|
block[12] = tmp11;
|
||||||
|
block[13] = tmp12;
|
||||||
|
block[14] = tmp13;
|
||||||
|
block[15] = tmp14;
|
||||||
|
carry[ 0] = tmp15;
|
||||||
|
carry[ 1] = tmp16;
|
||||||
|
break;
|
||||||
|
case 2: block[ 2] |= tmp00;
|
||||||
|
block[ 3] = tmp01;
|
||||||
|
block[ 4] = tmp02;
|
||||||
|
block[ 5] = tmp03;
|
||||||
|
block[ 6] = tmp04;
|
||||||
|
block[ 7] = tmp05;
|
||||||
|
block[ 8] = tmp06;
|
||||||
|
block[ 9] = tmp07;
|
||||||
|
block[10] = tmp08;
|
||||||
|
block[11] = tmp09;
|
||||||
|
block[12] = tmp10;
|
||||||
|
block[13] = tmp11;
|
||||||
|
block[14] = tmp12;
|
||||||
|
block[15] = tmp13;
|
||||||
|
carry[ 0] = tmp14;
|
||||||
|
carry[ 1] = tmp15;
|
||||||
|
carry[ 2] = tmp16;
|
||||||
|
break;
|
||||||
|
case 3: block[ 3] |= tmp00;
|
||||||
|
block[ 4] = tmp01;
|
||||||
|
block[ 5] = tmp02;
|
||||||
|
block[ 6] = tmp03;
|
||||||
|
block[ 7] = tmp04;
|
||||||
|
block[ 8] = tmp05;
|
||||||
|
block[ 9] = tmp06;
|
||||||
|
block[10] = tmp07;
|
||||||
|
block[11] = tmp08;
|
||||||
|
block[12] = tmp09;
|
||||||
|
block[13] = tmp10;
|
||||||
|
block[14] = tmp11;
|
||||||
|
block[15] = tmp12;
|
||||||
|
carry[ 0] = tmp13;
|
||||||
|
carry[ 1] = tmp14;
|
||||||
|
carry[ 2] = tmp15;
|
||||||
|
carry[ 3] = tmp16;
|
||||||
|
break;
|
||||||
|
case 4: block[ 4] |= tmp00;
|
||||||
|
block[ 5] = tmp01;
|
||||||
|
block[ 6] = tmp02;
|
||||||
|
block[ 7] = tmp03;
|
||||||
|
block[ 8] = tmp04;
|
||||||
|
block[ 9] = tmp05;
|
||||||
|
block[10] = tmp06;
|
||||||
|
block[11] = tmp07;
|
||||||
|
block[12] = tmp08;
|
||||||
|
block[13] = tmp09;
|
||||||
|
block[14] = tmp10;
|
||||||
|
block[15] = tmp11;
|
||||||
|
carry[ 0] = tmp12;
|
||||||
|
carry[ 1] = tmp13;
|
||||||
|
carry[ 2] = tmp14;
|
||||||
|
carry[ 3] = tmp15;
|
||||||
|
carry[ 4] = tmp16;
|
||||||
|
break;
|
||||||
|
case 5: block[ 5] |= tmp00;
|
||||||
|
block[ 6] = tmp01;
|
||||||
|
block[ 7] = tmp02;
|
||||||
|
block[ 8] = tmp03;
|
||||||
|
block[ 9] = tmp04;
|
||||||
|
block[10] = tmp05;
|
||||||
|
block[11] = tmp06;
|
||||||
|
block[12] = tmp07;
|
||||||
|
block[13] = tmp08;
|
||||||
|
block[14] = tmp09;
|
||||||
|
block[15] = tmp10;
|
||||||
|
carry[ 0] = tmp11;
|
||||||
|
carry[ 1] = tmp12;
|
||||||
|
carry[ 2] = tmp13;
|
||||||
|
carry[ 3] = tmp14;
|
||||||
|
carry[ 4] = tmp15;
|
||||||
|
carry[ 5] = tmp16;
|
||||||
|
break;
|
||||||
|
case 6: block[ 6] |= tmp00;
|
||||||
|
block[ 7] = tmp01;
|
||||||
|
block[ 8] = tmp02;
|
||||||
|
block[ 9] = tmp03;
|
||||||
|
block[10] = tmp04;
|
||||||
|
block[11] = tmp05;
|
||||||
|
block[12] = tmp06;
|
||||||
|
block[13] = tmp07;
|
||||||
|
block[14] = tmp08;
|
||||||
|
block[15] = tmp09;
|
||||||
|
carry[ 0] = tmp10;
|
||||||
|
carry[ 1] = tmp11;
|
||||||
|
carry[ 2] = tmp12;
|
||||||
|
carry[ 3] = tmp13;
|
||||||
|
carry[ 4] = tmp14;
|
||||||
|
carry[ 5] = tmp15;
|
||||||
|
carry[ 6] = tmp16;
|
||||||
|
break;
|
||||||
|
case 7: block[ 7] |= tmp00;
|
||||||
|
block[ 8] = tmp01;
|
||||||
|
block[ 9] = tmp02;
|
||||||
|
block[10] = tmp03;
|
||||||
|
block[11] = tmp04;
|
||||||
|
block[12] = tmp05;
|
||||||
|
block[13] = tmp06;
|
||||||
|
block[14] = tmp07;
|
||||||
|
block[15] = tmp08;
|
||||||
|
carry[ 0] = tmp09;
|
||||||
|
carry[ 1] = tmp10;
|
||||||
|
carry[ 2] = tmp11;
|
||||||
|
carry[ 3] = tmp12;
|
||||||
|
carry[ 4] = tmp13;
|
||||||
|
carry[ 5] = tmp14;
|
||||||
|
carry[ 6] = tmp15;
|
||||||
|
carry[ 7] = tmp16;
|
||||||
|
break;
|
||||||
|
case 8: block[ 8] |= tmp00;
|
||||||
|
block[ 9] = tmp01;
|
||||||
|
block[10] = tmp02;
|
||||||
|
block[11] = tmp03;
|
||||||
|
block[12] = tmp04;
|
||||||
|
block[13] = tmp05;
|
||||||
|
block[14] = tmp06;
|
||||||
|
block[15] = tmp07;
|
||||||
|
carry[ 0] = tmp08;
|
||||||
|
carry[ 1] = tmp09;
|
||||||
|
carry[ 2] = tmp10;
|
||||||
|
carry[ 3] = tmp11;
|
||||||
|
carry[ 4] = tmp12;
|
||||||
|
carry[ 5] = tmp13;
|
||||||
|
carry[ 6] = tmp14;
|
||||||
|
carry[ 7] = tmp15;
|
||||||
|
carry[ 8] = tmp16;
|
||||||
|
break;
|
||||||
|
case 9: block[ 9] |= tmp00;
|
||||||
|
block[10] = tmp01;
|
||||||
|
block[11] = tmp02;
|
||||||
|
block[12] = tmp03;
|
||||||
|
block[13] = tmp04;
|
||||||
|
block[14] = tmp05;
|
||||||
|
block[15] = tmp06;
|
||||||
|
carry[ 0] = tmp07;
|
||||||
|
carry[ 1] = tmp08;
|
||||||
|
carry[ 2] = tmp09;
|
||||||
|
carry[ 3] = tmp10;
|
||||||
|
carry[ 4] = tmp11;
|
||||||
|
carry[ 5] = tmp12;
|
||||||
|
carry[ 6] = tmp13;
|
||||||
|
carry[ 7] = tmp14;
|
||||||
|
carry[ 8] = tmp15;
|
||||||
|
carry[ 9] = tmp16;
|
||||||
|
break;
|
||||||
|
case 10: block[10] |= tmp00;
|
||||||
|
block[11] = tmp01;
|
||||||
|
block[12] = tmp02;
|
||||||
|
block[13] = tmp03;
|
||||||
|
block[14] = tmp04;
|
||||||
|
block[15] = tmp05;
|
||||||
|
carry[ 0] = tmp06;
|
||||||
|
carry[ 1] = tmp07;
|
||||||
|
carry[ 2] = tmp08;
|
||||||
|
carry[ 3] = tmp09;
|
||||||
|
carry[ 4] = tmp10;
|
||||||
|
carry[ 5] = tmp11;
|
||||||
|
carry[ 6] = tmp12;
|
||||||
|
carry[ 7] = tmp13;
|
||||||
|
carry[ 8] = tmp14;
|
||||||
|
carry[ 9] = tmp15;
|
||||||
|
carry[10] = tmp16;
|
||||||
|
break;
|
||||||
|
case 11: block[11] |= tmp00;
|
||||||
|
block[12] = tmp01;
|
||||||
|
block[13] = tmp02;
|
||||||
|
block[14] = tmp03;
|
||||||
|
block[15] = tmp04;
|
||||||
|
carry[ 0] = tmp05;
|
||||||
|
carry[ 1] = tmp06;
|
||||||
|
carry[ 2] = tmp07;
|
||||||
|
carry[ 3] = tmp08;
|
||||||
|
carry[ 4] = tmp09;
|
||||||
|
carry[ 5] = tmp10;
|
||||||
|
carry[ 6] = tmp11;
|
||||||
|
carry[ 7] = tmp12;
|
||||||
|
carry[ 8] = tmp13;
|
||||||
|
carry[ 9] = tmp14;
|
||||||
|
carry[10] = tmp15;
|
||||||
|
carry[11] = tmp16;
|
||||||
|
break;
|
||||||
|
case 12: block[12] |= tmp00;
|
||||||
|
block[13] = tmp01;
|
||||||
|
block[14] = tmp02;
|
||||||
|
block[15] = tmp03;
|
||||||
|
carry[ 0] = tmp04;
|
||||||
|
carry[ 1] = tmp05;
|
||||||
|
carry[ 2] = tmp06;
|
||||||
|
carry[ 3] = tmp07;
|
||||||
|
carry[ 4] = tmp08;
|
||||||
|
carry[ 5] = tmp09;
|
||||||
|
carry[ 6] = tmp10;
|
||||||
|
carry[ 7] = tmp11;
|
||||||
|
carry[ 8] = tmp12;
|
||||||
|
carry[ 9] = tmp13;
|
||||||
|
carry[10] = tmp14;
|
||||||
|
carry[11] = tmp15;
|
||||||
|
carry[12] = tmp16;
|
||||||
|
break;
|
||||||
|
case 13: block[13] |= tmp00;
|
||||||
|
block[14] = tmp01;
|
||||||
|
block[15] = tmp02;
|
||||||
|
carry[ 0] = tmp03;
|
||||||
|
carry[ 1] = tmp04;
|
||||||
|
carry[ 2] = tmp05;
|
||||||
|
carry[ 3] = tmp06;
|
||||||
|
carry[ 4] = tmp07;
|
||||||
|
carry[ 5] = tmp08;
|
||||||
|
carry[ 6] = tmp09;
|
||||||
|
carry[ 7] = tmp10;
|
||||||
|
carry[ 8] = tmp11;
|
||||||
|
carry[ 9] = tmp12;
|
||||||
|
carry[10] = tmp13;
|
||||||
|
carry[11] = tmp14;
|
||||||
|
carry[12] = tmp15;
|
||||||
|
carry[13] = tmp16;
|
||||||
|
break;
|
||||||
|
case 14: block[14] |= tmp00;
|
||||||
|
block[15] = tmp01;
|
||||||
|
carry[ 0] = tmp02;
|
||||||
|
carry[ 1] = tmp03;
|
||||||
|
carry[ 2] = tmp04;
|
||||||
|
carry[ 3] = tmp05;
|
||||||
|
carry[ 4] = tmp06;
|
||||||
|
carry[ 5] = tmp07;
|
||||||
|
carry[ 6] = tmp08;
|
||||||
|
carry[ 7] = tmp09;
|
||||||
|
carry[ 8] = tmp10;
|
||||||
|
carry[ 9] = tmp11;
|
||||||
|
carry[10] = tmp12;
|
||||||
|
carry[11] = tmp13;
|
||||||
|
carry[12] = tmp14;
|
||||||
|
carry[13] = tmp15;
|
||||||
|
carry[14] = tmp16;
|
||||||
|
break;
|
||||||
|
case 15: block[15] |= tmp00;
|
||||||
|
carry[ 0] = tmp01;
|
||||||
|
carry[ 1] = tmp02;
|
||||||
|
carry[ 2] = tmp03;
|
||||||
|
carry[ 3] = tmp04;
|
||||||
|
carry[ 4] = tmp05;
|
||||||
|
carry[ 5] = tmp06;
|
||||||
|
carry[ 6] = tmp07;
|
||||||
|
carry[ 7] = tmp08;
|
||||||
|
carry[ 8] = tmp09;
|
||||||
|
carry[ 9] = tmp10;
|
||||||
|
carry[10] = tmp11;
|
||||||
|
carry[11] = tmp12;
|
||||||
|
carry[12] = tmp13;
|
||||||
|
carry[13] = tmp14;
|
||||||
|
carry[14] = tmp15;
|
||||||
|
carry[15] = tmp16;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__kernel void m13800_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global win8phone_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* modifier
|
||||||
|
*/
|
||||||
|
|
||||||
|
const u32 gid = get_global_id (0);
|
||||||
|
const u32 lid = get_local_id (0);
|
||||||
|
const u32 lsz = get_local_size (0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* base
|
||||||
|
*/
|
||||||
|
|
||||||
|
u32 pw_buf0[4];
|
||||||
|
u32 pw_buf1[4];
|
||||||
|
|
||||||
|
pw_buf0[0] = pws[gid].i[0];
|
||||||
|
pw_buf0[1] = pws[gid].i[1];
|
||||||
|
pw_buf0[2] = pws[gid].i[2];
|
||||||
|
pw_buf0[3] = pws[gid].i[3];
|
||||||
|
pw_buf1[0] = pws[gid].i[4];
|
||||||
|
pw_buf1[1] = pws[gid].i[5];
|
||||||
|
pw_buf1[2] = pws[gid].i[6];
|
||||||
|
pw_buf1[3] = pws[gid].i[7];
|
||||||
|
|
||||||
|
const u32 pw_len = pws[gid].pw_len;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* shared
|
||||||
|
*/
|
||||||
|
|
||||||
|
__local u32 s_esalt[32];
|
||||||
|
|
||||||
|
for (u32 i = lid; i < 32; i += lsz)
|
||||||
|
{
|
||||||
|
s_esalt[i] = esalt_bufs[salt_pos].salt_buf[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
barrier (CLK_LOCAL_MEM_FENCE);
|
||||||
|
|
||||||
|
if (gid >= gid_max) return;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* loop
|
||||||
|
*/
|
||||||
|
|
||||||
|
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||||
|
{
|
||||||
|
u32x w0[4] = { 0 };
|
||||||
|
u32x w1[4] = { 0 };
|
||||||
|
u32x w2[4] = { 0 };
|
||||||
|
u32x w3[4] = { 0 };
|
||||||
|
|
||||||
|
const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
|
||||||
|
|
||||||
|
const u32x out_len2 = out_len * 2;
|
||||||
|
|
||||||
|
make_unicode (w1, w2, w3);
|
||||||
|
make_unicode (w0, w0, w1);
|
||||||
|
|
||||||
|
u32x w[16];
|
||||||
|
|
||||||
|
w[ 0] = swap32 (w0[0]);
|
||||||
|
w[ 1] = swap32 (w0[1]);
|
||||||
|
w[ 2] = swap32 (w0[2]);
|
||||||
|
w[ 3] = swap32 (w0[3]);
|
||||||
|
w[ 4] = swap32 (w1[0]);
|
||||||
|
w[ 5] = swap32 (w1[1]);
|
||||||
|
w[ 6] = swap32 (w1[2]);
|
||||||
|
w[ 7] = swap32 (w1[3]);
|
||||||
|
w[ 8] = swap32 (w2[0]);
|
||||||
|
w[ 9] = swap32 (w2[1]);
|
||||||
|
w[10] = swap32 (w2[2]);
|
||||||
|
w[11] = swap32 (w2[3]);
|
||||||
|
w[12] = swap32 (w3[0]);
|
||||||
|
w[13] = swap32 (w3[1]);
|
||||||
|
w[14] = swap32 (w3[2]);
|
||||||
|
w[15] = swap32 (w3[3]);
|
||||||
|
|
||||||
|
u32x carry[16];
|
||||||
|
|
||||||
|
carry[ 0] = s_esalt[ 0];
|
||||||
|
carry[ 1] = s_esalt[ 1];
|
||||||
|
carry[ 2] = s_esalt[ 2];
|
||||||
|
carry[ 3] = s_esalt[ 3];
|
||||||
|
carry[ 4] = s_esalt[ 4];
|
||||||
|
carry[ 5] = s_esalt[ 5];
|
||||||
|
carry[ 6] = s_esalt[ 6];
|
||||||
|
carry[ 7] = s_esalt[ 7];
|
||||||
|
carry[ 8] = s_esalt[ 8];
|
||||||
|
carry[ 9] = s_esalt[ 9];
|
||||||
|
carry[10] = s_esalt[10];
|
||||||
|
carry[11] = s_esalt[11];
|
||||||
|
carry[12] = s_esalt[12];
|
||||||
|
carry[13] = s_esalt[13];
|
||||||
|
carry[14] = s_esalt[14];
|
||||||
|
carry[15] = s_esalt[15];
|
||||||
|
|
||||||
|
// we can always use pw_len here, since we add exactly the hash buffer size
|
||||||
|
memcat64c_be (w, out_len2, carry);
|
||||||
|
|
||||||
|
u32x digest[8];
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
sha256_transform (w, digest);
|
||||||
|
|
||||||
|
w[ 0] = carry[ 0];
|
||||||
|
w[ 1] = carry[ 1];
|
||||||
|
w[ 2] = carry[ 2];
|
||||||
|
w[ 3] = carry[ 3];
|
||||||
|
w[ 4] = carry[ 4];
|
||||||
|
w[ 5] = carry[ 5];
|
||||||
|
w[ 6] = carry[ 6];
|
||||||
|
w[ 7] = carry[ 7];
|
||||||
|
w[ 8] = carry[ 8];
|
||||||
|
w[ 9] = carry[ 9];
|
||||||
|
w[10] = carry[10];
|
||||||
|
w[11] = carry[11];
|
||||||
|
w[12] = carry[12];
|
||||||
|
w[13] = carry[13];
|
||||||
|
w[14] = carry[14];
|
||||||
|
w[15] = carry[15];
|
||||||
|
|
||||||
|
carry[ 0] = s_esalt[16];
|
||||||
|
carry[ 1] = s_esalt[17];
|
||||||
|
carry[ 2] = s_esalt[18];
|
||||||
|
carry[ 3] = s_esalt[19];
|
||||||
|
carry[ 4] = s_esalt[20];
|
||||||
|
carry[ 5] = s_esalt[21];
|
||||||
|
carry[ 6] = s_esalt[22];
|
||||||
|
carry[ 7] = s_esalt[23];
|
||||||
|
carry[ 8] = s_esalt[24];
|
||||||
|
carry[ 9] = s_esalt[25];
|
||||||
|
carry[10] = s_esalt[26];
|
||||||
|
carry[11] = s_esalt[27];
|
||||||
|
carry[12] = s_esalt[28];
|
||||||
|
carry[13] = s_esalt[29];
|
||||||
|
carry[14] = s_esalt[30];
|
||||||
|
carry[15] = s_esalt[31];
|
||||||
|
|
||||||
|
// we can always use pw_len here, since we add exactly the hash buffer size
|
||||||
|
memcat64c_be (w, out_len2, carry);
|
||||||
|
|
||||||
|
sha256_transform (w, digest);
|
||||||
|
|
||||||
|
w[ 0] = carry[ 0];
|
||||||
|
w[ 1] = carry[ 1];
|
||||||
|
w[ 2] = carry[ 2];
|
||||||
|
w[ 3] = carry[ 3];
|
||||||
|
w[ 4] = carry[ 4];
|
||||||
|
w[ 5] = carry[ 5];
|
||||||
|
w[ 6] = carry[ 6];
|
||||||
|
w[ 7] = carry[ 7];
|
||||||
|
w[ 8] = carry[ 8];
|
||||||
|
w[ 9] = carry[ 9];
|
||||||
|
w[10] = carry[10];
|
||||||
|
w[11] = carry[11];
|
||||||
|
w[12] = carry[12];
|
||||||
|
w[13] = carry[13];
|
||||||
|
w[14] = carry[14];
|
||||||
|
w[15] = carry[15];
|
||||||
|
|
||||||
|
// we can always use pw_len here, since we add exactly the hash buffer size
|
||||||
|
append_0x80_4x4 (w + 0, w + 4, w + 8, w + 12, out_len2 ^ 3);
|
||||||
|
|
||||||
|
w[14] = 0;
|
||||||
|
w[15] = (out_len2 + 128) * 8;
|
||||||
|
|
||||||
|
sha256_transform (w, digest);
|
||||||
|
|
||||||
|
const u32x d = digest[DGST_R0];
|
||||||
|
const u32x h = digest[DGST_R1];
|
||||||
|
const u32x c = digest[DGST_R2];
|
||||||
|
const u32x g = digest[DGST_R3];
|
||||||
|
|
||||||
|
COMPARE_M_SIMD (d, h, c, g);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__kernel void m13800_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global win8phone_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
__kernel void m13800_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global win8phone_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
__kernel void m13800_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global win8phone_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* modifier
|
||||||
|
*/
|
||||||
|
|
||||||
|
const u32 gid = get_global_id (0);
|
||||||
|
const u32 lid = get_local_id (0);
|
||||||
|
const u32 lsz = get_local_size (0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* base
|
||||||
|
*/
|
||||||
|
|
||||||
|
u32 pw_buf0[4];
|
||||||
|
u32 pw_buf1[4];
|
||||||
|
|
||||||
|
pw_buf0[0] = pws[gid].i[0];
|
||||||
|
pw_buf0[1] = pws[gid].i[1];
|
||||||
|
pw_buf0[2] = pws[gid].i[2];
|
||||||
|
pw_buf0[3] = pws[gid].i[3];
|
||||||
|
pw_buf1[0] = pws[gid].i[4];
|
||||||
|
pw_buf1[1] = pws[gid].i[5];
|
||||||
|
pw_buf1[2] = pws[gid].i[6];
|
||||||
|
pw_buf1[3] = pws[gid].i[7];
|
||||||
|
|
||||||
|
const u32 pw_len = pws[gid].pw_len;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* shared
|
||||||
|
*/
|
||||||
|
|
||||||
|
__local u32 s_esalt[32];
|
||||||
|
|
||||||
|
for (u32 i = lid; i < 32; i += lsz)
|
||||||
|
{
|
||||||
|
s_esalt[i] = esalt_bufs[salt_pos].salt_buf[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
barrier (CLK_LOCAL_MEM_FENCE);
|
||||||
|
|
||||||
|
if (gid >= gid_max) return;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* digest
|
||||||
|
*/
|
||||||
|
|
||||||
|
const u32 search[4] =
|
||||||
|
{
|
||||||
|
digests_buf[digests_offset].digest_buf[DGST_R0],
|
||||||
|
digests_buf[digests_offset].digest_buf[DGST_R1],
|
||||||
|
digests_buf[digests_offset].digest_buf[DGST_R2],
|
||||||
|
digests_buf[digests_offset].digest_buf[DGST_R3]
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* loop
|
||||||
|
*/
|
||||||
|
|
||||||
|
for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
|
||||||
|
{
|
||||||
|
u32x w0[4] = { 0 };
|
||||||
|
u32x w1[4] = { 0 };
|
||||||
|
u32x w2[4] = { 0 };
|
||||||
|
u32x w3[4] = { 0 };
|
||||||
|
|
||||||
|
const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
|
||||||
|
|
||||||
|
const u32x out_len2 = out_len * 2;
|
||||||
|
|
||||||
|
make_unicode (w1, w2, w3);
|
||||||
|
make_unicode (w0, w0, w1);
|
||||||
|
|
||||||
|
u32x w[16];
|
||||||
|
|
||||||
|
w[ 0] = swap32 (w0[0]);
|
||||||
|
w[ 1] = swap32 (w0[1]);
|
||||||
|
w[ 2] = swap32 (w0[2]);
|
||||||
|
w[ 3] = swap32 (w0[3]);
|
||||||
|
w[ 4] = swap32 (w1[0]);
|
||||||
|
w[ 5] = swap32 (w1[1]);
|
||||||
|
w[ 6] = swap32 (w1[2]);
|
||||||
|
w[ 7] = swap32 (w1[3]);
|
||||||
|
w[ 8] = swap32 (w2[0]);
|
||||||
|
w[ 9] = swap32 (w2[1]);
|
||||||
|
w[10] = swap32 (w2[2]);
|
||||||
|
w[11] = swap32 (w2[3]);
|
||||||
|
w[12] = swap32 (w3[0]);
|
||||||
|
w[13] = swap32 (w3[1]);
|
||||||
|
w[14] = swap32 (w3[2]);
|
||||||
|
w[15] = swap32 (w3[3]);
|
||||||
|
|
||||||
|
u32x carry[16];
|
||||||
|
|
||||||
|
carry[ 0] = s_esalt[ 0];
|
||||||
|
carry[ 1] = s_esalt[ 1];
|
||||||
|
carry[ 2] = s_esalt[ 2];
|
||||||
|
carry[ 3] = s_esalt[ 3];
|
||||||
|
carry[ 4] = s_esalt[ 4];
|
||||||
|
carry[ 5] = s_esalt[ 5];
|
||||||
|
carry[ 6] = s_esalt[ 6];
|
||||||
|
carry[ 7] = s_esalt[ 7];
|
||||||
|
carry[ 8] = s_esalt[ 8];
|
||||||
|
carry[ 9] = s_esalt[ 9];
|
||||||
|
carry[10] = s_esalt[10];
|
||||||
|
carry[11] = s_esalt[11];
|
||||||
|
carry[12] = s_esalt[12];
|
||||||
|
carry[13] = s_esalt[13];
|
||||||
|
carry[14] = s_esalt[14];
|
||||||
|
carry[15] = s_esalt[15];
|
||||||
|
|
||||||
|
// we can always use pw_len here, since we add exactly the hash buffer size
|
||||||
|
memcat64c_be (w, out_len2, carry);
|
||||||
|
|
||||||
|
u32x digest[8];
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
sha256_transform (w, digest);
|
||||||
|
|
||||||
|
w[ 0] = carry[ 0];
|
||||||
|
w[ 1] = carry[ 1];
|
||||||
|
w[ 2] = carry[ 2];
|
||||||
|
w[ 3] = carry[ 3];
|
||||||
|
w[ 4] = carry[ 4];
|
||||||
|
w[ 5] = carry[ 5];
|
||||||
|
w[ 6] = carry[ 6];
|
||||||
|
w[ 7] = carry[ 7];
|
||||||
|
w[ 8] = carry[ 8];
|
||||||
|
w[ 9] = carry[ 9];
|
||||||
|
w[10] = carry[10];
|
||||||
|
w[11] = carry[11];
|
||||||
|
w[12] = carry[12];
|
||||||
|
w[13] = carry[13];
|
||||||
|
w[14] = carry[14];
|
||||||
|
w[15] = carry[15];
|
||||||
|
|
||||||
|
carry[ 0] = s_esalt[16];
|
||||||
|
carry[ 1] = s_esalt[17];
|
||||||
|
carry[ 2] = s_esalt[18];
|
||||||
|
carry[ 3] = s_esalt[19];
|
||||||
|
carry[ 4] = s_esalt[20];
|
||||||
|
carry[ 5] = s_esalt[21];
|
||||||
|
carry[ 6] = s_esalt[22];
|
||||||
|
carry[ 7] = s_esalt[23];
|
||||||
|
carry[ 8] = s_esalt[24];
|
||||||
|
carry[ 9] = s_esalt[25];
|
||||||
|
carry[10] = s_esalt[26];
|
||||||
|
carry[11] = s_esalt[27];
|
||||||
|
carry[12] = s_esalt[28];
|
||||||
|
carry[13] = s_esalt[29];
|
||||||
|
carry[14] = s_esalt[30];
|
||||||
|
carry[15] = s_esalt[31];
|
||||||
|
|
||||||
|
// we can always use pw_len here, since we add exactly the hash buffer size
|
||||||
|
memcat64c_be (w, out_len2, carry);
|
||||||
|
|
||||||
|
sha256_transform (w, digest);
|
||||||
|
|
||||||
|
w[ 0] = carry[ 0];
|
||||||
|
w[ 1] = carry[ 1];
|
||||||
|
w[ 2] = carry[ 2];
|
||||||
|
w[ 3] = carry[ 3];
|
||||||
|
w[ 4] = carry[ 4];
|
||||||
|
w[ 5] = carry[ 5];
|
||||||
|
w[ 6] = carry[ 6];
|
||||||
|
w[ 7] = carry[ 7];
|
||||||
|
w[ 8] = carry[ 8];
|
||||||
|
w[ 9] = carry[ 9];
|
||||||
|
w[10] = carry[10];
|
||||||
|
w[11] = carry[11];
|
||||||
|
w[12] = carry[12];
|
||||||
|
w[13] = carry[13];
|
||||||
|
w[14] = carry[14];
|
||||||
|
w[15] = carry[15];
|
||||||
|
|
||||||
|
// we can always use pw_len here, since we add exactly the hash buffer size
|
||||||
|
append_0x80_4x4 (w + 0, w + 4, w + 8, w + 12, out_len2 ^ 3);
|
||||||
|
|
||||||
|
w[14] = 0;
|
||||||
|
w[15] = (out_len2 + 128) * 8;
|
||||||
|
|
||||||
|
sha256_transform (w, digest);
|
||||||
|
|
||||||
|
const u32x d = digest[DGST_R0];
|
||||||
|
const u32x h = digest[DGST_R1];
|
||||||
|
const u32x c = digest[DGST_R2];
|
||||||
|
const u32x g = digest[DGST_R3];
|
||||||
|
|
||||||
|
COMPARE_S_SIMD (d, h, c, g);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__kernel void m13800_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global win8phone_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
__kernel void m13800_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global win8phone_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
|
||||||
|
{
|
||||||
|
}
|
1021
OpenCL/m13800_a1.cl
Normal file
1021
OpenCL/m13800_a1.cl
Normal file
File diff suppressed because it is too large
Load Diff
1154
OpenCL/m13800_a3.cl
Normal file
1154
OpenCL/m13800_a3.cl
Normal file
File diff suppressed because it is too large
Load Diff
@ -48,6 +48,7 @@ It combines all features of all hashcat projects in one project.
|
|||||||
- Added new hash-mode 13500 = PeopleSoft PS_TOKEN
|
- Added new hash-mode 13500 = PeopleSoft PS_TOKEN
|
||||||
- Added new hash-mode 13600 = WinZip
|
- Added new hash-mode 13600 = WinZip
|
||||||
- Added new hash-mode 137** = VeraCrypt
|
- Added new hash-mode 137** = VeraCrypt
|
||||||
|
- Added new hash-mode 13800 = Windows 8+ phone PIN/Password
|
||||||
|
|
||||||
##
|
##
|
||||||
## Performance
|
## Performance
|
||||||
|
@ -160,6 +160,7 @@ NVidia users require NVidia drivers 346.59 or later (recommended 361.x or later)
|
|||||||
- Juniper IVE
|
- Juniper IVE
|
||||||
- Juniper Netscreen/SSG (ScreenOS)
|
- Juniper Netscreen/SSG (ScreenOS)
|
||||||
- Android PIN
|
- Android PIN
|
||||||
|
- Windows 8+ phone PIN/Password
|
||||||
- GRUB 2
|
- GRUB 2
|
||||||
- CRC32
|
- CRC32
|
||||||
- RACF
|
- RACF
|
||||||
|
@ -354,6 +354,7 @@ extern hc_thread_mutex_t mux_display;
|
|||||||
#define HT_13400 "Keepass 1 (AES/Twofish) and Keepass 2 (AES)"
|
#define HT_13400 "Keepass 1 (AES/Twofish) and Keepass 2 (AES)"
|
||||||
#define HT_13500 "PeopleSoft PS_TOKEN"
|
#define HT_13500 "PeopleSoft PS_TOKEN"
|
||||||
#define HT_13600 "WinZip"
|
#define HT_13600 "WinZip"
|
||||||
|
#define HT_13800 "Windows 8+ phone PIN/Password"
|
||||||
|
|
||||||
#define HT_00011 "Joomla < 2.5.18"
|
#define HT_00011 "Joomla < 2.5.18"
|
||||||
#define HT_00012 "PostgreSQL"
|
#define HT_00012 "PostgreSQL"
|
||||||
@ -718,6 +719,8 @@ extern hc_thread_mutex_t mux_display;
|
|||||||
#define DISPLAY_LEN_MAX_13500 40 + 1 + 1024
|
#define DISPLAY_LEN_MAX_13500 40 + 1 + 1024
|
||||||
#define DISPLAY_LEN_MIN_13600 6 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 16 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 20 + 1 + 7
|
#define DISPLAY_LEN_MIN_13600 6 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 16 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 20 + 1 + 7
|
||||||
#define DISPLAY_LEN_MAX_13600 6 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 32 + 1 + 4 + 1 + 4 + 1 + 8192 + 1 + 20 + 1 + 7
|
#define DISPLAY_LEN_MAX_13600 6 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 32 + 1 + 4 + 1 + 4 + 1 + 8192 + 1 + 20 + 1 + 7
|
||||||
|
#define DISPLAY_LEN_MIN_13800 64 + 1 + 256
|
||||||
|
#define DISPLAY_LEN_MAX_13800 64 + 1 + 256
|
||||||
|
|
||||||
#define DISPLAY_LEN_MIN_11 32 + 1 + 16
|
#define DISPLAY_LEN_MIN_11 32 + 1 + 16
|
||||||
#define DISPLAY_LEN_MAX_11 32 + 1 + 32
|
#define DISPLAY_LEN_MAX_11 32 + 1 + 32
|
||||||
@ -988,6 +991,7 @@ extern hc_thread_mutex_t mux_display;
|
|||||||
#define KERN_TYPE_KEEPASS 13400
|
#define KERN_TYPE_KEEPASS 13400
|
||||||
#define KERN_TYPE_PSTOKEN 13500
|
#define KERN_TYPE_PSTOKEN 13500
|
||||||
#define KERN_TYPE_ZIP2 13600
|
#define KERN_TYPE_ZIP2 13600
|
||||||
|
#define KERN_TYPE_WIN8PHONE 13800
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* signatures
|
* signatures
|
||||||
@ -1648,6 +1652,7 @@ int veracrypt_parse_hash_200000 (char *input_buf, uint input_len, hash_t *hash
|
|||||||
int veracrypt_parse_hash_500000 (char *input_buf, uint input_len, hash_t *hash_buf);
|
int veracrypt_parse_hash_500000 (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||||
int veracrypt_parse_hash_327661 (char *input_buf, uint input_len, hash_t *hash_buf);
|
int veracrypt_parse_hash_327661 (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||||
int veracrypt_parse_hash_655331 (char *input_buf, uint input_len, hash_t *hash_buf);
|
int veracrypt_parse_hash_655331 (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||||
|
int win8phone_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
|
||||||
|
|
||||||
void load_kernel (const char *kernel_file, int num_devices, size_t *kernel_lengths, const u8 **kernel_sources);
|
void load_kernel (const char *kernel_file, int num_devices, size_t *kernel_lengths, const u8 **kernel_sources);
|
||||||
void writeProgramBin (char *dst, u8 *binary, size_t binary_size);
|
void writeProgramBin (char *dst, u8 *binary, size_t binary_size);
|
||||||
|
@ -283,6 +283,12 @@ typedef struct
|
|||||||
|
|
||||||
} zip2_t;
|
} zip2_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint salt_buf[32];
|
||||||
|
|
||||||
|
} win8phone_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint P[256];
|
uint P[256];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/**
|
/**
|
||||||
* Authors.....: Jens Steube <jens.steube@gmail.com>
|
* Authors.....: Jens Steube <jens.steube@gmail.com>
|
||||||
* Gabriele Gristina <matrix@hashcat.net>
|
* Gabriele Gristina <matrix@hashcat.net>
|
||||||
* magnum <john.magnum@hushmail.com>
|
* magnum <john.magnum@hushmail.com>
|
||||||
@ -576,6 +576,7 @@ const char *USAGE_BIG[] =
|
|||||||
" 22 | Juniper Netscreen/SSG (ScreenOS) | Operating-Systems",
|
" 22 | Juniper Netscreen/SSG (ScreenOS) | Operating-Systems",
|
||||||
" 501 | Juniper IVE | Operating-Systems",
|
" 501 | Juniper IVE | Operating-Systems",
|
||||||
" 5800 | Android PIN | Operating-Systems",
|
" 5800 | Android PIN | Operating-Systems",
|
||||||
|
" 13800 | Windows 8+ phone PIN/Password | Operating-Systems",
|
||||||
" 8100 | Citrix Netscaler | Operating-Systems",
|
" 8100 | Citrix Netscaler | Operating-Systems",
|
||||||
" 8500 | RACF | Operating-Systems",
|
" 8500 | RACF | Operating-Systems",
|
||||||
" 7200 | GRUB 2 | Operating-Systems",
|
" 7200 | GRUB 2 | Operating-Systems",
|
||||||
@ -6124,7 +6125,7 @@ int main (int argc, char **argv)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hash_mode_chgd && hash_mode > 13799) // just added to remove compiler warnings for hash_mode_chgd
|
if (hash_mode_chgd && hash_mode > 13800) // just added to remove compiler warnings for hash_mode_chgd
|
||||||
{
|
{
|
||||||
log_error ("ERROR: Invalid hash-type specified");
|
log_error ("ERROR: Invalid hash-type specified");
|
||||||
|
|
||||||
@ -10797,6 +10798,26 @@ int main (int argc, char **argv)
|
|||||||
dgst_pos3 = 3;
|
dgst_pos3 = 3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 13800: hash_type = HASH_TYPE_SHA256;
|
||||||
|
salt_type = SALT_TYPE_EMBEDDED;
|
||||||
|
attack_exec = ATTACK_EXEC_INSIDE_KERNEL;
|
||||||
|
opts_type = OPTS_TYPE_PT_GENERATE_BE
|
||||||
|
| OPTS_TYPE_PT_UNICODE;
|
||||||
|
kern_type = KERN_TYPE_WIN8PHONE;
|
||||||
|
dgst_size = DGST_SIZE_4_8;
|
||||||
|
parse_func = win8phone_parse_hash;
|
||||||
|
sort_by_digest = sort_by_digest_4_8;
|
||||||
|
opti_type = OPTI_TYPE_ZERO_BYTE
|
||||||
|
| OPTI_TYPE_PRECOMPUTE_INIT
|
||||||
|
| OPTI_TYPE_EARLY_SKIP
|
||||||
|
| OPTI_TYPE_NOT_ITERATED
|
||||||
|
| OPTI_TYPE_RAW_HASH;
|
||||||
|
dgst_pos0 = 3;
|
||||||
|
dgst_pos1 = 7;
|
||||||
|
dgst_pos2 = 2;
|
||||||
|
dgst_pos3 = 6;
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
default: usage_mini_print (PROGNAME); return (-1);
|
default: usage_mini_print (PROGNAME); return (-1);
|
||||||
}
|
}
|
||||||
@ -10923,6 +10944,7 @@ int main (int argc, char **argv)
|
|||||||
case 13761: esalt_size = sizeof (tc_t); break;
|
case 13761: esalt_size = sizeof (tc_t); break;
|
||||||
case 13762: esalt_size = sizeof (tc_t); break;
|
case 13762: esalt_size = sizeof (tc_t); break;
|
||||||
case 13763: esalt_size = sizeof (tc_t); break;
|
case 13763: esalt_size = sizeof (tc_t); break;
|
||||||
|
case 13800: esalt_size = sizeof (win8phone_t); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.esalt_size = esalt_size;
|
data.esalt_size = esalt_size;
|
||||||
|
69
src/shared.c
69
src/shared.c
@ -6031,6 +6031,7 @@ char *strhashtype (const uint hash_mode)
|
|||||||
case 13761: return ((char *) HT_13761); break;
|
case 13761: return ((char *) HT_13761); break;
|
||||||
case 13762: return ((char *) HT_13762); break;
|
case 13762: return ((char *) HT_13762); break;
|
||||||
case 13763: return ((char *) HT_13763); break;
|
case 13763: return ((char *) HT_13763); break;
|
||||||
|
case 13800: return ((char *) HT_13800); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ((char *) "Unknown");
|
return ((char *) "Unknown");
|
||||||
@ -8737,6 +8738,30 @@ void ascii_digest (char *out_buf, uint salt_pos, uint digest_pos)
|
|||||||
{
|
{
|
||||||
snprintf (out_buf, len-1, "%s", hashfile);
|
snprintf (out_buf, len-1, "%s", hashfile);
|
||||||
}
|
}
|
||||||
|
else if (hash_mode == 13800)
|
||||||
|
{
|
||||||
|
win8phone_t *esalts = (win8phone_t *) data.esalts_buf;
|
||||||
|
|
||||||
|
win8phone_t *esalt = &esalts[salt_pos];
|
||||||
|
|
||||||
|
char buf[256 + 1] = { 0 };
|
||||||
|
|
||||||
|
for (int i = 0, j = 0; i < 32; i += 1, j += 8)
|
||||||
|
{
|
||||||
|
sprintf (buf + j, "%08x", esalt->salt_buf[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
snprintf (out_buf, len-1, "%08x%08x%08x%08x%08x%08x%08x%08x:%s",
|
||||||
|
digest_buf[0],
|
||||||
|
digest_buf[1],
|
||||||
|
digest_buf[2],
|
||||||
|
digest_buf[3],
|
||||||
|
digest_buf[4],
|
||||||
|
digest_buf[5],
|
||||||
|
digest_buf[6],
|
||||||
|
digest_buf[7],
|
||||||
|
buf);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (hash_type == HASH_TYPE_MD4)
|
if (hash_type == HASH_TYPE_MD4)
|
||||||
@ -20518,6 +20543,50 @@ int zip2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
|
|||||||
return (PARSER_OK);
|
return (PARSER_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int win8phone_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
|
||||||
|
{
|
||||||
|
if ((input_len < DISPLAY_LEN_MIN_13800) || (input_len > DISPLAY_LEN_MAX_13800)) return (PARSER_GLOBAL_LENGTH);
|
||||||
|
|
||||||
|
u32 *digest = (u32 *) hash_buf->digest;
|
||||||
|
|
||||||
|
salt_t *salt = hash_buf->salt;
|
||||||
|
|
||||||
|
win8phone_t *esalt = hash_buf->esalt;
|
||||||
|
|
||||||
|
digest[0] = hex_to_u32 ((const u8 *) &input_buf[ 0]);
|
||||||
|
digest[1] = hex_to_u32 ((const u8 *) &input_buf[ 8]);
|
||||||
|
digest[2] = hex_to_u32 ((const u8 *) &input_buf[16]);
|
||||||
|
digest[3] = hex_to_u32 ((const u8 *) &input_buf[24]);
|
||||||
|
digest[4] = hex_to_u32 ((const u8 *) &input_buf[32]);
|
||||||
|
digest[5] = hex_to_u32 ((const u8 *) &input_buf[40]);
|
||||||
|
digest[6] = hex_to_u32 ((const u8 *) &input_buf[48]);
|
||||||
|
digest[7] = hex_to_u32 ((const u8 *) &input_buf[56]);
|
||||||
|
|
||||||
|
if (input_buf[64] != data.separator) return (PARSER_SEPARATOR_UNMATCHED);
|
||||||
|
|
||||||
|
char *salt_buf_ptr = input_buf + 64 + 1;
|
||||||
|
|
||||||
|
u32 *salt_buf = esalt->salt_buf;
|
||||||
|
|
||||||
|
for (int i = 0, j = 0; i < 32; i += 1, j += 8)
|
||||||
|
{
|
||||||
|
salt_buf[i] = hex_to_u32 ((const u8 *) &salt_buf_ptr[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
salt->salt_buf[0] = salt_buf[0];
|
||||||
|
salt->salt_buf[1] = salt_buf[1];
|
||||||
|
salt->salt_buf[2] = salt_buf[2];
|
||||||
|
salt->salt_buf[3] = salt_buf[3];
|
||||||
|
salt->salt_buf[4] = salt_buf[4];
|
||||||
|
salt->salt_buf[5] = salt_buf[5];
|
||||||
|
salt->salt_buf[6] = salt_buf[6];
|
||||||
|
salt->salt_buf[7] = salt_buf[7];
|
||||||
|
|
||||||
|
salt->salt_len = 64;
|
||||||
|
|
||||||
|
return (PARSER_OK);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* parallel running threads
|
* parallel running threads
|
||||||
*/
|
*/
|
||||||
|
@ -45,11 +45,11 @@ 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, 190, 200, 300, 400, 500, 900, 1000, 1100, 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, 4600, 4700, 4800, 4900, 5000, 5100, 5300, 5400, 5500, 5600, 5700, 5800, 6000, 6100, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7100, 7200, 7300, 7400, 7500, 7600, 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);
|
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, 190, 200, 300, 400, 500, 900, 1000, 1100, 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, 4600, 4700, 4800, 4900, 5000, 5100, 5300, 5400, 5500, 5600, 5700, 5800, 6000, 6100, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7100, 7200, 7300, 7400, 7500, 7600, 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);
|
||||||
|
|
||||||
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);
|
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);
|
||||||
my %allow_long_salt = map { $_ => 1 } qw(2500 5500 5600 7100 7200 7300 9400 9500 9600 9700 9800 10400 10500 10600 10700 1100 11000 11200 11300 11400 11600 12600 13500);
|
my %allow_long_salt = map { $_ => 1 } qw(2500 5500 5600 7100 7200 7300 9400 9500 9600 9700 9800 10400 10500 10600 10700 1100 11000 11200 11300 11400 11600 12600 13500 13800);
|
||||||
|
|
||||||
my @lotus_magic_table =
|
my @lotus_magic_table =
|
||||||
(
|
(
|
||||||
@ -226,7 +226,7 @@ sub verify
|
|||||||
$word = substr ($line, $index + 1);
|
$word = substr ($line, $index + 1);
|
||||||
}
|
}
|
||||||
# hash:salt
|
# hash:salt
|
||||||
elsif ($mode == 10 || $mode == 11 || $mode == 12 || $mode == 20 || $mode == 21 || $mode == 22 || $mode == 23 || $mode == 30 || $mode == 40 || $mode == 50 || $mode == 60 || $mode == 110 || $mode == 112 || $mode == 120 || $mode == 121 || $mode == 130 || $mode == 140 || $mode == 150 || $mode == 160 || $mode == 1100 || $mode == 1410 || $mode == 1420 || $mode == 1430 || $mode == 1440 || $mode == 1450 || $mode == 1460 || $mode == 1710 || $mode == 1720 || $mode == 1730 || $mode == 1740 || $mode == 1750 || $mode == 1760 || $mode == 2410 || $mode == 2611 || $mode == 2711 || $mode == 2811 || $mode == 3100 || $mode == 3610 || $mode == 3710 || $mode == 3720 || $mode == 3800 || $mode == 3910 || $mode == 4010 || $mode == 4110 || $mode == 4210 || $mode == 4900 || $mode == 5800 || $mode == 7600 || $mode == 8400 || $mode == 11000 || $mode == 12600 || $mode == 13500)
|
elsif ($mode == 10 || $mode == 11 || $mode == 12 || $mode == 20 || $mode == 21 || $mode == 22 || $mode == 23 || $mode == 30 || $mode == 40 || $mode == 50 || $mode == 60 || $mode == 110 || $mode == 112 || $mode == 120 || $mode == 121 || $mode == 130 || $mode == 140 || $mode == 150 || $mode == 160 || $mode == 1100 || $mode == 1410 || $mode == 1420 || $mode == 1430 || $mode == 1440 || $mode == 1450 || $mode == 1460 || $mode == 1710 || $mode == 1720 || $mode == 1730 || $mode == 1740 || $mode == 1750 || $mode == 1760 || $mode == 2410 || $mode == 2611 || $mode == 2711 || $mode == 2811 || $mode == 3100 || $mode == 3610 || $mode == 3710 || $mode == 3720 || $mode == 3800 || $mode == 3910 || $mode == 4010 || $mode == 4110 || $mode == 4210 || $mode == 4900 || $mode == 5800 || $mode == 7600 || $mode == 8400 || $mode == 11000 || $mode == 12600 || $mode == 13500 || $mode == 13800)
|
||||||
{
|
{
|
||||||
# get hash
|
# get hash
|
||||||
my $index1 = index ($line, ":");
|
my $index1 = index ($line, ":");
|
||||||
@ -3169,6 +3169,10 @@ sub passthrough
|
|||||||
{
|
{
|
||||||
$tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 32));
|
$tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 32));
|
||||||
}
|
}
|
||||||
|
elsif ($mode == 13800)
|
||||||
|
{
|
||||||
|
$tmp_hash = gen_hash ($mode, $word_buf, substr ($salt_buf, 0, 256));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "ERROR: Unsupported hash type\n";
|
print "ERROR: Unsupported hash type\n";
|
||||||
@ -3966,6 +3970,20 @@ sub single
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif ($mode == 13800)
|
||||||
|
{
|
||||||
|
for (my $i = 1; $i < 32; $i++)
|
||||||
|
{
|
||||||
|
if ($len != 0)
|
||||||
|
{
|
||||||
|
rnd ($mode, $len, 256);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rnd ($mode, $i, 256);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7291,6 +7309,16 @@ END_CODE
|
|||||||
|
|
||||||
$tmp_hash = sprintf ('$zip2$*%u*%u*%u*%s*%s*%u*%s*%s*$/zip2$', $type, $mode, $magic, $salt_buf, $verify_bytes, $compress_length, $data, substr ($auth, 0, 20));
|
$tmp_hash = sprintf ('$zip2$*%u*%u*%u*%s*%s*%u*%s*%s*$/zip2$', $type, $mode, $magic, $salt_buf, $verify_bytes, $compress_length, $data, substr ($auth, 0, 20));
|
||||||
}
|
}
|
||||||
|
elsif ($mode == 13800)
|
||||||
|
{
|
||||||
|
my $word_buf_unicode = encode ("UTF-16LE", $word_buf);
|
||||||
|
|
||||||
|
my $salt_buf_bin = pack ("H*", $salt_buf);
|
||||||
|
|
||||||
|
$hash_buf = sha256_hex ($word_buf_unicode . $salt_buf_bin);
|
||||||
|
|
||||||
|
$tmp_hash = sprintf ("%s:%s", $hash_buf, $salt_buf);
|
||||||
|
}
|
||||||
|
|
||||||
return ($tmp_hash);
|
return ($tmp_hash);
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
# missing hash types: 5200,6211,6221,6231,6241,6251,6261,6271,6281
|
# missing hash types: 5200,6211,6221,6231,6241,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 190 200 300 400 500 900 1000 1100 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 4700 4800 4900 5000 5100 5300 5400 5500 5600 5700 5800 6000 6100 6300 6400 6500 6600 6700 6800 6900 7100 7200 7300 7400 7500 7600 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"
|
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 190 200 300 400 500 900 1000 1100 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 4700 4800 4900 5000 5100 5300 5400 5500 5600 5700 5800 6000 6100 6300 6400 6500 6600 6700 6800 6900 7100 7200 7300 7400 7500 7600 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"
|
||||||
|
|
||||||
#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"
|
||||||
|
Loading…
Reference in New Issue
Block a user