Open In App

Staying Anonymous with ProxyChains in Kali Linux

Last Updated : 07 Nov, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Being anonymous on the internet or while carrying out an attack is one of the most important characteristics of a hacker. There are several ways to achieve this anonymity, one of which is by configuring proxy chains. It is an excellent way to remain anonymous while browsing the internet or conducting attacks. To achieve this anonymity, we will configure ProxyChains in Kali Linux in this article. But first, let us understand what a ProxyChain is.

What is a ProxyChain?

Proxychains are essentially a combination of proxies that reroute a TCP connection to any server using different protocols, such as HTTP, HTTPS, SOCK4 & SOCKS5, making the connection secure and making it nearly impossible for an observer to figure out what you are looking for up online and where you are. Through a very secure chain of proxies, ProxyChains serves as an intermediary between the source IP and the endpoint IP, concealing your identity. Most people mistakenly believe that VPNs are safer than ProxyChains, however, the reality is that DNS leaks are more common in VPNs, making them less secure than ProxyChains.

How to configure Proxychain?

There are two methods for configuring proxy chains.

  • Method 1: Making use of Automated Tools
  • Method 2: Manual configuration

Method 1: Making Use of Automated Tools

In this case, we’ll be employing TorGhost.

It is an anonymization script that basically redirects all internet traffic through the SOCKS5 Internet Protocol, which TOR uses, and DNS requests are also redirected through the TOR network, preventing DNSLeak.

Step 1: Navigate to the location where you want to install the tool (in this case Downloads folder). 

cd <folder name>

 

Step 2: Run the following command to install TorGhost: 

git clone https://github.com/SusmithKrishnan/torghost⁠⁠⁠⁠⁠⁠⁠

 

The command above will create a folder called torghost and install the tool within it.

 

Step 3: After installing, navigate to the TorGhost folder that was created in the preceding step.

cd torghost

 

Step 4: To view the folder’s contents, run the following command.

ls

 

Step 5: Execute the build script.

./build.sh

 

This will install the dependencies needed for the tool to function correctly.

Step 6: Execute the python file with the command.

python3 torghost.py

 

This will display the commands that can be used while running the file.

Step 7: To launch the tool, enter the following command.

python3 torghost.py -s

 

The system’s IP address will change in a few seconds. You can also verify your new IP address by typing what’s my IP into Google.

Method 2: Manually Configuring Proxychains

Step 1: Navigate to the /etc folder.

cd /etc

 

Step 2: Enter the ls command to view the files.

ls

 

Step 3: Look for the file proxychains.conf or proxychains4.conf.

 

Step 4: Use gedit to edit it.

gedit proxychains.conf
OR
gedit proxychains4.conf

 

The file will be opened in gedit.

Step 5: Return to the file’s top.

It will resemble this.

 

Step 6: Uncomment the dynamic chain and comment out the strict chain by removing and replacing the # sign.

 

  • dynamic_chain Will create a new chain of proxies whenever a new connection is opened.
  • strict_chain – Will only use the last chained proxy while opening every new connection.

So, in this case, we make the dynamic chain the default setting.

Step 7: Now search the web for websites that provide proxies, in this case, Geonode.com, and select the protocol you want to use; HTTP and HTTPS were used for demonstration purposes, but SOCK5 or SOCKS 4 can also be used. Make as many proxies as you like.

 

Step 8: Scroll down to the bottom of the gedit file.

 

Step 9: Copy and paste the proxies in the format shown in the image.

 

Step 10: Save and close the file

Done! Your system has now been set up to use multiple proxies. The proxies will be used, but to be safe, restart the system.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads