A guide to fix Logjam vulnerability in Apache HTTP & Nginx webserver
Introduction
Logjam vulnerability is found in TLS libraries (EXPORT cipher) on 20th May 2015 by team of computer scientists at CNRS, Inria Nancy-Grand Est, Inria Paris-Rocquencourt, Microsoft Research, Johns Hopkins University, University of Michigan, and the University of Pennsylvania: David Adrian, Karthikeyan Bhargavan, Zakir Durumeric,Pierrick Gaudry, Matthew Green, J. Alex Halderman, Nadia Heninger, Drew Springall, Luke Valenta, Benjamin VanderSloot,Eric Wustrow, Santiago Zanella-Beguelin, and Paul Zimmermann.
The Logjam vulnerability helps attacker (man-in-the-middle) to downgrade TLS connections to 512-bit export-grade cryptography. This helps an attacker to read and modify any data transmitted over the network connection.
You see, this is dangerous as an attacker can read credit card or sensitive information if your application is vulnerable to Logjam. This reminds me of FREAK attack.
Logjam vulnerability can be on any protocols like HTTPS, SSH, IPSec, SMTP that leverage on TLS.
As of 24th May, there are 8.4% of the top 1 million domains are affected by Logjam vulnerability.
Test if the client is Vulnerable
The easiest way to test would be to access this SSL lab client test page on the browser.
Alternatively, you can also try this one.
Test if the server is Vulnerable
There are multiple tools you can use to test.
TLS Scanner – an online scanner powered by Testssl.sh check the given site against for TLS misconfiguration and vulnerability including Logjam.
KeyCDN – another tool to test if the site is vulnerable to Logjam.
Fix Logjam Attack Vulnerability
You can disable EXPORT cipher suits at respective web server configuration to mitigate this vulnerability.
Apache HTTP Server
Disable export cipher by adding the following in the SSL configuration file.
SSLCipherSuite !EXPORT
Restart Apache, and that’s all.
Nginx
Add the following in nginx.conf file
ssl_ciphers '!EXPORT';
#Note: - If you already have ssl_ciphers configured, you just need to add !EXPORT in existing line instead of adding new one.
You may also refer here to fix this in Sendmail, Tomcat, IIS, HAProxy, Lighthttpd, etc.
What’s next?
If you are looking for continuous security protection for your online business then you may consider using cloud-based WAF.