1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-26 18:08:20 +00:00

Add special weak-hash detection section for LM

Fixes https://github.com/hashcat/hashcat/issues/889
This commit is contained in:
jsteube 2016-11-29 20:37:29 +01:00
parent 72d0b272c2
commit db5291a76c
2 changed files with 23 additions and 2 deletions

View File

@ -16,8 +16,8 @@
* weak hashes shutcut
*/
#define LM_WEAK_HASH "\x4e\xcf\x0d\x0c\x0a\xe2\xfb\xc1"
#define LM_MASKED_PLAIN "[notfound]"
static const char LM_WEAK_HASH[] = "aad3b435b51404ee";
static const char LM_MASKED_PLAIN[] = "[notfound]";
/**
* algo specific

View File

@ -303,6 +303,27 @@ int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx)
hash_buf.esalt = hcmalloc (hashconfig->esalt_size);
}
// this is usually detected by weak-hash-check
// but not if bitslice
if (hashconfig->hash_mode == 3000)
{
int parser_status = hashconfig->parse_func ((u8 *) LM_WEAK_HASH, 16, &hash_buf, hashconfig);
if (parser_status == PARSER_OK)
{
hash_t *found = (hash_t *) hc_bsearch_r (&hash_buf, hashes_buf, hashes_cnt, sizeof (hash_t), sort_by_hash_no_salt, (void *) hashconfig);
if (found)
{
found->pw_buf = "";
found->pw_len = 0;
found->cracked = 1;
}
}
}
const int rc = potfile_read_open (hashcat_ctx);
if (rc == -1) return -1;