Add risk flag about suspicious ESNI usage

In a Client Hello, the presence of both SNI and ESNI may obfuscate the real
domain of an HTTPS connection, fooling DPI engines and firewalls, similarly
to Domain Fronting.

Such technique is reported in a presentation at DEF CON 28:
"Domain Fronting is Dead, Long Live Domain Fronting: Using TLS 1.3 to evade
censors, bypass network defenses, and blend in with the noise"
Full credit for the idea must go the original author

At the moment, the only way to get the pdf presention and related video is via
https://forum.defcon.org/node/234492
Hopefully a direct link (and an example pcap) will be available soon
This commit is contained in:
Nardi Ivan
2020-08-05 17:13:23 +02:00
parent 07d9fa7f96
commit 79b89d2866
4 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -312,6 +312,7 @@ typedef enum {
NDPI_SSH_OBSOLETE_CLIENT_VERSION_OR_CIPHER,
NDPI_SSH_OBSOLETE_SERVER_VERSION_OR_CIPHER,
NDPI_SMB_INSECURE_VERSION,
NDPI_TLS_SUSPICIOUS_ESNI_USAGE,
/* Leave this as last member */
NDPI_MAX_RISK
} ndpi_risk_enum;
@@ -1446,4 +1447,4 @@ class NDPI():
def ndpi_exit_detection_module(self):
""" Exit function for nDPI module """
self._ndpi.ndpi_exit_detection_module(self._mod)
self._ffi.dlclose(self._ndpi)
self._ffi.dlclose(self._ndpi)
+1
View File
@@ -79,6 +79,7 @@ typedef enum {
NDPI_SSH_OBSOLETE_CLIENT_VERSION_OR_CIPHER,
NDPI_SSH_OBSOLETE_SERVER_VERSION_OR_CIPHER,
NDPI_SMB_INSECURE_VERSION,
NDPI_TLS_SUSPICIOUS_ESNI_USAGE,
/* Leave this as last member */
NDPI_MAX_RISK
+4 -1
View File
@@ -1532,7 +1532,10 @@ const char* ndpi_risk2str(ndpi_risk_enum risk) {
case NDPI_SMB_INSECURE_VERSION:
return("SMB Insecure Version");
case NDPI_TLS_SUSPICIOUS_ESNI_USAGE:
return("TLS Suspicious ESNI Usage");
default:
snprintf(buf, sizeof(buf), "%d", (int)risk);
return(buf);
+5
View File
@@ -1432,6 +1432,11 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
NDPI_SET_BIT(flow->risk, NDPI_TLS_NOT_CARRYING_HTTPS);
}
if(flow->protos.stun_ssl.ssl.encrypted_sni.esni &&
flow->protos.stun_ssl.ssl.client_requested_server_name[0] != '\0') {
NDPI_SET_BIT(flow->risk, NDPI_TLS_SUSPICIOUS_ESNI_USAGE);
}
return(2 /* Client Certificate */);
} else {
#ifdef DEBUG_TLS