mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1399] NETNTLMv2_fmt: Segmentation fault #889
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#889
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 @loverszhaokai on GitHub (Jun 7, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1399
This bug is found by afl.
#1. Reproduce
$ ./configure && make -sj8
$ cat pwfile
$ ./john pwfile
#2. GDB debug
@jfoug commented on GitHub (Jun 8, 2015):
@loverszhaokai When the input file has garbage characters in it, often you will need to convert the input file into hex, so that someone trying to recreate the problem can have the same input file. When I try to cut the data from this web page I get this:
@frank-dittrich commented on GitHub (Jun 8, 2015):
@loverszhaokai you can use the base64conv binary (located in the run directory)
and mention that you converted the input file to hex.
@loverszhaokai commented on GitHub (Jun 9, 2015):
@frank-dittrich There maybe a bug in base64conv.
After I use base64conv to convert pwfile to pwfile.hex, and convert pwfile.hex to pwfile2, but pwfile and pwfile2 are different.
$ emacs pwfile
OR
$ vi pwfile
$ ../../base64conv -q -i raw -o hex < pwfile > pwfile.hex
$ cat pwfile.hex
$ ../../base64conv -q -i hex -o raw < pwfile.hex > pwfile2
$ cat pwfile2
$ emacs pwfile2
OR
$ vi pwfile2
The pwfile and pwfile2 are different. Is this a problem?
@frank-dittrich commented on GitHub (Jun 9, 2015):
Looks like only the first line got converted to hex (or from hex back to raw).
This was issue https://github.com/magnumripper/JohnTheRipper/issues/968 which should have been fixed.
May be you didn't pass pwfile via stdin.
There's a difference in behaviour between
and
Looks like there still is an issue with base64conv (it seems to drop empty lines, as I noted when converting john.conf to hex and back...), but that shouln'd matter for your use case.
On the other hand, you could also adapt the fuzzer to reduce the test case, hopefully to just a single remaining hash which still shows the problem.
Look at Alexander Cherepanov's fuzzer http://article.gmane.org/gmane.comp.security.openwall.john.devel/8105, he needed to reduce the fuzzed input, because he started with a fuzzed list of all the test hashes of all formats.
@frank-dittrich commented on GitHub (Jun 9, 2015):
No, it looks like even the first line is cut in the middle when converting to hex, I assume base64conf doesn't like the '\0' bytes.
@frank-dittrich commented on GitHub (Jun 9, 2015):
If you make sure you convert all the input lines to hex and back to raw, can the segfault still be reproduced with the changed input file (lines cut at the first NULL byte)? I guess so, since fgetl() is not just used for base64conv, but almost everywhere in john when reading data.
@loverszhaokai commented on GitHub (Jun 9, 2015):
@frank-dittrich I have reduced the pwfile, and now there is only one hash.
$ cat pwfile
$ vi pwfile
Convert to hex:
$ ../../base64conv -q -i raw -o hex < pwfile > pwfile.hex
$ cat pwfile.hex
The pwfile.hex is empty.
$ ../../base64conv -q -i raw -o hex pwfile > pwfile.hex
$ cat pwfile.hex
$ ../../base64conv -q -i hex -o raw pwfile.hex > pwfile2
$ cat pwfile2
@frank-dittrich commented on GitHub (Jun 9, 2015):
@loverszhaokai I reported the base64conf issues, see https://github.com/magnumripper/JohnTheRipper/issues/1423
@jfoug fixed the problems with commit
github.com/magnumripper/JohnTheRipper@a716113253Instead of redirecting stdin and stdout, you have to use
-r input_file_name -w output_file_name.@jfoug commented on GitHub (Jun 22, 2015):
@loverszhaokai Can this issue be checked out after
cf9c4c1@loverszhaokai commented on GitHub (Jun 23, 2015):
@jfoug Fixed. Thanks.
@jfoug commented on GitHub (Jun 23, 2015):
Good to see these were fixed. I had a feeling that many were associated with the problems in these 2 formats.