Slashdot Log In
Attacks Against SSH 1 And SSL
Posted by
michael
on Mon Dec 18, 2000 06:09 AM
from the only-a-matter-of-time dept.
from the only-a-matter-of-time dept.
AndyR writes: "SecurityPortal has a very interesting article by Kurt Seifried in which he writes "dsniff 2.3 allows you to exploit several fundamental flaws in two extremely popular encryption protocols, SSL and SSH." He makes many very strong arguments about key validity and the problem with not having a trusted third party signing keys." Don't throw away SSH just yet, it's still a lot better than nothing.
This discussion has been archived.
No new comments can be posted.
Attacks Against SSH 1 and SSL
|
Log In/Create an Account
| Top
| 170 comments
(Spill at 50!) | Index Only
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.

Kurt's SSL article is wrong! (Score:3)
First, the technically useless. Every security product/protocol I am aware of is vulnerable to so-called social engineering attacks. That's their whole point! They go around the security perimeter and get "behind" the protection to get humans to give away information. It is certianly fair to analyze the ease to which some products/protocols facilitate this, but I didn't see much of that. Instead, the articles discuss a company called DigitalBond with a solution that perhaps is also vulnerable to social engineering attacks.
Now lets look at the technical attacks and claims, which are contained in the Sep 30th article. I'll only comment on the weaknesses he alleges are in SSL. His first claim is that you should not order from a store that uses the http GET method. He doesn't say why, and I cannot think of any reason. If the form is submitted with an SSL-secured action (action="https:...") then both are equally secure.
His next claim is that the user must inspect the certificate of the server every for every SSL connection. He does not say what attack he can mount if the user doesn't do this. I am guessing that he believes the man-in-the-middle can substitute his own certificates and appear to be legitimate. This is firstly not an attack on the SSL protocol, only perhaps on implementations, and secondly it does not work with the implentations I have tested, IE 5+ and Netscape 4.7+. These implementations verify that the hostname you asked the browser to connect to matches the hostname specified in the CN field of the certificate. Of course, you must trust that the CA will do some checking to make sure hostnames actualy belong to the entity getting the certificate, but that is way outside the scope of the SSL protocol. These "flaws" cannot be the basis for later claims of insecurities. These implementations do not rely entirely on having savvy users carefully inspect every certificate.
I'd like to check up on earlier broswer versions to see if they also behave similarly. I'd be particularly interested in browsers that were in play at the time the article was written, say fall of 1999.
--greg
SFS - DNS the way you want it (Score:3)
http://www.fs.net [fs.net]
Re:Locks are to keep honest people honest (Score:3)
I disagree, the strength of your locks reflect your assessment of risk. If sufficiently valuable in the real world, locks are replaced with security guards and automatic rifles. Most people don't have anything that valuable, and find it more cost effective to place limits on their credit cards, check up on protection from their credit card companies and take up insurance policies.
If there were no banks and no insurance policies, would you, with your life savings under your mattress, still say that your locks are to keep honest people honest?
Besides, this SSH and SSL attack is very well documented, known and understood for a long time to be a limitation of the system. If your life savings are on the line, use callback, challenge response, or don't use remote logins at all.
This isn't as bad as it looks (Score:4)
SSL is similar, but it is signed on the server side, usually not on the client.
This isn't anything new, it's just not there are publically available tools to exploit this.
Re:This isn't as bad as it looks (Score:4)
You most certainly do not need a certificate authority to trust the server on the other end. And for this article to imply that somehow SSH v2 is a solution is downright wrong.
If you're using SSH (either v1 or v2) to communicate with a server, and you want to avoid the man-in-the-middle attact described by the article, then you must be certain you're talking to to the server, and not to the man in the middle. The only way to do this is to be certain that the public key that you have for the server you want to talk to really is the public key for the server you want to talk to.
There are several ways to do this:
- You can copy the public key from the server using some secure method, such as copying it onto a floppy and transfering it to your machine using sneaker net, or transfering it through encrypted email
- You can copy the public key across the (possibly insecure) network, and verify that the key was not replaced in transit by verifying the key signature by some secure means (perhaps by getting on the telephone with an administrator of the other machine)
- Although I don't believe SSH directly supports it (someone will hopefully correct me if I'm wrong), the public key can be signed by some trusted third party. If you trust the thrid party, you can trust the key.
- or, you can simply allow SSH to transfer the public key across the insecure network, and when it asks "should I trust this key", you can simply answer "yes".
This last method, of course, is the only method that is vulnerable to the man in the middle attack described in the article. Unfortunatly, its also the default method used by most SSH users. Obviously, there are several ways to reliably transfer the public keys without using a signature by a certificate authority.It also can not be emphasised enough that a generic "certificate authority" by itself should not be considered a guarantee that you're talking to who you think you're talking to. Getting a signed certificate from a company like Verisign is not an insurmountable problem. Verisign is certainly reliable enough to trust with something like your credit card numbers -- credit card numbers are relatively inexpensive to replace if they're stolen, and stealing credit card numbers is painfully simple through many means much simpler than attacking Verisign. But I certainly wouldn't trust it for anything really important, unless I had absolutely no choice.
If you're using SSH (v1 or v2), or setting up a vpn, and you want to be reasonably certain you're not talking to a man in the middle, then nothing can replace coping the public key from machine in a known secure and reliable method. And if your client ever says "the signature of the server has changed. connect anyway (y/n)?" be very, very, very certain you know exactly what you're doing before you hit "y".
OpenSSH helps here (Score:4)
There is also a project underway to allow OpenSSH to use keys distributed by DNSSEC.
This attack then comes back to user apathy (i.e not bothering to verify key fingerprints). An alternative (not yet implemented) is some form of PKI, which has its own problems (complexity, centralised trust, revocation issues).
Not a probelm for local nets (Score:3)
are perfectly secure. You can surely trust keys certificates that you generate yourself. As most of the dsniff tools rely on being on the same segment of ethernet, with careful key management they're not really a threat. Ever tried changing a ssh host key and then sshing into it ? You get the largest, scariest warning that makes you feel totally paranoid.
Also, if you are connecting to a server for the first time - fingerprints allow you to check the validity of the keys.
The problem is with connections to machines you can't personally validate, where DNS spoofing could be used, for example with e-commerce sites. But this is what CAs are for. So where's the problem (until a CA gets cracked that is
Re:This isn't as bad as it looks (Score:3)
Okay, these vulnerabilities have always existed and you could live with them because it was quite hard to exploit them.
However, as the author of the article points out, there is now a very convenient, easy to compile/install, almost 'off-the-shelf shrinkwrapped' set of applications that can do these kinds of things, which means the l33t 5(r1pt k1dd135 are probably going to find it a lot easier to use then before.
So that's why he writes the article, and I think he certainly has a point here.
...wanna tell us something we DON'T know, Kurt? (Score:4)
This is definitely FUD. The SSH documentation deals specifically with this issue. This is a good thing and SSH's handling of the situation is more secure than a central signing authority.
What he's basically advocating is removing the need for people to have secure methods for exchanging keys. Instead of having the chance of a "man-in-the-middle" attack during the first connection (which, if you've exchanged the fingerprint of the server with the admin of the server involved, is eliminated), he'd rather that we trust some other person with our security.
What if:
If any of these happen then your security is FUBAR. Bear in mind that the key could potentially be used to attack e-commerce sites, and is therefore pretty valuable. If the secret of the key being leaked is kept well enough, it is quite possible that no-one will ever find out - except for the odd sum of money missing from random credit cards worldwide.
Compare that to SSH, where upon connecting to the server, you are notified that you are connecting to an unknown host key, and it gives you its fingerprint to check against what you have recorded it should be. If the key ever changes, you are presented with a huge warning message saying that the host key has changed, and that a man in the middle attack may be in progress.
If you were using this commercially, you generally would be using SSH between two machines that you admin yourself, or between one that you admin and one that your peer's company admins, and you can verify the keys, set them up in each systems ssh_known_hosts file, and rest secure that you are not vulnerable to man-in-the-middle attacks.
Personally, I think he's trying to promote the idea that "security needs trusted arbitraries" to the corporate IT world - I wonder if Kurt Seifried has received any "donations" from any large key authorities recently?
Let's face it - if people use security that doesn't need key authorities, then they'll go away.
Every security system that uses a trusted authority is vulnerable to a purchase-key attack, and don't let anyone convince you otherwise!
Ehmz, no. (Score:3)
Bob : 245.345.0.20
Alice : 245.345.0.40
Charlie: 245.345.0.50
Now Alice wants on Bob's machine so he (Bob) opens up the firewall to allow Alice to access his server (don't forget; SSH isn't about encrypting and decrypting email, its a real time connection. And hey; if you need security and therefor use SSH but no firewall I think you're missing the point). Their keys get intercepted by Charlie. Charlie tries to access Bobs machine but is rejected by his firewall. Now what?
Re:...wanna tell us something we DON'T know, Kurt? (Score:4)
black is white. stop is go. SSH's handling of the situation is most certainly not more secure than a central signing authority.
he'd rather that we trust some other person with our security.
Look, the article was a tripey piece of crap, but it certainly never said that. The simple, basic fact that the article gave was this -- if you don't verify who you're talking to, then you haven't verified who you're talking to. Somehow, this dumbass managed to make an entire article out of that. And I read it, and got the ad impressions, and everything. I feel dirty.
For anyone who hasn't taken the time to read the article yet, or ever learn basic security stuff, let me boil it down: In every single system known to man or mathematics, to identify an entity X, you must trust something to say "method Y is an accurate method to identify X". Unfortunately, the default way to get get that identification method in SSH and SSL is fundementally flawed. If entity W has no way to identify X, but wants to talk to X for the very first time, W simply asks X "what is a question that only you can answer correctly, and by answering proves that you are X?" That leads to a false sense of security at best, because entity Z can step in front of X, and provide a false answer to the "how can I identify you?" question. Voila! Now, W is talking to Z, and since Z was presumably smart enough to supply a question it can answer, W will never know that its speaking to Z instead of X.
Most two year olds could come up with a half dozen solutions for this problem. Certificate Authorities (where, essentially, someone pays a third party to certify that the identification question is a valid one) are certainly one partial solution. Manually transmitting the identification question (usually in the form of public keys) on secure medium is another. Ignoring the problem, because its inconvenient to deal with, is another solution.
As many people have pointed out already, ignoring the problem is often the "good enough" thing to do anyhow, since intercepting SSH or SSL communications is still several orders of magnitude more difficult than other attack vectors. But saying a Certificate Authority is bad because you can be lulled into a false sense of security is kind of like saying "you should only do electrical work on your house with the power switched on, since switching the power off lulls you into a false sense of security." You're certainly still vulnerable to attacks to the Certificate Authority, in exactly the same way you can still be electrocuted even if you think the fuse box is off. But there are certainly many situations where the CA's are the least inexpensive and effective method to mitigate the most risk.
Insurance (Score:3)
Why do we put locks on doors? To stop people walking in an stealing our stuff, So lets lock the windows, fair enough better security, people are less likely to break in that good. Fit an alarm?
So why not fit better locks? etc etc every upgrade costs money, and as it gets more expensive I get less return on my money. However this is completely ignoring one factor, insurance!
My SSL connection to buy a porn flick via my credit card... Hmm, how much do I care about it being broken.. well a thief just wants my number, my gf might be interested in my buying porn.
My GF does not have the skills to break the encryption, so SSL is secure. A thief, well so long as the Credit Card company pays up if someone else uses it I really don't care.
A tool should be fit for the job, SSL with real world insurance is seccure for credit cards, the day they don;t pay out, SSL falls!
James
Re:This isn't as bad as it looks (Score:3)
Locks are to keep honest people honest (Score:3)
Re:Pity... But: (Score:3)
Of course. I knew that.
But the article doesn't say anything new at all. I've long-since known about the possibility of interception, and when it comes to signed documents, the presence of a digital signature on a document, even one that matches someone else's signature, does not mean that that person wrote that document. (It means there exists at least one person out there who knows the private key password for that identity and/or chose to apply it to the document; if you go around signing things you didn't even write yourself willy-nilly, the whole concept loses any strength it had.)
Again, this is a luser-space problem. There is no security vulnerability in ssh that's been discovered, this is an "if you abuse it you'll lose it" article. Well woopie-doo.
~Tim
--
A Hybrid approach (Score:3)
The flexibility of the current approach could be maintained, with added levels of trust ranging from completely secure to completely open to "man-in-the-middle" attack.
There is still the possibility of abuse, however, as the "trusted third party" (particularly in the case of ISPs) could easilly be subverted by a law enforcement or spook agency into signing counterfeit keys. Indeed, they could legally be required to do so with legislation akin to the wiretapping laws requiring phone companies to provide technical facilities that facilitate evesdropping by law enforcement on demand.
just mitm (Score:5)
The interlock protocol, invented by ron rivest and adi shamir, has a good chance of foiling the man-in-the-middle attack. Here's how it works:
- Alice sends bob her public key.
- Bob sends alice his public key.
- Alice encryptions her message using bob's public key. She sends half of the encrypted message to bob.
- Bob encrypts his message using alice's public key. He sends half of the encrypted message to alice.
- Alice sends the other half of her encrypted message to bob.
- Bob puts the two halves of alice's message together and decrypts it with his private key. Bob sends the other half of his encrypted message to alice.
- Alice puts the two halves of bob's message together and decrypts it with her private key.
The improtant point is that half of the message is useless without the other half; it can't be decrypted. Bob cannot read any part of alice's message until step 6; Alice cannot read any part of bob's message until step 7. There are a number of ways to do this:- If the encryption algorithm is a block algorithm, half of each block (e.g., every other bit) could be sent in each half message.
- Decryption of the message could be dependent on an initialisation vector, which could be sent with the second half of the message.
- The first half of the message could be a one-way hash function of the encrypted message and the encrypted message itself could be the second half.
To see how this causes a problem for Mallory, let's review his attempt to subvert the protocol. He can still substitute his own public keys for alice's and bob's in steps 1 and 2. But now, when he intercepts half of alice's message in step 3, he cannot decrypt it with his private key and re-encrypt it with bob's public key. he must invent a totally new message and send half of it to bob. When he intercepts half of bob's message to alice in step 4, he has the same problem.dsniff URL (Score:5)
http://www.monkey.org/~dugsong/dsniff/ [monkey.org]
Clever stuff...
--
So when *should* it change? (Score:4)
I'm also pretty sure that rebooting the system isn't supposed to change the key. So what else is there that can legitimately change a key?
(And yes, I *did* try to RTFM. Checked the SSH specification, but that just says that hosts MUST have keys and MAY have multiple keys. STFW didn't help either; bunch of tech support announcements that some host somewhere was changing its key.)
Interlock protocol is not applicable. (Score:3)
Interlock only works if the actual communicating parties know they're interlocking. No attempt at automated interlock is going to work, because the MITM can separately spoof two separate interlocked conversations.
No, the correct answer is strong password protocols like SRP [stanford.edu] and B-SPEKE, as another poster has already observed ("Encrypted Key Exchange").
--
Encrypted key exchange (Score:3)
Why are they not in widespread use? It might have something to do with the fact that (AFAIK) all these algorithms are patented. SRP is patented by Stanford but apparently they allow it to be used without licensing fees in free software.
Another problem is that these algorithms cannot be used with the existing password databases. Replacing critical components such as
----
Man-in-the-middle is not completely unavoidable (Score:3)
Not entirely true.
If you are using SSH to connect to a machine, the automated key exchange and authentication may be 'impossible' to do without being vulnerable to man-in-the-middle attacks. However, once you've logged in, compare the
man in the middle is hard (Score:3)