Lesson Notes

Misconfigurations

Module 4: Common Vulnerabilities. Weak TLS ciphers.

Module 4: Misconfigurations — Comprehensive Theory (Focus on TLS)

Misconfigurations are a leading cause of real-world breaches: default credentials, open debug or management interfaces, permissive CORS, directory listing, or weak cryptography. This lesson focuses on TLS/SSL misconfigurations. When a server supports outdated protocols (SSLv3, TLS 1.0, TLS 1.1) or weak cipher suites (RC4, export-grade, NULL, or CBC with predictable IVs), an attacker may be able to force a protocol or cipher downgrade, or exploit known attacks (e.g. BEAST, POODLE, CRIME) to break confidentiality or integrity. You will learn why TLS configuration matters for MITM and confidentiality, how to find weak ciphers and protocols with Nmap and other tools, and how to fix and verify server configuration.

Why TLS Configuration Matters for Security

TLS provides confidentiality (encryption) and integrity (tamper detection) for data in transit. The strength of that protection depends on the protocol version and the cipher suite agreed in the handshake. SSLv3 is obsolete and has critical flaws (e.g. POODLE). TLS 1.0 and 1.1 use older cipher constructions (e.g. CBC without modern mitigations) and have been deprecated by standards bodies. TLS 1.2 and 1.3 support strong algorithms: AEAD ciphers (e.g. AES-GCM, ChaCha20-Poly1305) that provide both encryption and authentication. If a server still allows SSLv3 or TLS 1.0, or weak ciphers (RC4, export, NULL, or CBC with vulnerable IV handling), a man-in-the-middle can sometimes force the client and server to negotiate a weak combination and then attack it. Best practice: disable SSLv3 and TLS 1.0/1.1; enable only TLS 1.2 and 1.3; and restrict cipher suites to strong, modern options (e.g. AES-GCM, ChaCha20).

Finding Weak Ciphers and Protocols: Nmap and Other Tools

Nmap's NSE script ssl-enum-ciphers connects to the target port (e.g. 443) and negotiates TLS with different client options to enumerate which protocol versions and cipher suites the server supports. Command: nmap --script ssl-enum-ciphers -p 443 <host>. The output lists TLS 1.0, 1.1, 1.2, 1.3 and each cipher (e.g. TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256). Ciphers are often labeled with strength (strong, weak, or key length). Look for: SSLv3, TLS 1.0/1.1, RC4, export ciphers, NULL ciphers, or any cipher marked weak. Other tools: testssl.sh (detailed checks and grades), SSL Labs (web interface). Document every weak or deprecated item in your report with the exact cipher or protocol name and recommend removal.

Fixing Server Configuration and Verifying

On Apache: use SSLCipherSuite and SSLProtocol (e.g. SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1; SSLCipherSuite with a modern list). On Nginx: ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers with a strong list; ssl_prefer_server_ciphers on. Restart the service and re-run ssl-enum-ciphers or testssl.sh to confirm weak options are gone. Relate to MITM: weak TLS allows an on-path attacker to potentially decrypt or tamper with traffic; hardening ensures that even if someone is in the middle, they cannot read or modify application data. This is defense in depth alongside application-level security.

Broader Misconfiguration Mindset

Beyond TLS, misconfigurations include: default or guessable credentials, unnecessary services or ports open, verbose error messages leaking stack traces or paths, permissive CORS or missing security headers, and debug or admin interfaces exposed to the internet. Always include a "misconfiguration" lens in recon and reporting. Next: buffer overflows as a classic low-level vulnerability that can lead to code execution.

Key Takeaway for Lesson 15

Weak TLS (old protocols, weak ciphers) is a common and high-impact misconfiguration. Use Nmap ssl-enum-ciphers and tools like testssl.sh to find and document weak crypto; harden by disabling SSLv3 and TLS 1.0/1.1 and restricting to strong ciphers (e.g. AES-GCM). Verify after changes. Next: buffer overflows.