Hack Like a Pro: How to Evade Detection Using Proxychains « Null Byte :: WonderHowTo

Welcome back, my novice hackers!The worst thing that can happen to any hacker is being detected by a security admin, the security technologies (IDS, firewall, etc.), or a forensic investigator.Every time we send a packet to our intended target, that packet contains our IP address in the IP header. When we make a TCP connection, the target system will log our IP address as it logs all connections. If we set off any security alarms or alerts, our IP address will be logged. All of these events increase the possibility of detection.In order to hack anonymously with the least chance of detection, we need to use an intermediary machine whose IP address will be left on the target system. This can be done by using proxies.These systems are designed to accept our traffic and then forward it on to the intended target. Of course, the proxy will likely log our traffic, but an investigator would have to get a subpoena or search warrant to obtain the logs.If we string multiple proxies in a chain, we make it harder and harder to detect our original IP address. If one of those proxies is outside the jurisdiction of the victim, it makes it very unlikely that any traffic can be attributed to our IP address.BothKaliandBackTrackhave an excellent tool for proxying our traffic calledproxychains. In this tutorial, I will show how to use this simple, but powerful tool.Step 1: Find ProxychainsLet's start by finding proxychains. Type:kali > locate proxychainsAs we can see in the screenshot below, proxychains is in the/usr/bindirectory. Since/usr/binis in our PATH variable, we can use it from any directory. This is just as we would want since we use proxychains with other commands, which may NOT likely be in the PATH variable.Step 2: Proxychains SyntaxThe syntax for the proxycahins command is simple and straightforward.kali> proxychains <the command you want proxied> <any arguments>So, if I wanted to use proxychains to scan a site withnmapanonymously, I could type:kali> proxychains nmap -sS <IP address>Step 3: Set Up the Config FileLike nearly every application inLinux/Unix, configuration is managed by a simple text file called theconfig file. In the case of proxychains, this file is/etc/proxychains.conf. We can open it in leafpad or any other text editor (vi, emacs, gedit, kwrite, etc.), by typing:kali > leafpad /etc/proxychains.confWhen we do so, we will see a file like that displayed below. If we scroll down this file a bit, we will see a section that I have highlighted labeled "add proxy list here...".To get proxychains to use intermediary proxies, we simply need to add the IP addresses of the proxies we want to use here. It's important to note that proxychains defaults to useTor.Notice the last line in the screenshot above. It directs proxychains to send the traffic first through our host at 127.0.0.1 on port 9050 (the default Tor configuration). If you are using Tor, leaves this as it is. If you are not using Tor, you will need to comment out this line.As much as I like Tor, it is very slow and we now know thatthe NSA has broken Tor, so I am much less likely to depend upon it for anonymity.Step 4: Let's Test ItNow that we have put a proxy between us and any traffic we send, let's test it out. In this case, I am simply going to do annmapscan towonderhowto.comanonymously by sending the scan through a proxy. The command would be as follows:kali > proxychains nmap -sS 8.26.65.101As you can see in the screenshot above, I have successfully scannedwonderhowto.comthrough my chosen proxy and returned the results back to me. In this way, it appears that my proxy scannedwonderhowto.comand not my IP address.Some More Interesting OptionsNow that we have proxychains working, let's look at some options that we can configure through theproxychains.conf. As we now have it set up, we are simply using a single proxy. We can put in numerous proxies and use all of them, we can use a limited number from the list, or we can have proxychains change the order randomly. Let's try all of those options.Step 5: Add More ProxiesFirst, let's add some more proxies to our list. Open/etc/proxychains.configand add more proxy IPs like I've done below.Step 6: ProxychainingNow that we have multiple IPs in ourproxychain.confwe can set up dynamic chaining. 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, it will automatically go to the next proxy in the list without throwing an error.To do so, let's first open the proxychains configuration file again.With this file open, uncomment out the "dynamic_chains" line. This will enable dynamic chaining of our proxies allowing for greater anonymity and trouble-free hacking.Step 7: Random ChainingFinally, we can also use "random chaining". With this option, proxychains will randomly choose IP addresses from our list and use them for creating our proxychain. This means that 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 do so, open the/etc/proxychains.conffile and 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.In addition; you may want to uncomment the line with "chain_len". This will determine how many of the IP addresses in your chain will be used in creating your random proxy chain.Now that you know how to use proxychains, you can do your hacking with relative anonymity. I say relative, because there is no surefire way to remain anonymous with the NSA spying on all our activity. All we can do is make detection MUCH harder, and proxychains can help do this for us.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage credits:Glove and keyboardandIP fingerprintingvia ShutterstockRelatedHack Like a Pro:Digital Forensics for the Aspiring Hacker, Part 1 (Tools & Techniques)Hack Like a Pro:How to Evade a Network Intrusion Detection System (NIDS) Using SnortThe Hacks of Mr. Robot:How Elliot & Fsociety Made Their Hack of Evil Corp UntraceableHack Like a Pro:Digital Forensics Using Kali, Part 1 (The Tools of a Forensic Investigator)Hack Like a Pro:How to Conduct Active Reconnaissance and DOS Attacks with NmapHacking macOS:How to Create an Undetectable PayloadNews:How to Study for the White Hat Hacker Associate Certification (CWA)How To:The Essential Skills to Becoming a Master HackerHack Like a Pro:How to Change the Signature of Metasploit Payloads to Evade Antivirus DetectionHow To:Disable Scene Detection for More Control Over Photo Shoots on Your iPhone 12, 12 Mini, 12 Pro, or 12 Pro MaxHack Like a Pro:How to Evade AV Software with ShellterNews:What to Expect from Null Byte in 2015Hack Like a Pro:How to Evade AV Detection with Veil-EvasionHow To:Use MSFconsole's Generate Command to Obfuscate Payloads & Evade Antivirus DetectionSQL Injection 101:How to Avoid Detection & Bypass DefensesHack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 2 (Dissecting ClamAV)Hack Like a Pro:How Antivirus Software Works & How to Evade It, Pt. 1How To:Chain Proxies to Mask Your IP Address and Remain Anonymous on the WebLevitation Challenge:Evading ArrestNews:Amazing 3D Object DetectionNews:Minority Report, Kinect-styleHow To:The Official Google+ Insider's Guide Index