176

There are now tons of Certification Authorities (CAs) that are trusted by default in major OS's, many of which are unrecognizable without online lookup or reference.

While there have been attempts by the NSA and others to "hack" or otherwise exploit root certicate authorities; is there anything preventing the NSA from becoming a Root CA itself?

It certainly has the resources and expertise, and could "suggest" to major OS vendors to add its Root CA to the default trust store list (which is large enough that it may not be noticed by anyone..?)

If it is feasible, what would the implications be? Could they essentially Man-in-the-Middle attack most HTTPS connections without a warning? (Perhaps not Dragnet-type interception, but close?) Or create a fake commercial root CA as obviously people would be suspicious if it had NSA plastered all over it?

LateralFractal
  • 5,173
  • 18
  • 41
user2813274
  • 2,051
  • 2
  • 13
  • 18
  • 9
    In this context I like to cite once again (I did in a post on 23.9.2014) Ross J. Anderson who wrote in Sec.19.5.3 of his well-known book "Security Engineering", Wiley, 2001, the following: "In short, while public key infrastructures can be useful in some applications, they are unlikely to be the universal solution to security problems as their advocates seem to believe. They don't tackle most of the really important issues at all." – Mok-Kong Shen Oct 21 '14 at 10:31
  • 4
    Note that the NSA has *two* tasks: ensure information security of the US (not just the government, also commerce and really the entire population) and gather information from outside the US. For task #1, it makes perfect sense for them to become a root CA for no nefarious reasons. – Jörg W Mittag Oct 21 '14 at 21:16
  • 3
    Related: [How to know which Certificates to leave in my browser, and which to remove](http://superuser.com/questions/818065/how-to-know-which-certificates-to-leave-in-my-browser-and-which-to-remove) – dotancohen Oct 22 '14 at 07:43
  • 2
    @dotancohen Please also see [What Trusted Root Certification Authorities should I trust?](http://security.stackexchange.com/q/53117/30521) and [How feasible is it for a CA to be hacked? Which default trusted root certificates should I remove?](http://security.stackexchange.com/q/2268/30521) – LateralFractal Oct 23 '14 at 13:23
  • @LateralFractal: Thank you! I might close my linked question as a dupe, I'll investigate. – dotancohen Oct 23 '14 at 13:31
  • 1
    @Jörg W Mittag: For task #1 it makes perfect sense to become a CA, (or more likely stealing the keys of other CA's) for **totally nefarious** reasons - industrial espionage to serve US companies. Barring another Snowden (one that actually releases things that might be harmful to the US government), when secrecy is lifted in somewhere around 2100, I believe this is what we will find was happening. – JKAbrams Nov 15 '14 at 08:19
  • 1
    @JörgWMittag "the NSA has two tasks: ensure information security of the US (not just the government, also commerce and really the entire population)" Are we talking about the same NSA? Because it's become pretty clear that the real-world NSA (rather than fairytale good-guy NSA) views information security of its own country's inhabitants to be a problem that needs to be obliterated. – Alkanshel Sep 09 '16 at 19:17

4 Answers4

237

It is already done:

FPKI root in Windows' "trusted CA" store

It is the FPKI root CA, under explicit and full control of the US government. Windows already trusts it by default.

Before you flip out and begin to delete root CA certificates, burn your computer's motherboard, or drink a gallon of vodka, think about what it means. It means that the US government could technically emit a fake certificate for any SSL site that you are browsing -- but with a certificate chain that would point back to the US government. That is the point of having a "trusted CA" in the client: so that the client may validate a certificate chain. Therefore, such a forged site would hardly be a discreet way to eavesdrop on communications. All it would take would be a single user clicking on the padlock icon, reviewing the certificate chain, notice the FPKI root, and mock Obama on Twitter.

Pushing your own root CA in the "trusted store" of your victims is not an adequate way to spy on people without them noticing. Although it is a government agency, the NSA as a whole is usually not that stupid.

Thomas Pornin
  • 322,884
  • 58
  • 787
  • 955
  • 55
    Whilst I agree overall with Thomas' statement about the indiscretion of this type of spying - it's still not without serious concerns. They could selectively serve a doctored certificate for specific IPs at specific times only. Few normal browsers log every cert chain they've encountered. Additionally, subversion of back-end HTTPS is even worse; such as between mobile apps and the cloud, or between enterprise SOAP and embedded systems. Almost every programming framework I know of trusts all Root CAs equally unless a rare security minded programmer strips out the defaults (explicit opt-out). – LateralFractal Oct 21 '14 at 00:12
  • 53
    You don't even have any assurances that GoDaddy, or for that matter, *any* other CA, is not run by the NSA, except maybe asking nicely if they're actually run by the NSA, and if they say "yes", then it's true. They could easily start a company to work as a CA, and then, since it's a profitable venture, never report its expenses back to Congress. – Ernie Oct 21 '14 at 17:13
  • 1
    Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/18067/discussion-on-answer-by-thomas-pornin-is-there-anything-preventing-the-nsa-from) – Rory Alsop Oct 22 '14 at 07:53
  • 7
    @Rory: http://security.stackexchange.com/editing-help#comment-formatting – Lightness Races in Orbit Oct 22 '14 at 10:33
  • Note that while the root CA is completely trusted, its primary intermediate CA -- "DoD Interoperability Root CA 1" -- does make use of name constraints, limiting itself to basically just `.mil` domains. If you wanted to keep functionality, you could probably install that one as a root. (Also, related [Mozilla bug for root CA inclusion](https://bugzilla.mozilla.org/show_bug.cgi?id=478418).) – user1686 Oct 22 '14 at 16:15
  • 15
    @Thomas I think you cherry picked a blatantly obvious root CA. That one could easily be in there to access US government sites. What about the *other* ones that are covert, less obvious or have obscure names? I do not think this accounts for the scenario where NSA simply uses some of their [$10.8B](http://www.washingtonpost.com/wp-srv/special/national/black-budget/) p.a. black budget to setup a shell corporation and purchase existing CAs like Verisign. Or just sends US based CAs a [National Security Letter](https://en.wikipedia.org/wiki/National_security_letter) for a copy of the private key. – NDF1 Oct 22 '14 at 20:35
  • 4
    Is this certificate only installed in US ? I don't have this root certificate on my Windows 8.1 computer in France. – Kedare Nov 17 '14 at 14:22
  • 1
    @ThomasPornin : Same thing for me in Windows 7. – user2284570 Nov 20 '14 at 11:01
55

The NSA could and probably already has gone -- using a USA PATRIOT Act demand letter, or other similar legislative tool -- to all the major CAs in the United States (e.g. VeriSign, GeoTrust, etc.) and demanded that they remit their private root keys to "No Such Agency", "for purposes of 'national security'".

Of course, all such requests must (per PATRIOT Act law) be kept secret, and the CAs must lie to the public about their having complied with the request, or the chief executive officers of the CAs (and any of their underlings involved) are subject to long prison terms (with the trial, if any, conducted in camera in secret courts).

None of the above is unfounded speculation; it is based on well-known U.S. laws, which two successive U.S. administrations (Bush and Obama) have refused to change in any meaningful way, and in view of the Snowden revelations it would be extremely foolish to assume that this scenario hasn't already happened.

So yes -- the simple answer is, "the NSA doesn't need to do anything special to set up a root CA; because it can easily impersonate any of the existing (American) ones, at will".

user53510
  • 800
  • 5
  • 3
  • 34
    This is pure speculation, with no citations. There are a lot of misconceptions out there about what the PATRIOT act actually says, and this looks like yet another instance of that. Speculation about legal matters from non-legal experts, without citations or evidence to back it up, is not very useful. – D.W. Oct 21 '14 at 18:44
  • 18
    [Here is your citation](https://en.wikipedia.org/wiki/National_security_letter) @D.W. I disagree with your statement because what user53510 said is *exactly* what is likely happening. – NDF1 Oct 22 '14 at 20:40
  • @NDF1, That citation leaves something to be desired. National security letters (NSL's) predate the PATRIOT act. The PATRIOT act did not create NSL's. – D.W. Oct 22 '14 at 21:29
  • 11
    @D.W. from the citation, the part "the CAs must lie to the public about their having complied with the request" comes from "Patriot Act reauthorization statutes". I think that part is an important aspect. – Volker Siegel Oct 23 '14 at 04:30
  • I think if I were a CA I would send the security letter back and tell them they don't have a warrant. Furthermore when it came before a judge I'd ask if the government has the right do destroy my business, because if the CA's private key was turned over and the browser vendors learned about it that's what would happen. – Joshua Oct 23 '14 at 20:53
  • 11
    @Joshua Isn't it exactly what happened to Lavabit? The ruling very clearly said that yes, destroying a business is of no concern. – Andrey Tarantsov Oct 24 '14 at 11:54
  • I think public opinion would be different if it disrupted banking sites, which this would surely do for a CA. – Joshua Oct 24 '14 at 18:49
  • @Joshua - your going down a slippery slope - now you need to define which businesses are "disruptive" enough such that they won't get shut down, or in essence define the "too big to fail" threshold, but for tech firms instead of banks. This is also assuming that the company is allowed and willing to go public with the request, of which many are not. – user2813274 Nov 04 '14 at 17:25
  • 2
    I am not going down a slippery slope, the NSA is. – Joshua Nov 04 '14 at 18:38
  • 2
    For anyone who isn't an NSA agent sent to confuse readers, this is not "pure speculation". Root CA providers all over the world can be extorted. They may also leak certificates by accident or hacking. There is no magic barrier protecting them. If you don't want your communication to be eavesdropped, don't trust someone else to provide certificate chains for you. – pwned Aug 17 '18 at 10:50
15

No. In addition to the obvious government Root CAs in your trust stores; the NSA is a spy agency and as such has likely already stolen the private keys of several other CAs. If they are devious, they'd steal the private keys of other government CAs for potential false flag operations.

Additionally, unless every operating system and browser explicitly locks their updates to a specific CA or certificate only, they could use any Root CA they own or control to add a new anonymous CA (e.g. Issuer: Voldemort) to a trust store so that future back-tracing goes precisely nowhere.

LateralFractal
  • 5,173
  • 18
  • 41
  • 1
    That's an interesting one about hijacking update mechanisms to add imaginary CAs... and entirely possible :( – Mark K Cowan Oct 23 '14 at 13:04
  • The updater in most OSes won't log which root CA added the new one? – ike Oct 23 '14 at 17:46
  • @ike Likely not; for if they did then they are recognising the problem, and would simply pin the updater to a specific root or leaf certificate in the first place. – LateralFractal Oct 23 '14 at 21:56
5

They don't need to offer another certificate which points to them. They just need the private key of the server certificate to eavesdrop on the communication, which is probably easy to obtain if you have that kind of resources.

user59089
  • 59
  • 1
  • 1
    A single server key may be easier to obtain, but a CA would allow for a lot more than any single website or service to be eavesdropped on – user2813274 Oct 20 '14 at 20:54
  • 3
    yeah, but paying off one guy at each CA is probably easier to achieve than throwing MITM attacks with a legit root certificate and hoping nobody sees the difference. Unless of course they have already broken the ciphers, then it doesn't matter anyway. – user59089 Oct 20 '14 at 21:00
  • It may be easier to pull off, but when someone discovers what happened, it's [bad for business](https://blog.mozilla.org/security/2013/01/03/revoking-trust-in-two-turktrust-certficates/), intentional or not. – mpontillo Oct 20 '14 at 22:31
  • To decrypt a message you need the private key of the intended reader. Although it could be different for every conversation initiated (it can be discarded when the conversation is over), usually it isn't. – CompanyDroneFromSector7G Oct 22 '14 at 15:16
  • 2
    You haven't thought this through. How is it easier to obtain the millions (10s or 100s of millions?) of server certificates in use, and coordinate getting the right one to the right place on demand for use, when they could just get themselves control of even a single root CA and manufacture fake certificates to order? – mc0e Oct 26 '14 at 18:18