Slashdot Mirror


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.

8 of 170 comments (clear)

  1. This isn't as bad as it looks by enterfornone · · Score: 4

    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
    1. Re:This isn't as bad as it looks by bellings · · Score: 4
      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.

      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".
      --
      Slashdot is jumping the shark. I'm just driving the boat.
  2. OpenSSH helps here by dmiller · · Score: 4
    With OpenSSH you have a chance to thwart these attacks - not only does it support SSH protocol 2, it also displays "fingerprints" for each unknown key it receives from over the network. You can use this fingerprint to do out-of-band checking of key authenticity (eg. by phone, in person, PGP signatures on a web page, etc).

    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).

  3. ...wanna tell us something we DON'T know, Kurt? by mugwumpjism · · 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:

    1. Someone actually manages to break the key authority's signing key
    2. Someone replaces the key authority's signing key in your browser/software
    3. Somebody working for the key authority secretly leaks the key (a "purchase-key" attack)

    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.

    1. Re:...wanna tell us something we DON'T know, Kurt? by bellings · · Score: 4

      This is a good thing and SSH's handling of the situation is more secure than a central signing authority.

      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.

      --
      Slashdot is jumping the shark. I'm just driving the boat.
  4. just mitm by QuMa · · Score: 5
    It's just a man in the middle attack, hardly worth the electrons it's published with. Anyways, it claims man in the middle is fundamentel to public key is not true. The interlock protocol by rivest and shamir is quite effective against this sort of thing... The following description is quoted from Applied Cryptography by Bruce Schneier, second edition (page 49):

    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:
    1. Alice sends bob her public key.
    2. Bob sends alice his public key.
    3. Alice encryptions her message using bob's public key. She sends half of the encrypted message to bob.
    4. Bob encrypts his message using alice's public key. He sends half of the encrypted message to alice.
    5. Alice sends the other half of her encrypted message to bob.
    6. 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.
    7. 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.
  5. dsniff URL by phaze3000 · · Score: 5

    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.
  6. So when *should* it change? by Alik · · Score: 4
    As pointed out in the article, you can't really defeat stuff like this through user education, because Users Are Dumb. Seems to me that you *can* do the sort of risk-reduction that Schneier's always talking about. Therefore, o wise Slashdot users (I'm pretty sure there's one of you somewhere...), when is it reasonable to see a host key change? I can think of:
    1. Installation of new sshd
    2. Upgrade of OS (new software installed)
    3. Serious mucking with hardware configuration (not sure why --- I guess the keygen code uses some parameters as a seed)

    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.)