mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #2314] 7z formats enhancement #1546
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#1546
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 @magnumripper on GitHub (Oct 31, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2314
BIG_ENOUGHmacro and allocate dynamically instead. This is trivial but leads to 2:These steps seem to add support for "multiple unpack-sizes" as well as files without header encryption (apparently the limitations are in our current 7z2john.py, not the format)!
@magnumripper commented on GitHub (Oct 31, 2016):
Note: For the new 7z2john.pl (derived from 7z2hashcat.pl), we need to change a few bits: Add a "username" which is the basename of the archive file, and possibly some "gecos" metadata for additional keywords found (eg. file name(s) seen within archive). Both for single-mode cracking. Also, we need to ensure license and credits go to @philsmd properly.
@magnumripper commented on GitHub (Oct 31, 2016):
Note 2: We should also drop the
$SEVEN_ZIP_HASHCAT_MAX_DATAvariable (and its use) from new 7z2john.pl since we no longer have any limit for input data size.@magnumripper commented on GitHub (Oct 31, 2016):
With some luck this also fixes #2120. If it doesn't, we should fix it and submit upstream.
@magnumripper commented on GitHub (Nov 1, 2016):
@kholia after
a7dd209and1c2bad4our 7z2john accepts "multiple unpacksizes" but we don't seem to crack them (false negative) unless there happens to be enough padding. I'm not quite sure why?@magnumripper commented on GitHub (Nov 1, 2016):
I'm trying to follow Hashcat's workflow for 7z but can't see anything special.
@magnumripper commented on GitHub (Nov 1, 2016):
Here's a test vector (cleartext is "magnum")
Margin is just 4 so padding test doesn't apply. Hashcat does crack the above, we do not. Our CRC ends up incorrectly.
(EDIT: Hashcat relies on padding check for margin >= 4 but it does work even if I comment that out)
@magnumripper commented on GitHub (Nov 1, 2016):
I really don't get this. Using the aforementioned test vector our code come up with a CRC of 0xfff73193 for the correct plain, while the expected (121810819 in decimal) is 0x0742af83. So we don't get a match but a false negative. Hashcat sees and calculates the same two values yet somehow it does detect a match and show it as cracked. Due to bitmaps and other magic I fail to see where and how!?
@kholia commented on GitHub (Nov 3, 2016):
I took a brief look at hashcat's source code but I couldn't figure out how the 7-Zip cracking code works.
@magnumripper commented on GitHub (Nov 14, 2016):
Added bug label since we currently get some false negatives 😢
@magnumripper commented on GitHub (Jan 12, 2017):
@philsmd has figured this out. See https://github.com/philsmd/7z2hashcat/issues/4
After the hash format syntax is decided / implemented, we need to add simple and fast LZMA and LZMA2 code (perhaps including early rejection logic like we have in RAR and pkzip) in our format.
@magnumripper commented on GitHub (Jan 12, 2017):
7z2john.pl is fixed now. Still to do: Read that flag and add a step of LZMA/LZMA2 decompression right before calculating CRC, according to the flag.
@philsmd commented on GitHub (Jan 13, 2017):
I'm sure this might interest you too (the POC) and furthermore it seems that we need to adapt the hash format for the 7-zip hash mode again: https://github.com/hashcat/hashcat/issues/965#issuecomment-272499461
@magnumripper commented on GitHub (Jan 15, 2017):
https://github.com/hashcat/hashcat/issues/968
https://github.com/philsmd/7z2hashcat/issues/5
@magnumripper commented on GitHub (Jan 17, 2017):
After
738734bc4and453589b8the formats are pretty solid. Very good work by @philsmd, thanks a lot!