1. Support Center
  2. SSL / TLS Vulnerabilities
  3. Vulnerabilities requiring reconfiguration

Enable Perfect Forward Secrecy

Perfect Forward Secrecy (PFS) is unavailable with the server configuration. If the TLS encryption is broken once, recordings of previous connections are not secure and may be decrypted.

Security Assessment

Security_Assessment_EnablePerfectForwardSecrecy-1

CVSS Vector: AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Vulnerability Information

Perfect forward secrecy contains several possible vulnerabilities. 

PFS is intended to hinder attackers from obtaining session keys that would allow them to decipher communications. What forward secrecy cannot prevent is an attack that seeks to influence how the session key, i.e. encryption key, is generated. 

If an attacker is capable of modifying the functioning of the session key generator, thereby making the random values that are generated for the purpose of the key exchange predictable, then they will be able to decipher all future communications. This was the problem with the Dual Elliptic Curve Deterministic Random Bit Generator that had a backdoor that allowed the generator to be modified in such a way.

Perfect forward secrecy also does not protect against a man-in-the-middle attack (MITM) in which an attacker can record and modify communications between a server and a client. While PFS protects against the decryption of such communication, it cannot prevent it from being collected, if an attacker positions themself in the middle. In principle, obtaining and keeping such records leaves the door open for them to be deciphered in the future, once quantum computing becomes more widely available. 

Though not a vulnerability in itself, one of the reasons for the slow adoption of PFS on a wider scale is the additional computing resources required by the server to generate unique session keys. PFS also lacks legacy support which also somewhat limits its implementation. 

Finally, implementing PFS results in a lack of internal visibility of data. Since it encrypts network communications, tech teams are unable to locate problems and fix them because they cannot decrypt the traffic. There are workarounds to this problem, such as installing an SSL/TLS inspection device to act as an intermediary.

Guides

To enable PFS, configure your webserver to only use recent cipher suites that include PFS. See the following article for details: Secure TLS Configuration

Here is how to configure PFS manually in Nginx and Apache.

Enabling PFS in Nginx

  • То locate your SSL protocol configuration on the server type (assuming /etc/nginx as the base directory):
grep -r ssl_protocol /etc/nginx
  • Proceed to add the following lines to the configuration:
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_prefer_server_ciphers on;
  • Set the SSL cipher and choose your preferred cipher configuration (with or without RC4, or RC4 as a last resort). The configuration currently recommended is:
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
  • Restart Nginx using:

sudo service nginx restart

Enabling PFS in Apache

  •  То locate your SSL protocol configuration on the server type (assuming /etc/apache as the base directory):
grep -i -r "SSLEngine" /etc/apache
  • Proceed to add the following lines to the configuration:
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
  • Set the SSL cipher and choose your preferred cipher configuration (with or without RC4, or RC4 as a last resort). The configuration currently recommended is
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
  • Restart Apache using:

apachectl -k restart

For more information about Crashtest Security visit crashtest-security.com