mirror of
https://github.com/hashcat/hashcat
synced 2024-12-27 05:13:45 +01:00
HCCAPX management: Use advanced hints in message_pair stored by hcxtools about endian bitness of replay counter
Fixed missing code section in -m 2500 and -m 2501 to crack corrupted handshakes with a LE endian bitness base
This commit is contained in:
parent
5035b75bd7
commit
547025ec47
@ -1207,6 +1207,8 @@ typedef struct wpa
|
||||
u32 hash[4];
|
||||
int nonce_compare;
|
||||
int nonce_error_corrections;
|
||||
int detected_le;
|
||||
int detected_be;
|
||||
|
||||
} wpa_t;
|
||||
|
||||
|
1422
OpenCL/m02500.cl
1422
OpenCL/m02500.cl
File diff suppressed because it is too large
Load Diff
1098
OpenCL/m02501.cl
1098
OpenCL/m02501.cl
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,7 @@
|
||||
## Improvements
|
||||
##
|
||||
|
||||
- HCCAPX management: Use advanced hints in message_pair stored by hcxtools about endian bitness of replay counter
|
||||
- OpenCL kernels: Abort session if kernel self-test failed
|
||||
- Added JtR-compatible support for hex notation in rules engine
|
||||
|
||||
@ -12,6 +13,7 @@
|
||||
##
|
||||
|
||||
- Fixed a missing kernel in -m 5600 in combination with -a 3 and -O if mask is >= 16 characters
|
||||
- Fixed missing code section in -m 2500 and -m 2501 to crack corrupted handshakes with a LE endian bitness base
|
||||
|
||||
* changes v4.0.1 -> v4.1.0
|
||||
|
||||
|
@ -194,6 +194,8 @@ typedef struct wpa
|
||||
u32 hash[4];
|
||||
int nonce_compare;
|
||||
int nonce_error_corrections;
|
||||
int detected_le;
|
||||
int detected_be;
|
||||
|
||||
} wpa_t;
|
||||
|
||||
|
@ -1581,6 +1581,7 @@ typedef struct user_options
|
||||
bool workload_profile_chgd;
|
||||
bool segment_size_chgd;
|
||||
bool hccapx_message_pair_chgd;
|
||||
bool nonce_error_corrections_chgd;
|
||||
|
||||
bool advice_disable;
|
||||
bool benchmark;
|
||||
|
52
src/hashes.c
52
src/hashes.c
@ -831,7 +831,54 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
|
||||
wpa->message_pair = (u8) user_options->hccapx_message_pair;
|
||||
}
|
||||
|
||||
wpa->nonce_error_corrections = user_options->nonce_error_corrections;
|
||||
if (wpa->message_pair & (1 << 4))
|
||||
{
|
||||
// ap-less attack detected, nc not needed
|
||||
|
||||
wpa->nonce_error_corrections = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wpa->message_pair & (1 << 7))
|
||||
{
|
||||
// replaycount not checked, nc needed
|
||||
|
||||
wpa->nonce_error_corrections = user_options->nonce_error_corrections;
|
||||
}
|
||||
else
|
||||
{
|
||||
// replaycount checked, nc not needed, but we allow user overwrites
|
||||
|
||||
if (user_options->nonce_error_corrections_chgd == true)
|
||||
{
|
||||
wpa->nonce_error_corrections = user_options->nonce_error_corrections;
|
||||
}
|
||||
else
|
||||
{
|
||||
wpa->nonce_error_corrections = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// now some optimization related to replay counter endianess
|
||||
// hcxtools has techniques to detect them
|
||||
// since we can not guarantee to get our handshakes from hcxtools we enable both by default
|
||||
// this means that we check both even if both are not set!
|
||||
// however if one of them is set, we can assume that the endianess has been checked and the other one is not needed
|
||||
|
||||
wpa->detected_le = 1;
|
||||
wpa->detected_be = 1;
|
||||
|
||||
if (wpa->message_pair & (1 << 5))
|
||||
{
|
||||
wpa->detected_le = 1;
|
||||
wpa->detected_be = 0;
|
||||
}
|
||||
else if (wpa->message_pair & (1 << 6))
|
||||
{
|
||||
wpa->detected_le = 0;
|
||||
wpa->detected_be = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1652,6 +1699,9 @@ int hashes_init_selftest (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
wpa_t *wpa = (wpa_t *) st_esalts_buf;
|
||||
|
||||
wpa->detected_le = 1;
|
||||
wpa->detected_be = 0;
|
||||
|
||||
wpa->nonce_error_corrections = 3;
|
||||
}
|
||||
else if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE)
|
||||
|
@ -396,7 +396,8 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
||||
case IDX_LOGFILE_DISABLE: user_options->logfile_disable = true; break;
|
||||
case IDX_HCCAPX_MESSAGE_PAIR: user_options->hccapx_message_pair = hc_strtoul (optarg, NULL, 10);
|
||||
user_options->hccapx_message_pair_chgd = true; break;
|
||||
case IDX_NONCE_ERROR_CORRECTIONS: user_options->nonce_error_corrections = hc_strtoul (optarg, NULL, 10); break;
|
||||
case IDX_NONCE_ERROR_CORRECTIONS: user_options->nonce_error_corrections = hc_strtoul (optarg, NULL, 10);
|
||||
user_options->nonce_error_corrections_chgd = true; break;
|
||||
case IDX_TRUECRYPT_KEYFILES: user_options->truecrypt_keyfiles = optarg; break;
|
||||
case IDX_VERACRYPT_KEYFILES: user_options->veracrypt_keyfiles = optarg; break;
|
||||
case IDX_VERACRYPT_PIM: user_options->veracrypt_pim = hc_strtoul (optarg, NULL, 10); break;
|
||||
|
Loading…
Reference in New Issue
Block a user