Hacking Tutorials

What is Tor and how it works? The Anonymity Network Explained

Today we are going to talk about Tor network, also called The Onion Router. Its gonna be a bit long and interesting so grab your coffee and sit back.

Before you start to read about tor, make sure you read some of the basics:

What is Tor?

Well tor is a software which is used to enable anonymous communication. In simple words, it makes your connection more secure and hides your identity. But how it does that? Well basically it routes your traffic like a proxy chain and encrypts the data packets like a VPN.

Easy? Great. Now we are going to discuss how tor works so in deep which will give you a better idea of what is it.

How Tor Works?

Take a look at this graphic:

tor nodes

You are the green computer i.e. the Client. The red computer is the computer you want to connect to i.e. the Server.

So when you are using Tor, the tor connects you to the tor network which has a lot of servers called nodes or relays. The data is routed through three or more nodes before it reaches the target host like this,

tor nodes connected

You must be thinking its like a proxy chain. But wait there’s more…Tor uses encryption to ensure security.

For example, we are currently using 3 tor nodes. So here’s what happens behind the scenes:

Step 1. Tor software encrypts the data three times with 3 different keys A, B and C (just saying.)

Step 2. This three times encrypted data is sent to the first tor node which has the key C. The first tor node decrypts the data with the key C.

Step 3. Now the two times encrypted data is sent to the second tor node which has the key B. Second node decrypts the data using the key B.

Step 4. This one time encrypted data is sent to the third node which has the key C. This node decrypts the last layer of encryption with the key A.

Step 5. Now as the data is decrypted completely, it is sent to the target host.

Pheww. Was it a bit confusing? Don’t worry. Let me clear your confusion with an example.

I am Somdev and I want to send a letter to my friend Nidhish. I placed the letter in box ummm a Cyan colored box actuarially. Then I placed this box into a purple colored box. Finally, I placed this boxed into a red colored box. Now this whole package looks something like this:

encryption in tor

Now I sent this package to my some other friend lets say C, he removed the cyan colored box and sent the remaining package to my friend B. That guy removed the purple colored box and sent the remaining package to the last part of the chain i.e. my friend A. He opened the red colored box and found the letter. Then he sent the letter to the real target i.e. my friend Nidhish.

Now take a quick look here:tor encryption node


Now lets sum up things:

  •  There are about 6000 tor nodes all over the world
  • Tor uses three nodes by default.
  • The first node is called the Entry node. Its knows who are you.
  • The last node is called the Exit node. It knows what you are trying to access but it doesn’t know who you are.
  • Middle node ensures that entry node and exit node don’t know about each other.
  • Exit node decrypts the data completely before sending it to the target host. It means if you are using a clear text protocol like FTP or HTTP, your data can be compromised by attacks like sniffing.
  • Using doesn’t mean you will hack banks using it and police will not be able to catch you. Because nothing is perfect, everything is vulnerable.

Well I tried to clear the basics of Tor’s working. In next article we will learn how to use tor and how to browse Internet with it.

Till then keep learning..keep hacking.

Also Read: Malware : Definition, Types and Examples

Subscribe Now

Subscribe for free and get latest articles delivered right into your inbox.

Thank you for subscribing.

Something went wrong.