Skip to content

🔐 Project 06 — TLS/HTTPS Certificate Deployment

Network Security

View the live site — ijk37.com

Project 06: TLS/HTTPS Certificate Deployment

Home All Projects Notes Quiz

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).
  • openssl and Wireshark installed on the server VM (or a machine positioned to capture its traffic).

🧩 Tasks

🔹 Part A — Generate and Deploy a Self-Signed Certificate

  1. Generate a private key and a self-signed certificate:
    openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes
    
  2. Configure your web server to serve HTTPS using cert.pem/key.pem.
  3. Connect from a browser or with curl -v https://<server-ip> and observe the certificate warning. Explain — referencing 09-04: Certificates in Practicewhy 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

  1. Start a Wireshark/tcpdump capture on the server (or a machine that can see the traffic), then connect from the client.
  2. In the capture, locate the ClientHello, ServerHello, and Certificate messages (see 09-02: The TLS Handshake for what to expect at each step).
  3. 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

  1. 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).
  2. Enable an HSTS response header.
  3. Verify the old protocol versions are now refused:
    openssl s_client -connect <server-ip>:443 -tls1
    # should fail to connect
    
  4. 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 openssl commands 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 -tls1 output 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/certbot instead of a self-signed one, and compare the browser experience.
  • Enable OCSP stapling and confirm it in a capture.
  • Use nmap --script ssl-enum-ciphers or 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]]