It is really important to not to leave traces behind after the attack to successfully complete the job. The first step is to being anonymous while performing the attack, that is covering your face so it will be hard to trace back the attacker. In terms of computing, hiding your original IP is covering face.
Whenever a computer opens a connection to another computer, the connection receiving computer would log the IP address of the connection initiating computer. These logs will be used in audit trails which helps investigators to locate the origin of an attack, most of the time it will be either your ISPs IP which will bring lots of troubles to your door.
So you don't want the victim computer you are connecting to know your real IP, you need to fake/mask it so the victim will see the connection is originating from a different location of the world. This is done by creating the connecting through multiple intermediate computers. The victim will see the IP of the last computer you used to get connected to the victim machine, but not your IP. And higher the number of intermediate computers you use, make it harder to track you down.
Here we will be looking at the tool Tor for this job. Tor will create a connection to your target through multiple intermediate computers. Lets first try to understand how Tor works.
Now think your computer "Alice", needs to get connected to your friends computer "Bob".
Tor will provide a network of intermediate computers to make the connection from Alice to Bob.
Now Bob see the IP address of the last computer in the chain as the connection initiator's IP address. This way, it will be really harder to trace back to IP address of the Alice.
Another key advantage of Tor is that, it changes the chain of computers you are creating the connection to the target computer which makes the victim to see different initiating IP address every time you create a connection.
Setting up Tor
1. Installing Tor using apt-get in Linux [https://www.torproject.org/docs/debian.html.en]
After you have installed Tor in Linux successfully, it should be running on port 9050.
2. Installing Privoxy in Linux using apt-get install privoxy. [http://www.privoxy.org/user-manual/installation.html]
After you have installed Privoxy in Linux successfully, it should be running on port 8118. If not use the command /etc/init.d/privoxy start [http://www.privoxy.org/user-manual/startup.html]
3. Configuring Privoxy to work with Tor using forwarding. [http://www.privoxy.org/faq/misc.html#TOR] [Config file http://www.privoxy.org/user-manual/config.html]
Now we have setup Tor to use as a HTTP proxy, but we still haven't engage it to any of our clients. Lets do a simple test.
Test step 1: Open a terminal and use Curl to check your IP address from a remote service.
curl curlmyip.com
Now record the IP address you recieved, that is your real IP address external computers will see when you get connected to another computer.
Now lets engage Tor. Open .bashrc file and put the append the following lines.
http_proxy=http://127.0.0.1:8118/
HTTP_PROXY=$http_proxy
export http_proxy HTTP_PROXY
Above config engages the HTTP proxy to Curl, Now open a new terminal tab or you have to source the .bashrc file to use the same terminal tab.
Now perform the same curl command and see the IP address you receive.
curl curlmyip.com
Now you can see now you have received a new IP address. This is since Tor created the connection through a chain of computers to the remote service.
Likewise, now you can configure the HTTP proxy for your web browsers and other client applications. [https://trac.torproject.org/projects/tor/wiki/doc/TorifyHOWTO]
Very informative and extremely well written. Thanks for sharing.
ReplyDelete