Weak Diffie Hellman Logjam Attack Fix

To fix issue with weak Diffie Hellman Logjam Attack you need to:

  1. Disable Export Cipher Suites
  2. Deploy ECDHE and
  3. Use a Strong Diffie Hellman Group

This can be accomplished in following way.

Update Ciphers

Update  global NGINX configuration file

vim /etc/nginx/nginx.conf

and update ssl_ciphers to below

ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;

Note: If you havessl_ciphers defined inserver block of your site specific NGINX configuration then you must update it there.

Using a Strong DH Group

Run following command on your server

openssl dhparam -out /etc/nginx/dhparams.pem 2048

open your NGINX configuration file

vim /etc/nginx/nginx.conf

and update below directive into it

ssl_dhparam /etc/nginx/dhparams.pem;

References

  1. https://weakdh.org/
  2. https://weakdh.org/sysadmin.html