mirror of
https://github.com/openwall/john.git
synced 2026-12-03 20:43:49 +07:00
[GH-ISSUE #989] BFegg format error in test suite #589
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#589
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 @frank-dittrich on GitHub (Jan 2, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/989
@jfoug commented on GitHub (Jan 2, 2015):
Here is what I see, this is after a hand run, putting the data into ./tst.pot
Not, the line +C/.8o.Wuph9: then the following line. (N.qSI1ccnIA/ line). The N.qSI1.. is for a single space character. The other (the C/.8o....) is actually the password for querty, BUT for some reason, querty is not being written into the .pot file. Guess I will have to see if VC has this same bug (I hope so).
@frank-dittrich commented on GitHub (Jan 2, 2015):
with commit
c7e2bd6, BFegg still works.I thought the commit adding long passwords had triggered the bug, but
git bisectpoints toas the first bad commit.
@jfoug commented on GitHub (Jan 2, 2015):
VC finds it just fine. NOTE, the difference in the .pot file between a cygwin64 build (or Unbuntu build), is that line: +C/.8o.Wuph9.: is moved up in the file. In the VC build (that works), that line is at
#26, which is the element itself. Other than this ONE line, the rest of the entire .pot file is the same.@jfoug commented on GitHub (Jan 2, 2015):
But this has nothing to do with jtrts. I am not even using that tool. I am doing all of this from command line. JtrTS is giving 100% valid results. On my cygwin/ubuntu runs, there ARE 1499 valid .pot lines, and 1 invalid one.
So we need to look at commits around this time, but in the jumbo branch, not jtrts.
@frank-dittrich commented on GitHub (Jan 2, 2015):
I don't yet see how that commit 01c00a0f7faf9e06b82d82f526f9b44738228080 could break the BFegg test, but
after a
git revert 01c00a0f7faf9e06b82d82f526f9b44738228080, the BFegg format test passes!@frank-dittrich commented on GitHub (Jan 2, 2015):
I bet it is the pw.dic change in commit 01c00a0f7faf9e06b82d82f526f9b44738228080 that broke the BFegg test.
@jfoug commented on GitHub (Jan 2, 2015):
I bet that is 100% correct. There also were some longer passwords added. We may have some overwrite issue in bf egg that this has tripped. I will have to look at this, sometime later.
This points out that we may want to modify pw.dic in other ways to try and flush out other bugs. These are often 1 offs, and may greatly depend upon order of input file, length of 1 line and other lines either just in front or just after.
This was similar to the bug I found in the flat SIMD dynamic code. There were 2 formats which each had the same password 'missed'. It happened to be something that was triggered by the 64 bit SIMD, and how the self test stuff 'prepared' the data. Once it was setup, that password (or anything that specific length) would not be found.
But I need to bail out now, for a while. I will look at this one later, since I think you have found the initial cause of seeing this bug (the modification to the dictionary file).
@frank-dittrich commented on GitHub (Jan 2, 2015):
But it didn't cause any asan error or MemDbg_Validate level 0 error.
@jfoug commented on GitHub (Jan 3, 2015):
If things are overwritten WITHIN an array of arrays, i.e. like when we allocate things like our array of buffers for plaintext,within the format, then there would be nothing to catch that. The external 'array', is nothing more than something conceptual to the programming language. The actual buffer allocated is just a flat space of data, that is perfectly valid to write all over the place. I have an idea that (or something like that), is what is getting trampled on. It may just be one of those bugs that single stepping, would find quickly. Something that does not jump out.
Unfortunately, VC is not having this problem :(((((( or I could probably find it in minutes, by simply stepping code, and watching results. Without that, you almost have to single step within your head, figure out things that you 'should' be able to make assertions for, before a piece of code is executed and an assertion of what should be after that code is done, and then start using trace statements to check those assertions. Very slow and time consuming, but it is about the only way I know without knowing better how to debug well on unix.
@magnumripper commented on GitHub (Jan 3, 2015):
FWIW there's a GUI frontend to gdb called ddd that makes single stepping a lot less painful than with a pure text interface.
@frank-dittrich commented on GitHub (Jan 3, 2015):
if you want to use gdb, you need to adjust your ~/.gdbinit to define aliases and macros so that you can single step and display all the info you need with a simple alias ...
@jfoug commented on GitHub (Jan 4, 2015):
This bug has to do with this format not working with 0 length password. I just have to figure out how to get it to work properly.
@jfoug commented on GitHub (Jan 4, 2015):
Fixed:
736c18d@magnumripper commented on GitHub (Jan 4, 2015):
Maybe the real application does not even allow a zero length?
@jfoug commented on GitHub (Jan 4, 2015):
It does not, BUT a word list might have 0 length lines in there. That is why we have to 'work around' those issues, within the format itself. I do not thin we have a minword-length like we have a maxword length in the format structure.
@magnumripper commented on GitHub (Jan 4, 2015):
We do (not in the format struct but as an option). We could force min length to 1 just as we force it to 8 for WPA-PSK. It's line 1329 in john.c
@frank-dittrich commented on GitHub (Jan 4, 2015):
That hack is ugly enough. I wouldn't want to add formats with min. length 1 here.
@jfoug commented on GitHub (Jan 4, 2015):
But the hack added to BFegg is also an ugly hack. But it 'is' only contained within that one format.
Are there other 'min-length' password hashes (I think so). It might be good to look at a less hackish way to do this in general. Ahh, I see you did, in #996
@frank-dittrich commented on GitHub (Jan 4, 2015):
SAP also has min length, but it removes trailing spaces before calculating the min length. So, SAP needs a format specific solution anyway.
@jfoug commented on GitHub (Jan 4, 2015):
Yes, I agree there. There certainly will be ' ' (2 spaces) passwords in wordlists, so SAP has to also deal with it internally in the format. However, it still could have a min length of 1 set for the format, in the fmt-structure. You would at least assure the format that there is 'something' there, even if it ends up being 0 length string after trimming.
I think there are others (bcrypts??? / scrypts??) which do not work with zero length strings.
@magnumripper commented on GitHub (Jan 6, 2015):
Workaround reverted and real min-length implemented in
a916df7