Skip to main content

Free 30-min security demo  — We'll scan your real code and show live findings, no commitment Book Now

Offensive360
Academy TLS/SSL Misconfigurations
Intermediate · 20 min

TLS/SSL Misconfigurations

Understand how weak TLS versions and cipher suites expose encrypted traffic to decryption attacks.

1 Weak TLS Versions and Cipher Suites

TLS security depends on both the protocol version and the cipher suites negotiated. Legacy configurations expose HTTPS traffic to practical attacks.

Deprecated protocol versions:

  • SSL 2.0 / SSL 3.0: Broken, vulnerable to POODLE, BEAST. Must be disabled.
  • TLS 1.0 / TLS 1.1: Deprecated by RFC 8996. Vulnerable to known attacks. Disable.
  • TLS 1.2: Acceptable with strong cipher suites.
  • TLS 1.3: Recommended. Removes weak cipher options entirely.

Weak cipher suites to disable:

  • RC4 — broken stream cipher (NOMORE attack)
  • DES / 3DES — short keys, SWEET32 attack
  • NULL cipher — no encryption
  • EXPORT ciphers — deliberately weakened
  • Anonymous DH — no server authentication

Check your server with:

nmap --script ssl-enum-ciphers -p 443 example.com
openssl s_client -connect example.com:443 -tls1
# Or use Qualys SSL Labs online test

2 TLS Hardening Configuration

Configure your web server to require TLS 1.2+ and only allow strong cipher suites.

Nginx TLS hardening:

server {
  listen 443 ssl;
  
  # TLS versions
  ssl_protocols TLSv1.2 TLSv1.3;  # Disable SSLv2, SSLv3, TLS 1.0, TLS 1.1
  
  # Strong cipher suites
  ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:
    ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:
    TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384";
  ssl_prefer_server_ciphers off;  # Let client choose for TLS 1.3
  
  # Perfect Forward Secrecy
  ssl_session_cache shared:SSL:10m;
  ssl_session_timeout 1d;
  ssl_session_tickets off;  # Disable for PFS
  
  # HSTS
  add_header Strict-Transport-Security "max-age=63072000" always;
}

Defense checklist:

  • Enable only TLS 1.2 and TLS 1.3
  • Disable all export, NULL, anonymous, RC4, DES ciphers
  • Prefer ECDHE key exchange for forward secrecy
  • Use certificates from a trusted CA with 2048+ bit RSA or 256+ bit ECDSA keys
  • Regularly test with Qualys SSL Labs or testssl.sh

Knowledge Check

0/3 correct
Q1

What is "Perfect Forward Secrecy" and why is it important?

Q2

Which TLS versions should be disabled on a modern production server?

Q3

A developer is setting up a test server and uses a self-signed certificate to avoid the cost of a CA cert. What risk does this create?

Code Exercise

Harden Nginx TLS Configuration

The Nginx server has a permissive TLS configuration. Update ssl_protocols to only allow TLS 1.2 and 1.3, and set strong cipher suites.

nginx