1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-19 13:08:19 +00:00

Fix detection of argon2 kernel_accel_new. Ensure user-defined -n value does not exceed available memory; reduce it if necessary. On devices with unified memory (iGPU), only half of the memory is made available.

Improve unit test for -m 8300. In optimized mode, allow longer passwords, domain names, and salts. In both optimized and pure modes, ensure the domain name does not exceed 63 characters.
Fix SNMPv3 unit test to produce passwords of at least 8 characters, as required by RFC 3414.
Fix file permissions in tools/ folder.
This commit is contained in:
Jens Steube 2025-07-14 11:30:21 +02:00
parent 52b0edb6b9
commit 51e47daa1d
10 changed files with 14 additions and 26 deletions

View File

@ -61,20 +61,17 @@ const char *argon2_module_extra_tuningdb_block (MAYBE_UNUSED const hashconfig_t
const u64 available_mem = MIN (device_param->device_available_mem, (device_param->device_maxmem_alloc * 4)) - (fixed_mem + spill_mem);
const u32 kernel_accel_max = (device_param->device_host_unified_memory == true) ? (available_mem / 2) / size_per_accel : available_mem / size_per_accel;
u32 kernel_accel_new = device_processors;
if (kernel_accel_user)
{
kernel_accel_new = kernel_accel_user;
kernel_accel_new = MIN (kernel_accel_max, kernel_accel_user);
}
else
{
if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) && (device_param->device_host_unified_memory == false))
{
kernel_accel_new = available_mem / size_per_accel;
kernel_accel_new = MIN (kernel_accel_new, 1024); // 1024 = max supported
}
kernel_accel_new = kernel_accel_max;
}
char *new_device_name = hcstrdup (device_param->device_name);

0
tools/apfs2hashcat.py Normal file → Executable file
View File

0
tools/bitlocker2hashcat.py Normal file → Executable file
View File

0
tools/keybag2hashcat.py Normal file → Executable file
View File

0
tools/metamask2hashcat.py Normal file → Executable file
View File

0
tools/shiro1-to-hashcat.py Normal file → Executable file
View File

View File

@ -14,18 +14,19 @@ use Net::DNS::SEC;
# we need to restrict the pure password length for the test module to 63 bytes,
# because we can't have any string (including the pass) of over 63 bytes without "."
# sub module_constraints { [[1, 256], [-1, -1], [1, 55], [-1, -1], [-1, -1]] }
sub module_constraints { [[1, 63], [-1, -1], [1, 55], [-1, -1], [-1, -1]] }
sub module_constraints { [[1, 63], [1, 63], [1, 32], [1, 24], [1, 44]] }
sub get_random_dnssec_salt
{
my $domain = shift;
my $salt_buf = "";
$salt_buf .= ".";
$salt_buf .= random_lowercase_string (8);
$salt_buf .= $domain;
$salt_buf .= ".net";
#$salt_buf .= ".net";
$salt_buf .= ":";
@ -40,19 +41,9 @@ sub module_generate_hash
my $salt = shift;
my $iter = shift // 1;
if (length $salt == 0)
{
if (int (rand (10)) == 0)
{
$salt = ":";
}
else
{
$salt = get_random_dnssec_salt ();
}
}
my $combined_salt = get_random_dnssec_salt ($salt);
my ($domain, $salt_hex) = split (":", $salt);
my ($domain, $salt_hex) = split (":", $combined_salt);
my $hashalg = Net::DNS::SEC->digtype ("SHA1");

View File

@ -12,7 +12,7 @@ use Digest::MD5 qw (md5 md5_hex);
use Digest::SHA qw (sha1 sha1_hex);
use Digest::HMAC qw (hmac_hex);
sub module_constraints { [[0, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] }
sub module_constraints { [[8, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] }
sub module_generate_hash
{

View File

@ -11,7 +11,7 @@ use warnings;
use Digest::MD5 qw (md5 md5_hex);
use Digest::HMAC qw (hmac_hex);
sub module_constraints { [[0, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] }
sub module_constraints { [[8, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] }
sub module_generate_hash
{

View File

@ -11,7 +11,7 @@ use warnings;
use Digest::SHA qw (sha1 sha1_hex);
use Digest::HMAC qw (hmac_hex);
sub module_constraints { [[0, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] }
sub module_constraints { [[8, 256], [24, 3000], [-1, -1], [-1, -1], [-1, -1]] }
sub module_generate_hash
{