mirror of
https://github.com/hashcat/hashcat
synced 2024-11-13 17:28:58 +01:00
Update -m 16100 kernel to enable cracking of sequences 1, 3 and 5
This commit is contained in:
parent
0fbaff8b90
commit
9a3cf88887
@ -65,7 +65,9 @@ __kernel void m16100_mxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
||||||
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
||||||
|
|
||||||
u32 cl_len = esalt_bufs[digests_offset].ct_data_len;
|
u32 ct_len = esalt_bufs[digests_offset].ct_data_len;
|
||||||
|
|
||||||
|
u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loop
|
* loop
|
||||||
@ -86,7 +88,7 @@ __kernel void m16100_mxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
u32 sequence2[4];
|
u32 sequence2[4];
|
||||||
u32 sequence3[4];
|
u32 sequence3[4];
|
||||||
|
|
||||||
sequence0[0] = esalt_bufs[digests_offset].sequence_buf[0];
|
sequence0[0] = sequence_buf0;
|
||||||
sequence0[1] = 0;
|
sequence0[1] = 0;
|
||||||
sequence0[2] = 0;
|
sequence0[2] = 0;
|
||||||
sequence0[3] = 0;
|
sequence0[3] = 0;
|
||||||
@ -112,6 +114,49 @@ __kernel void m16100_mxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
test[0] = ctx.h[0] ^ ct_buf[0];
|
test[0] = ctx.h[0] ^ ct_buf[0];
|
||||||
test[1] = ctx.h[1] ^ ct_buf[1];
|
test[1] = ctx.h[1] ^ ct_buf[1];
|
||||||
|
|
||||||
|
if (sequence_buf0 == 0x01c0)
|
||||||
|
{
|
||||||
|
const u32 action = ((test[0] >> 0) & 0xff);
|
||||||
|
// can have more than predefined ones
|
||||||
|
// const u32 priv_lvl = ((test[0] >> 8) & 0xff);
|
||||||
|
const u32 authen_type = ((test[0] >> 16) & 0xff);
|
||||||
|
const u32 authen_service = ((test[0] >> 24) & 0xff);
|
||||||
|
const u32 user_len = ((test[1] >> 0) & 0xff);
|
||||||
|
const u32 port_len = ((test[1] >> 8) & 0xff);
|
||||||
|
const u32 rem_addr_len = ((test[1] >> 16) & 0xff);
|
||||||
|
const u32 data_len = ((test[1] >> 24) & 0xff);
|
||||||
|
|
||||||
|
if (((action == 0x01) || (action == 0x02) || (action == 0x04))
|
||||||
|
&& ((authen_type >= 0x01) && (authen_type <= 0x06))
|
||||||
|
&& ((authen_service >= 0x00) && (authen_service <= 0x09))
|
||||||
|
&& ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((sequence_buf0 == 0x03c0) || (sequence_buf0 == 0x05c0))
|
||||||
|
{
|
||||||
|
const u32 msg_len = ((test[0] >> 0) & 0xff) << 8
|
||||||
|
| ((test[0] >> 8) & 0xff) << 0;
|
||||||
|
const u32 data_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
|
| ((test[0] >> 24) & 0xff) << 0;
|
||||||
|
const u32 flags = ((test[1] >> 0) & 0xff);
|
||||||
|
|
||||||
|
if (((5 + msg_len) == ct_len)
|
||||||
|
&& (data_len == 0)
|
||||||
|
&& (flags == 0))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
const u32 status = ((test[0] >> 0) & 0xff);
|
const u32 status = ((test[0] >> 0) & 0xff);
|
||||||
const u32 flags = ((test[0] >> 8) & 0xff);
|
const u32 flags = ((test[0] >> 8) & 0xff);
|
||||||
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
@ -121,7 +166,7 @@ __kernel void m16100_mxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
|
|
||||||
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
||||||
&& (flags == 0x01 || flags == 0x00)
|
&& (flags == 0x01 || flags == 0x00)
|
||||||
&& (6 + msg_len + data_len == cl_len))
|
&& (6 + msg_len + data_len == ct_len))
|
||||||
{
|
{
|
||||||
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
{
|
{
|
||||||
@ -130,6 +175,7 @@ __kernel void m16100_mxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
__kernel void m16100_sxx (__global pw_t *pws, __constant const kernel_rule_t *rules_buf, __global const pw_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const tacacs_plus_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 u64 gid_max)
|
__kernel void m16100_sxx (__global pw_t *pws, __constant const kernel_rule_t *rules_buf, __global const pw_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const tacacs_plus_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 u64 gid_max)
|
||||||
{
|
{
|
||||||
@ -181,7 +227,9 @@ __kernel void m16100_sxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
||||||
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
||||||
|
|
||||||
u32 cl_len = esalt_bufs[digests_offset].ct_data_len;
|
u32 ct_len = esalt_bufs[digests_offset].ct_data_len;
|
||||||
|
|
||||||
|
u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loop
|
* loop
|
||||||
@ -202,7 +250,7 @@ __kernel void m16100_sxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
u32 sequence2[4];
|
u32 sequence2[4];
|
||||||
u32 sequence3[4];
|
u32 sequence3[4];
|
||||||
|
|
||||||
sequence0[0] = esalt_bufs[digests_offset].sequence_buf[0];
|
sequence0[0] = sequence_buf0;
|
||||||
sequence0[1] = 0;
|
sequence0[1] = 0;
|
||||||
sequence0[2] = 0;
|
sequence0[2] = 0;
|
||||||
sequence0[3] = 0;
|
sequence0[3] = 0;
|
||||||
@ -228,6 +276,49 @@ __kernel void m16100_sxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
test[0] = ctx.h[0] ^ ct_buf[0];
|
test[0] = ctx.h[0] ^ ct_buf[0];
|
||||||
test[1] = ctx.h[1] ^ ct_buf[1];
|
test[1] = ctx.h[1] ^ ct_buf[1];
|
||||||
|
|
||||||
|
if (sequence_buf0 == 0x01c0)
|
||||||
|
{
|
||||||
|
const u32 action = ((test[0] >> 0) & 0xff);
|
||||||
|
// can have more than predefined ones
|
||||||
|
// const u32 priv_lvl = ((test[0] >> 8) & 0xff);
|
||||||
|
const u32 authen_type = ((test[0] >> 16) & 0xff);
|
||||||
|
const u32 authen_service = ((test[0] >> 24) & 0xff);
|
||||||
|
const u32 user_len = ((test[1] >> 0) & 0xff);
|
||||||
|
const u32 port_len = ((test[1] >> 8) & 0xff);
|
||||||
|
const u32 rem_addr_len = ((test[1] >> 16) & 0xff);
|
||||||
|
const u32 data_len = ((test[1] >> 24) & 0xff);
|
||||||
|
|
||||||
|
if (((action == 0x01) || (action == 0x02) || (action == 0x04))
|
||||||
|
&& ((authen_type >= 0x01) && (authen_type <= 0x06))
|
||||||
|
&& ((authen_service >= 0x00) && (authen_service <= 0x09))
|
||||||
|
&& ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((sequence_buf0 == 0x03c0) || (sequence_buf0 == 0x05c0))
|
||||||
|
{
|
||||||
|
const u32 msg_len = ((test[0] >> 0) & 0xff) << 8
|
||||||
|
| ((test[0] >> 8) & 0xff) << 0;
|
||||||
|
const u32 data_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
|
| ((test[0] >> 24) & 0xff) << 0;
|
||||||
|
const u32 flags = ((test[1] >> 0) & 0xff);
|
||||||
|
|
||||||
|
if (((5 + msg_len) == ct_len)
|
||||||
|
&& (data_len == 0)
|
||||||
|
&& (flags == 0))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
const u32 status = ((test[0] >> 0) & 0xff);
|
const u32 status = ((test[0] >> 0) & 0xff);
|
||||||
const u32 flags = ((test[0] >> 8) & 0xff);
|
const u32 flags = ((test[0] >> 8) & 0xff);
|
||||||
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
@ -237,7 +328,7 @@ __kernel void m16100_sxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
|
|
||||||
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
||||||
&& (flags == 0x01 || flags == 0x00)
|
&& (flags == 0x01 || flags == 0x00)
|
||||||
&& (6 + msg_len + data_len == cl_len))
|
&& (6 + msg_len + data_len == ct_len))
|
||||||
{
|
{
|
||||||
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
{
|
{
|
||||||
@ -246,3 +337,4 @@ __kernel void m16100_sxx (__global pw_t *pws, __constant const kernel_rule_t *ru
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -62,7 +62,9 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
||||||
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
||||||
|
|
||||||
u32 cl_len = esalt_bufs[digests_offset].ct_data_len;
|
u32 ct_len = esalt_bufs[digests_offset].ct_data_len;
|
||||||
|
|
||||||
|
u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loop
|
* loop
|
||||||
@ -79,7 +81,7 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
u32 sequence2[4];
|
u32 sequence2[4];
|
||||||
u32 sequence3[4];
|
u32 sequence3[4];
|
||||||
|
|
||||||
sequence0[0] = esalt_bufs[digests_offset].sequence_buf[0];
|
sequence0[0] = sequence_buf0;
|
||||||
sequence0[1] = 0;
|
sequence0[1] = 0;
|
||||||
sequence0[2] = 0;
|
sequence0[2] = 0;
|
||||||
sequence0[3] = 0;
|
sequence0[3] = 0;
|
||||||
@ -105,6 +107,49 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
test[0] = ctx.h[0] ^ ct_buf[0];
|
test[0] = ctx.h[0] ^ ct_buf[0];
|
||||||
test[1] = ctx.h[1] ^ ct_buf[1];
|
test[1] = ctx.h[1] ^ ct_buf[1];
|
||||||
|
|
||||||
|
if (sequence_buf0 == 0x01c0)
|
||||||
|
{
|
||||||
|
const u32 action = ((test[0] >> 0) & 0xff);
|
||||||
|
// can have more than predefined ones
|
||||||
|
// const u32 priv_lvl = ((test[0] >> 8) & 0xff);
|
||||||
|
const u32 authen_type = ((test[0] >> 16) & 0xff);
|
||||||
|
const u32 authen_service = ((test[0] >> 24) & 0xff);
|
||||||
|
const u32 user_len = ((test[1] >> 0) & 0xff);
|
||||||
|
const u32 port_len = ((test[1] >> 8) & 0xff);
|
||||||
|
const u32 rem_addr_len = ((test[1] >> 16) & 0xff);
|
||||||
|
const u32 data_len = ((test[1] >> 24) & 0xff);
|
||||||
|
|
||||||
|
if (((action == 0x01) || (action == 0x02) || (action == 0x04))
|
||||||
|
&& ((authen_type >= 0x01) && (authen_type <= 0x06))
|
||||||
|
&& ((authen_service >= 0x00) && (authen_service <= 0x09))
|
||||||
|
&& ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((sequence_buf0 == 0x03c0) || (sequence_buf0 == 0x05c0))
|
||||||
|
{
|
||||||
|
const u32 msg_len = ((test[0] >> 0) & 0xff) << 8
|
||||||
|
| ((test[0] >> 8) & 0xff) << 0;
|
||||||
|
const u32 data_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
|
| ((test[0] >> 24) & 0xff) << 0;
|
||||||
|
const u32 flags = ((test[1] >> 0) & 0xff);
|
||||||
|
|
||||||
|
if (((5 + msg_len) == ct_len)
|
||||||
|
&& (data_len == 0)
|
||||||
|
&& (flags == 0))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
const u32 status = ((test[0] >> 0) & 0xff);
|
const u32 status = ((test[0] >> 0) & 0xff);
|
||||||
const u32 flags = ((test[0] >> 8) & 0xff);
|
const u32 flags = ((test[0] >> 8) & 0xff);
|
||||||
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
@ -114,7 +159,7 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
|
|
||||||
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
||||||
&& (flags == 0x01 || flags == 0x00)
|
&& (flags == 0x01 || flags == 0x00)
|
||||||
&& (6 + msg_len + data_len == cl_len))
|
&& (6 + msg_len + data_len == ct_len))
|
||||||
{
|
{
|
||||||
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
{
|
{
|
||||||
@ -123,6 +168,7 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
__kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const pw_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const tacacs_plus_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 u64 gid_max)
|
__kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const pw_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const tacacs_plus_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 u64 gid_max)
|
||||||
{
|
{
|
||||||
@ -174,7 +220,9 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
||||||
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
||||||
|
|
||||||
u32 cl_len = esalt_bufs[digests_offset].ct_data_len;
|
u32 ct_len = esalt_bufs[digests_offset].ct_data_len;
|
||||||
|
|
||||||
|
u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loop
|
* loop
|
||||||
@ -191,7 +239,7 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
u32 sequence2[4];
|
u32 sequence2[4];
|
||||||
u32 sequence3[4];
|
u32 sequence3[4];
|
||||||
|
|
||||||
sequence0[0] = esalt_bufs[digests_offset].sequence_buf[0];
|
sequence0[0] = sequence_buf0;
|
||||||
sequence0[1] = 0;
|
sequence0[1] = 0;
|
||||||
sequence0[2] = 0;
|
sequence0[2] = 0;
|
||||||
sequence0[3] = 0;
|
sequence0[3] = 0;
|
||||||
@ -217,6 +265,49 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
test[0] = ctx.h[0] ^ ct_buf[0];
|
test[0] = ctx.h[0] ^ ct_buf[0];
|
||||||
test[1] = ctx.h[1] ^ ct_buf[1];
|
test[1] = ctx.h[1] ^ ct_buf[1];
|
||||||
|
|
||||||
|
if (sequence_buf0 == 0x01c0)
|
||||||
|
{
|
||||||
|
const u32 action = ((test[0] >> 0) & 0xff);
|
||||||
|
// can have more than predefined ones
|
||||||
|
// const u32 priv_lvl = ((test[0] >> 8) & 0xff);
|
||||||
|
const u32 authen_type = ((test[0] >> 16) & 0xff);
|
||||||
|
const u32 authen_service = ((test[0] >> 24) & 0xff);
|
||||||
|
const u32 user_len = ((test[1] >> 0) & 0xff);
|
||||||
|
const u32 port_len = ((test[1] >> 8) & 0xff);
|
||||||
|
const u32 rem_addr_len = ((test[1] >> 16) & 0xff);
|
||||||
|
const u32 data_len = ((test[1] >> 24) & 0xff);
|
||||||
|
|
||||||
|
if (((action == 0x01) || (action == 0x02) || (action == 0x04))
|
||||||
|
&& ((authen_type >= 0x01) && (authen_type <= 0x06))
|
||||||
|
&& ((authen_service >= 0x00) && (authen_service <= 0x09))
|
||||||
|
&& ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((sequence_buf0 == 0x03c0) || (sequence_buf0 == 0x05c0))
|
||||||
|
{
|
||||||
|
const u32 msg_len = ((test[0] >> 0) & 0xff) << 8
|
||||||
|
| ((test[0] >> 8) & 0xff) << 0;
|
||||||
|
const u32 data_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
|
| ((test[0] >> 24) & 0xff) << 0;
|
||||||
|
const u32 flags = ((test[1] >> 0) & 0xff);
|
||||||
|
|
||||||
|
if (((5 + msg_len) == ct_len)
|
||||||
|
&& (data_len == 0)
|
||||||
|
&& (flags == 0))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
const u32 status = ((test[0] >> 0) & 0xff);
|
const u32 status = ((test[0] >> 0) & 0xff);
|
||||||
const u32 flags = ((test[0] >> 8) & 0xff);
|
const u32 flags = ((test[0] >> 8) & 0xff);
|
||||||
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
@ -226,7 +317,7 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
|
|
||||||
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
||||||
&& (flags == 0x01 || flags == 0x00)
|
&& (flags == 0x01 || flags == 0x00)
|
||||||
&& (6 + msg_len + data_len == cl_len))
|
&& (6 + msg_len + data_len == ct_len))
|
||||||
{
|
{
|
||||||
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
{
|
{
|
||||||
@ -235,3 +326,4 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -69,7 +69,9 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
||||||
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
||||||
|
|
||||||
u32 cl_len = esalt_bufs[digests_offset].ct_data_len;
|
u32 ct_len = esalt_bufs[digests_offset].ct_data_len;
|
||||||
|
|
||||||
|
u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loop
|
* loop
|
||||||
@ -96,7 +98,7 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
u32x sequence2[4];
|
u32x sequence2[4];
|
||||||
u32x sequence3[4];
|
u32x sequence3[4];
|
||||||
|
|
||||||
sequence0[0] = esalt_bufs[digests_offset].sequence_buf[0];
|
sequence0[0] = sequence_buf0;
|
||||||
sequence0[1] = 0;
|
sequence0[1] = 0;
|
||||||
sequence0[2] = 0;
|
sequence0[2] = 0;
|
||||||
sequence0[3] = 0;
|
sequence0[3] = 0;
|
||||||
@ -122,6 +124,49 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
test[0] = ctx.h[0] ^ ct_buf[0];
|
test[0] = ctx.h[0] ^ ct_buf[0];
|
||||||
test[1] = ctx.h[1] ^ ct_buf[1];
|
test[1] = ctx.h[1] ^ ct_buf[1];
|
||||||
|
|
||||||
|
if (sequence_buf0 == 0x01c0)
|
||||||
|
{
|
||||||
|
const u32 action = ((test[0] >> 0) & 0xff);
|
||||||
|
// can have more than predefined ones
|
||||||
|
// const u32 priv_lvl = ((test[0] >> 8) & 0xff);
|
||||||
|
const u32 authen_type = ((test[0] >> 16) & 0xff);
|
||||||
|
const u32 authen_service = ((test[0] >> 24) & 0xff);
|
||||||
|
const u32 user_len = ((test[1] >> 0) & 0xff);
|
||||||
|
const u32 port_len = ((test[1] >> 8) & 0xff);
|
||||||
|
const u32 rem_addr_len = ((test[1] >> 16) & 0xff);
|
||||||
|
const u32 data_len = ((test[1] >> 24) & 0xff);
|
||||||
|
|
||||||
|
if (((action == 0x01) || (action == 0x02) || (action == 0x04))
|
||||||
|
&& ((authen_type >= 0x01) && (authen_type <= 0x06))
|
||||||
|
&& ((authen_service >= 0x00) && (authen_service <= 0x09))
|
||||||
|
&& ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((sequence_buf0 == 0x03c0) || (sequence_buf0 == 0x05c0))
|
||||||
|
{
|
||||||
|
const u32 msg_len = ((test[0] >> 0) & 0xff) << 8
|
||||||
|
| ((test[0] >> 8) & 0xff) << 0;
|
||||||
|
const u32 data_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
|
| ((test[0] >> 24) & 0xff) << 0;
|
||||||
|
const u32 flags = ((test[1] >> 0) & 0xff);
|
||||||
|
|
||||||
|
if (((5 + msg_len) == ct_len)
|
||||||
|
&& (data_len == 0)
|
||||||
|
&& (flags == 0))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
const u32 status = ((test[0] >> 0) & 0xff);
|
const u32 status = ((test[0] >> 0) & 0xff);
|
||||||
const u32 flags = ((test[0] >> 8) & 0xff);
|
const u32 flags = ((test[0] >> 8) & 0xff);
|
||||||
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
@ -131,7 +176,7 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
|
|
||||||
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
||||||
&& (flags == 0x01 || flags == 0x00)
|
&& (flags == 0x01 || flags == 0x00)
|
||||||
&& (6 + msg_len + data_len == cl_len))
|
&& (6 + msg_len + data_len == ct_len))
|
||||||
{
|
{
|
||||||
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
{
|
{
|
||||||
@ -140,6 +185,7 @@ __kernel void m16100_mxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
__kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const pw_t *combs_buf, __constant const u32x *words_buf_r, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const tacacs_plus_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 u64 gid_max)
|
__kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const pw_t *combs_buf, __constant const u32x *words_buf_r, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const tacacs_plus_t *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_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 u64 gid_max)
|
||||||
{
|
{
|
||||||
@ -198,7 +244,9 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
ct_buf[0] = esalt_bufs[digests_offset].ct_data_buf[0];
|
||||||
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
ct_buf[1] = esalt_bufs[digests_offset].ct_data_buf[1];
|
||||||
|
|
||||||
u32 cl_len = esalt_bufs[digests_offset].ct_data_len;
|
u32 ct_len = esalt_bufs[digests_offset].ct_data_len;
|
||||||
|
|
||||||
|
u32 sequence_buf0 = esalt_bufs[digests_offset].sequence_buf[0];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loop
|
* loop
|
||||||
@ -225,7 +273,7 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
u32x sequence2[4];
|
u32x sequence2[4];
|
||||||
u32x sequence3[4];
|
u32x sequence3[4];
|
||||||
|
|
||||||
sequence0[0] = esalt_bufs[digests_offset].sequence_buf[0];
|
sequence0[0] = sequence_buf0;
|
||||||
sequence0[1] = 0;
|
sequence0[1] = 0;
|
||||||
sequence0[2] = 0;
|
sequence0[2] = 0;
|
||||||
sequence0[3] = 0;
|
sequence0[3] = 0;
|
||||||
@ -251,6 +299,49 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
test[0] = ctx.h[0] ^ ct_buf[0];
|
test[0] = ctx.h[0] ^ ct_buf[0];
|
||||||
test[1] = ctx.h[1] ^ ct_buf[1];
|
test[1] = ctx.h[1] ^ ct_buf[1];
|
||||||
|
|
||||||
|
if (sequence_buf0 == 0x01c0)
|
||||||
|
{
|
||||||
|
const u32 action = ((test[0] >> 0) & 0xff);
|
||||||
|
// can have more than predefined ones
|
||||||
|
// const u32 priv_lvl = ((test[0] >> 8) & 0xff);
|
||||||
|
const u32 authen_type = ((test[0] >> 16) & 0xff);
|
||||||
|
const u32 authen_service = ((test[0] >> 24) & 0xff);
|
||||||
|
const u32 user_len = ((test[1] >> 0) & 0xff);
|
||||||
|
const u32 port_len = ((test[1] >> 8) & 0xff);
|
||||||
|
const u32 rem_addr_len = ((test[1] >> 16) & 0xff);
|
||||||
|
const u32 data_len = ((test[1] >> 24) & 0xff);
|
||||||
|
|
||||||
|
if (((action == 0x01) || (action == 0x02) || (action == 0x04))
|
||||||
|
&& ((authen_type >= 0x01) && (authen_type <= 0x06))
|
||||||
|
&& ((authen_service >= 0x00) && (authen_service <= 0x09))
|
||||||
|
&& ((8 + user_len + port_len + rem_addr_len + data_len) == ct_len))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((sequence_buf0 == 0x03c0) || (sequence_buf0 == 0x05c0))
|
||||||
|
{
|
||||||
|
const u32 msg_len = ((test[0] >> 0) & 0xff) << 8
|
||||||
|
| ((test[0] >> 8) & 0xff) << 0;
|
||||||
|
const u32 data_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
|
| ((test[0] >> 24) & 0xff) << 0;
|
||||||
|
const u32 flags = ((test[1] >> 0) & 0xff);
|
||||||
|
|
||||||
|
if (((5 + msg_len) == ct_len)
|
||||||
|
&& (data_len == 0)
|
||||||
|
&& (flags == 0))
|
||||||
|
{
|
||||||
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
|
{
|
||||||
|
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, 0, digests_offset + 0, gid, il_pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
const u32 status = ((test[0] >> 0) & 0xff);
|
const u32 status = ((test[0] >> 0) & 0xff);
|
||||||
const u32 flags = ((test[0] >> 8) & 0xff);
|
const u32 flags = ((test[0] >> 8) & 0xff);
|
||||||
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
const u32 msg_len = ((test[0] >> 16) & 0xff) << 8
|
||||||
@ -260,7 +351,7 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
|
|
||||||
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
if (((status >= 0x01 && status <= 0x07) || status == 0x21)
|
||||||
&& (flags == 0x01 || flags == 0x00)
|
&& (flags == 0x01 || flags == 0x00)
|
||||||
&& (6 + msg_len + data_len == cl_len))
|
&& (6 + msg_len + data_len == ct_len))
|
||||||
{
|
{
|
||||||
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
if (atomic_inc (&hashes_shown[digests_offset]) == 0)
|
||||||
{
|
{
|
||||||
@ -269,3 +360,4 @@ __kernel void m16100_sxx (__global pw_t *pws, __global const kernel_rule_t *rule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user