1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-11 08:10:59 +00:00

Merge pull request #2044 from s3inlc/master

Fixed two bugs where pkzip hashes wouldn't be cracked
This commit is contained in:
Jens Steube 2019-05-25 08:38:47 +02:00 committed by GitHub
commit ede3ac9b10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 20 deletions

View File

@ -986,8 +986,8 @@ KERNEL_FQ void m17220_mxx (KERN_ATTR_RULES_ESALT (pkzip_t))
update_key012 (key0, key1, key2, plain, l_crc32tab);
}
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 24 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
{

View File

@ -681,7 +681,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t))
update_key3 (key2, key3);
plain = unpack_v8a_from_v32_S (next) ^ key3;
if ((plain & 6) == 0 || (plain & 6) == 6) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break;
tmp[0] = plain;
update_key012 (key0, key1, key2, plain, l_crc32tab);
@ -726,8 +726,8 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_RULES_ESALT (pkzip_t))
update_key012 (key0, key1, key2, plain, l_crc32tab);
}
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
{
@ -1009,7 +1009,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t))
update_key3 (key2, key3);
plain = unpack_v8a_from_v32_S (next) ^ key3;
if ((plain & 6) == 0 || (plain & 6) == 6) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break;
tmp[0] = plain;
update_key012 (key0, key1, key2, plain, l_crc32tab);
@ -1054,8 +1054,8 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_RULES_ESALT (pkzip_t))
update_key012 (key0, key1, key2, plain, l_crc32tab);
}
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
{

View File

@ -681,7 +681,7 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t))
update_key3 (key2, key3);
plain = unpack_v8a_from_v32_S (next) ^ key3;
if ((plain & 6) == 0 || (plain & 6) == 6) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break;
tmp[0] = plain;
update_key012 (key0, key1, key2, plain, l_crc32tab);
@ -726,8 +726,8 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_ESALT (pkzip_t))
update_key012 (key0, key1, key2, plain, l_crc32tab);
}
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
{
@ -1010,7 +1010,7 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t))
update_key3 (key2, key3);
plain = unpack_v8a_from_v32_S (next) ^ key3;
if ((plain & 6) == 0 || (plain & 6) == 6) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((plain & 6) == 0 || (plain & 6) == 6)) break;
tmp[0] = plain;
update_key012 (key0, key1, key2, plain, l_crc32tab);
@ -1055,8 +1055,8 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_ESALT (pkzip_t))
update_key012 (key0, key1, key2, plain, l_crc32tab);
}
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
{

View File

@ -738,8 +738,8 @@ KERNEL_FQ void m17225_sxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
update_key012 (key0, key1, key2, plain, l_crc32tab);
}
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
{
@ -1079,8 +1079,8 @@ KERNEL_FQ void m17225_mxx (KERN_ATTR_VECTOR_ESALT (pkzip_t))
update_key012 (key0, key1, key2, plain, l_crc32tab);
}
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 2 && !check_inflate_code1 (tmp, 24)) break;
if (esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && esalt_bufs[digests_offset].hashes[idx].data_length >= 36 && esalt_bufs[digests_offset].hashes[idx].compression_type == 8 && ((tmp[0]) & 6) == 4 && !check_inflate_code2 (tmp)) break;
if (esalt_bufs[digests_offset].hashes[idx].data_type_enum == 1)
{

View File

@ -99,7 +99,7 @@ static const u32 DGST_POS2 = 2;
static const u32 DGST_POS3 = 3;
static const u32 DGST_SIZE = DGST_SIZE_4_8;
static const u32 HASH_CATEGORY = HASH_CATEGORY_ARCHIVE;
static const char *HASH_NAME = "PKZIP (Compressed Multi-File)";
static const char *HASH_NAME = "PKZIP (Mixed Multi-File)";
static const u64 KERN_TYPE = 17225;
static const u32 OPTI_TYPE = 0;
static const u64 OPTS_TYPE = 0;

View File

@ -99,7 +99,7 @@ static const u32 DGST_POS2 = 2;
static const u32 DGST_POS3 = 3;
static const u32 DGST_SIZE = DGST_SIZE_4_8;
static const u32 HASH_CATEGORY = HASH_CATEGORY_ARCHIVE;
static const char *HASH_NAME = "PKZIP (Compressed Multi-File Checksum-Only)";
static const char *HASH_NAME = "PKZIP (Mixed Multi-File Checksum-Only)";
static const u64 KERN_TYPE = 17230;
static const u32 OPTI_TYPE = 0;
static const u64 OPTS_TYPE = 0;