• December 22, 2024

How To Setup A Proxy Chain

How to Setup PROXYCHAINS in Kali-Linux by Terminal

How to Setup PROXYCHAINS in Kali-Linux by Terminal

proxychains is open source software for Linux systems and comes pre-installed with Kali Linux, the tool redirects TCP connections through proxies like TOR, SOCKS4, SOCKS5, and HTTP (S) and it allows us to chain proxy servers. With proxychains, we can hide the IP address of the source traffic and evade IDS and setup proxychains you will first need the tor service, most of the time the service is preinstalled. To check if there is tor service available or not just use this Switch to ROOT usersudo -iType your password and enter, Now you’re in Root user. so type, root@kali:~# service tor satusIf you get this output that means TOR is not installed in your system and not running, Means TOR is installed in your system and apt-get install torWe had already installed tor service before so there will be a difference in execution. If you get any error while doing this then do update && upgrade and reboot, and do TOR Successfully installs then, Start TOR service tor startNow to check the TOR service service tor statusctrl +c for If you want to stop TOR service, type service tor stopAfter installing tor service now we need to configure proxychains. To do so use the following you must in ROOT user. if you do not then switch to nano /etc/nfYou see this type of file in the terminal. you will see “#” which means bash language comments. if there is no “#” hash that means it defaults running. or if we remove “#” hash that means we want to run this. You can use arrow keys to scroll down & up and read file content and do the following changes as you you see in this there are three types of proxychains: 1)dynamic 2)strict 3)randomwe’re going to use dynamic chain, Remove Dynamic chain from commentcomment Strict chain and Random chainRemove proxy DNS from commentAlso, Remove Proxy DNS requests — no leak for DNS data from commentTips: here removing proxy DNS and no leak for DNS data, helps you to fully anonymous. 3. Now, write socks5 127. 0. 1 9050 in the last line of the proxy just write save by ctrl+o and enter and for exit the file ctrl+X, now exit the proxychains setup is Here, SOCKS is an internet protocol that routes packets between a server and a client using a proxy server. and socks4 and socks5 is the type of socks. 127. 1 is the loopback Internet protocol (IP) address also referred to as the localhost. 9050 is port number and By default, Tor listens on this port for socks Restart your machine, To start proxychains first restart the tor service and then launch proxychains in firefox with a link for a particular search engine like bing, duckduckgo. Use the following commands:root@kali:~# service tor restartNow, root@kali:~# proxychains firefox running the following commands firefox will launch and will load. When you run the command you must not get any error and bing should get loaded. Also please close all firefox tabs before executing the can see that after executing the proxychains bing loaded with some other language. Now let’s do a DNS leak test by searching DNS leak test and open any website providing the can see that my location is now changed from INDIA to GERMANY and the good thing is that proxychains keep on changing my IP address in a dynamic way without leaking my DNS. so that it provides good you want that you see a different result then you can just close the firefox and clear the terminal, restart tor service and again launch proxychains you will see some different results in DNS leak test as shown below:This is the result which we got after restarting tor service. Now If you facing any issues just comment.
ProxyChains Tutorial - Linux Hint

ProxyChains Tutorial – Linux Hint

There are a lot of “hackers” around the world, some are good, and some are evil. The evil, hack either for money, stealing or just for fun. They like to create havoc in the cyber world or spread malware. The good also could do hacking for money, but in the right way, such as taking part in a bug bounty program, help others to backup lost data, or learn what vulnerabilities exist to educate administrators, etc. What i mean by hacker here is not solely limited to whom are able to break into restricted access. They are an IT expert who has the capability to manage the company’s property security.
Hackers want to be anonymous and hard to be detected while doing their work. Tools can be used in order to hide the hacker’s identity from being exposed. VPN (Virtual Private Network), Proxyservers and RDP (Remote Desktop Protocol) are some of the tools to guard their identity.
In order to do penetration testing anonymously and decrease the possibility of identity detection, hackers need to use an intermediary machine whose IP address will be left on the target system. This can be done by using a proxy. A proxy or proxy server is a dedicated computer or software system running on a computer which acts as an intermediary between an end device, such as a computer and another server which a client is requesting any services from. By connecting to the Internet through proxies, the client IP address will not be shown but rather the IP of the proxy server. it can provide a client with more privacy then if simply connecting directly to the Internet.
In this article, i will discuss about a built-in anonymity service in Kali Linux and or others penetration testing based systems, it is Proxychains.
PROXYCHAINS FEATURES
Support SOCKS5, SOCKS4, and HTTP CONNECT proxy servers.
Proxychains can be mixed up with a different proxy types in a list
Proxychains also supports any kinds of chaining option methods, like: random, which takes a random proxy in the list stored in a configuration file, or chaining proxies in the exact order list, different proxies are separated by a new line in a file. There is also a dynamic option, that lets Proxychains go through the live only proxies, it will exclude the dead or unreachable proxies, the dynamic option often called smart option.
Proxychains can be used with servers, like squid, sendmail, etc.
Proxychains is capable to do DNS resolving through proxy.
Proxychains can handle any TCP client application, ie., nmap, telnet.
PROXYCHAINS SYNTAX
Instead of running a penetration test tool, or creating multiple requests to any target directly using our IP, we can let Proxychains cover and handle the job. Add command “proxychains” for every job, that means we enable Proxychains service. For example, we want to scan available hosts and its ports in our network using Nmap using Proxychains the command should look like this:
proxychains nmap 192. 168. 1. 1/24
Lets take a minute to break up the syntax above:
– proxychains: tell our machine to run proxychains service
– nmap: what job proxychains to be covered
– 192. 1/24 or any arguments needed by certain job or tool, in this case is our scan range needed by Nmap to run the scan.
Wrap up, the syntax is simple, as it is only adds proxychains on start of every command. The rest after the proxychain command is the job and its arguments.
HOW TO USE PROXYCHAINS
Before we are using proxychains, we need to setup proxychains configuration file. We also need a list of proxy server. Proxychains configuration file located on /etc/
Open file in your desirable text editor and set up some configuration. Scroll down until you reach the bottom, at the end of file you will find:
[ProxyList]
# add proxy here…
# meanwile
# defaults set to "tor"
socks4 127. 0. 1 9050
By default proxychains directly sends the traffic first through our host at 127. 1 on port 9050 (the default Tor configuration). If you are using Tor, leave this as it is. If you are not using Tor, you will need to comment out this line.
Now, we need to add more proxies. There are free proxy servers on the Internet, you may look at Google for it or click this link Here I am using NordVPN free proxy service, as it has very detailed information on their web site as you see below.
Comment the default proxy for Tor if you are not using Tor then add the proxy on Proxychains config file, then save it. it should look like this:
DYNAMIC_CHAIN VS RANDOM_CHAIN
Dynamic chaining will enable us to run our traffic through every proxy on our list, and if one of the proxies is down or not responding, the dead proxies are skipped, it will automatically go to the next proxy in the list without throwing an error. Each connection will be done via chained proxies. All proxies will be chained in the order as they appear in the list. Activating dynamic chaining allows for greater anonymity and trouble-free hacking experience. To enable dynamic chaining, in the configuration file, uncomment “dynamic_chains” line.
Random chaining will allow proxychains to randomly choose IP addresses from our list and each time we use proxychains, the chain of proxy will look different to the target, making it harder to track our traffic from its source.
To activate random chaining comment out “dynamic chains” and uncomment “random chain”. Since we can only use one of these options at a time, make certain that you comment out the other options in this section before using proxychains.
You may also want to uncomment the line with “chain_len”. This option will determine how many of the IP addresses in your chain will be used in creating your random proxy chain.
Ok, now you know how hackers use proxychains to cover their identity and stay anonymous without worrying about being detected by target IDS or forensic investigators.
About the author
Hy, I am Bima, i am a Freelance Writer and Penetration Tester. Do you have any questions or sharable opportunities? Contact me personally on: dk3ferdiandoo [AT]
How To Setup Proxychains In Linux Without Any Errors?

How To Setup Proxychains In Linux Without Any Errors?

Proxychains in Linux is another tool for anonymity providing anonymity and safe browsing with proxychains is easy. The proxychains works on socks4, socks5, HTTP, and protocols. Setting up proxychains is easy but many users get errors while using them, some of the most common errors occur during tor installation and other errors like proxychain starts but you are not anonymous and your DNS leaks appear. How to setup Proxychains? To setup proxychains you will first need the tor service, most of the time the service is preinstalled. To check if there is tor service available or not just use this command. service tor status If you get any error after using this command then it means tor service is not available in your system, to install tor service use the following command. sudo apt-get install tor We had already installed tor service before so there will be a difference in execution. If you get any error while doing this then check below steps in this article. After installing tor service, now we need to configure proxychains. To do so use the following command. nano /etc/nfYou can use any editor of your choice here we are using nano, you can also use vim, leafpad or sublime etc. In the configuration, you will see “#” which means bash language comments. You can use arrow keys to scroll down and do the following changes. Remove Dynamic chain from commentcomment Strict chain and Random chainRemove proxy DNS from commentwrite socks5 127. 0. 1 9050 in last line of proxy list Save the configuration file and exit the terminal. The proxychains setup is complete. To start proxychains first restart the tor service and then launch proxychains in firefox with a link for a particular search engine like bing, duckduck go. Use the following commands: service tor restart
proxychains firefox running the following commands firefox will launch and will load. When you run the command you must not get any error and bing should get loaded. Also please close all firefox tabs before executing the commands. You can see that after executing the proxychains bing loaded with some other language. Now let’s do a DNS leak test by searching DNS leak test and open any website providing the same. You can see that my location is now changed from INDIA to GERMANY and the good thing is that proxychains keeps on changing my IP address in a dynamic way so that it provides good anonymity. If you want that you see a different result then you can just close the firefox and clear the terminal, restart tor service and again launch proxychains you will see some different results in DNS leak test as shown below: This is the result which we got after restarting tor service. Now you might be facing many issues which setting up proxychains, let us see how to solve most of the frequent errors. What are different errors and how to solve them? One of the most common error is for the tor service, when you check for tor service it may not be present and when you try to install it then you get errors like: Failed to start rvice: Unit rvice not found.
or
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package tor is not available but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ‘tor’ has no installation candidateThis error mostly occurs when recenlty install system and you have some broken sources repositories. If you are running kali linux just go to the kali documentation in browser and search positories. click here for the page. Copy the regular repository and paste it in nano /etc/apt/stYou can easily find repositories for your Linux version. After copying the source repository use command apt-get update && apt-get upgradeThis may take some time and data depending on your version of Linux. This can solve one of the biggest error of proxychains. The second error is for DNS leaks and server not found in the browser. If you get these errors then make sure that you restarted the tor service and your browser is not running. Also, check that dynamic chain in the proxy configuration is not commented, along with that check for proxy DNS also, make sure that both are not commented.

Frequently Asked Questions about how to setup a proxy chain

Leave a Reply