1 Filename: xxx-verify-tor-usage.txt
2 Title: Help users to verify they are using Tor
5 Author: Steven J. Murdoch
11 Websites for checking whether a user is accessing them via Tor are a
12 very helpful aid to configuring web browsers correctly. Existing
13 solutions have both false positives and false negatives when
14 checking if Tor is being used. This proposal will discuss how to
15 modify Tor so as to make testing more reliable.
19 Currently deployed websites for detecting Tor use work by comparing
20 the client IP address for a request with a list of known Tor nodes.
21 This approach is generally effective, but suffers from both false
22 positives and false negatives.
24 If a user has a Tor exit node installed, or just happens to have
25 been allocated an IP address previously used by a Tor exit node, any
26 web requests will be incorrectly flagged as coming from Tor. If any
27 customer of an ISP which implements a transparent proxy runs an exit
28 node, all other users of the ISP will be flagged as Tor users.
30 Conversely, if the exit node chosen by a Tor user has not yet been
31 recorded by the Tor checking website, requests will be incorrectly
32 flagged as not coming via Tor.
34 The only reliable way to tell whether Tor is being used or not is for
35 the Tor client to flag this to the browser.
39 A DNS name should be registered and point to an IP address
40 controlled by the Tor project and likely to remain so for the
41 useful lifetime of a Tor client. A web server should be placed
44 Tor should be modified to treat requests to port 80, at the
45 specified DNS name or IP address specially. Instead of opening a
46 circuit, it should respond to a HTTP request with a helpful web
49 - If the request to open a connection was to the domain name, the web
50 page should state that Tor is working properly.
51 - If the request was to the IP address, the web page should state
52 that there is a DNS-leakage vulnerability.
54 If the request goes through to the real web server, the page
55 should state that Tor has not been set up properly.
59 Identifying proxy server:
61 If needed, other applications between the web browser and Tor (e.g.
62 Polipo and Privoxy) could piggyback on the same mechanism to flag
63 whether they are in use. All three possible web pages should include
64 a machine-readable placeholder, into which another program could
65 insert their own message.
67 For example, the webpage returned by Tor to indicate a successful
68 configuration could include the following HTML:
69 <h2>Connection chain</h2>
71 <li>Tor 0.1.2.14-alpha
72 <!-- Tor Connectivity Check: success -->
75 When the proxy server observes this string, in response to a request
76 for the Tor connectivity check web page, it would prepend it's own
77 message, resulting in the following being returned to the web
81 <li>Tor 0.1.2.14-alpha
82 <li>Polipo version 1.0.4
83 <!-- Tor Connectivity Check: success -->
86 Checking external connectivity:
88 If Tor intercepts a request, and returns a response itself, the user
89 will not actually confirm whether Tor is able to build a successful
90 circuit. It may then be advantageous to include an image in the web
91 page which is loaded from a different domain. If this is able to be
92 loaded then the user will know that external connectivity through
95 Security and resiliency implications:
97 What attacks are possible?
99 If the IP addressed used for this feature moves there will be two
101 - A new website at this IP address will remain inaccessible over
103 - Tor users who are leaking DNS will be informed that Tor is not
104 working, rather than that it is active but leaking DNS
105 We should thus attempt to find an IP address which we reasonably
106 belive can remain static.
110 If a Tor version which does not support this extra feature is used,
111 the webpage returned will indicate that Tor is not being used. Can
112 this be safely fixed?
116 The proposed mechanism is very similar to config.privoxy.org. The
117 most significant difference is that if the web browser is
118 misconfigured, Tor will only get an IP address. Even in this case,
119 Tor should be able to respond with a webpage to notify the user of how
120 to fix the problem. This also implies that Tor must be told of the
121 special IP address, and so must be effectively permanent.