I heard there is a "new" TLS vulnerability named Logjam, what does it do and how do I prevent it?
|
|
In a nutshell: SSL/TLS client and server agree to use some weak crypto. Well, turns out that weak crypto is weak. In more details: In SSL/TLS, the client sends a list of supported cipher suites, and the server chooses one. At the end of the initial handshake, some This theory is fine, unless the client and server both support a cipher suite that is so weak that the MitM can break it right away, unravel the whole crypto layer, and fixed in real-time the With even more details: When using the "DHE" cipher suites (as in "Diffie-Hellman Ephemeral"), the server sends the "DH parameters" (modulus and generator) with which client and server will perform a Diffie-Hellman key exchange. The server further more signs that message with its private key (usually an RSA key, since everybody uses RSA in practice). The client verifies that signature (the public key is the one in the server certificate), then proceeds to use the DH parameter to complete the key exchange. It so happens that in previous century, there were some rather strict US export regulations on crypto, and this prompted "export cipher suites", i.e. weak crypto that was compatible with these regulations. Many SSL servers still support these "export cipher suites". In particular, some cipher suites that use DHE and mandate a DH modulus of no more than 512 bits. Moreover, most SSL server use the same modulus, because using the one provided with the SSL library is easier than generating your own. Reusing the same modulus as everybody else is not a big issue; DH tolerates that just fine. However, it means that if an attacker invests a lot of computations in breaking one DH instance that uses a given modulus p, the same attacker can reuse almost all of the work for breaking other instances that use the same modulus p. So the attack runs like this:
The Logjam article authors call this a "protocol flaw" because the What should you do ? Well, the same thing as always: install patches from your software vendors. This should go without saying. On the client side, Microsoft has already patched Internet Explorer to refuse to use a too small modulus. A fix for firefox in the form of a plugin by Mozilla is available now here. It is expected that other browser vendors (Opera, Chrome...) will soon follow. On the server side, you can explicitly disable support for "export" cipher suites, and generate your own DH parameters. See that page for details. Note that IIS is kinda immune to all this because it apparently never supported DHE cipher suites with anything else than a DSS server certificate, and nobody uses DSS server certificates. Note that ECDHE cipher suites, with "EC" meaning "elliptic curve", are not at risk here, because:
And what about the NSA ? The Logjam researchers include some talk about how some "attackers with nation-state resources" could break through 1024-bit DH. This is quite a stretch. In my experience, nation-states indeed have a lot of resources and are good at spending it, but that's not the same thing as succeeding at breaking hard crypto. Nevertheless, if you fear that 1024-bit DH is "too weak", go for 2048-bit (this is recommended anyway), or ECDHE. Or simply accept that people with overwhelming resources really have overwhelming resources and won't be defeated by a simple modulus size. Those who can spend billions of dollars for a cracking machines can also bribe your kids with a few hundreds of dollars to go through your computer files and your wallet. |
|||||||||||||
|
|
Logjam shouldn't really be called a "new" vulnerability - it's a rehash of FREAK which targets export-grade DH rather than export-grade RSA. Practical exploitation relies on the following flaws:
The attack essentially allows an attacker to precompute a set of data for a target prime known to be in use by a TLS service in its DH implementation. For 512-bit DH this is known to take about a week. Once this has been done, the attacker can break the DH key exchanges with that service in about 1-2 minutes per exchange. Once the exchange is broken, the attacker gains access to the session keys, allowing them to decrypt all traffic. This issue can be fixed in the following ways:
As a side note, one of the interesting factors in this bug is that it matches the NSA's reported capabilities in the field of TLS and IKE (VPN) traffic decryption. In the case of mass traffic capture and decryption, the precomputation attack becomes particularly efficient and effective, due to the vast quantity of data available which is likely to be associated with a known shared prime. More details available: |
|||||||||||||
|
|
Logjam is a cipher downgrade attack where a man in the middle can trick the end points into using a weak cipher. A weak cipher would allow the man in the middle to easily decrypt intercepted traffic. As with all other cipher downgrade attacks the best way to prevent it is to disable weak ciphers in the first place. If weak ciphers are not available even a successful cipher downgrade will result in strong encryption. |
|||
|
|
|
To prevent Logjam you could follow recommendations of the Guide to Deploying Diffie-Hellman for TLS which will help you to configure your server (Apache HTTP Server, nginx, IIS, Lighttpd, Tomcat, Postfix, Sendmail, Dovecot, HAProxy, OpenSSH, Amazon Elastic Beanstalk) :
Mozilla SSL Configuration Generator is also a good configuration tool. |
||||
|
|