<<

Onion Routing using Kali

SURFING, HOSTING, TESTING HIDDEN SERVICES

“The Tor network is a group of volunteer-operated servers that allows people to improve their privacy and security on the Internet. Tor's users employ this network by connecting through a series of virtual tunnels rather than making a direct connection, thus allowing both organizations and individuals to share information over public networks without compromising their privacy. Along the same line, Tor is an effective censorship circumvention tool, allowing its users to reach otherwise blocked destinations or content. Tor can also be used as a building block for software developers to create new communication tools with built-in privacy features.” - torproject.orgs. There has been talk about the Tor network no longer being safe to use. A network is only as safe as the users on the network. The more people use Tor and host relays, the it is. The more proxies available on any network makes it harder to track back the origin of traffic. There are many benefits of the Tor network that transcend the anonymous factor. Having a .onion address is similar to having a static IP address that dynamically follows you around wherever you are. There are many residual bonuses that are derived from this vast and free resource.

The Tor Onion network is easier to connect to than most people realize. In these labs, we are going to use Kali Linux to install the Tor service and use the torsocks proxy to connect through Tor to the Internet, access .onion addresses, and even create your own Hidden Service.

Requirements: Kali Linux An Internet connection

Lab Time: Connection to the Tor Network

Enter the command line (left click on the icon.)

Install tor through apt-get: Press the “Enter” .

If the install prompts you to continue, type “Y” and “Enter”:

Make sure you are connected to the Internet.

In the command line, type service tor start + “Enter”.

www.informationwarfarecenter.com

Wait 60 seconds…

In the command line, type torsocks iceweasel whatismyipaddress.com + “Enter”.

You should soon see the Iceweasel browser open to look similar to this:

(If you are not connected to the tor network, type in “service tor restart” and wait a minute before trying again)

After you validate your connection to the Tor network, either go to the address bar and type in startpage.com or close the Iceweasel browser and go back into the command line and type in torsocks iceweasel startpage + “Enter”.

You should see something similar to this:

Once the StartPage search engine pops up, search for “Hidden Wiki”. There are several options during this search. This example just shows that you can now access domains that end in the “.onion” extension. Highlight the .onion address and paste into the address bar.

www.informationwarfarecenter.com

At the time of this lab, the website highlighted went to the hidden service for AHMIA.FI, a great indexing website for the .onion websites.

When using ahmia.fi, search for the term “wiki” and left click the search button.

www.informationwarfarecenter.com

You now have access to .onion servers that are currently connected to Tor.

www.informationwarfarecenter.com Tor Hidden Services using Kali

“Tor makes it possible for users to hide their locations while offering various kinds of services, such as web publishing or an server. Using Tor "rendezvous points," other Tor users can connect to these hidden services, each without knowing the other's network identity.” - torproject.orgs

A Tor Hidden Service can be used for more than just a "rendezvous points.” Some people use the .onion address as an easy and free traveling static address. Instead of investing in a static IP address which can be costly or using a dynamic DNS service, Tor offers the ability to broadcast your identity while keeping a layer of security and anonymity.

Lab Time: Creating a Hidden Service

Enter the command line (left click on the icon.)

Assuming you have the Apache web server installed, type service apache2 start + “Enter”.:

Type leafpad /etc/tor/torrc + “Enter”.

Locate the Hidden Service section and add the following section:

You can set up a number of basic services in this section

Write down the folder your addess for the HiddenServiceDir: /var/lib/tor/web/

Save and exit leafpad.

www.informationwarfarecenter.com

Type service tor restart + “Enter”. (This generates a unique .onion address)

Type cd /var/lib/tor/web/ + “Enter”.

Type ls + “Enter”.

Type: cat hostname + “Enter”.

(Your hostname will be different. It is unique to your server)

Type: torsocks iceweasel your-unique-address.onion + “Enter”.

If all goes well, you should see something that looks like this:

You now have an active Tor Hidden Service .onion server.

www.informationwarfarecenter.com Tor as an Attack Proxy using Kali

Since the Tor network is a large group of proxy servers, you can use it for many purposes. In this lab we are going to use it to hide the source of a target reconnaissance.

Lab Time: Creating a Hidden Service

Enter the command line (left click on the icon.)

Make sure you are connected to the Internet.

In the command line, type service tor start + “Enter”.

Wait 60 seconds…

Use nmap to map the available TCP ports on the target system. In the command line, type torsocks nmap -Pn -sT -p 80,443,53,21,23 target + “Enter”.

You can also validate specific ports using the program netcat by typing: torsocks nc -w 2 -z target 80 –v + “Enter”.

www.informationwarfarecenter.com