-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An active attack on XTLS under origin mode #12
Comments
感谢提供一个新颖的思路:某些情况下 TLS 会发送 Alert 但不关闭 TCP 连接。不过这种方式受到的限制也比较明显:
这里顺便说一下,计划中 Origin 会被废弃(也几乎没人在用了),主要是因为:
关于 issue 中的最后一句话,麻烦展开叙述一下。另外,XTLS 正在研究引入 uTLS,即客户端指纹伪造功能。 |
补充:Origin 严格的写过滤预计会被应用到 Direct 对 TLSv1.2 的传输中。 |
TLS 1.3 mandates connection closure upon error. So an RFC-conforming implementation will never trigger a false positive. False negatives are unavoidable.
For example, the attacker can initiate a renegotiation when the upper-layer protocol is TLS 1.2 and XTLS is running in Direct mode (no read filtering). The renegotiation will eventually fail but is enough to leak a huge amount of information. The current implementation of write filtering does not prevent this because Even under TLS 1.3, a corner case exists: when the upper-layer negotiates |
I don't think the attacks I've described are practical though. Exploiting the difference between fatal and non-fatal alerts needs precise timing (leveraging the delay between |
Thanks for your post. Should be fixed in XTLS/Xray-core#1235 |
旧版 XTLS 早已被弃用,新版 XTLS,即 XTLS Vision 仅支持内层 TLSv1.3 非 |
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 aclose_notify
alert. XTLS parses the record but is not aware of the encryptedclose_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_notify
early 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.
The text was updated successfully, but these errors were encountered: