8

I know that even with DoT or DoH the target of the connection is leaked due to the use of SNI in the client hello (and that ESNI/ECH are proposed solutions), but what I can't figure out is does SNI get used 100% of the time (assuming a TLS connection)?

If it's not 100% of the time, then when does it or doesn't it get used?

By "used" I mean is it always present in the client hello making TLS connections ALWAYS leak their target

2 Answers 2

9

Using SNI extension or not depends on the TLS client. Some will use it by default (e.g. all major browsers?), some won't use it at all (e.g. all IE versions on Windows XP), while some other clients will use it or not depending on params/configuration (see e.g. openssl s_client with options -servername and -noservername).

6
  • 1
    As @mti2935 pointed out, not using SNI is not viable. Virtual server connections will not work without it and it has no useful meaning for non-virtual servers. Encrypted SNI is still beta and not widely supported yet. Aug 25, 2021 at 19:32
  • 1
    @user10216038, regardless of viability, there are still some programs that do it.
    – Mark
    Aug 26, 2021 at 0:17
  • 6
    @user10216038 not every client is a browser. Not every protocol is HTTP. And SNI didn't exist for almost the first 20 years of TLS.
    – hobbs
    Aug 26, 2021 at 1:46
  • @user10216038 TLS without SNI is used by the program OpenVPN. It works just fine as it i always used with non-virtualized servers, as it can be run on any port
    – Ferrybig
    Aug 26, 2021 at 6:35
  • 1
    @hobbs "didn't exist for almost the first 20 years of TLS" seems a bit strong. The RFC is from 2003, and SNI was first proposed around 2000 (and discussed before).
    – janm
    Aug 26, 2021 at 18:27
12

There may be a way to disable SNI in your browser settings. This would stop your browser from sending SNI information in the client hello when you connect to a site by https.

But, this will also mean:

  1. If a server is hosting multiple TLS sites on the same IP, your browser will not be able to connect to any of these sites (This is exactly why we have SNI - so that a server can host multiple TLS sites on the same IP).

  2. If a server is hosting just a single TLS site on the IP, then your browser will be able to connect to it by https. But, any eavesdropper will know you are connecting to the site, because it's the only site on that IP.

So, disabling SNI in your browser (if it's even possible) would probably prevent you from connecting to a lot of sites, and will still leak the sites that you are still able to connect to.

2
  • 1
    There is encrypted SNI but it's still Beta and not yet considered an accepted standard. The only large scale site I know that supports it is WordPress. Aug 25, 2021 at 19:25
  • 1
    @user10216038 Cloudflare does it a lot too, see blog.cloudflare.com/esni Aug 26, 2021 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.