Home » Installing Tor in Kali Linux

Installing Tor in Kali Linux

by p2.revelation
48 comments

Tor is free software and an open network that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security. Installing Tor in Kali Linux - blackMORE Ops - 2

This guide guides your through installing tor in Kali Linux.

Why anonymity matters?

Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location.

[Source: https://www.torproject.org/]

Installing Tor in Kali Linux:

Step 1: Getting tor service ready

There are 3 ways of installing Tor service in Kali Linux. You can install Tor by following any of these options:

Option #1: Install Tor from Kali Repository

Tor is available in Kali repository, to install it directly from the repository open your Terminal and type this:

apt-get install tor

If no error occurs, follow the second step.

Option #2: Install Tor from Debian Wheezy Repository

If you can’t install Tor using the first method then you may try this option. In this way we are going to add the official Tor repository according to our Debian distribution. Not to be confused, Kali is actually based on Debian and it uses the package management from “Wheezy”. So we are going to use “Wheezy” as our distribution.
Now open your terminal and follow these steps:

Step #1: Add repo to sources.list file

Lets add the distribution in the list by opening the sources.list file

leafpad /etc/apt/sources.list

Now add the following line at the bottom of the file,

deb http://deb.torproject.org/torproject.org wheezy main
Step #2: Add GPG Keys

Now we need to add the gpg key used to sign the packages by running the following commands:

gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
Step #3: Update package lists

Lets refresh our sources:

apt-get update
Step #4: Install singing keys

Now, before installing the Tor we must add the signing key,

apt-get install deb.torproject.org-keyring
Step #5: Install Tor from Debian repository

Finally,

apt-get install tor

Now Tor should be installed!
If no error occurs, follow the second step.

Option #3: Install Tor from development branch

If you are an advanced user and you want to install Tor using the development branch then this method is for you.

Step #1: Add Tor project repository to sources.list

You need to add a different set of lines to your /etc/apt/sources.list file:

deb http://deb.torproject.org/torproject.org wheezy main
deb http://deb.torproject.org/torproject.org tor-experimental-0.2.5.x- wheezy main
Step #2: Add GPG keys, keyring and install Tor

Then run the following commands at your command prompt:

gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -
apt-get update
apt-get install tor deb.torproject.org-keyring

Now Tor should be installed!
If no error occurs, follow the second step.
Note: This release will provide you more features but it contains bugs too.

Option #4: Build and Install Tor from sources

If you want to build your own debs from source you must first add an appropriate deb-src line to sources.list.

deb-src http://deb.torproject.org/torproject.org wheezy main
deb-src http://deb.torproject.org/torproject.org wheezy main
deb-src http://deb.torproject.org/torproject.org tor-experimental-0.2.5.x--wheezy main

You also need to install the necessary packages to build your own debs and the packages needed to build Tor:

apt-get install build-essential fakeroot devscripts
apt-get build-dep tor

Then you can build Tor in ~/debian-packages:

mkdir ~/debian-packages; cd ~/debian-packages
apt-get source tor
cd tor-*
debuild -rfakeroot -uc -us
cd ..

Now you can install the new package:

dpkg -i tor_*.deb

Step #2: Downloading and Running Tor bundle

Download the Tor Bundle from here,
https://www.torproject.org/projects/torbrowser.html.en
Download the architecture-appropriate file above, save it somewhere, then run one of the following two commands to extract the package archive:

tar -xvzf tor-browser-gnu-linux-i686-2.3.25-15-dev-LANG.tar.gz

or (for the 64-bit version):

tar -xvzf tor-browser-gnu-linux-x86_64-2.3.25-16-dev-LANG.tar.gz

(where LANG is the language listed in the filename).
Once that’s done, switch to the Tor browser directory by running:

cd tor-browser_LANG

(whereLANG is the language listed in the filename).
To run the Tor Browser Bundle, execute the start-tor-browser script:

./start-tor-browser

This will launch Vidalia and once that connects to Tor, it will launch Firefox.

Note: Do not unpack or run TBB as root. (though in Kali Linux, it doesn’t make any differences)

Conclusion

How secured is TOR? It’s only as secured as the upstream nodes are! VPN is always better solution and to be honest, VPN is faster than TOR. In case you’ve already tried TOR and it didn’t hold up to your requirements, you should try to setup VPN to bypass security or restrictions. torsocks is another alternative to using TOR and it’s somewhat faster as there’s less users on that at anytime.

Thanks for reading. Please share with friends.

You may also like

48 comments

sponky February 5, 2017 - 5:14 pm

try to use option 2, i get this when i reach the step to type “apt-get install tor”

The following packages have unmet dependencies:
tor : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
Recommends: tor-geoipdb but it is not going to be installed
Recommends: torsocks but it is not installable
E: Unable to correct problems, you have held broken packages.

Reply
Bl4ck0ut February 12, 2017 - 10:28 am

ok so im on kali 2.0 and this is what happens right after i type apt-get install TOR using the second install method. I am also new to kali but its a must have as is Tor.

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
tor : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
Recommends: tor-geoipdb but it is not going to be installed
Recommends: torsocks but it is not installable
E: Unable to correct problems, you have held broken packages.

Reply
standard June 4, 2017 - 6:00 am

is this you? fight for freedom? its standard here :D

Reply
0x4bdull4H March 6, 2017 - 2:35 am

Hi blackMORE Ops,

Great tuts, I found a problem where I can’t add the gpg key
#gpg –keyserver keys.gnupg.net –recv 886DDD89

Kali gives me this”
gpg: keyserver receive failed: No keyserver available

I tried this

#gpg –keyserver keys.gnupg.net –recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89

==> from torproject official page but it seems this also doesn’t work!! ==> it shows this:
gpg: keyserver receive failed: Server indicated a failure

what to do ?!!

Reply
美剧天堂网 April 26, 2017 - 12:55 pm

very good,is very cool

Reply
yusuf June 21, 2017 - 5:16 pm

When i say
tar -xvzf tar -xvzf tor-browser-gnu-linux-x86_64-2.3.25-16-dev-en-US.tar.gz

it says
tar: Multiple archive files require ‘-M’ option
Try ‘tar –help’ or ‘tar –usage’ for more information.

please help

Reply
AmmarFahmy December 25, 2017 - 4:10 am

Dear Sir,
I’ve tried these instructions all. but no response…
plzz help me sir

Reply
pyaesonezayyarmaungmaung March 14, 2018 - 12:47 pm

Very nice topic , thanks alot.regards.

Reply
Mike May 7, 2020 - 12:35 am

Tanks. all of way was good but i could just use of step#2 other was complex :D

Reply
Ayan March 16, 2021 - 7:47 am

root@kali:~/Desktop# tar -xvJf tor-browser-gnu-linux-x86_64-4.0.3_de.tar.xz
tar (child): tor-browser-gnu-linux-x86_64-4.0.3_de.tar.xz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

It is showing me this error, what should I do??

Reply
1 2

Leave your solution or comment to help others. Comment don't need registration or real email, so feel free.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About Us

blackMORE Ops - touch-icon-72x72

blackMORE Ops” does not promote, encourages and excite hackers, its purpose is to make people aware that what is going around. Know Hacking but No Hacking!

Feature Posts

Newsletter