# When SNIs Cannot be Trusted | ntop

[Blog](https://www.ntop.org/blog/)[Cybersecurity](https://www.ntop.org/category/cybersecurity/)[nDPI](https://www.ntop.org/category/ndpi/)

# When SNIs Cannot be Trusted

October 7, 20252 min read

SNI (Server Name Indication) is an optional extension in TLS/QUIC that contains the symbolic host name we’re connecting to. For instance, during the TLS handshake, the SNI allows the server to identify the correct TLS certificate of a server hosting multiple websites. nDPI reports SNIs in order to make it possible to detect name-based services deployed on the same server IP address. Below you can see an example of how nDPI reports SNIs in encrypted traffic.

```

TCP 192.168.1.29:52663 <-> 116.203.142.127:443 [proto: 91.26/TLS.ntop][Stack: TLS.ntop][IP: 0/Unknown][Encrypted][Confidence: DPI][FPC: 0/Unknown, Confidence: Unknown][DPI packets: 8][cat: Network/14][Breed: Safe][23 pkts/4503 bytes <-> 24 pkts/25933 bytes][Goodput ratio: 66/94][0.36 sec][Hostname/SNI: www.ntop.org][(Advertised) ALPNs: h2;http/1.1][TLS Supported Versions: GREASE;TLSv1.3;TLSv1.2][bytes ratio: -0.704 (Download)][IAT c2s/s2c min/avg/max/stddev: 0/0 20/16 263/219 60/49][Pkt Len c2s/s2c min/avg/max/stddev: 66/66 196/1081 1506/1506 363/627][nDPI Fingerprint: 09a4ff6a891e0364e7cd1b08c0825fc3][TCP Fingerprint: 194_64_65535_d29295416479/macOS][TLSv1.3][JA4: t13d1516h2_8daaf6152771_d8a2da3f94cd][JA3S: f4febc55ea12b31ae17cfb7e614afda8][ECH: version 0xfe0d][Chrome][Cipher: TLS_AES_128_GCM_SHA256][Plen Bins: 0,0,12,0,0,4,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,71,0,0]
```

Client applications use the SNI to verify that the website it is connecting to matches the symbolic website, and in case this is not happening errors such as ‘Your connection is not private’ are reported. This said, it is not wise to assume that clients will always check name mismatches. In fact there are many applications that do not check them at all as this allows them to bypass network security policies. For instance, there are many VPN-like applications that connect to malicious IPs using popular SNIs (e.g. www.google.com) to hide their activities. While passively monitoring traffic, assuming that SNI maps.google.com means Google Maps isn’t safe without checking it.

As in TLS 1.3, the server certificate exchange is encrypted, in order to passively validate a connection, we have introduced in nDPI a DNS cache. Such cache keeps track of DNS resolution <numeric IP>:<symbolic hostname> in order to detect

-   Connections to SNIs that have not been previously DNS-resolved.
-   Mismatches numeric vs symbolic IP address

Below you can see an example of nDPI flow risk NDPI\_UNRESOLVED\_HOSTNAME reported by ntopng when a mismatch is detected.

![Mismatch](/images/2025/10/mismatch.webp)

In order to reduce cache memory size, we hash values in a bloom-filter-like data structure, so enabling this feature has a limited computational cost. Note that when DoH/DoT is in use, nDPI can report false positives as it has not observed the query, so enable this feature only on networks where it can be safely used.

In nEdge, host pools use the above feature to create a dynamic blacklist whenever a mismatch is reported. This means that hosts relying on SNI mismatch to bypass network policies can be spotted and blocked automatically.

![When SNIs Cannot be Trusted, figure 2](/images/2025/10/Screenshot-2025-10-07-at-22.50.46.webp)

Bottom line: trusting SNIs is not a good idea as some malicious applications can use them to overcome network security measures. nDPI (hence all ntop applications) implements a mechanism to detect malicious SNI usage and eventually (in nEdge) block this traffic. Now you can safely monitor network traffic and trust SNIs again.

Enjoy !

**Related:**[TLS fingerprinting guide](https://www.ntop.org/tls-fingerprinting-ja3-ja4/), [nDPI](https://www.ntop.org/products/deep-packet-inspection/ndpi/)

## Keep reading

ntopngNov 23, 2026

### [Modeling Your Network: Part I](https://www.ntop.org/network-model-intro/)

ntopng is introducing continuous network learning to help administrators close visibility gaps in dynamic networks, starting with a new Server Model feature. Using DPI and historical flow data, the system passively discovers and baselines core servers—alerting operators to unauthorized services, unresponsive hosts, or traffic anomalies while automatically updating network configurations to reduce false-positive security alerts.

AINov 7, 2026

### [Sharkfest 26EU: HowTo Detect Stealth VPN and AI Inference Traffic](https://www.ntop.org/sharkfest-26eu-howto-detect-stealth-vpn-and-ai-inference-traffic/)

Earlier this week we have presented at Sharkfest Europe 2026 a presentation of our work about traffic detection of Stealth VPNs and AI Inference. The presentation addresses the challenges of detecting modern obfuscated network traffic, specifically from stealth VPNs and custom/local artificial intel

nDPINov 7, 2026

### [Detecting CVE-2026-98432 using nDPI/ntopng](https://www.ntop.org/detecting-cve-2026-98432-using-ndpi-ntopng/)

CVE-2026-98432 is a critical, 9.8-severity use-after-free (UAF) vulnerability in the Linux kernel’s IPv4 TCP networking stack. It allows an unauthenticated remote attacker to potentially cause system crashes, memory corruption, or execute arbitrary commands with root privileges. From a network stand

## Try it on your own network

Download the free Community edition and see your first flows in five minutes.

[Download ntopng free](https://www.ntop.org/support/documentation/software-installation/)[Talk to an engineer](https://www.ntop.org/support/need-help/contacts/)
Source: https://www.ntop.org/when-snis-cannot-be-trusted/