107 points · by cleverjake · 11y ago · 110 comments
An Egyptian telecom company, MCS Holdings, contracted with CNNIC, the Chinese national Internet authority, to obtain a CA=TRUE certificate for use in their internal enterprise proxy --- ostensibly for use only with MCS's own hostnames. Users of MCS traversed that proxy to get to Google, at which point the proxy dutifully generated a (fake) Google certificate to bypass TLS for that connection. Google noticed.
Internal enterprise MITM proxy sounds creepy but isn't. There's a bunch of good reasons why a company would need to decrypt TLS traffic leaving their own network.
But enterprises don't need delegated CA=TRUE certificates to accomplish this. They can just roll their own self-signed root CA=TRUE certificate and built it into their machines. There is no reason a CA should need to put the entire Internet at risk solely for the convenience of a single company's IT operations.
A Chicago company called Trustwave did something similar a few years back. Are they still an HTTPS CA?
Blockchain-based solutions like Namecoin & DNSChain would have prevented this attack without forcing people to rely on untrusted third-parties (if Google stored their domain info in a blockchain).
We compare various mechanisms here:
https://github.com/okTurtles/dnschain/blob/master/docs/Compa...
EDIT: Not sure why this comment is getting downvoted. Maybe some folks don't want this problem to be fixed? :-\
Similarly, many investment banks and financial information firms have strict requirements to monitor all communications owing to SEC rules and insider trading regulation.
Yes, but what are those controls? You check every packet to see if it contains any information from one of your databases?
What if the person sending the data just applies a simple obfuscation technique to the data, or just tunnels through some other encryption scheme?
Edit: downmods? really?
Google's response here seems a bit weak.
CNNIC did so here: https://docs.google.com/spreadsheet/pub?key=0Ah-tHXMAwqU3dGx...
Kathleen Wilson's comment on the bug was: https://bugzilla.mozilla.org/show_bug.cgi?id=724929#c66 "My intent is to make it clear that this type of behavior will not be tolerated for subCAs chaining to roots in NSS, give all CAs fair warning and a grace period, and state the consequences if such behavior is found after that grace period."
However, over 14th months later when it came out the ANSSI (aka the French government) was doing the exact same thing, rather than revoking the root certificate Mozilla decided to limit them to issuing certificates to: .fr, .gp, .gf, .mq, .re, .yt, .pm, .bl, .mf, .wf, .pf, .nc, .tf
which AFAICT essentially acquiesces in MitM French firefox users that go to French websites.
I wonder if the response will be the same here.
Is there any way to do the same, manually, for the other "national" CAs? I woudln't mind if CNNIC handed out a certificate for every .cn domain out there, but if they ever try to sign one for an Egyptian entity (or even worse, a .com domain), I want to see a big red warning. Ditto for the Japanese and Taiwanese governments, which Firefox also seems to trust unconditionally.
I actually do this to some extent, as I don't quite trust the NIC of my own government. I told my browser not to trust it, so whenever I try to visit a government website, I get a big red warning. I override the warning after confirming that I am indeed visiting a government website protected with a government certificate. But if the government NIC ever tried to show me a certificate for a non-government website, I would know immediately. This works, but it's inconvenient, so I'd love to be able to restrict any given CA to subdomains of specific TLDs and/or second-level domains.
Too big to fail and all that jazz.
Doing it this way, however, means that they don't need to worry about pushing their self-signed certificate out to all their machines, right?
That could be done easily with group policies on Windows machines which would take care of, at least, Internet Explorer. I haven't used a Windows machine in a long time, though, so I'll ask: do the other major browsers use the built-in certificate store? If not, they'd still have to address the problem of getting their self-signed certificate "trusted" by Firefox and Chrome, for example.
I'm curious about the mechanism of Google noticing - was Chrome side-channeling information about it's cert to Google? Because if it was a true MITM proxy, google would never have talked to the browser directly to know what cert the browser was being presented. That's kinda how the whole MITM thing is dangerous - it's invisible to both sides if done correctly...
http://blog.chromium.org/2011/06/new-chromium-security-featu...
Why do we have that extension if nobody uses it :( ?
Edit: I have no delusions that this is not happening in the US, it is simply that as someone in the US, I don't have any options to lop off CAs that the US could influence. I can however make the decision to not trust some foreign CAs entirelly.
I wonder if certificate transparency could be mandated for intermediate certificates sooner than a full DV rollout could. It seems some CAs can't quite resist bending the rules when a sweet contract is dangled in front of their faces. It makes me wonder how much CNNIC was being paid to do this. Given that MCS Holdings sells "security products" it makes me wonder if this was an attempt to do or prepare to do bulk SSL stripping. I guess the blog post says there was no evidence of abuse though, so I guess not.
It should be mentioned that Certificate Transparency would not have prevented this attack (nor any other such attack).
Google has nothing to gain from CT beyond where they are right now: knowing who issued the cert.
Details: https://blog.okturtles.com/2014/09/the-trouble-with-certific...
TLDR: https://github.com/okTurtles/dnschain/blob/master/docs/Compa...
Corollary, is there a short list of CAs that folks around here trust more than average? Is there any value in such a whitelist, or are all CAs so rotten it doesn't much matter?
I don't think you'll have much problem even if you only trusted a few U.S. megacorporations, such as Verisign, Comodo, GeoTrust, GoDaddy, etc. They're no more trustworthy than the rest, but at least they're much more widely used than some government agency of a country you have nothing to do with.
Of course, MCS Holdings can then just change their name or create a new company or whatever, get a new agreement (with CNNIC or another Root CA) and continue on.
The alternative is that it's a free-for-all for everyone in the trust store. Cash in selling sub-CAs and shrug if they get caught? Really?
With the exception of DigiNotar [0], what has happened to any of the other CAs that had "security issues"?
Browsers should start considering scoping CAs by default. If CNNIC signs, say, a Mexican domain, that might be cause for suspicion. It's a bit more complicated since .com and others are sorta generic. But there's gotta be something that can limit exposure for many customers. How many US users often run into CNNIC, or those South American CAs?
1: On one of their sales calls, I told them they failed at the one thing they were supposed to do as a CA. Without missing a beat, the guy shifted to trying to sell me antivirus software.
I would have preferred the Pulp Fiction version. Google should have instead said to CNNIC:
You hear me talkin', hillbilly boy? I ain't
through with you by a damn sight. I'ma get
medieval on your ass.That has some advantages, most obviously, scalability and robustness. It also has one giant disadvantage: the only way to catch misbehaviour is to actually find a bogus certificate being used in the wild.
Certificate transparency is Google's plan to fix this. The idea is to evolve the PKI in a backwards compatible way. It creates public logs in which every certificate is meant to be registered. The certificates (or SSL handshakes, or a few other things) can then have a short mathematical proof embedded in them that the certificate was logged.
If the log proof isn't present then browsers remove the security indicators in order to apply pressure to people to get their certificates logged. It's supposed to be done by CAs so most SSL users should never notice any of this is happening.
Once certificates are being logged publicly the idea is anyone can do data mining over the log, for example to find certificates issued for their own website that they know they didn't request. Thus it allows crowdsourced policing of the CA system. Violations of the rules could be detected much faster.
Currently however only Chrome implements CT, and only for EV certs (the ones that make the address bar green), and the majority of CAs have been ignoring it, although the big fish are taking part. The customers of the smaller CAs that are pretending CT isn't happening will get a nasty surprise once Chrome stops treating their certificate as EV.
Firefox has an open bug for implementation[1] but it's inactive for whatever reason.
Not hard to see why from your explanation.
You don't need implementation in the browser. You need the CAs to provide the public audit logs and all HTTPS domain owners to check them for unexpected issuance.
The browser is just a political tool to enforce the CAs to provide the logs, for example by no longer marking their certs as trusted unless they do so.
On its face the idea of making a note of what certificates are created is a simple idea, but in reality CT is far from simple, and it does not actually "fix" these sorts of problems.
CT is an attempt a transparency, that's it. It cannot prevent MITM attacks because it allows unaffiliated third-parties to issue certificates on your website's behalf (same as X.509), something that they have no business doing (and is completely unnecessary).
Nor does it guarantee that mis-issued certificates will be found. The reason is partly because, as you note, it is mostly a voluntary effort on behalf of the CAs out there, but also because its design is ineffective. Even if every CA participated in CT, it would still not accomplish much:
1. It does not prevent these types of attacks from being used on users.
2. It does not guarantee that mis-issued certificates would be found because it requires website owners to query all the logs out there in order to find out whether or not someone mis-issued a certificate (a sort of needle in a haystack problem that almost no one [except maybe large companies like Google] is going to engage in, and in the end doesn't prevent attacks from happening).
Our detailed analysis of CT is here:
https://blog.okturtles.com/2014/09/the-trouble-with-certific...
We spent a good amount of effort analyzing CT, and if you believe we missed something, your reply is worth a lot more than a downvote & run.
It's odd how much effort is being put behind this effort, especially given that in this particular attack Google would have nothing to gain from CT (since all it can hope to do is tell them who issued the fraudulent cert, which they already know).
# remove-cnnic-root-ca-certificate.pp (only tested on ubuntu 14.04)
file { 'CNNIC_ROOT.crt':
path => '/usr/share/ca-certificates/mozilla/CNNIC_ROOT.crt',
ensure => absent,
}
file { '895cad1a.0':
path => '/etc/ssl/certs/895cad1a.0',
ensure => absent,
}
file { 'bd1910d4.0':
path => '/etc/ssl/certs/bd1910d4.0',
ensure => absent,
}
file { 'CNNIC_ROOT.pem':
path => '/etc/ssl/certs/CNNIC_ROOT.pem',
ensure => absent,
}
(N.B.: Yes, I know that doesn't completely take care of the problem. I manually "distrusted" it in Chromium and Firefox as well.)- The CA must have had some warning that it wasn't being loaded onto a HSM
- It was never verified the CSR/key was generated on a HSM (!!!)
- The auditors did not oversee the key being generated (this is typical for roots, although not for intermediaries)
- If this subordinate was in operation for >1yr, how was this not caught in an audit?
and you can't load a certificate off of a HSM, so I'd argue the CA is entirely at fault here.
I try to be an early adopter of such practices such as using SSL all the time on all my sites.
I zoom in to read the text and when I try to slide the screen over, it interprets that as me wanting to go to the next page. No, I wanted to read the text on THIS page.