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

--regen-lost-salts option segfault #4518

Closed
magnumripper opened this issue Dec 10, 2020 · 1 comment
Closed

--regen-lost-salts option segfault #4518

magnumripper opened this issue Dec 10, 2020 · 1 comment
Labels

Comments

@magnumripper
Copy link
Member

@kernelr00ter reported in #1463 (comment)

There was an error that I wanted to talk about.

We don't know in advance which hash is salted.
And if we accidentally put salted and regular hashes in one file.
Then, depending on the order of the hashes in the file, we get an error.
Example:
md5-raw pass
c4ca4238a0b923820dcc509a6f75849b 1

md5($s.$p) salt pass
d3d9446802a44259755d38e6d163e820 1 0

in file hash_dump.txt
c4ca4238a0b923820dcc509a6f75849b
d3d9446802a44259755d38e6d163e820

run john --regen-lost-salts
Result:
0                (?)

*** Process received signal ***
Signal: Segmentation fault (11)
Signal code: Address not mapped (1)
Failing at address: (nil)
[ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f4d13061390]
[ 1] /john[0x47b785]
[ 2] /john[0x6bee8b]
[ 3] /john[0x6bfe30]
[ 4] /john[0x6c0605]
[ 5] /john[0x6dd359]
[ 6] /john[0x6cdd51]
[ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f4d12ca6840]
[ 8] /john[0x407099]
*** End of error message ***
Segmentation fault (core dumped)

In this case, the utility correctly detects the hash result, but does not show the salt. And the report file remains empty.

But if you swap hashes
d3d9446802a44259755d38e6d163e820
c4ca4238a0b923820dcc509a6f75849b

Everything works perfectly.

If you try to run the same file with examples in the format raw-md5
For a salted hash, we get the following answer:
$dynamic_0$d3d9446802a44259755d38e6d163e820:10

Or does she just write the salt and password this way.
Instead:
@dynamic=md5($s.$p)@d3d9446802a44259755d38e6d163e820$1:0

@magnumripper
Copy link
Member Author

#4517

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

No branches or pull requests

1 participant