Secret Code Found in Juniper's Firewalls Shows Risk of Government Backdoors
wired.com
wired.com
I conceded awhile ago that Dual EC was a crypto backdoor (before BULLRUN and the antics that were uncovered with RSA and with the European standards, I had suggested, as some other crypto people had, that Dual EC was too hamfisted and obvious to be a crypto backdoor).
But I've maintained since then that virtually nobody uses Dual EC, so its impact --- while clearly malign! --- is probably limited.
Nope. ScreenOS apparently (I'm not 100% sure, but that seems to be the way the wind is blowing) uses it to key VPN connections!
FULLY CONCEDED. The immediate known practical impact of Dual EC is, if that's true, enormous.
The weird thing about this particular backdoor is that the adversary seems to have modified the Dual EC parameters. Dual EC is an RNG with an embedded public key, where an adversary with the private key can "decrypt" the random bytes it generates to recover its state and rewind/fast forward it. This backdoor appears to swap out the public key, which is something NSA has no interest in doing.
My money is that this is the work of GCHQ, the world's most unhinged signals intelligence agency, and our partners in peace.
While I wish I was an uber-crypto-nerd, unfortunately I only have time to be an occasional crypto geek.
EDIT: Here's a start, from another front page HN article: "Dual-EC was an NSA effort to introduce a backdoored random number generator (RNG) that, given knowledge of a secret key, allowed an attacker to observe output from the RNG and then predict its future output."
However, having it in the standard (since removed) is perfect for fallback-like attacks or surreptitious changes (in the best case, your target has already implemented and deployed your exploit code and all you have to do is throw the switch to enable it!). That's what this is demonstrating (though some of the details are still speculative).
* Exception being those paid or required to do so by NSA.
The way I read this statement is that each device generates its own set of points. If this is the case, I don't see how it would work as a crypto backdoor.
If by "self-generated" they mean generated by Juniper once, well, thats fishy.
[0] http://kb.juniper.net/InfoCenter/index?page=content&id=KB282...
Edited to add: Upon further research, the latter possibility seems more likely.
Looks like they feed the output through a standard CPRNG. Assuming it's true, that pretty much breaks the DUAL_EC attack because you can't use the output of the final CPRNG to recover the DUAL_EC state.
Oddly, you can disable the Dual EC seeding with the flag 'one-stage-rng'. But not the other way around.
[1] http://csrc.nist.gov/groups/STM/cavp/documents/rng/931rngext...
While they wouldn't need to swap it out (since they can unlock standard Dual EC), that doesn't mean they wouldn't.
Assuming 1) that Dual EC was used here and 2) was inserted surreptitiously in a way that has a nonnegligible chance of discovery, it would make sense to rekey it since failing to do so would strongly attribute the attack to NSA (or someone willing to give up the passive backdoor opportunity in order to pin it on NSA).
The only case for NSA where using the old key would be best is if the use of standards-based Dual EC would pass scrutiny but a modified one would not. This depends on the details.
If switching Juniper to Dual EC required only calling a different function in Juniper's existing crypto library and/or detection was unlikely, standard Dual EC might be best. If the compromise added a full Dual EC implementation, then changing the constants is good (different magic constants don't significantly increase risk of detection for the large inserted code blob while significantly decreasing the risk of attribution).
No. It is not at all plausible that NSA backdoored ScreenOS in 2012 in order to rekey their backdoor.
I disagree that following the standard on that point and creating your own would be a smoking gun that the standard is malicious. Rather, it could be a smoking gun that this implementation was. If the tampering would likely be detected anyway, I'd argue it's better to avoid attribution.
It is certainly not the case that any part of the US Government acknowledged anything hinky about Dual EC in 2012. The notion that Dual EC was a cryptographic standards backdoor would have been one of the more closely guarded secrets in the entire government.
Virtually everything we now know about Dual EC is a result of the Snowden disclosures and the followup work people like Bernstein and Lange did in the wake of those disclosures. When analyzing stuff like this, it's important not to project knowledge we have now back before we had it.
However, in 2007, it wasn't just known that you could implement a backdoor, but how to do so. This of course means that any constants generated after this point could not be given the benefit of the doubt since anyone could launch this attack (and I think you'll grant me that all major intelligence services knew how to create and use a similar backdoor after 2007). And while USG did not acknowledge a backdoor, there was real, public doubt about the constants: Schneier's article in Wired was titled (notwithstanding Betteridge) "Did NSA put a Secret Backdoor in New Encryption Standard?"
Those in the standard were of unknown status, but even 2007 Schneier had the appropriately conservative cryptographer response and recommended "not to use Dual_EC_DRBG under any circumstances."
The pieces were there in 2012 for anyone that noticed a new Dual EC dependency being added, but I agree that the knowledge was not well-known enough (though it saddens me that a VPN manufacturer didn't know to avoid it 5 years later).
I still hold to the statement that rekeying Dual EC in 2012 is not a smoking gun on the standard, but more suggestive of an opportunistic attacker using the known mechanism for how to embed such a backdoor. If detected, it's obvious it's a backdoor, but that's not an indictment on the standard's constants (in fact, if you could otherwise attribute the attack to NSA, it's a tiny bit of evidence that either there is no standard backdoor or that USG don't want to use it in this case).
Here's a statement that I think we might disagree on: I believe that no one in 2012 that knew why the provenance of the constants could be a problem would have allowed Dual EC in the codebase in any form. This is why I believe the incremental chance of detection from changing the constants was small and why it'd be worth it to avoid attribution.
That said, I've stated my positions and see no need to continuing pressing legitimate points of disagreement. I just wanted to understand your position.
--from "Casablanca"
I'd be shocked to learn that there are no back doors in routing equipment. Having that kind of control is just too appealing to the most powerful players -- the NSA, China, perhaps Russia.
One hopes that people who care about the privacy of their communications are not relying on the routers for encryption. I would encrypt end-to-end. Even if the spooks are capturing the data, let them work for their cleartext.
Of course, we have to use algorithms that aren't compromised, either.
Annoying and disturbing. And they can't claim it's needed to stop terrorism, either. The U.S. anti-terrorism apparatus didn't spot an obviously dangerous couple in San Bernardino, even after one of them posted jihadist goals on her stream. They didn't stop the Tsarnaev brothers from bombing the Boston Marathon even after the Russians phoned to warn us about them. Idiots.
are you repeating a convenient falsehood or am I? in other words -- do you have a source that verified she in fact posted jihadist anything, anywhere?
On Sunday the New York Times quoted "law enforcement sources" as saying that she had made postings on her stream. The story got a huge amount of coverage and even came up during Tuesday's Republican debate.
On Wednesday, FBI Director Comey described the reporting as "grabled" and clarified that no, it was just private messages -- and the Times (and others) rewrote their stories to reflect it. But you can't unring a bell; most people's opinion, and even more importantly their emotional responses, are based on the original story.
Erik Wemple covers this well in the Washington Post [1]
Times' "public editor" Margeret Sullivan's looks at it as well [2], noting that two of the reporters also incorrectly reported that Hillary Clinton was the target of a criminal investigation.
[1] https://www.washingtonpost.com/blogs/erik-wemple/wp/2015/12/...
[2] http://publiceditor.blogs.nytimes.com/2015/12/18/new-york-ti...
Marquez (the Muslim convert who sold them the guns), however, did post something on his verified Facebook account a month before the attack.[1]
And Malik (the wife) did apparently post something on Facebook minutes before the attack.
Do you disagree with my overall point, that the U.S. law enforcement has over-surveillance and under-intelligence?
1. http://www.nbcnews.com/storyline/san-bernardino-shooting/san...
Let's say they vent in private conversation well that's legal, they then buy some guns and ammo. Well again that's legal. Then one day they go out and shoot people, well sorry we can't afford to have a swat team around and you can go from 100% legal to shooting people in about 30 seconds.
The problems begin when we have a process-bound bureaucracy rather than a group of smart people, each acting on hunches and excellent information. Bureaucracies can be composed of smart people yet act stupidly.
Also, there are political mandates that certain minorities not be singled out, e.g. the Muslims. Thus, the fact that the three involved in San Bernardino were Muslims did not come into play until well after the shooting. The initial news articles I saw didn't even mention their ethnicities and religious affiliations; even the conservative Wall Street Journal only mentioned it at the very end, and the fact that Marquez was a recent convert to Islam didn't come out until recently.
In terms of mass shootings Muslims are far from the most common profile. Seung-Hui Cho aged 23 for example killed 32 people and wounded 17 in VT on April 16, 2007. Jeffrey Weise, a 16-year-old killed 10 in Red Lake, Minnesota. 21 died at Columbine.
Go though: http://timelines.latimes.com/deadliest-shooting-rampages/ they don't really fit just 1 or 2 profiles.
Of course, you can't just go pick up every strange person and lock them away, or 20% of us might be incarcerated. But we can definitely have better scrutiny of sociopathic children in junior high and high school, and steer them into treatment that might help protect them from hurting themselves and others. We've gone from excessive incarceration back in the 1950s to inadequate attention to the mentally ill since the 1970s, when the flawed policy of mainstreaming became popular.
The Columbine massacre was perpetrated by two disturbed boys whose families suspected something. Afterwards one of their dads said "That sounds like him." Well, if you suspected violence, why didn't you do something about it sooner?
The other kind of mass murderers today are ideology-driven Muslims. 3,000 on 9/11. Dozens at a Texas base. 14 in San Bernardino. I suspect there will be many more coming. These people are quite possibly mentally ill, sociopathic, something wrong upstairs. The ideology gives them a focus for their delusions. We don't need to go after Muslims in general; we need to focus on the unstable ones who are headed for trouble.
It's going to take clear heads and a lot of work, and in my opinion the very worst approach is to sweep all these problems under the carpet and simply tap everyone's phone and email. That's just an evasion and confers a dangerous sense of complacence.
[0] http://www.zerohedge.com/news/2015-09-17/antidepressants-sci...
age 36 SEPT. 28, 2012 Andrew Engeldinger 6 killed, 2 injured
age 43 APRIL 2, 2012 7 killed, 3 injured: Oakland
age 41 OCT. 12, 2011 Scott Dekraai, 8 killed, 1 injured: Seal Beach, Calif.
age 34 AUG. 3, 2010 Omar S. Thornton, 6 killed, 11 injured: Tucson, Ariz.
age 45 FEB. 12, 2010 Amy Bishop 45: 3 killed, 3 wounded: Huntsville, Ala.
age 39 November 5, 2009 Nidal Malik Hasan: fatally shooting 13 people and injuring more than 30
Sure, you could say it's mostly 14-45 but that's true for most criminals and not that useful. And even just on that page there is Gian Luigi Ferri, age 55 JULY 1, 1993Even if you don't subscribe to the "more than once a day" statistic (which does include gang violence), it's still "about once a week" in 2015 for non-gang completely-innocent random victims -- and yet, this page lists only about 5 a year.
something something heatmap. https://xkcd.com/1138/
> To be clear, we do not work with governments or anyone else to purposely introduce weaknesses or vulnerabilities into our products…
Can we assume they can force a software modification in the interest of national security, just as we know they can force taps into the likes of Yahoo and AT&T?
http://edition.cnn.com/2015/12/18/politics/juniper-networks-...
Obviously it must be either Russia or China - NSA couldn't possibly be responsible ;)
</sarcasm>
Much like the difference between forcing sites to hand over SSL certs and breaking SSL, there's a gulf between compromising hardware that you have physical access to and compromising the software stack at the source.
In this case I wouldn't be surprised if that turned out to be the narrative, but the "NSA can accomplish anything" position is a narrative that plays into their favor.
You know that they could have their own programmers working there, or just approach, bribe or blackmail, an existing programmer to compromise the software (e.g. one found with child porn on his HD).
I hope the folks at Juniper are checking their toolchains, build machines and repositories for signs of similar attack. Of course, enough time has elapsed that they may need to establish a cleanroom for their code. Hoo boy.
I hope they figure out who planted it there and that they change their hiring/code review policies to make sure that such a thing can not happen again. Firewalls should be tamper-proof to the point where they simply refuse to operate at all if the code has been messed with after it leaves the premises, the absence of such tamper proofing is already a problem and should be taken quite serious.
Attestation is sort of like DRM with policies that you decide.
Note that many of these devices have significant complexity in hardware. Lots of things that state-level actors can do to your hardware, on the order of:
- see packet starting with a known signature
- over-write the rest of that packet with interesting stuff, and transmit
Something at this level would be really hard to find.
We knew this from Echelon in the 1980s.
But the fact that people with access to your infrastructure also had access to your data was more or less well known ever since "the beginning", and it's also why internetworks other than the Internet were a thing for a long time.
> And yet, as a whole, we de facto continue to trust in opaque entities that provide valuable yet likely compromised services because it is convenient.
Don't forget the scarcity of alternatives though. It takes a lot of money to come up with a credible alternative to Juniper and Cisco. Siphoning personal data is what sells nowadays, not protecting it.
Phrases like If you want something to stay private, don't post it. are bandied about by the general public. Not just by single issue privacy advocates, but by people of all sorts.
1. https://en.wikipedia.org/wiki/Olmstead_v._United_States 2. http://scarinciattorney.com/olmstead-v-united-states-and-the...
The problem goes much deeper. It could be any "larger" corporation or government or other entity having enough manpower. It could even be parts of a corporation or government entity.
However which way you put it, a program of which you don't have access to the source cannot be trusted.
If you care about your security then you need to be able to inspect the code that protects your assets.
Distributed open source firewall vs propritary firewall with backdoors.
Some of the very large security bugs found in open source software which were present in that code for years, indicate that this is not commonly done.
And that was just bugs as opposed to actual backdoors which would likely be harder to find if inserted competently.
So whilst in theory you are correct, I'm not so sure you are in practice.
If anything, the advantages of open source here are more about open development processes and being able to know just who is the gate keeper. As an example, if you use OpenBSD, you have reasonable assurances that Theo will do a good job, because he has earned his reputation.
Juniper? Who really knows what goes on internally? How are people allocated and shuffled around? It's a black box.
Ultimately I'd put more trust in OpenBSD than in Juniper because of this, but I'm still making a leap of faith. And OpenBSD is an extreme example of how much trust a project can earn; a vast majority of open source code is not held to such scrutiny.
https://community.openvpn.net/openvpn/wiki/DeveloperDocument...
http://sourceforge.net/p/openvpn/mailman/openvpn-devel/?view...
Given enough eyeballs backdoors can be easy to spot in source code, but eyeballs aren't an unlimited resource. In addition to open sourcing your software, the community that cares about the project needs enough funding or institutional support to actually review the code in question.
After looking at some examples of the Underhanded C contest (http://underhanded-c.org/) and its predecessor, the Obfuscated V contest (http://web.archive.org/web/20110605000401/http://graphics.st...), I'm not so sure that well-implemented backdoors are easy to spot.
1: https://www.schneier.com/blog/archives/2010/12/did_the_fbi_p...
You can certainly provide, for example, open source designs for a specialized ASIC, but it doesn't mean anyone could afford to actually make it.
But, there is a notable gap. Compare throughput for a 3DES vpn for example. Or total throughput with filtering on.
Would you take whatever your VCS claims as face value in this case? I wouldn't, which makes answering this very difficult, so I think it is to be expected that they don't have an answer yet.
Think of the value of all the data in the world that Juniper firewalls protect. Of course every actor that can afford to will invest the resources to introduce back doors. As an example, the NSA had ~30,000 employees and a ~$10 billion budget as of a few years ago; they can afford to do it.
For me, the real question is, how does Juniper address the fact that they are such a target? Do they take adequate security measures for the situation (which would be very expensive)? Just take standard security measures, which very likely would be inadequte, so they can escape liability? How does any such organization deal with it?: Google, Microsoft, Apple, Apache, Linux, etc.
On the outside, I think this is yet another reason to use git, which, if I recall correctly, is designed to make attacks on commit history significantly more difficult than they are with SVN and CVS.
I started using Signal because I don't want people seeing the messages I post. But in the end it's only trust that makes me think Signal is safe to use.
A lot of people also trusted Juniper. But that trust is gone. And not only for Juniper. What about other brands? We don't know.
One has to assume that all are back-doored. Mobile phones are inherently not trustable.
Same goes for all major firewall vendors. If you going to hack one of them as a nation state, then you're going to do all of them.
While that used to be true, based upon recent history we, unfortunately, can't blindly trust HTTPS to always be "secure" 100% of the time anymore -- whether due to things like Heartbleed, fake certs signed by a root CA, protocol attacks, or some other vulnerability that hasn't even been discovered yet.
Deleted comment
(Also, since it's a stream cipher, it can't use the same key ever again, else you can xor those ciphertexts to get 2 xored plaintexts, which are much easier to crack.)
Trust is something delicate which works best by using face to face communication.
So it's ok not to trust everything you read.
But this story is about private communication not being as private as thought.
They embedded the backdoor password right into it. Clearly they should have embedded the hash of the password instead. Then it would be unbreakable and no other party would be able to use the backdoor.
Hashing passwords is extremely basic security practice.
Or you know, that's just one obvious backdoor they put in, to divert from the other 2-3 non-obvious they have.
I see the benefit of inserting multiple backdoors. But none of them should be vulnerable to rival nations.
Which is an empty statement when it comes to security principles. If you've placed a backdoor (and some are blatantly obvious if you look for it, like some SSL issues), then others can use it too. Most backdoors are not of the "we have an encrypted password only we know" variety, but of the purposeful hole to exploit.
>I see the benefit of inserting multiple backdoors. But none of them should be vulnerable to rival nations.
Except if the idea is to monitor the local population, and you do not care that much if others monitor them too.
If I remember correctly even tptacek was claiming initially that "Dual EC is not so bad...not that many companies use it anyway, because they would be stupid to use a 1000x slower algorithm". Yeah, except some of the biggest networking equipment makers in the world who do use it, and who sell products to many other small and large companies, too. Quite a bit of an attack surface for the NSA.
The point was always that Dual_EC should've never become a NIST standard, no matter how "bad it was and that probably nobody would use it anyway". It was made a standard for a reason by the NSA, to convince at least some of the big companies to use it. And they succeeded in that.
We can only hope that the good people who work in standard bodies will never allow something like that to happen again, because in the end backdoors always end up being used for "evil", whether by the initial creators or by someone else who finds them later.