Recommendations for TLS/SSL Cipher Hardening | Acunetix (2024)

Transport Layer Security (TLS) and its predecessor, Secure Socket Layer (SSL), are widely used protocols. They were designed to secure the transfer of data between the client and the server through authentication, encryption, and integrity protection.

Note: At the time of writing of this article, TLS 1.3 was not yet available. It is available now, and it is recommended for use instead of TLS 1.2. TLS 1.3 does not require you to manually specify cipher suites in configuration.

TLS/SSL technology is commonly used in websites and web applications together with the HTTP protocol. It is also used by several other services and protocols, for example, email (SMTP, POP, and IMAP protocols), FTP, chat (XMPP protocol), virtual private networks (TLS/SSL VPNs), and network appliances.

To secure the transfer of data, TLS/SSL uses one or more cipher suites. A cipher suite is a combination of authentication, encryption, and message authentication code (MAC) algorithms. They are used during the negotiation of security settings for a TLS/SSL connection as well as for the transfer of data.

The following are examples of what algorithms a cipher suite may use.

FunctionAlgorithm
Key ExchangeRSA, Diffie-Hellman, ECDH, SRP, PSK
AuthenticationRSA, DSA, ECDSA
Bulk CiphersRC4, 3DES, AES
Message AuthenticationHMAC-SHA256, HMAC-SHA1, HMAC-MD5

TLS is now a requirement in several regulatory standards. Major browsers mark sites as not secure in absence of TLS. It may therefore also be considered a requirement for serving websites and web applications. However, getting a correct TLS implementation may be difficult. Bad TLS configurations may provide a false sense of security and make websites and web applications vulnerable to attacks.

Many common TLS misconfigurations are caused by choosing the wrong cipher suites. Old or outdated cipher suites are often vulnerable to attacks. If you use them, the attacker may intercept or modify data in transit. Below is a list of recommendations for a secure SSL/TLS implementation.

Disabling SSL 2.0 and SSL 3.0

SSL 2.0 was the first public version of SSL. It was released in 1995. This version of SSL contained several security issues. In 1996, the protocol was completely redesigned and SSL 3.0 was released.

Because of the security issues, the SSL 2.0 protocol is unsafe and you should completely disable it. Due to the POODLE (Padding Oracle On Downgraded Legacy Encryption) vulnerability, SSL 3.0 is also unsafe and you should also disable it. If it is enabled, an attacker may retrieve plain text content of secure connections. Furthermore, you cannot use elliptic-curve cryptography (see below) with SSL 3.0.

Internet Explorer 6 is the only browser that still uses SSL 3.0. Therefore, unless you still need to support the legacy Internet Explorer 6 browser, you should disable SSL 3.0 as outlined below.

Disabling TLS 1.0 and 1.1

Unless you need to support legacy browsers, you should also disable TLS 1.0 and TLS 1.1. The PCI DSS (Payment Card Industry Data Security Standard) specifies that TLS 1.0 may no longer be used as of June 30, 2018. It also strongly suggests that you disable TLS 1.1. These protocols may be affected by vulnerabilities such as FREAK, POODLE, BEAST, and CRIME. If you must still support TLS 1.0, disable TLS 1.0 compression to avoid CRIME attacks.

You should also disable weak ciphers such as DES and RC4. DES can be broken in a few hours and RC4 has been found to be weaker than previously thought. In the past, RC4 was advised as a way to mitigate BEAST attacks. However, due to the latest attacks on RC4, Microsoft has issued an advisory against it. The PCI DSS also prohibits the use of the RC4 bulk cipher.

If you disable TLS 1.0 and TLS 1.1, the following user agents and their older versions will likely be affected (specific user agent versions on different operating systems may vary).

  • Android 4.3
  • Chrome 29
  • Firefox 26
  • Internet Explorer 10
  • Java 6u45, 7u25
  • OpenSSL 0.9.8y
  • Safari 6.0

How to Configure TLS

Depending on your business use case (e.g. the need to support legacy browsers and regulatory requirements) you may need to use slightly different cipher suite configurations. You may use the Mozilla SSL Configuration Generator to obtain an optimal TLS configuration using different browser profiles (modern, intermediate, or old).

The following is a breakdown of the modern profile (oldest compatible clients: Firefox 27, Chrome 30, Internet Explorer 11 on Windows 7, Edge, Opera 17, Safari 9, Android 5.0, and Java 8). The syntax for enabling/disabling TLS protocols and cipher suites will vary slightly depending on the web server.

Nginx

# Enable TLSv1.2, disable SSLv3.0, TLSv1.0 and TLSv1.1ssl_protocols TLSv1.2;# Enable modern TLS cipher suitesssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384';# The order of cipher suites mattersssl_prefer_server_ciphers on;

Apache HTTP Server

# Enable TLSv1.2, disable SSLv3.0, TLSv1.0 and TLSv1.1SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1# Enable modern TLS cipher suitesSSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384# The order of cipher suites mattersSSLHonorCipherOrder on# Disable TLS compressionSSLCompression off# Necessary for Perfect Forward Secrecy (PFS)SSLSessionTickets off

Preferred Cipher Suite Order

The table below breaks down the cipher suite string above into what is preferred in order (best key exchange algorithm/strongest encryption first).

Note – More Information on ciphers supported by OpenSSL is available here.

OrderKey Exchange AlgorithmAuthentication AlgorithmBulk Encryption AlgorithmMac Algorithm
#1Elliptic Curve Diffie–Hellman (ECDH)Elliptic Curve Digital Signature Algorithm (ECDSA)AES 256 in Galois Counter Mode (AES256-GCM)SHA384
#2Elliptic Curve Diffie–Hellman (ECDH)RSAAES 256 in Galois Counter Mode (AES256-GCM)SHA384
#3Elliptic curve Diffie–Hellman (ECDH)Elliptic Curve Digital Signature Algorithm (ECDSA)ChaCha20 (CHACHA20)POLY1305
#4Elliptic curve Diffie–Hellman (ECDH)RSAChaCha20 (CHACHA20)POLY1305
#5Elliptic Curve Diffie–Hellman (ECDH)Elliptic Curve Digital Signature Algorithm (ECDSA)AES 128 in Galois Counter Mode (AES128-GCM)SHA256
#6Elliptic curve Diffie–Hellman (ECDH)RSAAES 128 in Galois Counter Mode (AES128-GCM)SHA256

This string provides the strongest encryption in modern browsers and TLS/SSL clients (AES in Galois/Counter Mode is only supported in TLS 1.2). Furthermore, this string also provides perfect forward secrecy (PFS) if both the server and the TLS/SSL client support it (on Apache HTTP Server you must set SSLSessionTickets to off).

How to Verify the Configuration

An easy way to test if your website or web application uses a vulnerable SSL/TLS configuration is to run an automated scan using the online Acunetix vulnerability scanner, which includes a network security scanner. At the same time, you can also test for web vulnerabilities. Take a demo and find out more about running scans against your website or web application.

Frequently asked questions

Default SSL/TLS configurations in most servers are not secure enough. By default, most servers still support outdated and vulnerable protocol versions. This could lead to attacks against such servers. Therefore, you need to manually configure your every server, not rely on defaults.

Learn more about TLS and SSL.

To harden your SSL/TLS configuration, you must do two things. First of all, you must turn off support for the old and vulnerable SSL protocol completely as well as for old and vulnerable versions of the newer TLS protocol. Second of all, you must turn off insecure cipher suites and establish a priority of cipher suites based on their security.

Read about potential attacks against SSL/TLS.

You should not support the SSL protocol at all. You should also not support TLS 1.0 or TLS 1.1. Therefore, your configuration should only support TLS 1.2 and up. Some server versions may not support TLS 1.3 yet, therefore TLS 1.2 must be the cornerstone of your configuration. This protocol version is supported by all current browser versions and quite a few outdated versions, therefore, you should not run across compatibility problems.

Find out more about the history of SSL and TLS.

A cipher suite consists of a key exchange algorithm, an authentication algorithm, a bulk encryption algorithm, and a message authentication algorithm. Currently, the most secure and most recommended combination of these four is: Elliptic Curve Diffie–Hellman (ECDH), Elliptic Curve Digital Signature Algorithm (ECDSA), AES 256 in Galois Counter Mode (AES256-GCM), and SHA384.

See the full list of ciphers supported by OpenSSL.

Get the latest content on web security
in your inbox each week.

THE AUTHOR

Recommendations for TLS/SSL Cipher Hardening | Acunetix (1)

Ian Muscat

Ian Muscat used to be a technical resource and speaker for Acunetix. More recently, his work centers around cloud security and phishing simulation.

Related Posts:

  • TLS Security 3: SSL/TLS Terminology and BasicsRead more
  • TLS Security 2: A Brief History of SSL/TLSRead more
  • TLS Security 4: SSL/TLS CertificatesRead more
Recommendations for TLS/SSL Cipher Hardening | Acunetix (2024)

FAQs

Recommendations for TLS/SSL Cipher Hardening | Acunetix? ›

Currently, the most secure and most recommended combination of these four is: Elliptic Curve Diffie–Hellman (ECDH), Elliptic Curve Digital Signature Algorithm (ECDSA), AES 256 in Galois Counter Mode (AES256-GCM), and SHA384. See the full list of ciphers supported by OpenSSL.

What are the recommendations for TLS SSL cipher hardening? ›

Currently, the most secure and most recommended combination of these four is: Elliptic Curve Diffie–Hellman (ECDH), Elliptic Curve Digital Signature Algorithm (ECDSA), AES 256 in Galois Counter Mode (AES256-GCM), and SHA384. See the full list of ciphers supported by OpenSSL.

What are the recommendations for TLS? ›

​​ Decide what version to use. Not all browser versions support TLS 1.2 and above. Depending on your particular business situation, this may present some limitations in using stronger encryption standards. Consider using TLS 1.0 or 1.1 for sites with a broad user base, particularly non-transactional sites.

What is the recommended TLS cipher? ›

The secure suites to be used in TLS 1.2 are:
  • TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256.
  • TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384.
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256.
  • TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384.
  • TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256.
  • TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384.
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256.
Jan 10, 2022

How can you best secure TLS SSL? ›

Best Practices for Protecting SSL/TLS Certificates and Keys
  1. Identify and create SSL/TLS Certificates inventory. ...
  2. Monitor SSL/TLS Certificates. ...
  3. Automate certificate management. ...
  4. Secure Private Keys. ...
  5. Enforce Policies. ...
  6. SSL/TLS Certificate Vulnerabilities.

Is it recommended to disable TLS 1.1 and replace it with TLS 1.2 or higher? ›

TLS 1.0 and TLS 1.1 are no longer considered secure, due to the fact that they are vulnerable to various attacks, such as the POODLE attack. Disabling TLS 1.0 and TLS 1.1 on your server will force clients to use a more secure protocol (TLS 1.2), which is less vulnerable to attack.

How do you solve TLS problems? ›

How to troubleshoot TLS handshake issues
  1. Method #1: Update your system's date and time.
  2. Method #2: Fix your Browser's configuration to match the Latest TLS Protocol Support.
  3. Method #3: Check and Change TLS Protocols [in Windows]
  4. Method #4: Verify Your Server Configuration [to Support SNI]

What are the 3 main security purposes of TLS? ›

What does TLS do?
  • Encryption: hides the data being transferred from third parties.
  • Authentication: ensures that the parties exchanging information are who they claim to be.
  • Integrity: verifies that the data has not been forged or tampered with.

What are the 4 protocols in TLS? ›

The TLS and SSL protocols can be divided into two layers. The first layer consists of the application protocol and the three handshaking protocols: the handshake protocol, the change cipher spec protocol, and the alert protocol. The second layer is the record protocol.

What is the prevention of TLS? ›

The best management of TLS is prevention. Prevention strategies include hydration and prophylactic rasburicase in high-risk patients, hydration plus allopurinol or rasburicase for intermediate-risk patients, and close monitoring for low-risk patients.

What is the recommended TLS key size? ›

For TLS server certificates, 2048-bit RSA keys or 256-bit ECDSA keys currently provide the best combination of security and performance. Consider the role of the certificate and the impact on performance before choosing a larger key.

Which is the most secure TLS SSL? ›

TLS is an updated, more secure version of SSL. We still refer to our security certificates as SSL because it's a more common term, but when you buy SSL from DigiCert, you get the most trusted, up-to-date TLS certificates.

How do I enable TLS SSL support for strong ciphers? ›

You can use the SSL Cipher Suite Order Group Policy settings to configure the default TLS cipher suite order.
  1. From the Group Policy Management Console, go to Computer Configuration > Administrative Templates > Network > SSL Configuration Settings.
  2. Double-click SSL Cipher Suite Order, and then click the Enabled option.
Jun 15, 2023

How do I allow weak SSL TLS ciphers? ›

Step1: Login to WHM. Step2: Go to Home >> Service Configuration >> Exim Configuration Manager. Step3: Locate the option Allow weak SSL/TLS ciphers under the Security tab.

How do I allow weak SSL TLS ciphers [?]? ›

How to Allow Weak SSL/TLS Ciphers in WHM
  • Log in to WHM.
  • From the home page, select “Service Configuration” option.
  • Under service configuration, you will find “Exim Configuration Manager” sub-option. ...
  • You will enter a new interface, where you can simply type; “Allow weak SSL/TLS ciphers” and click enter.
Apr 7, 2023

What are the three most common security errors with TLS certificates? ›

7 Common Mistakes: TLS Certificate Management
  • Not having a complete inventory of your certificates. ...
  • Using outdated and deprecated protocols. ...
  • Relying on short key lengths. ...
  • Using self-signed certificates. ...
  • Lack of certificate protection policies and practices. ...
  • Overly long certificate lifespans.

What is the recommended key size for SSL certificate? ›

Per the introduction, you should definitely pick at least a 2048 bit key: the makers of openssl, Microsoft, and every web browser are pushing you to use a 2048 bit key at minimum.

Top Articles
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 5783

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.