Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148550 - net-proxy/tsocks - tor patch to tsocks to prevent DNS leaks
Summary: net-proxy/tsocks - tor patch to tsocks to prevent DNS leaks
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL: http://www.totalinfosecurity.com/patc...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-21 10:33 UTC by Ali Polatel (RETIRED)
Modified: 2006-09-22 07:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
tsocks-1.8_beta5.ebuild with tordns useflag (tsocks-1.8_beta5.ebuild,1.50 KB, text/plain)
2006-09-21 10:35 UTC, Ali Polatel (RETIRED)
Details
Tor patch to tsocks (tsocks-1.8b5-tordns1.diff.gz,65.43 KB, patch)
2006-09-21 11:08 UTC, Ali Polatel (RETIRED)
Details | Diff
Tor patch for tsocks (tsocks-1.8b5-tordns1.diff,341.58 KB, patch)
2006-09-21 11:13 UTC, Ali Polatel (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Polatel (RETIRED) gentoo-dev 2006-09-21 10:33:47 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; tr; rv:1.8.0.6) Gecko/20060808 Firefox/1.5.0.6
Build Identifier: 

 I've written an ebuild to add tordns useflag to tsocks-1.8_beta5 which applies
tor patch to tsocks.The patch can be found on
http://www.totalinfosecurity.com/patches/tor.php.It modifies the tsocks library
to use SOCKS for name resolution thus preventing DNS leaks.
     

Reproducible: Always
Comment 1 Ali Polatel (RETIRED) gentoo-dev 2006-09-21 10:35:35 UTC
Created attachment 97677 [details]
tsocks-1.8_beta5.ebuild with tordns useflag
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-09-21 10:41:14 UTC
Please, attach the patch here, we have bad experience w/ third-party links going 404 in a couple of days.
Comment 3 Ali Polatel (RETIRED) gentoo-dev 2006-09-21 11:08:13 UTC
Created attachment 97681 [details, diff]
Tor patch to tsocks
Comment 4 Ali Polatel (RETIRED) gentoo-dev 2006-09-21 11:13:28 UTC
Created attachment 97682 [details, diff]
Tor patch for tsocks
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2006-09-21 11:35:49 UTC
What exactly "tor" means?
Comment 6 Ali Polatel (RETIRED) gentoo-dev 2006-09-21 14:23:35 UTC
 Tor(net-misc/tor - http://tor.eff.org/ ) is an anonymous internet communication system and it has a tool called 'torify' which is a wrapper between tsocks and tor.It has a major problem with DNS.The dns requests made to dnsservers by 'torified' programs is a problem with  anonimity.For example one can use torify to connect to IRC with irssi by torifying irssi ( simply 'torify irssi') and everything instead of the DNS requests go over tor anonymously.
 There is already a tool called privoxy to handle http requests without leaking DNS information and there is a tool called 'tor-resolve' to resolve hostnames to IP addresses via tor but still for protocols other than http tor doesn't provide a way to automate the process.
 There are right now two solutions for that afaik.The first is a seperate project called dns-proxy-tor which is a DNS server that constructs tor to map a domain to a virtual IP address and subsequently tor will treat the virtual IP address as an alias for the original domain name.This makes it possible to safely use SOCKS4 without leaking DNS requests.
 The second one is the mentioned patch.This patch modifies the tsocks library to use SOCKS for name resolution.This has two advantages for tor users: the tool torify doesn't leak DNS information and it provides direct access to .onion addresses without modifying torrc.As an example to connect to freenode's hidden service ( mejokbp2brhw4omd.onion ) with irssi one has add something like this to his torrc : 
  mapaddress 10.40.40.40 mejokbp2brhw4omd.onion
 to map the domain to a virtual IP address.When using the mentioned patch 'torify' will do it automatically.
  I've tested the patched tsocks library using torify to check these two solutions it claims to provide.One can test for DNS leaks by simply starting a sniffer to look for requests made on port 53 and there were no dns requests made  to my dns server and programs like irssi,netcat etc. can directly use .onion addresses when torified which wasn't possible before.
                                                       Regards,
                                                       Ali Polatel
 
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2006-09-22 05:26:32 UTC
fixed in tsocks-1.8_beta5-r2. enjoy!
Comment 8 Ali Polatel (RETIRED) gentoo-dev 2006-09-22 07:15:27 UTC
 Thanks a bunch :-)