Attacks Against SSH 1 And SSL
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.
I consider myself somewhat knowledgable about cryptography in general and SSL in particular. I read the articles by Kurt Seifried, especially the "foundation" articles dates Sep 30, 1999 and Oct 7, 1999. He is very cagey about actually demonstrating an attack, but I think his points are either technically wrong or technically useless.
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
http://www.fs.net
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.
These vunrubilities have always existed. It comes from the fact that SSH is not signed by a certificate authority, and as such you cannot trust the server on the other end. If someone cracks DNS etc to direct you to another server, you won't know about it, except for a warning that the key is different from last time.
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.
--
enterfornone - logging in for a change
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).
For administering a private network, SSH and SSL
:-).
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
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!
If the guide is not respected, or the material not cared for, confusion will result, no matter how clever one is.
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?
I find the quest for the holy grail of perfect encryption/perfect protocol rather odd.
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
I don't think twice about giving my credit card to a waiter at a restraunt, although its rather easy for the waiter to use the information to charge false expenses to my account (and it has happened to other people before). Its nice to have security holes pointed out, but really, locks are to keep honest people honest, any transaction is potentially insecure, and it pays to double check any financial records you receive to find any false charges or transactions. I don't fear this hole, statistically speaking, I suspect real life is a lot riskier.
"In the end nothing is 100% secure... "
.|` Clouds cross the black moonlight,
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
--
~Tim
--
Rushing on down to the circle of the turn
If each administrative domain could maintain its own key-signing/authentication service, then at least enterprises, ISPs, and the like could provide solid security between their own systems. Contact between such entities could be preceeded by "out-of-band" authentication or exchange of keys (e.g. something like a PGP key signing party, a phone call, or an exchange of keys signed by a trusted third party).
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.
The Future of Human Evolution: Autonomy
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.For those that want to check out dsniff itself, the URL is:
http://www.monkey.org/~dugsong/dsniff/
Clever stuff...
--
Blaming GW Bush for the Iraq war is like blaming Ronald McDonald for the poor quality of food.
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.)
I don't think you can plausibly apply the interlock protocol to SSH. When I log into a server, I expect a conversation in which each side reads the message from the other before generating their own messages. If that's the fundamental top-level conversation, any attempt to impose an interlock underneath that, unbeknownst to the communicating parties, can be spoofed.
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 and B-SPEKE, as another poster has already observed ("Encrypted Key Exchange").
--
Xenu loves you!
Encrypted key exchange algorithms such as SRP and SPEKE provide strong password authentication which is resistant to all known passive and man-in-the-middle attacks. An added benefit is that they authenticate the server to the client as well as the other way around. And all this is done without PKI and without even requiring particularly strong passwords.
/etc/shadow, passwd and requiring all users to change their password to move to the new system is never going to be very popular with system administrators.
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
----
Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
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.
/etc/ssh_host_key.pub to the ~/.ssh/known_hosts key you just got; if they're different, watch out! It would have to be a very smart sniffer program to realize 'cat /etc/ssh_host_key.pub' and all other variations should get the 'fake' key substituted in.
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
bah. I have seen a few people intercept SSH before but only at demonstrations. I knew all of these guys and they said they have never wanted for accounts - there's enough unencrypted traffic to not bother going after the encrypted traffic. If there is one box that no-one connects to without using ssh, it is almost always connected to from an insecure box and, at present, there is nothing to stop tty sniffing. I wont even bother mentioning people who use windoze ssh clients. On most "secure" networks, ssh is the strong link in the weak chain. As for SSL, I have never seen an intercept of SSL by anyone who didn't have the SSL certificate.
How we know is more important than what we know.