

SSH Taking Stand On Vulnerability 90
jeffy124 writes "SSH Communications is recognizing the vulnerability claim made by UC Berkeley researchers earlier this week. They say it is not a practical threat to the ssh protocol, people can still remain confident in keeping communications over ssh private. While this is true IMO, they are open to and will be researching techniques that would make the standard stronger, along with hopes of lessening this vulnerability."
Do they do the commercial one? (Score:2, Insightful)
Yes, SSH.com's product works fine with OpenSSH (Score:3, Informative)
I know, I use the SSH.com client to talk to the OpenSSH (on OpenBSD) server. However, I don't use the key-exchange methods, so I can't comment on that facet.
The SFTP function is a really nice feature, too. All I had to do was enable the server in the OpenSSH /etc/sshd_config file, and it just worked. Beautiful.
Finally, they offer a free "educational, charity, and personal recreational/hobby use" license -- just the thing for using my Windows desktop to talk to my home firewall.
I've never had a hiccup... no complaints at all! I think that's as much a credit to OpenSSH as it is to SSH.com -- they have a standard, and they've stuck to it!
So what.. (Score:4, Insightful)
If you have people capable of reconstructing passwords from key timings then you have got yourself a problem.
The only solution is to inject fake data..
Huh? (Score:1)
Re:Huh? (Score:1)
The solution is trivial.
Establish secure channel/determine remote server SSH version.
If the server is older version, report the potential for vulnerability.
else
Grab the whole password, and send it over the secure channel all at once.
I wouldn't hash it locally, because then you have to figure out what remote hashing algorithm is (crypt, md5, sha1...) since the channel is secure, easier to send it all at once. And in a large, uniform size packet to make guessing the length of the password also impossible.
Re:Huh? (Score:2)
SSH already does this. The issue is NOT NOT NOT with the initial password to establish the connection, but with passwords that you type DURING YOUR SESSION (say, for sudo).
Re:Huh? (Score:1)
If that is the case, then I don't really see any obvious solution, apart from an escape sequence to turn on line at a time, or keystroke at a time sending.
Besides, if what you're saying is true, then this is really not very helpful as an exploit. I'll be on the server, sometimes for hours. I could be typing "cd
Granted, orginal poster said, fake data could be injected, but it doesn't seem serious enough for that.
Just a minor point (Score:1)
it seems to me that far too much processing and logging is needed to get a small amount of information which only narrows down the list of posibilities. Also how many people run su or sudo on a machine? For security it should be only one. And also for security you shouldn't re-ssh off an exposed machine, but if you want to allow this you should use RSA keys.
Then we have the fact that the evesdropper has no clear way of knowing that anyone has input a password, so he has to analyse every keystroke and every response and try to find the input 's u' followed by return and then he has to take it on blind faith that it is 'su' and not 'di', 'sj', 'sn', 'd8', 'ab' or even 'u2' as these are all about the same spacing apart on the keyboard (for us non-touchtypists out there).
But then just suppose thay did get a password for say an ssh connection or even narrow down the posibilities what good would it do. They would have no idea where the connection was going to, but he could try the same thing with the ip/domain name, still on faith, so he now has to try and brute-force his way through different items first find the server, then find the username, then find the right password. Now there is the posibility that the username and password would be the same on both servers but that is why you would use the RSA keys to authenticate.
All in all no real information is gained. All you gain is data that if coupled with sociological, personality and typing profilles could lead to a security breach but would need to be focused on the client end of the connection and so would have much further reaching consequences as this is analisys on the Bletchly Park scale of things
issue can be avoided (Score:2, Informative)
Re:issue can be avoided (Score:2)
Or with SSH by just not sending the password across the network at all. Using RSA euthentication completely nullifies this potential vulnerability.
Re:issue can be avoided (Score:2)
They are talking about passwords entered after you log in. To things like sudo, or SQL front ends, or other crap like that. Or loging into another machine.
Re:issue can be avoided (Score:1)
That's great, but how do they know when somebody is entering a password locally? It's not as though they can read all your keystrokes and tell exactly what you're doing. The only way they could do so is if they're also logged on to the remote computer so that they can process monitor and see exactly what you're doing. Otherwise they won't know whether you're typing in a password or replying to a message on /. in Links. If they've already got access to the machine, they're much more likely to be able to find a local root compromise than brute force a good password using key timings.
That's not to say that they should just ignore the problem. With a little bit of cleverness they could minimize the problem. Some of the approaches already mentioned- adding jitter to packet sending times, sending multiple characters in a single packet if they're being typed quickly, etc. could make the technique pretty much hopeless. But let's face it, it's already pretty hopeless, since the attacker doesn't have an obvious way of finding out when and where you're sending a password during the session in the first place.
Re:issue can be avoided (Score:2)
That's what I thought before I read the paper. However you can guess when passwords are typed. One big hint would be lack of an echo. Sure, that might be someone typing a long vi command sequence, or the far end being slow, but the traffic information is only used to help guess passwords, it isn't relied on to actually be 100% accurate!
Re:issue can be avoided (Score:1)
I do not believe you are correct, from their document [berkeley.edu] it appears they are focussing on the initial login. It is much easier as they know where in the stream to look. Trying to capture a sudo, etc. would be very difficult as you would need to analyze the entire session stream (that is almost certainly intermixed with writing emails, scripting, coding, etc.) and look for repeating patterns (and that assumes you are entering the password alot for various things).
Or loging into another machine.
Yes, they do address that. But now that involves them having a very, very (almost too) convenient location from which to sniff, twice (or they are sniffing from your machine itself). Using switched networks (super common) and decent physical security will make this really hard. Also, if you use RSA style auth on this operation too, you have circumvented it again.
I think the original posters statement that RSA authentication is the way to short-circuit this potential vulnerability is correct. Perhaps the use of the word "nullify" is a bit strong, but it sure makes an extremely difficult task even more difficult (perhaps approaching impossible). I have to be honest, I have always found RSA auth annoying, but this vulnerability has perhaps convinced me that it is the right way to go.
Re:issue can be avoided (Score:1, Informative)
Believe it. In SSH2 the initial login password is buffered by the client and then sent in 8 byte chuncks, so you cannot get any keypress-timing information from the initial password.
Re:issue can be avoided (Score:1)
Re:issue can be avoided (Score:2)
Re:issue can be avoided (Score:2)
Not really, even the command line ssh sends the ssh password in a single CMSG_AUTH_PASSWORD packet. The attack isn't talking about that password. It is talking about passwords you use after you are logged in. Say by running sudo, or ssh'ing to another host (maybe one that a firewall prevents reaching directly).
You could avoid this by cut n' pasting your password, but that has other problems (like forgetting the password was the last thing in the buffer and pasting it somewhere you don't want it!), and is just ugly. The ssh client could buffer multiple characters, but it doesn't know when it should do that. Most of the time having that done would suck huge. The ssh client could also pad packet sizes, but that only helps so much.
A real answer would change the ssh client, the ssh server, the ssh protocol, and anything that prompts for a password. Even if you assume that "anything that prompts for a password" all uses libc's getpass that is still a whole whole lot of work.
What would the change do? It would have getpass do a tty ioctl letting the master side of tty know we are in "read password mode". The master side of the tty would be sshd in this case, it would send a new ssh message to the client asking for all keys typed to be buffered until the end line char, interrupt char, or other special control chars are typed, and transmit the whole buffer. The ssh client's role should be obvious.
Come to think of it, that sounds alot like the telnet line mode, so maybe the tty driver has an appropriate mode, but a quick look turned up nothing.
Re:issue can be avoided (Score:2)
I didn't know ssh-agent on machine A could help you log into machine C from machine B. How does that work given that ssh-agent only binds to a unix domain socket (single host IPC)? Does ssh magically tunnel it? I didn't see anything in the RFC about that when I implemented my ssh client!
It definitely didn't work magically for me when I logged into my work account from my home machine and tried to have it RSA authenticate to my SourceForge account -- it does work from my home account.
Lastly, what makes you think that the kind of wanker that can't trust ssh and makes you bounce through a firewall is going to leave RSA auth on? Eh?
Re:issue can be avoided (Score:1)
Yes it does... see manual page for option -A.
Forwarding works (at least) when protocol version
1.5 is used.
Re:issue can be avoided (Score:1)
In the first they claim that by analysing key timings they can attack passwords up to 50 times faster. We'll assume that they are not exaggerating and that this is based on real life tests.
The second claim they make is that it allows the length of the password to be ascertained immediately, giving a significant advantage. However, simple maths shows that a password based on a set of n characters has ~(n-1) more permutations than the sum of all shorter passwords. Hence, in a strong password we see that attacking the shorter passwords is virtually noise compared with the time taken to attack the correct length password.
So really the result is an approximate 50 times speedup in brute force attacks, as suggested by the first claim. Once again, assuming we are using a strong password, using upper/lower case, numerical and punctuation, we have a character set of well over 50, so to combat this attack we simply all increase our passwords by one character. This will take security back to a state even higher than before this weakness was found.
Hmm. Not really a fatal security flaw is it?
Re:issue can be avoided (Score:1)
Re:issue can be avoided (Score:1)
My solution is to type asynchronously, pause for a random interval between each character, or each group of characters.
What you actually want to do is type at a fixed rate (say, one character every two seconds exactly). Clearly, the attacker then gets no information about the password other than its length. Trying to be truly random is harder than just looking at a timepiece that gives seconds as you type your password.
Re:issue can be avoided (Score:1)
Is it really easier...? (Score:1)
Re:Is it really easier...? (Score:1, Informative)
its not that "TCP/IP" sends one character in each packet. its like this:
SSH and telnet are supposed to simulate exactly what happens if you press a certain key on a certain box. Of course they are not going to wait for an enter key. these clients are not "smart". they dont even know if you are using pine or entering a passwd. if they had to wait for an enter key, they would have to wait for an enter key when you press "I" in pine. this ofcourse, would be a big problem.
Re:Is it really easier...? (Score:5, Informative)
host.from -> host.to TELNET C port=35957
host.to -> host.from TELNET R port=35957 login:
host.from -> host.to TELNET C port=35957 a
host.to -> host.from TELNET R port=35957 a
host.from -> host.to TELNET C port=35957 l
host.to -> host.from TELNET R port=35957 l
host.from -> host.to TELNET C port=35957 e
host.to -> host.from TELNET R port=35957 e
host.from -> host.to TELNET C port=35957 x
host.to -> host.from TELNET R port=35957 x
host.from -> host.to TELNET C port=35957
host.to -> host.from TELNET R port=35957 Password:
host.from -> host.to TELNET C port=35957 4
host.to -> host.from TELNET R port=35957
host.from -> host.to TELNET C port=35957 2
host.to -> host.from TELNET R port=35957
That's telnet, clear text. Note how each user input has it's own packet. If you use -v, you can get very precise timing on these packets.
Now with SSH, obviously, the user data is going to be encrypted. But the data is still going to be sent one keystroke at a time.
ssh, telnet, etc were all designed to be terminal emulation compatible (or something like that), which esentially means that they need to behave just like those old paper-based TTYs. think about it for a few minutes, why do you think linux assigns you a TTY when you telnet to it? because parts of the kernel think you're actually sitting at one of those TTYs. and those TTYs sent and returned each keystroke, because early usability studies noted that most users equate response time with speed.
hth,
alex
Re:Is it really easier...? (Score:1)
Re:Is it really easier...? (Score:1)
The overwhelming majority of people knowing important passwords should be able to type two to three characters in a 200 msec window and the whole password in 500 msec, making this hole less exploitable
We all know your password (Score:1)
god
Everyone knows it.
This kind of attacks are useless (Score:1)
Solution already exists. (Score:2, Interesting)
Basically, keystroke input is placed in a buffer. The buffer sends its data when the buffer is full or when a buffer timer has expired. If you type very slowly, one character at a time is sent. However, if you type normally several characters are sent in each packet.
The only drawback with this technique is that it can increase latency. If the input is only a single character, as would be the case in selecting a menu option, the user will experience latency as they wait for the timer to expire and send the keystroke. To reduce the latency to a minimum it becomes neccessary to very carefully adjust the buffer size for your particular application. Too small a buffer and the ability to guess password length still exists. Too large a buffer and latency becomes unaceptable.
Re:Solution already exists. (Score:1)
You're talking about the Nagel Algorithm [ibm.com]. It's described in RFC 896 [freesoft.org].
I don't put a lot of stock. (Score:1, Troll)
When's the last time you heard a major vendor acknowledge a severe hole was actually severe. They have to worry about the lawsuits, and anything they say could be used in a class action, so while this particular threat isn't outright horrifying, it's likely worse than the spin it's getting from ssh.com.
Re:I don't put a lot of stock. (Score:2)
When's the last time you heard a major vendor acknowledge a severe hole was actually severe.
Um, how about Microsoft and Code Red [microsoft.com], which incidently was patched months before the Code Red outbreak.
Re:I don't put a lot of stock. (Score:1)
This might have something to do with SSH being an open standard, and not the good will of the company, though...
Re:I don't put a lot of stock. (Score:1)
Microsoft on that IIS hole that gave way to Code Red
Ha, they won't get me!!! (Score:1)
That will throw them off the track.
Increase computer security - use Dvorak!
Um... (Score:1)
People will try anything if they want something bad enough. These people don't factor in the motivation of some groups.
Just MHO...
OpenSSh - no problem (Score:3, Interesting)
Re:OpenSSh - no problem (Score:3, Informative)
It appears, using openssh 2.9p2 (that currently in debian/unstable) that it sends the entire password in one TCP packet, so no problem there then.
The issue is not, and never was, with the initial password that ssh sends for authentication, but rather with using, for example, su or ssh within an ssh session.
Re:OpenSSh - no problem (Score:1)
Re:OpenSSh - no problem (Score:1)
Re:OpenSSh - no problem (Score:2, Informative)
AFAIK, *every* version of SSH has done that. The logon password isn't the issue... the issue has to do with passwords that are typed *during* the session... such as when you 'su'.
Re:OpenSSh - no problem (Score:2)
Re:OpenSSh - no problem (Score:2)
It probably would not be hard at all to isolate packets from an SSH dump in order to determine exactly which ones constitute a password. It's trivial, from this, to determine the length of the password. You also have timing information which, if accurately collected and combined with a profile on the typist, might allow you to refine a brute-force search considerably (the paper's researchers apparently were able to speed up their brute force crack by a factor of fifty - if you had a profile of the typist on file, you might be able to improve that by an order of magnitude or two.)
Another vulnerability stemming from having touch-type profiles: during World War II, individual telegraph operators could be recognized by their "fist," the characteristic way they typed their messages. It's probable that individual computer users could be similarly recognized and automatically profiled.
Re:OpenSSh - no problem (Score:1, Insightful)
If you care, use key-based authentication! (Score:2, Informative)
If you are this paranoid then you would already be using public key authentication [openssh.com].
I knew one manager who wanted to disable SSH and go back to telnet/ftp because of the SSH1 deattack vulnerability! Let us keep these things in perspective.
Re:If you care, use key-based authentication! (Score:2)
STOP IT!! PLEASE LEARN SOMETHING ABOUT WHAT YOU'RE TALKING ABOUT BEFORE YOU START SPEWING MISINFORMATION ABOUT HOW TO FIX IT!!
Public key authentication will help you ZERO to ward off this kind of attack. The issue is NOT about the password that establishes a connection, it is about passwords typed DURING the connection (like for sudo).
Quick solution (Score:2, Informative)
When you're typing in your password, don't type it in fluidly. Just wait a second here or there between random letters when you enter it. It'll confuse the heck out of anyone trying to sniff it from you
Re:Quick solution (Score:2)
Justin Dubs
send ghost characters (Score:2)
Let's say you enter one char of text, your client recognizes this and begins to send out more bytes of data to provide cover for your char. This cover should last for a random period of time after the initial key press (say, 1-5 seconds) and should consist of a random number of packets sent with timings from 0 to the average timing between key presses. The packets have to be something predetermined by the client and server so that the server knows to ignore these packets. Any other packets the client sends which happen to match this predetermined packet will have to be escaped somehow.
so when i go to type in
passwd
the client sends these packets:
p
(cover packet)
(cover packet)
a
(cover packet)
s
(cover packet)
(cover packet)
(cover packet)
(cover packet)
s
(cover packet)
(cover packet)
w
(cover packet)
(cover packet)
(cover packet)
d
(cover packet)
This should destroy an attacker's ability to determine the timing frequencies between your keypresses. The length of the text you've entered may still be determined, but only within a certain range, provided the cover packets last for long enough after a single keypress. That is, if the cover packets last up to 3 average key presses in length, then the attacker will know the length of the string you entered +-3 characters.
Re:send ghost characters (Score:2)
Then the ssh client should check the weather and display it in a window on you screen. But first it should open lots of wake windows with dummy weather information so anyone walking by your cubicle can't find out what the REAL weather is. Muahhaha.
Or, better yet. The easy way. Just group characters into blocks before sending them and send the blocks at a regular interval. If 8 keys have been typed in that interval, send 'em all. If only one, send just that one. Encypher the block so no one can tell how many keystrokes are in it. Send them every
Justin Dubs
Re:send ghost characters (Score:2)
This, of course, is the problem that everyone is interested in. Its an easy problem to solve, 4 lines, but not an easy problem to solve nicely, in a way that won't result in an increase in the amount of bandwidth used by an ssh application.
I don't believe its really worth worrying about. If you're really paranoid, you should add a patch like mine or run over freeswan or something. In general, its not a script-kiddie vuln.
Another solution (Score:3, Insightful)
And I did a quick check (tcpdump in one window, ssh in in another window) and there's no packet sent for each stroke of my password, one packet is sent when I hit <enter> at the end of my password. I suppose length could probably still be figured out from those packets, though. I'm running OpenSSH 2.5.2p2 (the version that came from RedHat with RH 7.1)
Re:Another solution (Score:1)
AFAIK, *every* version of SSH has done that. The logon password isn't the issue... the issue has to do with passwords that are typed *during* the session... such as when you 'su'.
Yes, I posted this already in reply to another, but people keep modding up these misleading posts.
Re:Another solution (Score:1)
New Technique realeased (Score:4, Funny)
Whe you see that lock thingy on your browser just switch your hands on the keyboard. That's right, put your right hand on the left side of the keyboard and vice versa. We were going to write a technical paper on this put I just drew a picture on a napkin this morning.
Sinceretly,
SSH Communications
Simple to avoid, really (Score:5, Informative)
The timings that were used as a basic model were also taken from experienced touch-typists. The woman who presented the results said that there is a very simple countermeasure (she was joking, I think, but it's a very valid point): if you normally touch-type, just use a single finger to hunt-and-peck your passwords -- then the timings aren't what they "should" have been, and in fact their attack could actually make things worse by sending you down the wrong path to the password.
Anyway, I'm surprised this has gotten so much attention -- it is cool, but it really isn't practical in the least....
Mostly Nonsense (Score:3, Interesting)
The interkey timing applies ONLY AFTER the initial login. The cracker would have to have to somehow know you were exceuting something that involved entering a password, then capture the packets with your keystrokes.
This is getting way more play than it deserves, IMO.
Re:Mostly Nonsense (Score:1)
http://www.openwall.com/advisories/OW-003-ssh-tra
See the part about "Interactive session weaknesses".
There is some sense in that. (Score:1)
It should not be much of problem to do that and perhaps it does not require any change in the protocol spec.
Even if the password remains secret, why should anybody be able to read the typed text?
Petrus
a REAL, INTERESTING solution possibility (Score:2)
A better, modified version of this solution would buffer data ONLY when you're typing in a password of some sort. But who wants to manually tell SSH that they're typing in a password every time they run sudo or su?
The solution: while an SSH session is in progress, LD_PRELOAD a library that intercepts whatever library/system call disables echoing on a terminal (I don't know enough about terminals to know what call this would be). Then, enable buffering whenever the terminal echo is disabled. Problem solved!
If it's not a system or library call that disables echo, then just monitor for the escape sequence that does it instead.
You would of course pad the buffer so that you don't give away the length of the password.
A simple fix (Score:2)
If the client is modified to insert a random delay between keystrokes, the attack becomes MUCH harder to pull off.
The attack is not so much an attack against SSH as it is a general attack on crypto terminal sessions. IIRC, this form of attack was originally suggested as a way to intercept numeric keypad entries based on EM radiation from the keypad itself.
Problem with implementation not protocol (Score:1)