Tor is free software for enabling anonymous communication. The name is an acronym derived from the original software project name The Onion Router.[6] Tor directs Internet traffic through a free, worldwide, volunteer network consisting of more than six thousand relays[7] to conceal a user's location and usage from anyone conducting network surveillance or traffic analysis. Using Tor makes it more difficult for Internet activity to be traced back to the user: this includes "visits to Web sites, online posts, instant messages, and other communication forms".[8] Tor's use is intended to protect the personal privacy of users, as well as their freedom and ability to conduct confidential communication by keeping their Internet activities from being monitored. An extract of a Top Secret appraisal by the National Security Agency (NSA) characterized Tor as "the King of high-secure, low-latency Internet anonymity" with "no contenders for the throne in waiting",[9] and the Parliamentary Office of Science and Technology deemed it, with approximately 2.5 million users daily "by far the most popular anonymous internet communication system." [10] Furthermore, a July 2015 NATO analysis opines that "the use of anonymisation technologies such as Tor will continue to thrive. Despite the attention that Tor has received worldwide, the technical and legal questions surrounding it remain relatively unexplored." [11]

Onion routing is implemented by encryption in the application layer of a communication protocol stack, nested like the layers of an onion. Tor encrypts the data, including the destination IP address, multiple times and sends it through a virtual circuit comprising successive, randomly selected Tor relays. Each relay decrypts a layer of encryption to reveal only the next relay in the circuit in order to pass the remaining encrypted data on to it. The final relay decrypts the innermost layer of encryption and sends the original data to its destination without revealing, or even knowing, the source IP address. Because the routing of the communication is partly concealed at every hop in the Tor circuit, this method eliminates any single point at which the communicating peers can be determined through network surveillance that relies upon knowing its source and destination.

An adversary unable to defeat the strong anonymity that Tor provides may try to de-anonymize the communication by other means. One way this may be achieved is by exploiting vulnerable software on the user's computer.[12] The NSA has a technique that targets outdated Firefox browsers codenamed EgotisticalGiraffe,[13] and targets Tor users in general for close monitoring under its XKeyscore program.[14][15] Attacks against Tor are an active area of academic research,[16][17] which is welcomed by the Tor Project itself.[18]

The alpha version of Tor, developed by Syverson and computer scientists Roger Dingledine and Nick Mathewson[22] and then called The Onion Routing project, or TOR project, launched on 20 September 2002.[1][23] On 13 August 2004, Syverson, Dingledine and Mathewson presented "Tor: The Second-Generation Onion Router" at the 13th USENIX Security Symposium.[24] In 2004, the Naval Research Laboratory released the code for Tor under a free licence, and the Electronic Frontier Foundation (EFF) began funding Dingledine and Mathewson to continue its development.[22]

Tor has been praised for providing privacy and anonymity to vulnerable Internet users such as political activists fearing surveillance and arrest, ordinary web users seeking to circumvent censorship, and women who have been threatened with violence or abuse by stalkers.[31][32] The U.S. National Security Agency (NSA) has called Tor "the king of high-secure, low-latency Internet anonymity",[12] and BusinessWeek magazine has described it as "perhaps the most effective means of defeating the online surveillance efforts of intelligence agencies around the world".[33] Other media have described Tor as "a sophisticated privacy tool",[34] "easy to use"[35] and "so secure that even the world's most sophisticated electronic spies haven't figured out how to crack it".[36]

In March 2011, The Tor Project received the Free Software Foundation's 2010 Award for Projects of Social Benefit. The citation read, "Using free software, Tor has enabled roughly 36 million people around the world to experience freedom of access and expression on the Internet while keeping them in control of their privacy and anonymity. Its network has proved pivotal in dissident movements in both Iran and more recently Egypt."[37]

In 2013, Jacob Appelbaum described Tor as a "part of an ecosystem of software that helps people regain and reclaim their autonomy. It helps to enable people to have agency of all kinds; it helps others to help each other and it helps you to help yourself. It runs, it is open and it is supported by a large community spread across all walks of life."[39]

In 2014, the Russian government offered a $111,000 contract to "study the possibility of obtaining technical information about users and users' equipment on the Tor anonymous network".[41][42]

Advocates for Tor say it supports freedom of expression, including in countries where the Internet is censored, by protecting the privacy and anonymity of users. The mathematical underpinnings of Tor lead it to be characterized as acting "like a piece of infrastructure, and governments naturally fall into paying for infrastructure they want to use".[43]

Critics say Tor is not as secure as it claims,[47] pointing to U.S. law enforcement's investigations and shutdowns of Tor-using sites such as web-hosting company Freedom Hosting and online marketplace Silk Road.[22] In October 2013, after analyzing documents leaked by Edward Snowden, the Guardian reported that the NSA had repeatedly tried to crack Tor and had failed to break its core security, although it had had some success attacking the computers of individual Tor users.[12] The Guardian also published a 2012 NSA classified slide deck, entitled "Tor Stinks", which said: "We will never be able to de-anonymize all Tor users all the time", but "with manual analysis we can de-anonymize a very small fraction of Tor users".[48] When Tor users are arrested, it is typically due to human error, not to the core technology being hacked or cracked.[49] On 7 November 2014, for example, a joint operation by the FBI, ICE Homeland Security investigations and European Law enforcement agencies led to 17 arrests and the seizure of 27 sites containing 400 pages.[50] A late 2014 report by Der Spiegel using a new cache of Edward Snowden leaks revealed, however, that as of 2012 the NSA deemed Tor on its own as a "major threat" to its mission, and when used in conjunction with other privacy tools such as OTR, Cspace, ZRTP, RedPhone, Tails, and TrueCrypt was ranked as "catastrophic," leading to a "near-total loss/lack of insight to target communications, presence..."[51][52]

In October 2014 The Tor Project hired the public relations firm Thomson Communications in order to improve its public image (particularly regarding the terms "Dark Net" and "hidden services," which are widely viewed as being problematic) and to educate journalists about the technical aspects of Tor.[53]

Tor enables users to surf the Internet, chat and send instant messages anonymously, and is used by a wide variety of people for both licit and illicit purposes.[58] Tor has for example been used by criminal enterprises, hacktivism groups, and law enforcement agencies at cross purposes, sometimes simultaneously;[59][60] likewise, agencies within the U.S. government variously fund Tor (the U.S. State Department), the National Science Foundation, and (through the Broadcasting Board of Governors, which itself partially funded Tor until October 2012), Radio Free Asia, and seek to subvert it.[12][61]

Tor is not meant to completely solve the issue of anonymity on the web. Instead, it simply focuses on protecting the transportation of data so that certain sites cannot trace back the data to a given location. It is still possible for sites to backtrack to a location. The best way to avoid the dissemination of information is to be safe and smart about what you post. Tor is not designed to erase a users tracks but to simply make it less likely for sites to trace back to them.[62]

Tor is also used for illegal activities, e.g., to gain access to censored information, to organize political activities,[63] or to circumvent laws against criticism of heads of state.

In its complaint against Ross William Ulbricht of the Silk Road the FBI acknowledged that Tor has "known legitimate uses".[76][77] According to CNET, Tor's anonymity function is "endorsed by the Electronic Frontier Foundation and other civil liberties groups as a method for whistleblowers and human rights workers to communicate with journalists".[78] EFF's Surveillance Self-Defense guide includes a description of where Tor fits in a larger strategy for protecting privacy and anonymity.[79]

In 2014, the EFF's Eva Galperin told BusinessWeek magazine that "Tor’s biggest problem is press. No one hears about that time someone wasn't stalked by their abuser. They hear how somebody got away with downloading child porn."[36]

The Tor Project states that Tor users include "normal people" who wish to keep their Internet activities private from websites and advertisers, people concerned about cyber-spying, users who are evading censorship such as activists and journalists, and military professionals. As of November 2013, Tor had about four million users.[80] According to the Wall Street Journal, in 2012 about 14% of Tor's traffic connected from the United States, with people in "Internet-censoring countries" as its second-largest user base.[81] Tor is increasingly used by victims of domestic violence and the social workers and agencies that assist them. It has also been used to prevent digital stalking, which has increased due to the prevalence of digital media in contemporary online life.[82] Along with SecureDrop, Tor is used by news organizations such as the Guardian, the The New Yorker, ProPublica and The Intercept to protect the privacy of whistleblowers.[83]

In March 2015 the Parliamentary Office of Science and Technology released a briefing which stated that "There is widespread agreement that banning online anonymity systems altogether is not seen as an acceptable policy option in the U.K." and that ""Even if it were, there would be technical challenges." The report further noted that Tor "plays only a minor role in the online viewing and distribution of indecent images of children" (due in part to its inherent latency); its usage by the Internet Watch Foundation, the utility of its hidden services for whistleblowers, and its circumvention of the Great Firewall of China were touted.[10]

Tor's executive director, Andrew Lewman, also said in August 2014 that agents of the NSA and the GCHQ have anonymously provided Tor with bug reports.[84]

Criminals can already do bad things. Since they're willing to break laws, they already have lots of options available that provide better privacy than Tor provides....

Tor aims to provide protection for ordinary people who want to follow the law. Only criminals have privacy right now, and we need to fix that....

So yes, criminals could in theory use Tor, but they already have better options, and it seems unlikely that taking Tor away from the world will stop them from doing their bad things. At the same time, Tor and other privacy measures can fight identity theft, physical crimes like stalking, and so on.[85]

Tor aims to conceal its users' identities and their online activity from surveillance and traffic analysis by separating identification and routing. It is an implementation of onion routing, which encrypts and then randomly bounces communications through a network of relays run by volunteers around the globe. These onion routers employ encryption in a multi-layered manner (hence the onion metaphor) to ensure perfect forward secrecy between relays, thereby providing users with anonymity in network location. That anonymity extends to the hosting of censorship-resistant content by Tor's anonymous hidden service feature.[24] Furthermore, by keeping some of the entry relays (bridge relays) secret, users can evade Internet censorship that relies upon blocking public Tor relays.[86]

Because the IP address of the sender and the recipient are not both in cleartext at any hop along the way, anyone eavesdropping at any point along the communication channel cannot directly identify both ends. Furthermore, to the recipient it appears that the last Tor node (called the exit node), rather than the sender, is the originator of the communication.

A Tor user's SOCKS-aware applications can be configured to direct their network traffic through a Tor instance's SOCKS interface. Tor periodically creates virtual circuits through the Tor network through which it can multiplex and onion-route that traffic to its destination. Once inside a Tor network, the traffic is sent from router to router along the circuit, ultimately reaching an exit node at which point the cleartext packet is available and is forwarded on to its original destination. Viewed from the destination, the traffic appears to originate at the Tor exit node.

Tor can also provide anonymity to websites and other servers. Servers configured to receive inbound connections only through Tor are called hidden services. Rather than revealing a server's IP address (and thus its network location), a hidden service is accessed through its onion address. The Tor network understands these addresses and can route data to and from hidden services, even those hosted behind firewalls or network address translators (NAT), while preserving the anonymity of both parties. Tor is necessary to access hidden services.[87]

Hidden services have been deployed on the Tor network since 2004.[88] Other than the database that stores the hidden-service descriptors,[89] Tor is decentralized by design; there is no direct readable list of all hidden services, although a number of hidden services catalog publicly known onion addresses.

Because hidden services do not use exit nodes, connection to a hidden service is encrypted end-to-end and not subject to eavesdropping. There are, however, security issues involving Tor hidden services. For example, services that are reachable through Tor hidden services and the public Internet are susceptible to correlation attacks and thus not perfectly hidden. Other pitfalls include misconfigured services (e.g. identifying information included by default in web server error responses), uptime and downtime statistics, intersection attacks, and user error.[89][90]

Hidden services could be also accessed from a standard web browser without client-side connection to the Tor network, using services like Tor2web.[91]

Like all current low-latencyanonymity networks, Tor cannot and does not attempt to protect against monitoring of traffic at the boundaries of the Tor network (i.e., the traffic entering and exiting the network). While Tor does provide protection against traffic analysis, it cannot prevent traffic confirmation (also called end-to-end correlation).[98][99]

In spite of known weaknesses and attacks listed here, Tor and the alternative network system JonDonym (Java Anon Proxy, JAP) are considered more resilient than alternatives such as VPNs. Were a local observer on an ISP or WLAN to attempt to analyze the size and timing of the encrypted data stream going through the VPN, Tor, or JonDo system, the latter two would be harder to analyze, as demonstrated by a 2009 study.[100]

Researchers from the University of Michigan developed a network scanner allowing identification of 86% of live Tor "bridges" with a single scan.[101]

If an autonomous system (AS) exists on both path segments from a client to entry relay and from exit relay to destination, such an AS can statistically correlate trafﬁc on the entry and exit segments of the path and potentially infer the destination with which the client communicated. In 2012, LASTor proposed a method to predict a set of potential ASes on these two segments and then avoid choosing this path during path selection algorithm on client side. In this paper, they also improve latency by choosing shorter geographical paths between client and destination.[102]

In September 2007, Dan Egerstad, a Swedish security consultant, revealed that he had intercepted usernames and passwords for e-mail accounts by operating and monitoring Tor exit nodes.[103] As Tor cannot encrypt the traffic between an exit node and the target server, any exit node is in a position to capture traffic passing through it that does not use end-to-end encryption such as Secure Sockets Layer (SSL) or Transport Layer Security (TLS). While this may not inherently breach the anonymity of the source, traffic intercepted in this way by self-selected third parties can expose information about the source in either or both of payload and protocol data.[104] Furthermore, Egerstad is circumspect about the possible subversion of Tor by intelligence agencies:[105]

If you actually look in to where these Tor nodes are hosted and how big they are, some of these nodes cost thousands of dollars each month just to host because they're using lots of bandwidth, they're heavy-duty servers and so on. Who would pay for this and be anonymous?

In October 2011, a research team from ESIEA claimed to have discovered a way to compromise the Tor network by decrypting communication passing over it.[106][107] The technique they describe requires creating a map of Tor network nodes, controlling one third of them, and then acquiring their encryption keys and algorithm seeds. Then, using these known keys and seeds, they claim the ability to decrypt two encryption layers out of three. They claim to break the third key by a statistical-based attack. In order to redirect Tor traffic to the nodes they controlled, they used a denial-of-service attack. A response to this claim has been published on the official Tor Blog stating that these rumours of Tor's compromise are greatly exaggerated.[108]

Steven J. Murdoch and George Danezis from University of Cambridge presented an article at the 2005 IEEESymposium on security and privacy on traffic-analysis techniques that allow adversaries with only a partial view of the network to infer which nodes are being used to relay the anonymous streams.[109] These techniques greatly reduce the anonymity provided by Tor. Murdoch and Danezis have also shown that otherwise unrelated streams can be linked back to the same initiator. This attack, however, fails to reveal the identity of the original user.[109] Murdoch has been working with and has been funded by Tor since 2006.

Operators of Internet sites have the ability to prevent traffic from Tor exit nodes or to offer reduced functionality to Tor users. For example, it is not generally possible to edit Wikipedia when using Tor or when using an IP address that also is used by a Tor exit node, due to the use of the TorBlock MediaWiki extension, unless an exemption is obtained. The BBC blocks the IP addresses of all known Tor relays from its iPlayer service—including guards, relays, and exit nodes—regardless of geographic location. Bridge relays are not affected.

In March 2011, researchers with the Rocquencourt, France-based National Institute for Research in Computer Science and Control (Institut national de recherche en informatique et en automatique, INRIA), documented an attack that is capable of revealing the IP addresses of BitTorrent users on the Tor network. The "bad apple attack" exploits Tor's design and takes advantage of insecure application use to associate the simultaneous use of a secure application with the IP address of the Tor user in question. One method of attack depends on control of an exit node or hijacking tracker responses, while a secondary attack method is based in part on the statistical exploitation of distributed hash table tracking.[110] According to the study:[110]

This attack against Tor consists of two parts: (a) exploiting an insecure application to reveal the source IP address of, or trace, a Tor user and (b) exploiting Tor to associate the use of a secure application with the IP address of a user (revealed by the insecure application). As it is not a goal of Tor to protect against application-level attacks, Tor cannot be held responsible for the first part of this attack. However, because Tor's design makes it possible to associate streams originating from secure application with traced users, the second part of this attack is indeed an attack against Tor. We call the second part of this attack the bad apple attack. (The name of this attack refers to the saying "one bad apple spoils the bunch". We use this wording to illustrate that one insecure application on Tor may allow to trace other applications.)

The results presented in the bad apple attack research paper are based on an attack in the wild launched against the Tor network by the authors of the study. The attack targeted six exit nodes, lasted for 23 days, and revealed a total of 10,000 IP addresses of active Tor users. This study is particularly significant because it is the first documented attack designed to target P2P file-sharing applications on Tor.[110] BitTorrent may generate as much as 40% of all traffic on Tor.[111] Furthermore, the bad apple attack is effective against insecure use of any application over Tor, not just BitTorrent.[110]

Due to lack of encryption or authentication in communication between tracker and peer, typical man-in-the-middle attacks allow attackers to determine peer IP addresses and even verify the distribution of content. Such attacks work when Tor is used only for tracker communication.[112]:4

Exploiting distributed hash tables (DHT)

This attack exploits the fact that distributed hash table (DHT) connections through Tor are impossible, so an attacker is able to reveal a target's IP address by looking it up in the DHT even if the target uses Tor to connect to other peers.[112]:4–5

With this technique, researchers were able to identify other streams initiated by users, whose IP addresses were revealed.[112]

Jensen et al., describe a DDoS attack targeted at the TOR node software, as well as defenses against that attack and its variants. The attack works using a colluding client and server, and filling the queues of the exit node until the node runs out of memory, and hence can serve no other (genuine) clients. By attacking a significant proportion of the exit nodes this way, an attacker can degrade the network and increase the chance of targets using nodes controlled by the attacker.[113]

The HeartbleedOpenSSLbug disrupted the Tor network for several days in April 2014 while private keys were renewed. The Tor Project recommended that Tor relay operators and hidden service operators revoke and generate fresh keys after patching OpenSSL, but noted that Tor relays use two sets of keys and that Tor's multi-hop design minimizes the impact of exploiting a single relay.[114] 586 relays later found to be susceptible to the Heartbleed bug were taken off-line as a precautionary measure.[115][116][117][118]

Tor Browser, previously known as Tor Browser Bundle (TBB), is the flagship product of the Tor Project. It consists of a modified Mozilla Firefox ESR web browser, the TorButton, TorLauncher, NoScript and HTTPS Everywhere Firefox extensions and the Tor proxy.[121][122] It can be run from removable media and is available for Windows, Mac OS X, and Linux.[123]

The Tor Browser automatically starts Tor background processes and routes traffic through the Tor network. Upon termination of a session the browser deletes privacy-sensitive data such as HTTP cookie and the browsing history.[122]

In August 2013, it was discovered that the Firefox browsers in many older versions of the Tor Browser Bundle were vulnerable to a JavaScript attack, as NoScript was not enabled by default.[125] This attack was being exploited to send users' MAC and IP addresses and Windows computer names to the attackers.[126][127][128] News reports linked this to a United States Federal Bureau of Investigation (FBI) operation targeting Freedom Hosting's owner, Eric Eoin Marques, who was arrested on a provisional extradition warrant issued by a United States court on 29 July. The FBI is seeking to extradite Marques out of Ireland to Maryland on four charges — distributing, conspiring to distribute, and advertising child pornography — as well as aiding and abetting advertising of child pornography. The warrant alleges that Marques is "the largest facilitator of child porn on the planet".[129][130] The FBI acknowledged the attack in a 12 September 2013 court filing in Dublin;[131] further technical details from a training presentation leaked by Edward Snowden showed that the codename for the exploit was EgotisticalGiraffe.[132]

The FBI, in Operation Torpedo, has been targeting Tor hidden servers since 2012, such as in the case of Aaron McGrath, who was sentenced to 20 years for running three hidden Tor servers containing child pornography.[133]