Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hashcat fails to run some valid masks #3981

Open
die-github-die opened this issue Apr 3, 2024 · 2 comments · May be fixed by #3982
Open

Hashcat fails to run some valid masks #3981

die-github-die opened this issue Apr 3, 2024 · 2 comments · May be fixed by #3982
Labels

Comments

@die-github-die
Copy link

die-github-die commented Apr 3, 2024

Describe the bug

Hashcat doesn't accept some masks it should (because of the buggy overflow_check_u64_mul function).

Some of the masks (but not all):
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?d?d?u?l?l?l?l?l
?u?s?l?l?l?l?l?l?l?l?l?l?d?d
?u?l?l?l?l?l?l?l?u?l?l?l?d?d
?u?d?l?d?l?l?l?l?l?l?l?l?l?s
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?d?d?d?d?d?d?s
?u?l?l?l?l?l?l?l?s?d?d?d?d?d?d
?u?l?l?l?l?l?l?l?l?l?l?s?d?d
?u?l?l?l?l?l?u?l?l?l?l?s?d?d
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?d?d?d?d?d?d?s
?u?l?l?l?l?l?l?l?l?l?l?s?d?d
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?d?d?d?d?d?d?s
?l?l?l?l?l?l?l?l?l?l?l?l?d?d
?l?u?u?u?u?u?u?u?u?u?u?d?d?s
?u?l?l?l?l?l?l?l?d?d?d?d?s?d?d
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?l?l?l?l?l?l?l?l?l?l?d?d?s?u
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?l?l?l?l?l?l?l?l?l?l?l?l?d?d
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?d?d?l?l?l?l?l?l?l?l?l?l?u?s
?u?l?l?l?l?l?l?l?l?l?l?s?d?d
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?d?d?d?d?d?d?s
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?s?l?l?l?l?l?l?l?d?d?d?d?d?d
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?d?d?d?d?d?d?s
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?u?l?l?l?l?l?d?d
?l?l?l?l?l?l?l?l?l?l?l?l?d?d
?u?l?l?l?l?l?l?l?l?l?l?d?s?d
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?d?d?u?l?l?l?l?l?u?l?l?l?l?l
?l?l?l?l?l?l?d?d?l?l?l?l?l?l
?u?l?l?l?l?l?l?l?l?l?l?d?d?s
?u?u?u?u?u?u?l?l?l?l?l?d?d?s
?u?l?l?l?l?l?l?l?l?l?l?s?d?d
?u?l?l?l?l?l?l?l?l?l?l?l?d?d
?u?l?l?l?l?l?u?l?s?d?d?d?d?d?d
?u?l?l?l?l?l?u?l?l?l?l?l?d?d
?u?l?l?l?l?l?l?l?l?l?l?d?d?s

Hashcat says "integer overflow detected" while in fact there's no overflow.

This patch solves the issue:

diff --git a/src/shared.c b/src/shared.c
index 5b2375009..19cf02c1c 100644
--- a/src/shared.c
+++ b/src/shared.c
@@ -183,10 +183,8 @@ bool overflow_check_u64_add (const u64 a, const u64 b)
 
 bool overflow_check_u64_mul (const u64 a, const u64 b)
 {
-  const int a_msb = get_msb64 (a);
-  const int b_msb = get_msb64 (b);
-
-  return ((a_msb + b_msb) < 64);
+  u64 c = a * b;
+  return c / a == b;
 }
 
 bool is_power_of_2 (const u32 v)

Expected behavior

These masks should work because their keyspaces fit in 64 bits.

Hashcat version: 6.2.6

@die-github-die die-github-die linked a pull request Apr 3, 2024 that will close this issue
@faiyaz-libscr
Copy link

Screenshot 2024-05-04 124145
How to fix this ? I am running the latest hashcat 6.2.6 release file.
any help is appreciated !

@PenguinKeeper7
Copy link
Contributor

How to fix this ? I am running the latest hashcat 6.2.6 release file. any help is appreciated !

This isn't related to the above topic. Your mask is far, far too large to ever be exhausted in a lifetime. It has 36^15 possible combinations, it would take 23,197 years to fully run on an RTX 4090. If you need additional help on this, try the Discord or the Forum instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants