The internet allows for information to be shared and ideas spread when businesses create websites and apps that engage their users in commerce, discussion and entertainment. This has fostered a system where the world's information is at our fingertips and communicating with our friends is as easy as sending a message. But in some countries, governments have elected to censor the internet, locking the people who live there out of the global information superhighway.
While the modern web has managed to solve some of these problems, corruption and censorship still exist. In response, people have created networks that make it harder for governments to trace connections, take down servers and institute policies of censorship. This post describes The Onion Router ("Tor" for short), which is the most popular of these anonymity networks. I'll explain how it works, how you can get started and why Tor can be an important tool—even if you don't live under censorship.
Before we dive in, a quick disclaimer: These anonymous networks—while useful—do not discriminate. They allow you to access anything people might put there—even the illegal and the immoral. I bring you this post on Tor with the hope that it might help you to achieve access to a more free web, and for those who might use the understanding they gain here for any malicious purpose, I can only refer you to this post on the Tor blog. My role is to educate, not to decide how you choose to make use of the tools at your disposal.
High-level Overview
Tor is a network of several thousand computers that bounce around people's traffic to hide its origin. If used properly, Tor allows you to anonymously browse the web and connect with others without being tracked or censored. The vast majority of times when Tor "fails" someone, it's because they didn't use it correctly or apply the necessary security measures for what they were trying to do.
Before using Tor, you should have a few things in mind:
- What is it you'd like to do that requires anonymity?
- What could the consequences be if you were ever discovered?
- Based on the above, what level of security do you require?
- What precautions do you need to take in order to achieve and maintain the required level of security?
There are various ways you can access the Tor network. All the information in this post should be viewed through the lens of your answers to the above questions—At the end of the day, you assume the risks and responsibilities associated with keeping yourself safe.
Basic Security Precautions
A very common misconception about Tor is that it somehow makes you completely anonymous no matter what you do online. This couldn't be further from the truth—If you tell a website your name and address, they will know your name and address. This might sound obvious, but many people seem to believe that Tor somehow makes them invincible and completely anonymous.
When you use Tor, you need to keep your personal information out of the equation. I'll be covering a lot in this post, but if you don't understand that disclosing any of your personal information will completely destroy the protection that Tor provides, everything you're about to learn will be completely useless.
In fact, the only thing Tor does is to provide a way for your traffic to get from point A to point B without revealing who sent the traffic—But it doesn't care what the actual traffic is and won't stop you from revealing your identity through what you send. This means you must never log into your personal email account—never log into your social media profiles—never visit your personal website or talk to your friends. One last time, do not let your real identity co-mingle with what you do on Tor. We'll talk more about this in the Alias Compartmentalization Techniques section later in this post.
Getting On Tor
Tor is available for most operating systems—you can even use Tor on your Android or iOS devices. Depending on your security needs, you should consider using Tails (covered briefly in my internet censorship post) for less evidence and better security.
There are people who will tell you that using Tor is completely safe on Windows, and there are people who will say emphatically that no one should ever use Tor Browser on anything but Tails. The truth is that what might be considered safe and secure for the casual user will be considered a grievous security breach by someone with higher security needs. Before deciding how you'll get online, consider how much security your situation requires—and how much convenience you'd be willing to sacrifice in order to get there. Once you decide on how much security is right for you, download the Tor browser or boot up your Tails and let's explore.
Ducks and Onions
Ducks? By default, Tor Browser uses the DuckDuckGo search engine instead of Google. This allows you to search with more anonymity. Opening Tor browser for the first time shouldn't feel too different from your typical Chrome setup, but it's actually based on code from Mozilla Firefox.
You can use the Tor browser like any other web browser. Visit websites, search the world's information or anything else you could think to do on the internet. You're free to explore, and as long as you take appropriate security measures, you won't be tracked.
In addition to normal websites with endings like .com and .net, you can also access .onion websites which are exclusive to the Tor network. These "onion sites" are anonymously-hosted services where you can exchange information and perform other tasks. I won't link to any onion sites here, but you can generally find what you're looking for just by searching.
So now you're on Tor—how does it work? Why is it anonymous? How can you be certain you aren't being tracked? In the next section I'll give you an overview of onion routing so you get a basic understanding of why this technology works. Then we'll explore how the onion routing model holds up against various types of attack.
Onion Routing 101
Like I said before, Tor gets your internet traffic (which consists of "packets") from point A to point B without revealing its true origin. Specifically, there are three things the Tor network tries to obscure about your traffic at various times as it passes through the network:
- Destination: Only the last server in the circuit (the "exit node") knows the true destination of the traffic.
- Content: Only the exit node can read the content of the packets.
- Source: Only the first server in the circuit (the "entry node") knows the true sender of the traffic.
The aforementioned "circuit" is just the path chosen by the sender for their packets. Only the sender knows the complete path. The term "onion routing" comes from the idea that traffic is encrypted and can only be accessed by one of the servers on the path at a time. Hence, the servers are "peeling back the layers of an onion" as they forward a given packet through the network. To illustrate how this process works, think about it like this:
Before your computer begins your Tor browsing session, it downloads a list with thousands of servers who have volunteered to help you forward traffic anonymously. No one tells your computer which of the servers it should use, so the computer picks the path randomly for each browsing session.
The first task is the circuit-building process which is done so that no one else knows where the traffic is coming from or where it's going. The system picks three random servers from the giant list and makes note of their addresses—We'll call the selected servers "A", "B" and "C."
The system wants the packets to go from itself to "A", then to "B", then to "C" and finally to the destination. In order to achieve this, it needs to wrap the destination packet in layers starting with the destination and working inwards toward the source.
With the path selected, your system takes your request for a Tor webpage and puts it onto a figurative postcard addressed to the destination website. Anyone can read the postcard and the content of the request might not be secure. However, the return address on your postcard isn't yours, it belongs to server "C." This means that even if someone on the internet were to see your request, they wouldn't know it came from you. Instead, they would think it came from server "C" which you chose earlier.
The second step is to take the postcard and put it into a figurative envelope addressed to "C." This is an encrypted envelope, meaning that while anyone can read the to- and from-address, no one can look inside except "C." Again, the return address is spoofed—This time, you use server "B" as the return address.
Next, you take your envelope addressed from "B" to "C" and put it into yet another encrypted envelope addressed from "A" to "B." For the final layer of protection, you wrap that envelope in another one addressed from your own address to the address of server "A." When you finally send your postcard, it just looks like you're talking with server "A," but let's think about what's going on under the hood:
Server "A" receives his envelope and opens it. Now he knows about you (the original sender) and he sees the address of server "B," but since the inner envelope is encrypted, server "A" won't be able to see inside—He can't learn about server "C" or where the traffic will ultimately end up. This means that server "A" can only forward the traffic onwards without knowing what's being sent. In other words, this hides the Destination and Content of the traffic from server "A", as described in bullet points 1 and 2 above.
When server "B" receives the message from server "A," it can open the envelope and discover the innermost envelope addressed to server "C." Server "B" doesn't know where the traffic originated (remember that the envelope only came from server "A" and not from the original sender), and since server "B" also can't read the traffic (remember that server "B" only has an envelope addressed to server "C" and can't look inside), his only option is to forward the envelope onwards to server "C."
Finally, server "C" gets the envelope from server "B." He can open the envelope and discover the postcard, but remember that it only came to him through server "B." He can't possibly learn who originally sent it. The request moves out of the onion network and any responses to the postcard are sent back to server "C." He will then forward the traffic to "B" who gives it to "A" who gives it back to the original sender.
To summarize, onion routing provides obscurity for the source, destination and contents of the traffic being sent over the network. As long as what you send does't reveal your identity and you trust the servers along your chosen path not to collude against you, you can be certain your traffic will remain anonymous. But that's a fairly high bar and many people have been unmasked by neglecting their security.
Alias Compartmentalization Techniques
While using Tor, you might come across the need to establish a persistent identity. This can be used for things like publishing a blog, communicating with others in a group or sharing information with journalists. In any case, you don't want this alias to be traceable back to your real identity. Otherwise what would be the point of using Tor? There wouldn't be one!
If I'm using Tails, I sometimes set up a persistent volume (protected by a secure, unguessable password) and use this to store my aliasing information. For each alias, I'll create a document where I can keep note of the various pieces of information specific to that alias. Depending on your security needs, you may require multiple aliases and each one might have its own Tails or Whonix setup.
For each alias, I'll generally write down a first name, last name, screen name, date of birth and create a ProtonMail account. In some cases, I'll write down a timezone different from my own and only come online during the appropriate times. You can go as far as you want (writing a backstory, using a different dialect such as UK english), but the most important part is to keep your own information completely isolated and out of the picture.
When you use Tor under one of your aliases, you should try to put yourself in the fictitious person's shoes as much as possible. How might they respond differently than you would in a discussion? The more completely you define your aliases and the more consistently you stick with their habits, the less likely you will be to disclose any of your own information inadvertently.
The Importance of Tor
A common response to Tor I've heard from people is "but why?" Why would anyone need a place where they can anonymously send traffic across the internet unless they were doing something criminal? These people claim that Tor has become filled with people offering illegal and immoral black market services and that no good can come from a place where no one uses their real identity.
Not everyone will agree with me here, but sometimes these types of systems are necessary and even beneficial for society as a whole. I'll be the first to say that there are bad things on Tor—Like the internet itself, it's a tool that can be used for nefarious purposes. But Tor does have some benefits that shouldn't be taken for granted either—Every day, people use the network to communicate with loved ones and access unbiased information under government censorship. You can't build a censorship-resistant network while censoring the criminals who decide to try and use it.
Anyone who is serious about using Tor and using it well knows why they are there—be it for good or for evil. Like free will itself, Tor empowers people with the ability to choose their own path. In today's world, bringing that choice into the digital landscape like everything else shouldn't surprise anyone. If it means anything to you, the US government also supports Tor and the project started out in the US navy. In a word, Tor is important because it empowers the individual and promotes freedom in the online world.