mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #2021] vnc format possible problems #1358
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#1358
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 @jfoug on GitHub (Feb 4, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2021
Originally assigned to: @kholia on GitHub.
I was looking into porting vnc over to pass_gen, and to me the format looks very problematic.
The problem I see is DOES it work if the password is not exactly 8 bytes long??? To me, it looks like the key would not have been properly initialized.
Can we get some 'real' challenge/responses that are from a server with 3 or 5 byte passwords?
This 'may' be a PEBCAK, but I can not tell. The code just looks fishy, and ALL test vectors are 8 byte passwords.
@jfoug commented on GitHub (Feb 4, 2016):
NOTE, vnc is NOT CBC. It is 2 crypts in ECB mode (it appears to be). I am pretty sure that within crypt_all, we are passing a null iv to both the first and second 8 byte decrypt. That is ECB, but foolishly using ECB mode.
NOTE, we should look at doing this with jtr improved DES code, for sure.
@jfoug commented on GitHub (Feb 4, 2016):
I believe a simple memset of the key prior to copying password bytes into it, 'fixes' the problem. I have been doing work within pass_gen.pl, and I 'think' this is the way it should work.
@jfoug commented on GitHub (Feb 4, 2016):
@kholia can we get some additional 'real' hashes as test strings. Some other than 8 byte passwords? It would also be nice to know if > 8 byte really does get truncated to 8 bytes.
@kholia commented on GitHub (Feb 4, 2016):
http://www.tightvnc.com/faq.php#howsecure
Thanks Jim. This bug has been lurking for a long time.
@jfoug commented on GitHub (Feb 4, 2016):
Also, We need to get some hashes where the high bit is set in the password. I think (looking at code), that it appears to be broken odd parity. But without 'real' hashes, I can not tell.
@jfoug commented on GitHub (Feb 4, 2016):
Your patch 'matches' my pass_gen.pl code. I have gotten high bit set stuff to match, so the code 'may' work just fine. However, if we can get some KNOWN high bit set passwords (i.e. utf-8 bytes or unicode, etc). then we would know that the logic is right.
@jfoug commented on GitHub (Feb 4, 2016):
This was generated with pass_gen.pl, and it works in current vnc format.
@jfoug commented on GitHub (Feb 4, 2016):
added pass_gen.pl with vnc. NOTE, vnc is simple ECB and not CBC. Doing the 2 CBC is probably 'faster' than a simple ECB of the 2 blocks, since the 2nd CBC block (with null IV) is only done if the first one matches. But I think ECB would be a bit faster, and I KNOW if we could get jtr DES code to work, that would be MUCH faster.