diff --git a/tools/test_modules/m29910.pm b/tools/test_modules/m29910.pm index afc0aeef3..e6603470c 100644 --- a/tools/test_modules/m29910.pm +++ b/tools/test_modules/m29910.pm @@ -97,23 +97,25 @@ sub module_generate_hash { my $ct_bin = pack ("H*", $ct); - $pt_bin = xor_len (substr ($ctr, 4, 4), $ct_bin, 4); + $pt_bin = xor_len (substr ($ctr, 4, 8), $ct_bin, 8); - if ($pt_bin eq "\xd2\xc3\xb4\xa1") + # we compare only 56 bit, see https://github.com/hashcat/hashcat/issues/3467 + + if (substr ($pt_bin, 0, 7) eq "\xd2\xc3\xb4\xa1\x00\x00\x00") { # ok } else { - $pt_bin = "\xff\xff\xff\xff"; + $pt_bin = "\xff\xff\xff\xff\xff\xff\xff\xff"; } } else { - $pt_bin = "\xd2\xc3\xb4\xa1"; + $pt_bin = "\xd2\xc3\xb4\xa1\x00\x00\x00\x00"; } - my $ct_bin = xor_len (substr ($ctr, 4, 4), $pt_bin, 4); + my $ct_bin = xor_len (substr ($ctr, 4, 8), $pt_bin, 8); my $hash = sprintf ('$encdv-pbkdf2$1$%d$%s$%s$32$%s$%d', $algo, unpack ("H*", $iv_bin), unpack ("H*", $ct_bin), unpack ("H*", $salt_bin), $iter); diff --git a/tools/test_modules/m29920.pm b/tools/test_modules/m29920.pm index eec32f4b7..880e45df5 100644 --- a/tools/test_modules/m29920.pm +++ b/tools/test_modules/m29920.pm @@ -141,23 +141,25 @@ sub module_generate_hash { my $ct_bin = pack ("H*", $ct); - $pt_bin = xor_len (substr ($ctr, 4, 4), $ct_bin, 4); + $pt_bin = xor_len (substr ($ctr, 4, 8), $ct_bin, 8); - if ($pt_bin eq "\xd2\xc3\xb4\xa1") + # we compare only 56 bit, see https://github.com/hashcat/hashcat/issues/3467 + + if (substr ($pt_bin, 0, 7) eq "\xd2\xc3\xb4\xa1\x00\x00\x00") { # ok } else { - $pt_bin = "\xff\xff\xff\xff"; + $pt_bin = "\xff\xff\xff\xff\xff\xff\xff\xff"; } } else { - $pt_bin = "\xd2\xc3\xb4\xa1"; + $pt_bin = "\xd2\xc3\xb4\xa1\x00\x00\x00\x00"; } - my $ct_bin = xor_len (substr ($ctr, 4, 4), $pt_bin, 4); + my $ct_bin = xor_len (substr ($ctr, 4, 8), $pt_bin, 8); my $hash = sprintf ('$encdv-pbkdf2$3$%d$%s$%s$32$%s$%d$%s', $algo, unpack ("H*", $iv_bin), unpack ("H*", $ct_bin), unpack ("H*", $salt_bin), $iter, unpack ("H*", $keychain_bin)); diff --git a/tools/test_modules/m29930.pm b/tools/test_modules/m29930.pm index 608e4ac93..681fd603e 100644 --- a/tools/test_modules/m29930.pm +++ b/tools/test_modules/m29930.pm @@ -117,23 +117,25 @@ sub module_generate_hash { my $ct_bin = pack ("H*", $ct); - $pt_bin = xor_len (substr ($ctr, 4, 4), $ct_bin, 4); + $pt_bin = xor_len (substr ($ctr, 4, 8), $ct_bin, 8); - if ($pt_bin eq "\xd2\xc3\xb4\xa1") + # we compare only 56 bit, see https://github.com/hashcat/hashcat/issues/3467 + + if (substr ($pt_bin, 0, 7) eq "\xd2\xc3\xb4\xa1\x00\x00\x00") { # ok } else { - $pt_bin = "\xff\xff\xff\xff"; + $pt_bin = "\xff\xff\xff\xff\xff\xff\xff\xff"; } } else { - $pt_bin = "\xd2\xc3\xb4\xa1"; + $pt_bin = "\xd2\xc3\xb4\xa1\x00\x00\x00\x00"; } - my $ct_bin = xor_len (substr ($ctr, 4, 4), $pt_bin, 4); + my $ct_bin = xor_len (substr ($ctr, 4, 8), $pt_bin, 8); my $hash = sprintf ('$encdv$1$%d$%s$%s', $algo, unpack ("H*", $iv_bin), unpack ("H*", $ct_bin)); diff --git a/tools/test_modules/m29940.pm b/tools/test_modules/m29940.pm index cbc65d4f2..05fecc678 100644 --- a/tools/test_modules/m29940.pm +++ b/tools/test_modules/m29940.pm @@ -161,23 +161,25 @@ sub module_generate_hash { my $ct_bin = pack ("H*", $ct); - $pt_bin = xor_len (substr ($ctr, 4, 4), $ct_bin, 4); + $pt_bin = xor_len (substr ($ctr, 4, 8), $ct_bin, 8); - if ($pt_bin eq "\xd2\xc3\xb4\xa1") + # we compare only 56 bit, see https://github.com/hashcat/hashcat/issues/3467 + + if (substr ($pt_bin, 0, 7) eq "\xd2\xc3\xb4\xa1\x00\x00\x00") { # ok } else { - $pt_bin = "\xff\xff\xff\xff"; + $pt_bin = "\xff\xff\xff\xff\xff\xff\xff\xff"; } } else { - $pt_bin = "\xd2\xc3\xb4\xa1"; + $pt_bin = "\xd2\xc3\xb4\xa1\x00\x00\x00\x00"; } - my $ct_bin = xor_len (substr ($ctr, 4, 4), $pt_bin, 4); + my $ct_bin = xor_len (substr ($ctr, 4, 8), $pt_bin, 8); my $hash = sprintf ('$encdv$3$%d$%s$%s$%s', $algo, unpack ("H*", $iv_bin), unpack ("H*", $ct_bin), unpack ("H*", $keychain_bin));