mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-08 23:01:14 +00:00
add more checks in 27500/27600 module_verify_hash
This commit is contained in:
parent
6ab2c13a0c
commit
bbfc401ab8
@ -388,7 +388,7 @@ KERNEL_FQ void m27500_init2 (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, vbox_t))
|
||||
out[2] = in[2];
|
||||
out[3] = in[3];
|
||||
|
||||
u32 S[4] = { 0 }; // tweek, 16 x 0x00
|
||||
u32 S[4] = { 0 }; // tweak, 16 x 0x00
|
||||
u32 T[4] = { 0 };
|
||||
|
||||
aes128_set_encrypt_key (ks, ukey2, s_te0, s_te1, s_te2, s_te3);
|
||||
|
@ -404,7 +404,7 @@ KERNEL_FQ void m27600_init2 (KERN_ATTR_TMPS_ESALT (pbkdf2_sha256_tmp_t, vbox_t))
|
||||
out[2] = in[2];
|
||||
out[3] = in[3];
|
||||
|
||||
u32 S[4] = { 0 }; // tweek, 16 x 0x00
|
||||
u32 S[4] = { 0 }; // tweak, 16 x 0x00
|
||||
u32 T[4] = { 0 };
|
||||
|
||||
aes256_set_encrypt_key (ks, ukey2, s_te0, s_te1, s_te2, s_te3);
|
||||
|
@ -122,7 +122,10 @@ sub module_verify_hash
|
||||
return unless defined $salt2;
|
||||
|
||||
return unless ($version eq "0");
|
||||
return unless (length $salt1 eq 64);
|
||||
return unless ($klen eq "8");
|
||||
return unless (length $enc_pass eq 64);
|
||||
return unless (length $salt2 eq 64);
|
||||
|
||||
my $word_packed = pack_if_HEX_notation ($word);
|
||||
|
||||
|
@ -94,8 +94,6 @@ sub module_generate_hash
|
||||
|
||||
my $hash = sprintf ("\$vbox\$0\$%s\$%s\$16\$%s\$%s\$%s\$%s", $iter1, $salt1, $enc_pass, $iter2, $salt2, unpack ("H*", $hash_buf));
|
||||
|
||||
# print "out: ", $hash, "\n";
|
||||
|
||||
return $hash;
|
||||
}
|
||||
|
||||
@ -124,7 +122,10 @@ sub module_verify_hash
|
||||
return unless defined $salt2;
|
||||
|
||||
return unless ($version eq "0");
|
||||
return unless (length $salt1 eq 64);
|
||||
return unless ($klen eq "16");
|
||||
return unless (length $enc_pass eq 128);
|
||||
return unless (length $salt2 eq 64);
|
||||
|
||||
my $word_packed = pack_if_HEX_notation ($word);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user