mirror of
https://github.com/openwall/john.git
synced 2026-12-03 20:43:49 +07:00
[GH-ISSUE #2889] 7z2john.pl treats CRC as a signed value #1831
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1831
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kholia on GitHub (Nov 15, 2017).
Original GitHub issue: https://github.com/openwall/john/issues/2889
See https://github.com/hashcat/hashcat/issues/1450 for details.
hash.txt <- sample hash to demonstrate the problem.
The following incorrect patch enables loading and cracking of this hash with JtR,
If we change
-914293439(CRC field) to unsigned int3380673857, then the hash is cracked just fine without any changes.The actual issue seems to be in
7z2john.pl(and upstream too I believe). The$hash_buf = sprintfline uses the%iformat specifier. I believe that we should be using the%uformat specifier for the CRC field. We need to treat the CRC value as an unsigned integer value.CC'ing @philsmd for his advice.
Code in question,
@kholia commented on GitHub (Nov 16, 2017):
Here is a slightly better approach if we want to support "negative" CRC values.
@philsmd commented on GitHub (Nov 16, 2017):
Hey,
thanks for the report.
I also noticed this "problem" within the hashcat's issue you linked above, but it didn't really made any difference for hashcat (hashcat parsed it correctly anyways).
I agree that this is not really expected behaviour and therefore I pushed this fix for 7z2hashcat:
github.com/philsmd/7z2hashcat@9d37dc9edcWe shouldn't use signed integers at all within the hash format for 7zip, I replaced all of them.
Thanks again. I think this issue can be closed too whenever you update 7z2john to the newest version.
@kholia commented on GitHub (Nov 16, 2017):
Thanks @philsmd. I will backport this change very soon.