🔐 Project 06 — TLS/HTTPS Certificate Deployment¶
Type: Build/design project (Linux VM) Modules: 07 (Cryptography Fundamentals), 09 (TLS/SSL & Secure Communication) Difficulty: ⭐⭐⭐
🎯 Objective¶
Deploy a web server with HTTPS using a self-signed certificate, inspect the TLS handshake on the wire, then harden the configuration to modern best practices.
🛠️ Setup¶
- One Linux VM running a web server (nginx or Apache both work fine).
- A client machine or browser to connect to it (can be the host machine, or a second VM on the same network).
openssland Wireshark installed on the server VM (or a machine positioned to capture its traffic).
🧩 Tasks¶
🔹 Part A — Generate and Deploy a Self-Signed Certificate¶
- Generate a private key and a self-signed certificate:
- Configure your web server to serve HTTPS using
cert.pem/key.pem. - Connect from a browser or with
curl -v https://<server-ip>and observe the certificate warning. Explain — referencing 09-04: Certificates in Practice — why the browser doesn't trust it (it's not a cryptographic weakness; it's a trust/chain-of-trust problem).
🔹 Part B — Capture and Read the Handshake¶
- Start a Wireshark/tcpdump capture on the server (or a machine that can see the traffic), then connect from the client.
- In the capture, locate the
ClientHello,ServerHello, andCertificatemessages (see 09-02: The TLS Handshake for what to expect at each step). - Note the negotiated TLS version and cipher suite shown in the
ServerHello, and decode the cipher suite name's components (see 09-03: Cipher Suites).
🔹 Part C — Harden the Configuration¶
- Reconfigure the web server to disable TLS 1.0 and TLS 1.1, and restrict the allowed cipher suites to a modern list (ECDHE + AES-GCM, per 09-06: TLS Best Practices & HTTPS).
- Enable an HSTS response header.
- Verify the old protocol versions are now refused:
- Re-capture a connection attempt and confirm the negotiated version/cipher suite is now the modern one you configured.
✅ Verification Checklist¶
- Self-signed certificate generated and serving HTTPS successfully.
- Explained why the browser warns about the self-signed certificate (trust, not crypto).
- Identified the ClientHello/ServerHello/Certificate messages in a real packet capture.
- Decoded the negotiated cipher suite into its four components.
- Confirmed TLS 1.0/1.1 are refused after hardening.
- HSTS header present in server responses.
📦 Deliverables¶
- The
opensslcommands used to generate the certificate. - The relevant web server TLS configuration snippet (before and after hardening).
- A short description (annotated screenshot text or a written walkthrough) of the captured handshake messages.
- The
openssl s_client -tls1output showing the old protocol is refused post-hardening.
🚀 Stretch Goals¶
- If you have access to a real domain, obtain a genuine trusted certificate via Let's Encrypt/
certbotinstead of a self-signed one, and compare the browser experience. - Enable OCSP stapling and confirm it in a capture.
- Use
nmap --script ssl-enum-ciphersor a similar tool to audit exactly which protocol versions and cipher suites your hardened server accepts, and confirm it matches your intended configuration.
See also notes: [[07-08-digital-certificates-and-pki]], [[09-02-tls-handshake-walkthrough]], [[09-03-cipher-suites]], [[09-06-tls-best-practices-and-https]]