Be Secure and Anonymous in Kali Linux by Using Tor, Proxy Servers, VPN and Encrypted Emails

Now these days, nearly everything we do on internet is tracked. Whoever is doing the tracking - it may be Google tracking our online searches, website visits, and email or it may be the National Security Agency (NSA) cataloging all our every online step is being recorded, indexed, and then mined for their benefit. The normal users and security experts everyone needs to understand how to limit this tracking and stay relatively anonymous on the internet and limit this ubiquitous surveillance.

be safe and anonymous in kali linux


In this detailed post we look how we can navigate the World Wide Web anonymously (or as close as we can get) and safely using four methods:
  1. The Onion Router
  2. Proxy servers
  3. Virtual Private Networks
  4. Private encrypted email
No one method is sure to keep our activities safe from prying eyes and given enough time and resources, anything can be tracked. However we can use all methods together, this will make the tracker's job almost impossible.

Let's start, finally we discuss at a high level some of the ways our activity on the internet are tracked. We won't go into all tracking methods, or into too much details about only one method, as that would be beyond the scope of this post. Indeed such a discussion could take up an entire book on it's own.

First, our IP address identifies us as we traverse the internet. Data send from our machine is generally tagged with our IP address, making our activities easy to track. Second, Google and other email services will read our email, looking for keywords to more efficiently serve the ads. Although there are many more sophisticated methods that are far more time and resource intensive, these are the ones we try to prevent in this post. Let's start by taking a look at how IP address give us away on the internet.

When we send a data packet across the internet, it contains the IP address of the source and destination for the data. In this way, the packet knows where it is going and where to return the response. Each packet hops through multiple internet routers until it finds its destination and then hops back to the sender. For general internet surfing each hop is a router the packets passes through to get to its destination, but usually any packet will find its way to the destination in fewer then 15 hops.

As the packet traverses the internet, anyone intercepting the packet can see who sent it, Where it has been, and it's going. This is one way websites can tell who we are when arrive and log us in automatically, and it's also how someone can track where we have been on the internet.

To see what hops a packet might make between we and our destination, we can see the traceroute command in our Kali Linux treminal as following:

traceroute google.com
The screenshot is following:


As we can see in the screenshot Google.com is 10 hops across the internet from us. Our results will likely be different because our request would be coming from a different location and because Google have many servers across the world. Packets do not always take the same route across the internet, so we might send another packet from our address to the same site and receive different route. Let's see how we can disguise all this with the Tor network.


1. Tor -- The Onion Router


 In the year 1990, the US office of Naval Research (ONR) set out to develop a method for anonymously navigating the internet for espionage purpose. The plan was to set up a network of routers that was separated from the internet routers, that could encrypt the traffic, and that only stored unencrypted IP address of our previous router.

That means all other routers address along the way were encrypted. The idea was that anyone watching the traffic could not determine the origin or destination of the data. This research become known as "The Onion Router (Tor) Project" In 2002, it is available for everyone to use  safe and anonymous navigation on the internet.

How Tor Works


Packets send over Tor are not sent over the regular routers so closely monitored by so many rather are sent over a network of over 7000+ routers around the world, special thanks to volunteers who allow their computers to be used by Tor. On top of using a totally separate router network, Tor encrypts the data, destination, and sender IP address of each packet. At each hop, the information is encrypted and then decrypted by the next hop when it is received. In this way, each packet contains information about only the previous hop along the path and not the IP address of the traffic. If someone intercepts the traffic, they can see only the IP address of previous hop, and the website owner can see only the IP address of the last router that send the traffic. In this way Tor ensure relative anonymity across the web.

how tor works
How Tor uses Encrypted traffic data


To enable the use of Tor we need to install Tor browser from https://www.torproject.org/download/ 

Download Tor
Download page of Tor
 We can download Tor as per our OS, in our case that is Kali Linux. So after download the file we right click and choose the "Extract Here" option.

Tor installing in Kali Linux

Then we double click to open the tor-browser folder. We can run Tor browser from here but in Kali Linux it's bit difficult to run Tor as root user. We do some configuration to run Tor in Kali Linux. We need to go a folder Browser and in this folder we will got a file called start-tor-browser.

start-tor-browser


we will open this file in text editor. Then we will search for root by using Ctrl+F key.

running tor as root

We added '#' in four lines here, see following screenshot:

run tor as root


Then we save this file now we can run Tor browser as root user. go back to to the main folder.

tor download folder


Now we open terminal here, and type following command

./start-tor-browser.desktop

connect to Tor

Now we can click on connect and after some seconds Tor will opens like following:

Tor Browser in Kali Linux
Tor Browser in Kali Linux
It looks like any old internet browser. By using this browser , we will be navigating the internet through a separate set of routers and will be able to visit without being tracked by anyone. Unfortunately, the trade off is that via the Tor browser can be bit slower, because there are not nearly as many routers, the bandwidth is limited in Tor network.

In addition, to being capable of accessing nearly any website on the traditional internet, the Tor browser is capable of accessing the dark web. The websites that make up the dark web requires anonymity, for this reason they allow access only through the Tor browser, and dark websites have address ending with .onion for their top level domain (TLD). The dark web is infamous for illegal activity, but some numbers of legitimate services are also available in dark web. Some words for caution, however when accessing the dark web, we may come across material that many will find offensive. Have a look how we can host our own .onion dark web for free by clicking here.

Security Concerns


The intelligence and spy services of the United States and other nations consider the Tor network as a threat to national security, believing such an anonymous network enables foreign governments and terrorists to communicate without being watched. As a result, some robust, ambitious research projects are working to break the anonymity of Tor.

Tor's anonymity has been broken before before by these authorities and will likely broke again. The NSA, as one instance , runs it's own Tor routers, means that our traffic may be traversing the NSA's routers when we use Tor. If our traffic is exiting the NSA's routers, that is even worse, because the exit router always knows our destination, but this will be very hard to trace us. The NSA also has a method known as traffic correlation, which involves looking for patterns in incoming and outgoing traffic, that has been able to break Tor's anonymity. Though these attempts to break Tor won't affect Tor's effectiveness at obscuring our identity for commercial services, such as Google, they may limit the browser's effectiveness in keeping us anonymous from spy agencies.

2. Proxy Servers


Another strategy for achieving anonymity on the web is to use proxies, which are intermediate systems that user connects to a proxy, and the traffic is given the IP address of the proxy before it's passed on. We can see the following picture.

Running traffic on a Proxy Server
Running traffic on a Proxy Server


When the traffic returns from the destinations the proxy sends the traffic back to the source. In this way, traffic appears to come from the proxy and not our IP address.

Obviously, the proxy servers likely log our traffic, but an investigator would have to get a subpoena or search warrant to obtain our logs. To make our traffic even harder to trace, we can use more then one proxy, this strategy known as proxy chain. Kali Linux has an beautiful proxying tool called proxyxchains that can set up to obscure our traffic. To know how to configure proxychains read our this tutorial.

Security Concerns


A note on proxy security, be sure to choose your proxies wisely. Proxychains is only as good as the proxies we use. If we are intent on remaining anonymous, we should not use free proxies. Experts use paid proxies that can be trusted. In fact the free proxies are likely selling our IP address and browsing history. Bruce Schneier a famous security expert said "If something is free, you're no the customer; you are the product." In other words any free product likely gathering our data and selling it. Why else would they offer a proxy for free ?

Although, the IP address of our traffic leaving the proxy will be anonymous, there are other ways for surveillance agencies to identify us. For instance the owner or law enforcement agencies with jurisdiction, may offer up our identity to protect their business. It's important to be aware of the limitations of proxies as a source of anonymity.


3. Virtual Private Networks (VPN)


Using a virtual private network (VPN) can be effective way to keep our web traffic relatively anonymous and secure. A VPN is used to connect to an intermediary internet device such as a router that sends our traffic to it's ultimate destination tagged with the IP address of the router.

Using a VPN can certainly enhance our security and privacy, but it is not guarantee of anonymity. The internet device we connect to must record our IP address can uncover information about us.

The beauty of VPN is that they are simple and easy to work with. We can open an account with a VPN provider and then seamlessly connect to the VPN each time we log on to our computer. We can use our browser as usual to navigate the web, but it will appear to anyone watching that our traffic is coming from the IP address and location of the internet VPN device, not our own. In addition, all traffic between us and the VPN devices is encrypted, so even our internet provider can't see our traffic. Among other things, a VPN can be effective in evading government controlled content and information censors. For instance, if our national government limits our access to websites with a particular political message, we can likely use a VPN based outside our country in order to access that content. Some media corporations like NetFlix, Hulu and HBO limit access to their content to IP address originating from their own country. Using a VPN based in a nation that those services allow can often get us  around to CNET are following:
Most of these VPN services charge $50 - $100 per year, and many offers a free 30 day trail. To find out more about how to set up a VPN, choose one from the list and visit the website. We should find download, installation and uses instructions that are quite easy to follow.

The strength of a VPN is that all our traffic is encrypted when it leaves our PC/mobile, thus protecting us against snooping, and our IP address is cloaked by the VPN IP address when we visit a site. As with a proxy server, the admin of the VPN has our originating IP address (otherwise they couldn't send our traffic back to us). If they are pressured by espionage agencies or law enforcement, they might give up our identity. One way to prevent that is to use only VPN's that promised not to store or log any of this information (and we hope they are being truthful). In this way, if someone request that the VPN service provider to check their data of users, there is no data.

4. Encrypted E-mail


Free commercial email services like Gmail, Yahoo!, Outlook, Hotmail are free for a reason. They are vehicles for tracking our interests and serving their ads. As Mentioned earlier, if a service is free then we are the product, not the customer. In addition, the servers of the email provider have access to the unencrypted content of our emails, even if we're using HTTPS.

One way to prevent eavesdropping on our email is to use encrypted email.

ProtonMail, encrypts our email from end to end or browser to browser. This means that our email is encrypted on ProtonMail servers. Even the ProtonMail owners can't read our emails.

Protonmail kali linux encrypted mails
ProtonMail Homepage


ProtonMail was founded by a group of young scientists at the CERN super collider facility in Switzerland. The Swiss have a big and storied history of protecting secrets (remember the Swiss bank accounts), and ProtonMail's servers are based in the European Union, which has much stricter laws regarding the sharing of personal data then does the US. ProtonMail does not charge for a basic account but offers premium accounts for a nominal price. It is important for some or all of the email not to be encrypted. Check the ProtonMail support knowledge base for full details.

Conclusion


We are constantly being surveilled by commercial firms and national intelligence agencies. To keep our data and web travels secure, we need to implement at least one of the security measures discussed in this post.
By applying them in combination we can minimize our footprint on the web and keep our data much more secure. That's all. Be secure and help friends to be secure by shearing this on social media.
Be Secure and Anonymous in Kali Linux by Using Tor, Proxy Servers, VPN and Encrypted Emails Be Secure and Anonymous in Kali Linux by Using Tor, Proxy Servers, VPN and Encrypted Emails Reviewed by Kali Linux on August 31, 2019 Rating: 5

No comments:

Powered by Blogger.