SSL Decrypt / MITM / SSL/TLS Inspection

SSL Decrypt is a security technique used by proxies, firewalls, and secure web gateways (such as Netskope, Zscaler, Palo Alto, etc.) to inspect the contents of HTTPS traffic that would otherwise be encrypted and unreadable.
Core Idea is:
- The proxy temporarily terminates the encrypted connection from the client, decrypts the traffic, inspects it
- Proxy then creates a new encrypted connection to the destination server.
- 2 encrypted channels exist. 1 from Client to proxy other from Proxy to Server.
Browser <--TLS--> Proxy <--TLS--> Google

Key Characteristics

* Forged Leaf Certificate: Proxy terminates the Client TLS Connection using its own forged leaf certificate.
* Seperate TLS Connections: Proxy opens a new TLS connection with upstream server, and TLS connection with client. It helps inspecting the packet in both directions
* Proxy Root CA Installed on Client: For client to trust forged certificate, proxy's ROOT CA certificate must be installed on Browser Client's Trust Store.

Flow

1. Client Requests a Website (Browser → https://google.com)
2. Proxy Intercepts the traffic
3. Proxy Creates Its Own TLS Session to google (Proxy → Google)
4. Using Emphemeral CA proxy generates CA Cert(CN = google.com, Issuer = Corporate CA)
5. proxy sends this cert to Browser, Since Client has already installed trusted root certificate from proxy into "Trusted Certificate Store", Client browser accepts the cert
6. Traffic arrives encrypted from browser. Proxy decrypts it. Now it can inspect
7. After inspection, Proxy encrypts again and sends traffic to Google.

Why HTTP Connect?

Simple Flow

Simple SSL_DND Floe

Detialed Flow

SSL_DND