WPA/WPA2 cracking: In the potfile, replace password with PMK in order to detect already cracked networks across all WPA modes

This commit is contained in:
jsteube
2019-04-02 11:24:22 +02:00
parent c0a31b3239
commit b8d609ba16
293 changed files with 1149 additions and 349 deletions
+9 -1
View File
@@ -14,6 +14,15 @@
#include "inc_hash_sha1.cl"
#include "inc_hash_sha256.cl"
#include "inc_cipher_aes.cl"
#else
#include "inc_vendor.h"
#include "inc_types.h"
#include "inc_common.h"
#include "inc_simd.h"
#include "inc_hash_md5.h"
#include "inc_hash_sha1.h"
#include "inc_hash_sha256.h"
#include "inc_cipher_aes.h"
#endif
#define COMPARE_S "inc_comp_single.cl"
@@ -34,7 +43,6 @@ typedef struct wpa_eapol
u8 essid_len;
u8 essid[32];
u32 keymic[4];
u32 hash[4];
int nonce_compare;
int nonce_error_corrections;
int detected_le;
+2 -1
View File
@@ -46,7 +46,6 @@ typedef struct wpa_eapol
u8 essid_len;
u8 essid[32];
u32 keymic[4];
u32 hash[4];
int nonce_compare;
int nonce_error_corrections;
int detected_le;
@@ -54,6 +53,7 @@ typedef struct wpa_eapol
} wpa_eapol_t;
#ifdef KERNEL_STATIC
DECLSPEC static u8 hex_convert (const u8 c)
{
return (c & 15) + (c >> 6) * 9;
@@ -68,6 +68,7 @@ DECLSPEC static u8 hex_to_u8 (const u8 *hex)
return (v);
}
#endif
DECLSPEC static void make_kn (u32 *k)
{
+22 -2
View File
@@ -11,6 +11,12 @@
#include "inc_common.cl"
#include "inc_simd.cl"
#include "inc_hash_sha1.cl"
#else
#include "inc_vendor.h"
#include "inc_types.h"
#include "inc_common.h"
#include "inc_simd.h"
#include "inc_hash_sha1.h"
#endif
#define COMPARE_S "inc_comp_single.cl"
@@ -280,9 +286,23 @@ KERNEL_FQ void m16800_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pbkdf2_tmp_t, wpa_pmkid_t)
const u32 r2 = sha1_hmac_ctx.opad.h[2];
const u32 r3 = sha1_hmac_ctx.opad.h[3];
#define il_pos 0
#ifdef KERNEL_STATIC
#define il_pos 0
#include COMPARE_M
#else
if ((hc_swap32_S (r0) == wpa_pmkid->pmkid[0])
&& (hc_swap32_S (r1) == wpa_pmkid->pmkid[1])
&& (hc_swap32_S (r2) == wpa_pmkid->pmkid[2])
&& (hc_swap32_S (r3) == wpa_pmkid->pmkid[3]))
{
if (atomic_inc (&hashes_shown[digest_cur]) == 0)
{
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0);
}
}
#endif
}
+18 -2
View File
@@ -39,6 +39,7 @@ typedef struct wpa_pmkid
} wpa_pmkid_t;
#ifdef KERNEL_STATIC
DECLSPEC static u8 hex_convert (const u8 c)
{
return (c & 15) + (c >> 6) * 9;
@@ -53,6 +54,7 @@ DECLSPEC static u8 hex_to_u8 (const u8 *hex)
return (v);
}
#endif
KERNEL_FQ void m16801_init (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_pmkid_t))
{
@@ -157,9 +159,23 @@ KERNEL_FQ void m16801_aux1 (KERN_ATTR_TMPS_ESALT (wpa_pmk_tmp_t, wpa_pmkid_t))
const u32 r2 = sha1_hmac_ctx.opad.h[2];
const u32 r3 = sha1_hmac_ctx.opad.h[3];
#define il_pos 0
#ifdef KERNEL_STATIC
#define il_pos 0
#include COMPARE_M
#else
if ((hc_swap32_S (r0) == wpa_pmkid->pmkid[0])
&& (hc_swap32_S (r1) == wpa_pmkid->pmkid[1])
&& (hc_swap32_S (r2) == wpa_pmkid->pmkid[2])
&& (hc_swap32_S (r3) == wpa_pmkid->pmkid[3]))
{
if (atomic_inc (&hashes_shown[digest_cur]) == 0)
{
mark_hash (plains_buf, d_return_buf, salt_pos, digests_cnt, digest_pos, digest_cur, gid, 0, 0, 0);
}
}
#endif
}