Flaw Made Public In OpenSSH Encryption
alimo20 writes "Researchers at the Royal Holloway, University of London have discovered a flaw in Version 4.7 of OpenSSH on Debian/GNU Linux. According to ISG lead professor Kenny Patterson, an attacker has a 2^{-18} (that is, one in 262,144) chance of success. Patterson tells that this is more significant than past discoveries because 'This is a design flaw in OpenSSH. The other vulnerabilities have been more about coding errors.' The vulnerability is possible by a man-in-the-middle intercepting blocks of encrypted material as it passes. The attacker then re-transmits the data back to the server and counts the number of bytes before the server to throws error messages and disconnects the attacker. Using this information, the attacker can work backwards to figure out the first 4 bytes of data before encryption. 'The attack relies on flaws in the RFC (Request for Comments) internet standards that define SSH, said Patterson. ... Patterson said that he did not believe this flaw had been exploited in the wild, and that to deduce a message of appreciable length could take days.'"
Theo?
OpenSSH 5.2 was released in February already which has builtin countermeasures against this form of "attack." Next.
Whew. Glad I use Telnet.
MABASPLOOM!
...as we know, it's only a threat if people use the OS in question.
Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly and applying the wrong fix.
From the article it seems that it is more of a design flaw of SSH and not specifically OpenSSH
And in other news it also appears that the word "chink" is banned in the comments section.
If the flaw is in the design of SSH, wouldn't all OS's be effected? Why does this only effect Debian?
The 2^-18 is _really_scary_
The 'first 4 bytes', not so much.
So, meh. Of course true hardcore cryptanalysts are sure to be already ditching OpenSSH or maybe piping it through GPG first.
how long until
". . .discovered a flaw in Version 4.7 of OpenSSH on Debian/GNU Linux."
"The attack relies on flaws in the RFC (Request for Comments) internet standards that define SSH"
So which is it, is it an implementation specific bug, which is specific to OpenSSH on Linux specifically, OpenSSH on all O/Ses, or is it a flaw in the RFC, which should make it exploitable on *all* implementations of SSH, shouldn't it? How can a flaw in the standard only be exploitable in one version of one implementation of the standard on one specific target OS?
According to TFA, "OpenSSH version 5.2 contain[s] countermeasures". For Ubuntu users, note that Ubuntu 8.04 LTS (Hardy) is using the vulnerable version 4.7. Versions 8.10 (Intrepid) and above appear to use version 5.1.
Does anyone know whether 5.1 contains the flaw and/or the "countermeasures"?
Also, can any security gurus comment on the danger level here? It sounds like there is a low-probability to access a small amount of information... but the very existence of this vulnerability makes me uncomfortable. Also, why does it mention Debian specifically? Don't most distros use an OpenSSH package based on the exact same design? Shouldn't they all be vulnerable?
http://www.cpni.gov.uk/Docs/Vulnerability_Advisory_SSH.txt
Its in Debian? But a quick look at their repositories shows that oldstable has 4.3 and stable 5.1. Unless of course they compiled
After years of not using a signature, I am going to make one to say the following: Fuck Beta
So is it a flaw in the design of SSH or in the Debian patched OpenSSH implementation? If it's the former (as the quote seems to imply), why does it matter what SSH implementation, OS they found it on? Shouldn't it affect everyone?
sic transit gloria mundi
FTA, this vulnerability is addressed in newer versions of OpenSSH, not by fixing the specification, but by employing some kind of workaround to make it impractical. I didn't know that from the summary, since I don't really keep current on where OpenSSH is with their releases.
It seems like this attack has an awfully small chance of success. I am wondering if there is that small chance of success to decode a message after many days, or if because of the small chance of success, it would take multiple days before you had anything.
If this is really something that has almost no chance of working at all--period, I'm not too worried. If it is something that makes the encryption breakable in a few days, that's a pretty big deal and am surprised that it didn't get outed sooner as a flaw.
Can/should the RFC be revised to close this hole? Are there other (perhaps more obvious) examples of weakness in the RFC that have implementation-specific fixes applied?
This flaw was published in Nov 2008 with simple configuration fix, and OpenSSH released a default fixed version in March 2009.
Also, this attack gives only 4 bytes of unencrypted output after crashing your session many thousands of times, which is sure to be noticed. If you were repeating the exact same network traffic in millions of SSH sessions, an attacker might get something interesting after weeks of crashing your sessions. It's just one of the lamest exploits I've seen, worth mitigating eventually, but not worth all the press it's getting, especially 6 months after release...
The fix is simple, just use CTR mode encryption instead of CBC, or upgrade to OpenSSH 5.2 or later.
For more details go to the OpenSSH security page.
Blessed are the pessimists, for they have made backups.
It is because that happened to be the system that they found the vulnerability on.
Nothing more than that, really.
See, us weirdos who wrapped ssh inside an additional protection layer weren't being overly paranoid after all!
This is a technicality that no one cares about anymore I think even Stallman gave up on it.
Just enough to tell 'em what you think...
Everybody knows this. Nobody cares, except for Richard Stallman.
Obviously the flaw itself is (a) old, and (b) not specific to Debian.
The only point of (little) interest of the article is that it highlights that the SSH specifications - the RFC - has not been updated yet.
ftfa:
"The flaw, which lies in version 4.7 of OpenSSH on Debian/GNU Linux"
"Patterson said his group had worked with OpenSSH developers to mitigate the flaw, and that OpenSSH version 5.2 contained countermeasures."
They are unclear on whether or not it's only debian's repos that are affected, so I'd suggest upgrading to 5.2 or later.
I prefer to call it Linux/X/Mozilla/Alsa/KDE/QT/BSD. Fuck GNU.
Go back to /g/.
Give it up, Stallman. Nobody cares.
Gnu/Linux is not an operating system either.
"Fedora core 11" is an operation system.
It's a troll post from 4chan (page no longer exists -> google search link).
Command to determine openSSH version: ssh -V Output: OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL 0.9.8g 19 Oct 2007 I assume if you get the same results as I did you are not affected because you are running version 5.1.
Implies man-in-the-middle already, and the odds of figuring 32 bits of a particular packet are somewhat low. The worst case i could think about is when i pass my password or a very specific short data (cc number?). That particular data must be the decripted one, and in the 1/256k odds of happening, IF i have someone in the middle actively trying to get it. With that chances, the attacker well could expend his time playing lotto that have more chances to win.
Of course, those numbers are regarding a specific distribution/ssh version, could be different for other versions, but still, looks somewhat hard to happen ever.
> Patterson said that he did not believe this flaw
> had been exploited in the wild, and that to
> deduce a message of appreciable length could take
> days.
Is my social security number a "message of appreciable length?"
--I'm so big, my sig has its own sig.
-- See?
Which version is "1:4.7p1-8ubuntu1.2" in Ubuntu's nomenclature?
Launchpad page says "Published on 2008-05-14" which doesn't give me warm fuzzies.
https://launchpad.net/ubuntu/hardy/+source/openssh/1:4.7p1-8ubuntu1.2
You've got to be fucking kidding me.
From the summary:
Researchers at the Royal Holloway, University of London have discovered a flaw in Version 4.7 of OpenSSH on Debian/GNU Linux.
I think that's an adequate description. It is the combination of Debian, and GNU, an Linux, and many other things. Try copy/paste trolling something relevant.
And of course, calling it a GNU system is unbelievably arrogant. Why should it be called GNU/Linux, and not Debian/GNU/X.org/Apache/BSD/Linux? Recall that the software in question is OpenSSH, a project from the BSD world, and most definitely not a GNU project.
Oh, by the way, the GNU system is useless without a kernel. However, a kernel can actually be useful without running any userspace software at all -- for instance, take Coreboot, formerly LinuxBIOS, which if I recall, ran entirely in kernel-space. It's also possible to make a Linux distribution that does not include GNU -- for instance, use a non-GNU libc, and Busybox, and you have a useful (if minimal) Linux operating system without GNU.
Here's a suggestion: Drop this pointless, semantic bickering, and talk about something that matters, that actually has an impact on the realities and future of Free Software. Something like DRM, or Verified Voting, or open document standards, or Web standards, or better technology -- why are people still writing so much stuff (unnecessarily) in C? -- or free software in government, or network neutrality, or the need for marketing and business people in free software.
Because right now, it just looks embarrassing. Look at the Ubuntu homepage -- it doesn't even describe itself as Ubuntu Linux. It's just Ubuntu, and if you look at the details, you may find that it's a "Linux-based operating system". And notice the complete lack of complaints from anyone in the "Linux" community? It's only a few GNU people like you who are still bitter about the fact that Linus did in a few months what GNU took years to not do -- build a working kernel.
Don't thank God, thank a doctor!
No. They stopped calling it "Fedora Core" ages ago. "Fedora 11" is an operating system.
looks like ssh has a chink in its armor
The replies are all dripping with attitude and arrogance. The most arrogant replies are centered in the first person point of view response. As a community, a more appropriate response would be how can we push out this information to the larger Linux business community, who does not spend their idle time on /., to get the patch rolling.
I don't even use Linux, however I will wager that had this been Windows and I replied, "meh, I'm patched, next", that I would be flamed up and down worse than Eric Estrada in Tora, Tora, Tora.
This was never a real threat, just another piece of Academic FUD. To be vulnerable as an interactive ssh user you would have to ignore 100,000 aborted sessions to expose 14 bits of plaintext, I think I would notice, and block the attacker.
There are a whole suite of cyphers, including AES aka Rijhndael are configurable, have you done yours?, and not vulnerable.
Finally the protocol is trivially fixed.
Now I for one, whilst I have the highest respect for the work done by people like Ross Anderson and Schnieer am fed up to the back teeth with alarmism from governments, NGOs and academics -- all of which add up to give us more money.
If you dont know these researchers were working for the UK equivalent of Homeland Security and failed to inform SSH of the details of the attack, doubtless quoting National Security.
These people who parade nonsense should be tarred an feathered and sent on the next rail.
Fedora 11 is the distro and NOT the operating system! Fedora 11 includes an operating system that is based on the Linux kernel and includes GNU utilities. Fedora includes a great deal more then the OS
I can't find a reference to it. Certainly they submitted a bug report. They mention they found it on debian, so it seems like they would have file one.
"It is better to die on one's feet than to live on one's knees." - Albert Camus
(PS don't actually do this)
It passed the decrypted packet_length value back to the other end in an error message, according to the article. Shouldn't that have allowed arbitrary recovery of plaintext by just xoring the returned packet length with the previous ciphertext block used as the IV?
Particularly when using Krb5 for session encryption ;-) Of course how many slashdotters know that you can use telnet with session encryption on an intranet? Slim to none?
LedgerSMB: Open source Accounting/ERP
you would have to ignore 100,000 aborted sessions
So DoS attacks are no longer real threats? I hate an alarmist as much as the next over worked admin, but I'd rather a penetration than a DoS. Users don't need to know when we get "hacked", they tend to notice DoS attacks.
Me failed English...
FreeBSD over Linux. If my comments seem odd, this may explain...
The countermeasures aren't that complicated. Edit your sshd_config file to have the following line and do a reload/HUP:
Ciphers aes128-ctr,aes256-ctr,arcfour256,arcfour,aes128-cbc,aes256-cbc
By default the CBC modes are first, and this makes CTR (and RC4) the preferred cipher. This mitigates the attack as most recent clients support CTR so it will be chosen.
Really old clients may fall back to CBC mode and still be vulnerable. This is described in OpenSSH's original response the the report:
http://www.openssh.com/txt/cbc.adv
It's not that big of a deal.
What you say is true.
However, who says SSH has to be interactive? What about rsync backups over SSH? Automated connections that use SSH? Basically, anything and everything is tunnelled through SSH, so this is huge. If the attacker has time and you have a network of, say, 100 machines that initiate 1000 SSH sessions a day, you could have a breach in a day. If the attacker has a few weeks to work undetected, you could have a huge breach and have no idea because you're basking in the false security of working in SSH. Think you'd notice that?
404555974007725459910684486621289147856453481154 in hex is "You sank my Battleship?"
[GPG key in journal]
Oh dear god.
Please tell me who your users are so I can avoid being one in the future.
I assume the parent failed every numerate course he ever took, and never took any kind of statistics for idiots course, and has not bothered to read and understand the attack.
... then I have to tolerate 100000 failures/connection.
An continues to spread FUD.
The attack requires a Man in the Middle scenario, if I ssh into a random machine the MiM is __VERY__ unlikely to work unless the NSA and my ISP are in cahoots and I dont notice that connection takes a nonsensically longer time (15min v 3s),
Now comes the idiot who talks about rsync, and scripted connections, which, for brevity I did not address and tries to use multipicative probability leveling to try to convince us we have a problem; sorry now you need 1000+ MiM attacks, and fail to notice that they are failing, so you also dont notice a net cable kicked out, or a cable cut by a backhoe.
Look guys, get real, if you want to use statistics or probability learn some and understand contingent probability which is essential to risk evaluation.
... Although OpenSSH is usually included along with the Linux kernel in complete distributions of an OS. In fact (calling attention to the 'Open') it was actually developed by the OpenBSD group.
Categorizing this story as 'Linux' is misleading. OpenSSH is used with a variety of platforms, of which Linux is only one.
Microsoft completely replaced their consumer OS, moving from the Win95-based platform to the infinitely more secure NT-based platform
Thank goodness. I'd hate to think they were shipping anything insecure to their well deserved 97% of the market...
(And are you including OpenBSD in your "non-Linux UNIXes" list, by any chance?)
you had me at #!
this is not "news" at all: Prof. Paterson et al had already announced it in Nov 08, see
http://www.cpni.gov.uk/docs/vulnerability_advisory_ssh.txt
Also, the article title is misleading, the original paper says that they discovered the flaw while working in a Debian GNU/Linux OS, not that the bug is specific to Debian.
Indeed the bug was addressed in upstream code in OpenSSH 5.2 (and Debian/lenny ships 5.1p1 that contains a backported patch).
My understanding is that one packager screwed up one package (openssl), which (while a _big_ screw-up) would hardly amount to a "history of fucking up packages".
Can you cite any other examples that would indicate such a trend?
http://www.isg.rhul.ac.uk/~kp/SandPfinal.pdf
To mitigate on clients and servers: in /etc/ssh/sshd_config and /etc/ssh/ssh_config and/or any ssh clients you use, add:
Ciphers aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha1
To verify:
ssh -v host
look for the output:
debug1: kex: server->client aes128-ctr hmac-sha1 zlib@openssh.com
debug1: kex: client->server aes128-ctr hmac-sha1 zlib@openssh.com
You are particularly interested in the aesXXX-ctr segment. If that specifies a CBC mode, then you probably need to change that server's config. For the blowfish-using type, I'm uncertain of the attack's applicability to blowfish-cbc. YMMV. For server testing, you probably want to make sure your ssh client isn't forcing the CTR mode. To test that, do
ssh -v -o Ciphers=aes256-cbc,aes192-cbc,aes128-cbc,aes256-ctr,aes192-ctr,aes128-ctr
and look for similar debugging output as above.
That now makes more sense. Thank you for the more detailed explanation which actually makes some kind of sense. So, in a way, this isn't *exactly* a flaw in the standard, but how the OpenSSH team decided to implement that particular clause of the standard (that is, how they interpreted the standard).
It's not "Fedora Core" anymore. Just Fedora.
The technical paper describing this attack is available here:
http://www.isg.rhul.ac.uk/~kp/SandPfinal.pdf
It answers a lot of the questions being posed on this thread.