PDA

View Full Version : Torrenting through proxy could be dangerous



Renk
01.05.10, 22:59
In recent papers some researchers have revealed how they have been able to monitor a huge fraction of worldwide torrent trafic, and even to deanonymize those users who were using Tor.

The Torproject's blog discusses this point. I recommend to you to read it.


An increasing number of people are asking us about the recent paper coming out of Inria in France around Bittorrent and privacy attacks. This post tries to explain the attacks and what they imply.

There are three pieces to the attack (or three separate attacks that build on each other, if you prefer).

The first attack is on people who configure their Bittorrent application to proxy their tracker traffic through Tor. These people are hoping to keep their IP address secret from somebody looking over the list of peers at the tracker. The problem is that several popular Bittorrent clients (the authors call out uTorrent in particular, and I think Vuze does it too) just ignore their socks proxy setting in this case. Choosing to ignore the proxy setting is understandable, since modern tracker designs use the UDP protocol for communication, and socks proxies such as Tor only support the TCP protocol -- so the developers of these applications had a choice between "make it work even when the user sets a proxy that can't be used" and "make it mysteriously fail and frustrate the user". The result is that the Bittorrent applications made a different security decision than some of their users expected, and now it's biting the users.

The attack is actually worse than that: apparently in some cases uTorrent, BitSpirit, and libTorrent simply write your IP address directly into the information they send to the tracker and/or to other peers. Tor is doing its job: Tor is _anonymously_ sending your IP address to the tracker or peer. Nobody knows where you're sending your IP address from. But that probably isn't what you wanted your Bittorrent client to send.

That was the first attack. The second attack builds on the first one to go after Bittorrent users that proxy the rest of their Bittorrent traffic over Tor also: it aims to let an attacking peer (as opposed to tracker) identify you. It turns out that the Bittorrent protocol, at least as implemented by these popular Bittorrent applications, picks a random port to listen on, and it tells that random port to the tracker as well as to each peer it interacts with.
Because of the first attack above, the tracker learns both your real IP address and also the random port your client chose. So if your uTorrent client picks 50344 as its port, and then anonymously (via Tor) talks to some other peer, that other peer can go to the tracker, look for everybody who published to the tracker listing port 50344 (with high probability there's only one), and voila, the other peer learns your real IP address. As a bonus, if the Bittorrent peer communications aren't encrypted, the Tor exit relay you pick can also watch the traffic and do the attack.

That's the second attack. Combined, they present a variety of reasons why running any Bittorrent traffic over Tor isn't going to get you the privacy that you might want.

The third attack from their paper is where things get interesting. For efficiency, Tor puts multiple application streams over each circuit. This approach improves efficiency because we don't have to waste time and overhead making a new circuit for every tiny picture on the aol.com frontpage, and it improves anonymity because every time you build a new path through the Tor network, you increase the odds that one of the paths you've built is observable by an attacker. But the downside is that exit relays can build short snapshots of user profiles based on all the streams they see coming out of a given circuit. If one of those streams identifies the user, the exit relay knows that the rest of those streams belong to that user too.

The result? If you're using Bittorrent over Tor, and you're _also_ browsing the web over Tor at the same time, then the above attacks allow an attacking exit relay to break the anonymity of some of your web traffic.



Bittorrent over Tor isn't a good idea | The Tor Blog (http://blog.torproject.org/blog/bittorrent-over-tor-isnt-good-idea)

What's very annoying (at least, I think) is that what has failed with Tor would a fortiori fail with other kind of proxyfication (except vpn, hich are proxyfying including UDP).

I do not know if it suffices to disable DHT in order to prevent this kind of attacks. Maybe disabling DHT and using a "no report" client would be sufficient ???


Otherwise to be anonymous without VPN, you then have to use anonymized p2P networks such as I2P, RShare, Ants, Mute, Oneswarm, etc.

anon
01.05.10, 23:11
Workaround for the first attack: don't use UDP trackers, disable DHT, PEX and scraping (at the cost of loss of functionality, smaller peer horizon and maybe slower speeds), don't use such clients (the list includes anything with chunks of the BitComet core, for example BC itself, BitSpirit and BitLord) neither the "hostname to report to tracker option".
Workaround for the second attack: protect yourself against the first one. Using the option to choose a random port on startup would be cool, as it also prevents the tracker from potentially identifying you over time due to the static port.
Workaround for the third attack: give the user an option to turn that pipelining-like behavior off, at the cost of overhead traffic (not a 100% perfect solution, of course).

A sidenote:


That's the second attack. Combined, they present a variety of reasons why running any Bittorrent traffic over Tor isn't going to get you the privacy that you might want.

You shouldn't be torrenting through Tor in the first place. That's not what it was meant for.


I do not know if it suffices to disable DHT in order to prevent this kind of attacks. Maybe disabling DHT and using a "no report" client would be sufficient ???

You're right about DHT, but why NoReport?

Renk
02.05.10, 00:05
You shouldn't be torrenting through Tor in the first place. That's not what it was meant for.

I absolutely agree (concerning the torification of torrent trafic betwwen peers) and as the TorProject's blog says:


So what's the fix? There are two answers here. The first answer is "don't run Bittorrent over Tor". We've been saying for years not to run Bittorrent over Tor, because the Tor network can't handle the load; perhaps these attacks will convince more people to listen.

But what piqued my attention was that these attacks are working for all kind of socks proxyfication used, and I found a little alarming the following sentence:


The first attack is on people who configure their Bittorrent application to proxy their tracker traffic through Tor. These people are hoping to keep their IP address secret from somebody looking over the list of peers at the tracker.The problem is that several popular Bittorrent clients (the authors call out uTorrent in particular, and I think Vuze does it too) just ignore their socks proxy setting in this case.

although I don't well understand it: If I configure my torrent client in order to proxy only the tracker trafic (as you explained in your tuto about "semi anonymization") e.g. through Tor, I use http (or https) proxyfication through Privoxy (in utorrent connection setting: type hhtp, proxy 127.0.0.1, port 8118), with Tor as parent socks 5 proxy. In that case could really my utorrent client "ignore" my proxy setting ?





You're right about DHT, but why NoReport?

I though to NoReport because in uTorrent leecher pack you explain:


-NoReport-Tracker:
Your upload and download aren't reported to the tracker.
You are also not shown in the peerlist.
Unfortunately it doesn't work on all trackers.
Tested on BitMe

so that with this feature, the tracker has and disseminates very little information about the user. At least I understood this way.

anon
02.05.10, 00:12
although I don't well understand it: If I configure my torrent client in order to proxy only the tracker trafic (as you explained in your tuto about "semi anonymization") e.g. through Tor, I use http (or https) proxyfication through Privoxy (in utorrent connection setting: type hhtp, proxy 127.0.0.1, port 8118), with Tor as parent socks 5 proxy. In that case could really my utorrent client "ignore" my proxy setting ?

From my experiences, it shouldn't ignore it. You can always use CheckMyTorrentIP.com to check this. As far as I know, UDP traffic is never proxified, though, so don't use UDP trackers (private sites don't have these, but public torrents do, look for the udp://... at the beginning of the URL), and disable scraping just in case, although I think that goes through TCP.


I though to NoReport because in uTorrent leecher pack you explain:

Indeed it doesn't report your upload and download, but that's of little concern in this case, in my opinion. Also, the "peerlist" referred to by me in the quote is the ones available in some/a lot of private sites via a PHP script. You don't show up there, but the tracker still gets your IP if you're using your real address, and the Tor exit node's otherwise.