Anonymize Traffic with Tor
We can anonymize our traffic using Tor proxy and proxychains. Please note that this method does not provide complete anonymity.
Privacy Friendly OS
Tails
Qubes
Whonix
Anonymization
1. Configure Proxychains
First off, find the location of the proxychains configuration file.
find / -type f -name "*proxychains*" 2>/dev/nullAssume we found /etc/proxychains.conf then modify this file.
vim /etc/proxychainsWe need to remove # in front of dynamic_chains, then comment out the strict_chain line and the random_chain line.
In addition, check the proxy_dns is uncommented for avoiding our DNS to be leaked.
...
dynamic_chain
...
# strict_chain
...
# random_chain
...
proxy_dnsAdd socks4 127.0.0.1 9050 and socks5 127.0.0.1 9050 in the ProxyList section.
[ProxyList]
socks4 127.0.0.1 9050
socks5 127.0.0.1 90502. Start Tor Service
Before using proxychains, we need to start Tor service.
systemctl start tor
# Check the status
systemctl status tor3. Use Proxychains
Now we can execute arbitrary command with proxychains. Our traffic should be anonymous thanks to Tor.
# Open Firefox browser.
proxychains firefox dnsleaktest.com
proxychains nmap x.x.x.xCheck Public IP
To check our public ip address from command line, run the following command.
proxychains curl ifcfg.meProxhchains Bash
If we don't want to append proxychains command every time, proxychains bash command eliminates the need to do that.
proxychains bash
# Confirm our public ip
curl ifcfg.me4. Use Burp Suite
To use Burp Suite over Tor proxy, setup the SOCKS proxy in Burp Suite as below.
Open Burp Suite. We need to normally start Burp Suite without
proxychainscommand.Go to Proxy tab and click Proxy settings. Settings window opens.
In Settings window, go to User tab at the left pane, and click Network → Connections.
In SOCKS proxy section, click the switch "Override options for this project only", and fill the following forms:
SOCKS proxy host: 127.0.0.1 SOCKS proxy port: 9050After that, check "Use SOCKS proxy".
Close the Settings window.
After setting up, we can use Burp Suite built-in browser over Tor proxy.
5. Stop Tor Service
After using proxychains and Tor, stop the Tor service.
systemctl stop torLast updated