-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
--regen-lost-salts option: Bug fixes, closes #4517 #4795
Conversation
Still testing this. There's a slight problem, still:
It missed the 'aa' salt. This may well be a separate bug, I'll look into it. |
Notes to self:
...and they correspond to these:
...so what is supposed to be the uid is actually the brute-forced salt. I don't yet understand why this happens. It should have showed like this:
|
0869c58
to
615b873
Compare
This is a separate bug, Jim's code never outputs the 'aa' salt... oh well, I'll fix that too. |
No, it actually does. It's written to the original single-salt at load time, before the generation of all other salts. Still, I confirmed this bug was present before my changes - it always misses the 'aa' salt. |
More problems found: Some code isn't handling the dynamic compiler format or bare hashes correctly. Also, |
615b873
to
89bb4c6
Compare
Hopefully, all problems are now cared for. The code always relied on "bare hashes" (ie. with no format tag) so that's now enforced (and documented). I also added a way to use Countless of other problems were fixed. I bet some remain but it's definitely better than ever. |
Note that since the |
89bb4c6
to
fc18840
Compare
Since every salt has a copy of the initial salt->list pointer, a special fixup is needed after removing the first binary in the list in crk_process_guess(). This was the actual openwall#4517 issue. Other fixes: The generated salts written to the salt database lacked some info and the total number of salts wasn't updated. From now we copy the whole initial database struct, avoiding several current and at least some possible future problems. Improved the "Remaining xx hashes with yy different salts" output to be more accurate/informative when this feature is used - correctly showing same-salt boost or salt BF penalty. Error messages referred to a non-existing file in a non-existing directory. Several comments were bogus, eg. referring to code that was long gone. General code-style fixes (including a couple of barely related, made while trying to understand the code paths involved). Add bodges for --show to work with hashes cracked using this feature. For this to work you need to supply the --regen-lost-salts option with --show too. Since we unfortunately give the exact format as one of the parameters to --regen-lost-salts (a fairly stupid decision made 8 years ago), add code to automatically infer that format whenever a --format parameter isn't given, or complain if it is and they don't match. Minor updates to doc/Regen-Lost-Salts, eg. dropping references to things that were deprecated eight years ago.
fc18840
to
8b23b58
Compare
Since every salt copied the same salt->list pointer, a special fixup is needed after removing the first binary in the list in crk_process_guess(). Also, the generated salts written to the salt database lacked some info and the total number of salts wasn't updated.
Less important updates:
Error messages pointed to a non-existing file in a non-existing directory.
Change the "Remaining xx hashes with yy different salts" output to be more accurate when this feature is used.