Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login
PuTTY 0.64 released, fixing a security hole (www.chiark.greenend.org.uk) similar stories update story
61.0 points by xrstf | karma 1000 | avg karma 5.88 2015-03-03 10:15:06+00:00 | hide | past | favorite | 43 comments



view as:

Another security hole of PuTTY is downloads being served over non-SSL.

I should know better and check the sigs using PGP and checksums, but on Windows this is such a drag that I just end up whispering hallelujah praise the Lord, and hoping for the best.

I know it's my fault, but I'd still like SSL :(


> I should know better and check the sigs using PGP and checksums

Kind of pointless. If the download has been compromised so have the checksums


Not if they have been signed with PGP.

I have to ask: how are the PGP keys verified?

Through the Web of Trust:

https://en.wikipedia.org/wiki/Web_of_trust

http://www.pgpi.org/doc/pgpintro/

http://www.rubin.ch/pgp/weboftrust.en.html

Essentially: with cryptography, you aren't concerned about the transport, you're concerned about the crypto.

Signatures of the source or binaries will tell you if they've been changed.

Signatures on keys will tell you who trusts those keys. If someone you trust trusts a key, then you have a transitive trust of a key. This does mean, though, trusting people not to sign bogus keys.

In TLS/SSL, you have a hierarchical trust. Your session (and its contents) are encrypted and authenticated by the host key, which is signed by the CA's key. The theory is that we can trust CAs. Practice shows otherwise.

It's not cryptographically viable to fake a signature (of a key or data), though if someone manages to lose control of their private key, that's possible. PGP/GPG doesn't handle expired keys well.

But the upshot is that HTTP transport of PuTTY is fine from an integrity standpoint, so long as you verify the binary and signatures. And if you don't mind others being able to see what you're fetching as you're fetching it (the only real benefit to HTTPS in this case).

Even an MITM rewrite of data isn't a critical issue since you can catch that in PGP validation.


That's very thorough, thank you!

I understand all those things in general, but I don't know the specific mechanism by which my local PGP install recognizes who else trusts this PGP key. I grant you that if the key is protected from MITM then all is well. I just still don't know this part:

What mechanism do I use, I who have no prior encounter with that key and no existing PGP setup or connection to any web, to validate that key?

I'm sure this is just a lack of familiarity with PGPs web of trust implementation, but lacking this info, I too just opted to trust the plain HTTP download (until I switched to Cygwin/OpenSSH to make it a moot point anyway).


Never mind, I see a higher ranked comment got an answer to this. I see the concept of keys signing keys and gpg --list-sigs. (Still no idea who might be at the end of that chain that I could actually verify though.)

Generally, you'd need to have a match (or chain) between keys you do trust and those signing a given key.

In general, I fetch signatures of keys and may add some of these as partially trusted if they're very well known keys.

A bit of bash scripting that helps with this:

    gpg --list-sigs <key ID>  | grep 'not found' |
        cut -c 13-22 | sort -u |
        xargs --max-args 10 gpg --recv-keys
xargs speeds the process by requesting multiple keys at a time. I think keeping that below 20 keys helps keep the keyservers happy. Sort + uniq eliminates duplicate requests of the same key.

You cannot run parallel processes as your local gpg instance cannot do concurrent updates to the keyring.


For those already using PGP, that sounds great. For me, who is not using PGP, my set of trusted keys is currently empty. So it is unverified.

Which, arguably, might be safer than being overly trusting of my "trusted CAs", which is verified by a flawed system.

I guess I'm still not thrilled wih my options overall, but thank you for your time explaining how to use PGP.


The WoT is both PGP's strength and weakness. Lacking anything else, key security staff for various Linux distributions and key EFF members isn't a bad starting point for this. Assigning those "marginal" trust means that you'd have to have three of those signing a given key to trust it.

Ah, now that is what I was looking for but didn't know how to ask. A few starting points I might trust would go a long way.

> but on Windows this is such a drag that

Get the keybase.io client, it sets up your GPG pretty nicely. I was able to confirm the downloads on Windows using the standard ``gpg --verify putty.DSA.asc`` and it just worked(tm) in a cmd.exe window. Using the keybase client does not, however, as the signing key for the putty binaries is not on keybase.

Not saying anything about how much sense it makes to verify the downloads, just saying that it does work well on Windows, without any cygwin, mingw or whatever.


Thank you for the howto, I'll give this a try next time. Looks much more approachable than I feared.

I used to be a huge PuTTY (or derative) user, but recently, I've switched to just using the normal OpenSSH command-line client within Cygwin and ConEmu.

While PuTTY is nice, it lacks some features, like proxycommands and stuff which are standard in ~/.ssh/config. Things which can be taken along in a simple & portable fashion.

No disrespect to PuTTY, but I just found myself not really needing it anymore.


You can get SSH natively in the DOS command prompt by installing http://www.mls-software.com/opensshd.html

I found it very useful for connecting to vagrant boxes.


This bundles a version of cygwin.

Are there native builds that don't use cygwin?

The OpenSSH included with msysgit uses msys I think, but otherwise I don't think there's a native OpenSSH for Windows.

Indeed - I like being able to use SSH directly in the DOS prompt though.


Nice try, XShell employee.

I doubt that anyone is going to take $90/year closed source payware over well known FOSS like OpenSSH or PuTTY here at HN.


So is this just the PuTTY VT/ssh under the hood?

While I'm wary to start with, I'd probably be even warier if it weren't.


You can also get many unix commands, including ssh, from the git packages. They work remarkably well, with the limit being you get to run them in `cmd` or `powershell` windows.

I've been recommending MobaXterm [1] to people. My favourite feature is that it has an embedded and pre-configured X server for X forwarding.

[1]: http://mobaxterm.mobatek.net/


Likewise. Moved to Mosh in a VM and now have continual access to several boxes with very little effort.

Putty allowed for more secure remote working when on untrusted networks, but not having to constantly enter credentials is much more preferable.


I do use ProxyCommand in PuTTY - a lot. It's in the Connection -> Proxy options, and it's called "Telnet command, or local proxy command".

Kind of off topic:

Is there a secure way to download PuTTY? They are hosting on a http page. Though they provide RSA and DSA signatures how would I verify the signatures themselves? I'm kind of new to walking through trust paths. I don't even have any entry point too since nobody I know use public key encryption (I trust the Debian keys already though since I use their distro, maybe I can use that for a starting point?).

My best bet would be to download the signatures and keys from different mirrors and sources to limit the possibility of a successful targeted MITM attack.


How does that make it more secure? HTTPS doesn't do anything to stop an attacker accessing the host and changing the contents. If you are concerned by MITMA then download from multiple nations and compare or download the source and build it yourself

Downloading a file from multiple nations and comparing is more work that downloading it over HTTPS.

An attacker can't change the content without breaking the signatures and keys. If you can verify the keys from independent sources you can feel safe (this is where I don't have practice). If an attacker somehow can steal the private keys it's bad, but compromising the web page doesn't mean that they have access to the private keys used for the signatures. I don't know about common security practices for managing https keys but I would think that a compromised https server would mean a compromised ssl private key too in most cases.

Also https only verifies that page you see is the one intended to be hosted by the URL's owner. Even if the website had a valid cert signed by a trustworthy CA it wouldn't mean more. From that URL I couldn't tell if it's still a trustworthy site from I can download PuTTY.

I don't know the state of PGP though. I'm looking at http://keyserver.ubuntu.com/ right now and all I see are plain signatures of keys without any comment on the "type of trust" between the two parties (I'm really new to this). But it seems probable that if somebody signed the PuTTY master keys then it meant that "I trust that this key belongs to the PuTTY team who create the trustworthy PuTTY software" since I wouldn't sign faulty software even if I knew that it came from a valid source. It would be nice if people would sign certificates with comments like this.

edit: Sorry, seems like I misunderstood your comment. For my defense you misunderstood mine too. I don't say HTTPS is more secure. I just don't have any practice in verifying keys using gnupg.

edit2:

download the source and build it yourself

I usually don't audit the source code I build from a random project. A compromised source code for me is as dangerous as a compromised binary (for me at least).


According to: https://news.ycombinator.com/item?id=7334269 - doesn't look like it's currently possible...

> Though they provide RSA and DSA signatures how would I verify the signatures themselves?

Ideally, it goes something like this --

1. Start with the master keys. Download them from their website & import them into your keyring.

2. Fetch signatures for those keys from some key servers. (E.g. gpg --recv-keys 6A93B34E).

3. Examine the signatures (E.g. gpg --list-sigs 6A93B34E). Do you trust anybody in that list to have verified the ownership of the keys?

If "yes", then import the release keys and verify that _they_ have been signed by the master keys. You can use the release keys to verify the downloaded binary.

If "no", then you might recurse down those keys to see if you know anyone who signed any of _them_. At this point, you'll need to consider very carefully what your trust policy is going to be.


> 3. Examine the signatures (E.g. gpg --list-sigs 6A93B34E). Do you trust anybody in that list to have verified the ownership of the keys?

Well what if I don't know if I can trust them. Also I couldn't possibly verify them in person so I need to recursively walk through the signing keys to find a trusted signature. Isn't there an easy cli command for this? All I could find are online path finders.


Easy it's not, but since you trust the debian keys already, you could import keys from the debian-keyring - I'm sure there's a path from those to the putty maintainers'. Here's a somewhat detailed description I just found, for how to do such a thing https://tails.boum.org/doc/get/trusting_tails_signing_key/in...

It would have been better if the 0.64 release had been pulled, the fixed 0.64 release should have been named 0.65.

Do you know a SSH client that can share configs cross-platform? So I can define my connections once, and use on Windows/OSX/*nix?

OpenSSH does this, no? Just use it in Cygwin.

The official git client for windows support ssl, openssl, scp, ... , much more powerful than putty.

Do you have a workaround for having to run them in a `cmd` or `powershell` window? Those are worse than the old terminals in many cases.

ConEmu, MinTTY or similar terminals.

Legal | privacy