In my previous post about QUIC I wrote that QUIC needs to be blocked. If it’s not blocked, decryption doesn’t work, we don’t see what is inside, and firewall features like URL filtering or App-ID doesn’t work either. After blocking, traffic goes back to TLS over TCP and firewall can do its job again. So QUIC is blocked. What comes next? ECH.
What ECH actually changes
ECH means Encrypted Client Hello. In standard TLS, the ClientHello is sent in cleartext and it contains the SNI field – name of the site the client wants to connect to. URL filtering takes information from SNI, among others, to decide what it is and what to do with it. SNI is necesseary for URL Filtering for example.
With ECH, the real SNI is encrypted. Client sends an outer ClientHello with a cover name, visible for everyone, and the inner one with the real site name, encrypted. Firewall sees only the outer.
The public key used for this encryption comes from DNS, from HTTPS record. Browser asks DNS for this record, gets the key and encrypts the real name with it. Some browsers already use ECH by default, if it’s available for the site.
Take Cloudflare as example. Domains behind Cloudflare with ECH enabled are all visible under one name – cloudflare-ech.com. From URL filtering and firewall point of view, we see only communication to Cloudflare, nothing more. Behind this name can be normal sites, but malware can hide there as well.
What can we do
To make firewall work again with ECH, there are two things.
Decryption. Without decryption we don’t see what is inside, and this is the same story as with QUIC. But decryption alone is not enough.
DNS. Since the key comes from HTTPS record in DNS, we can block this record. Without the key, client can’t encrypt the SNI and uses standard ClientHello, so firewall sees the real name again. On Palo Alto it is done in Anti-Spyware profile, in DNS Policies, where SVCB, HTTPS and ANY record types can be blocked – see example below.

The next problem is DoH. If the client uses DNS over HTTPS, the DNS query is encrypted and firewall doesn’t see it, so blocking HTTPS record doesn’t help. So DoH needs to be blocked as well, otherwise firewall can be cheated
This is not theory, there is already malware using it – ECHidna. It uses ECH for C2 communication, so its destination is hidden behind the cover name and URL filtering doesn’t see it.
Summary
Decryption is necessary, I wrote about it many times. But with how privacy is developing, we need to go one step further. QUIC should be blocked, but even when it is blocked, ECH can still work, and DoH is more and more common. So HTTPS record in DNS and DoH need to be blocked too, only then we have real security from this point of view.
And one more thing I mentioned on my blog few times – having a network security solution is one thing, but proper configuration and hardening is the second one.
