by gmcabrita on 10/24/12, 10:26 PM with 130 comments
by tptacek on 10/24/12, 11:40 PM
Curl has an option, CURL_SSL_VERIFYHOST. When VERIFYHOST=0, Curl does what you'd expect: it effectively doesn't validate SSL certificates.
When VERIFYHOST=2, Curl does what you'd expect: it verifies SSL certificates, ensuring that one of the hosts attested by the certificate matches the host presenting it.
When VERIFYHOST=1, or, in some popular languages, when VERIFYHOST=TRUE, Curl does something very strange. It checks to see if the certificate attests to any hostnames, and then accepts the certificate no matter who presents it.
Developers reasonably assume parameters like "VERIFYHOST" are boolean; either we're verifying or we're not. So they routinely set VERIFYHOST to 1 or "true" (which can promote to 1). Because Curl has this weird in-between setting, which does not express any security policy I can figure out, they're effectively not verifying certificates.
by moxie on 10/24/12, 11:14 PM
They cast a really wide net, looking for as many examples as possible where non-browser applications fail to do SSL validation correctly, but then conclude that this will result in a security compromise without fully examining the implications.
For instance, they point out that many SDKs for Amazon FPS don't validate certificates correctly. But I didn't see them mention that the FPS protocol does its own signature-based authentication and that credentials are never transmitted in the clear: it was essentially designed to operate over an insecure transport to begin with.
Likewise, they point out an "unsafe" construction that an Android application that I wrote (TextSecure) uses. But they don't mention that this is for communication with an MMSC, that this is how it has to be (many don't present CA-signed certificates), and that the point of TextSecure is that an OTR-like secure protocol is layered on top of base transport layer (be it SMS or MMS).
So I think the paper would be a lot stronger if they weren't overstating their position so much.
by 3pt14159 on 10/24/12, 11:03 PM
Many security flaws found in commonly used SSL libraries.
Other than that, it is a great find.
by mrb on 10/25/12, 12:32 AM
<base href="http://crypto.stanford.edu/~dabo/pubs/pubs.html>;
This causes the page to throw an HTTPS warning: "this page loads insecure content" due to the css loaded over HTTP.
by rolux on 10/24/12, 11:03 PM
"Not the most interesting technically, but perhaps the most devastating (because of the ease of exploitation) bug is the broken certificate validation in the Chase mobile banking app on Android. Even a primitive network attacker—for example, someone in control of a malicious Wi-Fi access point—can exploit this vulnerability to harvest the login credentials of Chase mobile banking customers."
by pjscott on 10/25/12, 2:49 AM
http://docs.python-requests.org/en/latest/
It validates SSL certificates correctly by default. How about other languages?
by kzahel on 10/24/12, 11:03 PM
I suppose my web browser has an extended list of CA that my OSX lion does not know about.
by mindstab on 10/24/12, 11:48 PM
by andrewcooke on 10/24/12, 11:40 PM
i'm not saying that this would solve all the problems, or that you should develop critical financial software by having people that don't understand much writing tests. but tests are pretty much common culture now; you'd think people would have considered this. and the argument the paper makes is not that the programmers are clueless, but that they are confused by the API, so they should be able to think up some useful tests...
of course, integration testing with sockets is a bit more complicated than unit tests (perhaps something toolkit apis should support is a way to allow testing without sockets?), but it's not super-hard. [edit: hmm. although testing for unreliable dns is going to be more tricky.]
by zippie on 10/25/12, 5:08 AM
At any rate, here is a pull request for PHP which attempts to address the issue:
by scott_s on 10/24/12, 11:20 PM
by davyjones on 10/25/12, 1:45 AM
by justinhj on 10/25/12, 4:41 PM
by jyrkesh on 10/24/12, 11:04 PM
by felanthropop on 10/25/12, 2:34 AM
It is destined to be flawed as long as insecurity is allowed. Only when every exploit is exploited continously will people be vigilant.
by adamfisk on 10/25/12, 2:48 AM
https://github.com/getlantern/lantern/blob/master/src/main/j...
? This code is intended for deployment in potentially dangerous regions for getting around government censors.
Thanks.
by purephase on 10/25/12, 12:49 PM
You can see it here: https://github.com/rails/rails/blob/3-2-stable/activeresourc...
I'm pointing it out as it was not mentioned in the paper.
Edit: It looks like it has been that way since SSL was first implemented in Connection.
by khakimov on 10/25/12, 7:57 AM
require 'always_verify_ssl_certificates' AlwaysVerifySSLCertificates.ca_file = "/path/path/path/cacert.pem"
http= Net::HTTP.new('https://some.ssl.site, 443) http.use_ssl = true req = Net::HTTP::Get.new('/') response = http.request(req)
http://www.rubyinside.com/how-to-cure-nethttps-risky-default...
by drallison on 10/26/12, 5:29 PM
by citizenoftmrw on 10/25/12, 1:33 AM
by ritratt on 10/25/12, 9:17 AM
<falls off chair>