[GH-ISSUE #814] Some PuTTY format self tests missing #427

Closed
opened 2026-10-14 03:06:44 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @frank-dittrich on GitHub (Oct 18, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/814

Originally assigned to: @frank-dittrich on GitHub.

static struct custom_salt has 2 integers, is_mac and old_fmt.
Both of them influence how the hash is computed.
Both self tests, however, have is_mac set to 1 and old_fmt set to 0.

Does anybody know how to get valid hashes and their corresponding passwords for the other combinations of is_mac and old_fmt?
Otherwise we don't know whether the algorithm and/or putty2john really work correctly for those other combinations.

Originally created by @frank-dittrich on GitHub (Oct 18, 2014). Original GitHub issue: https://github.com/openwall/john/issues/814 Originally assigned to: @frank-dittrich on GitHub. static struct custom_salt has 2 integers, is_mac and old_fmt. Both of them influence how the hash is computed. Both self tests, however, have is_mac set to 1 and old_fmt set to 0. Does anybody know how to get valid hashes and their corresponding passwords for the other combinations of is_mac and old_fmt? Otherwise we don't know whether the algorithm and/or putty2john really work correctly for those other combinations.
Author
Owner

@magnumripper commented on GitHub (Oct 22, 2014):

I set this as "enhancement" but ultimately it's more of a bug.

<!-- gh-comment-id:60127442 --> @magnumripper commented on GitHub (Oct 22, 2014): I set this as "enhancement" but ultimately it's more of a bug.
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

Getting a very old version of PuTTY (and related utils) might work.

<!-- gh-comment-id:67303456 --> @kholia commented on GitHub (Dec 17, 2014): Getting a very old version of PuTTY (and related utils) might work.
Author
Owner

@kholia commented on GitHub (Sep 28, 2017):

https://www.chiark.greenend.org.uk/~sgtatham/putty/releases/0.52.html

Very old PuTTY version 0.52 (released on 2002-01-14) too generates keys which have is_mac set to 1. It should be reasonable to assume that keys with old_fmt set to 1 are very rare.

<!-- gh-comment-id:332760585 --> @kholia commented on GitHub (Sep 28, 2017): https://www.chiark.greenend.org.uk/~sgtatham/putty/releases/0.52.html Very old PuTTY version 0.52 (released on 2002-01-14) too generates keys which have `is_mac` set to `1`. It should be reasonable to assume that keys with `old_fmt` set to `1` are very rare.
Author
Owner

@kholia commented on GitHub (Sep 28, 2017):

old-puttgen

We also don't support the SSH1 (RSA) keys it seems. It might be by design but I don't remember.

$ ../run/putty2john old-puttygen-ssh1-nopass 
old-puttygen-ssh1-nopass : this private key doesn't need a passphrase!

$ ../run/putty2john old-puttygen-ssh1-pass
old-puttygen-ssh1-pass : this private key doesn't need a passphrase!

This behavior is not great. We should instead say that SSH1 private keys are not supported.

Use https://ftp.gnome.org/pub/putty/ to download and test older versions of PuTTY and associated utilities.

<!-- gh-comment-id:332761960 --> @kholia commented on GitHub (Sep 28, 2017): ![old-puttgen](https://user-images.githubusercontent.com/79528/30955606-cf2efb7c-a451-11e7-8c82-4ad1a24e5807.png) We also don't support the `SSH1 (RSA)` keys it seems. It might be by design but I don't remember. ``` $ ../run/putty2john old-puttygen-ssh1-nopass old-puttygen-ssh1-nopass : this private key doesn't need a passphrase! $ ../run/putty2john old-puttygen-ssh1-pass old-puttygen-ssh1-pass : this private key doesn't need a passphrase! ``` This behavior is not great. We should instead say that `SSH1 private keys are not supported`. Use https://ftp.gnome.org/pub/putty/ to download and test older versions of PuTTY and associated utilities.
Author
Owner

@kholia commented on GitHub (Sep 28, 2017):

I don't see a practical way to solve this issue. Hence, I am closing it.

<!-- gh-comment-id:332765623 --> @kholia commented on GitHub (Sep 28, 2017): I don't see a practical way to solve this issue. Hence, I am closing it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#427
No description provided.