| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 | Filename: 171-separate-streams-by-port-or-host.txtTitle: Separate streams across circuits by destination port or destination hostAuthor: Robert Hogan, Jacob Appelbaum, Damon McCoyCreated: 21-Oct-2008Modified: 30-Aug-2010Status: DraftMotivation:Streams are currently attached to circuits without regard to their content,destination host, or destination port. We propose three options,IsolateBySOCKSUser, IsolateStreamsByPort and IsolateStreamsByHost to change thedefault behavior.The contents of some streams will always have revealing plain text information;these streams should be treated differently than other streams that may or maynot have unencrypted PII content. DNS, with the exception of DNSCurve, isalways unencrypted. It is reasonable to assume that other protocols may existthat have a similar issue and may cause user concern. It is also the case thatwe must balance network load issues and stream privacy. The Tor network will notcurrently scale to one circuit per application connection nor should it anytimesoon.Circuits are currently created with a few constraints and are rotated withina reasonable time window. This allows a rogue exit node to correlate allstreams on a given circuit.Design:We propose two options for isolation of streams that lessen the observabilityand linkability of the Tor client's traffic.IsolateStreamsByPort will take a list of ports or optionally the keyword 'All'in place of a port list. The use of the keyword 'All' will ensure that allapplication connections attached to streams will be isolated to separatecircuits by port number.IsolateStreamsByHost will take a boolean value. When enabled, all applicationconnections, regardless of port number will be isolated with separate circuitsper host. If this option is enabled, we should ensure that the client has areasonable number of pre-built circuits to ensure perceived performance. Thisshould also intentionally limit the total number of circuits a client willbuild to ten circuits to prevent abuse and load on the network. This is atrade-off of performance for anonymity. Tor will issue a warning if a clientencounters this limit.IsolateBySOCKSUser will take a boolean value. When enabled, all applicationconnections, regardless of port number will be isolated with separate circuitsper SOCKS username. This options ensures that any two streams that were createdwith different SOCKS usernames will be sent over different circuits.  The emptyusername will be treated as its own username different from all other usernames.Security implications:It is believed that the proposed changes will improve the anonymity for enduser stream privacy.  The end user will no longer link all streams at a singleexit node during a given time window.There is a possible attack where a hostile web page possibly in collusion withan exit node contains image links for images at (say) "evil.example.com:53" and"evil.example.com:31337", and thereby (if they're lucky) correlate port-80circuits with port-53 and port-31337 circuits.Specification:The Tor client circuit selection process is not entirely specified. Any clientcircuit specification must take these changes into account.Compatibility:The proposed changes should not create any compatibility issues. New Tor clientswill be able to take advantage of this without any modification to the network.Implementation:It is further proposed that IsolateStreamsByPort will be enabled by defaultfor port 22, 53, and port 80.It is further proposed that IsolateStreamsByHost will be disabled by default.Implementation notes:The implementation of this option may want to consider cases where the sameexit node is shared by two or more circuits and IsolateStreamsByPort is inforce. Since the purpose of the option is to reduce the opportunity of ExitNodes to attack traffic from the same source on multiple ports, theimplementation may need to ensure that circuits reserved for the exclusive useof given ports do not share the same exit node.Circuits should not be shared by unique clients. Tor should check to ensurethat peer IP addresses are identical when they connect to the SOCKS listener orthe TransPort listener before sharing a circuit. If the addresses are notidentical, Tor should ensure that the circuits are not shared.Performance and scalability notes:It is further proposed that IsolateStreamsByPort will be enabled by default forall ports after a reasonable assessment is performed. Specifically, we shoulddetermine the impact this option has on Tor clients and the Tor network.
 |