Secure Sockets Layer
Table of Contents
SSL (Secure Sockets Layer) is a cryptographic protocol that ensures privacy, authentication, and data integrity in internet communications. SSL is the predecessor; Transport Layer Security (TLS) is the modern, more secure version used today. Together, they are often referred to as SSL/TLS, though in current practice "SSL" is largely legacy terminology — all modern connections use TLS, and finding SSL (specifically SSLv2/SSLv3) still enabled is itself a vulnerability, not just an older name for the same thing.
Related: Transport Layer Security Integrity Encryption Man-in-the-Middle Attack Wireshark
SSL/TLS Version History and Security Status
Worth knowing which versions are actually still acceptable, since this is a direct, checkable finding on an engagement:
| Version | Status |
|---|---|
| SSLv2 | Broken, must never be enabled |
| SSLv3 | Broken (POODLE), must never be enabled |
| TLS 1.0 | Deprecated, weak — flag if found |
| TLS 1.1 | Deprecated, weak — flag if found |
| TLS 1.2 | Currently acceptable, widely deployed |
| TLS 1.3 | Current standard, preferred |
Any server still accepting SSLv2/SSLv3 or TLS 1.0/1.1 is a reportable finding regardless of what else is configured correctly — this is a fast, high-confidence check worth running early.
Key Concepts
- Data Integrity: Ensures data is not altered during transmission.
- Handshake Process: Establishes a secure connection between the server and client.
- Certificates: Digital documents that verify the identity of a website or server.
The Handshake — What Actually Happens
- Client Hello: Client sends supported TLS versions, cipher suites, and a random value
- Server Hello: Server picks a TLS version and cipher suite from the client's list, sends its certificate
- Certificate Verification: Client verifies the certificate against a trusted Certificate Authority (CA), checks the hostname matches, checks it isn't expired/revoked
- Key Exchange: Client and server derive a shared session key (via RSA or, in modern TLS, Diffie-Hellman for forward secrecy)
- Finished: Both sides confirm the handshake, switch to encrypted communication using the negotiated session key
Testing SSL/TLS Configuration
# testssl.sh — comprehensive check of versions, ciphers, and known vulnerabilities testssl.sh target.com # nmap — quick check of supported versions and weak ciphers nmap --script ssl-enum-ciphers -p 443 target.com # openssl — manually test whether a specific weak version is accepted openssl s_client -connect target.com:443 -tls1 openssl s_client -connect target.com:443 -ssl3 # Check certificate details directly openssl s_client -connect target.com:443 -showcerts
Common Findings
- Weak/deprecated protocol versions accepted (SSLv2/v3, TLS 1.0/1.1)
- Weak cipher suites — e.g. RC4, DES, export-grade ciphers still enabled alongside strong ones
- Self-signed or expired certificates — breaks the trust chain, though impact varies by context (internal tooling vs public-facing)
- Missing certificate hostname validation on the client side of an application making outbound HTTPS calls — allows MITM if the client accepts any certificate regardless of hostname
- No HSTS header — allows a user's first connection to be downgraded to plain HTTP before ever reaching HTTPS
Applications
- Securing online transactions (e.g., e-commerce).
- Protecting sensitive data (e.g., passwords, credit card information).
- Building user trust (indicating a secure website).
- Preventing Man-in-the-Middle Attacks.
Tips
- On the exam, don't just note "HTTPS is used" as sufficient — actually check which versions and ciphers are accepted; a target can serve HTTPS while still accepting SSLv3 in parallel
testssl.shis the fastest single tool for a comprehensive pass; reach for manualopenssl s_clienttests only when you need to confirm one specific version/finding precisely for a report- A valid certificate proves the server's identity was verified by a CA — it says nothing about whether the underlying protocol version or cipher suite is actually secure; don't conflate "has a valid cert" with "properly configured"