-
Notifications
You must be signed in to change notification settings - Fork 47
Description
This attack is beyond the original threat model of XTLS. This issue is to discuss XTLS usage against more aggressive local adversaries like corporate firewalls.
There is an intrusive way to detect whether an encrypted TLS alert is close_notify: injecting binary garbage into the TCP connection. If an endpoint ignores the binary garbage, then it must have received a close_notify alert. XTLS parses the record but is not aware of the encrypted close_notify, so an active attacker can tell apart XTLS from other TLS stacks.
-
The user starts a huge download over HTTPS. Both Firefox and curl sends
close_notifyearly during a download, so the attacker can begin after seeing the first 19-byte encrypted data. -
The attacker forges TLS records and sends them to the XTLS server. XTLS forwards them to the actual server, who ignores them silently.
-
The attacker forges malformed TLS records. XTLS closes the connection immediately.
-
The attacker can now be sure of the existence of XTLS.
This attack is unlikely to be adopted by the GFW due to its potentially destructive effects. However, corporate networks might occasionally be aggressive enough to disrupt all TLS traffic. Direct mode is not a permanent solution: the mismatch between Client Hello extensions and the actual behavior easily spots a XTLS user.