Skip to content

Transparent proxy through Tor for Kali Linux OS

License

Notifications You must be signed in to change notification settings

praveenkumar277/kalitorify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kalitorify

Transparent Proxy through Tor for Kali Linux

About kalitorify

kalitorify is a shell script for Kali Linux which use iptables settings to create a Transparent Proxy through the Tor Network, the program also allows you to perform various checks like checking the Tor Exit Node (i.e. your public IP address when you are under Tor proxy), or if Tor has been configured correctly checking service and network settings.

In simple terms, with kalitorify you can redirect all traffic of your Kali Linux operating system through the Tor Network.

This program was created for the Kali Linux operating system (Kali Linux rolling 2021.x) , don't run on other Linux distributions if you're not sure what you're doing.

About Tor

if you don't know the Tor Network and the Tor Project (but even if you know them), I suggest you read the information from here:

Tor Anonimity Network on Wikipedia

Tor Project Website

What is Transparent Proxy through Tor

Transparent proxy is an intermediary system that sit between a user and a content provider. When a user makes a request to a web server, the transparent proxy intercepts the request to perform various actions including caching, redirection and authentication.

alt text

Transparent proxy via Tor means that every network application will make its TCP connections through Tor; no application will be able to reveal your IP address by connecting directly.

For more information about the Transparent Proxy through Tor please read the Tor project wiki


Install

Download:

Download with git:

git clone https://github.com/brainfucksec/kalitorify

Download release (package of the latest git version)

Install dependencies:

sudo apt-get update && sudo apt-get dist-upgrade -y

sudo apt-get install -y tor curl

Install kalitorify:

cd kalitorify/

sudo make install

Reboot:

Services and programs that use kalitorify (such as iptables) work at the kernel level, at the end of the installation reboot the operating system to avoid conflicts.


Usage

Before starting kalitorify:

1 - Make sure you have read the Security section.

2 - Disable your firewall if is active.

3 - Make a backup of the iptables rules if they are present, see: iptables

Commands:

Start transparent proxy through Tor:

kalitorify --tor

Return to clearnet:

kalitorify --clearnet

Commands list:

-h, --help

show this help message and exit

-t, --tor

start transparent proxy through tor

-c, --clearnet

reset iptables and return to clearnet navigation

-s, --status

check status of program and services

-i, --ipinfo

show public IP address

-r, --restart

restart tor service and change IP address

Security

Please read this section carefully before starting kalitorify

kalitorify is produced independently from the Tor anonimity software and carries no guarantee from the Tor Project about quality, suitability or anything else, please read these documents to know how to use the Tor network safely:

Tor General FAQ

Whonix Do Not recommendations

kalitorify is a bash script to start a transparent proxy through Tor to be used for a safe navigation during communications, searches or other activities with Kali Linux, but does not guarantee 100% anonymity.

About Transparent Torification, please read Transparent Proxy Leaks (mostly Microsoft Windows related) and/or consider an Isolating Proxy as alternative. See Whonix for a complete, ready-made VM based solution (alternatively using multiple physical computers) built around the Isolating Proxy and Transparent Proxy Anonymizing Middlebox design.

Source: https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy#BriefNotes


Hostname and MAC Address security risks

Applications can still learn your computer's hostname, MAC address, serial number, timezone, etc. and those with root privileges can disable the firewall entirely. In other words, transparent torification with iptables protects against accidental connections and DNS leaks by misconfigured software, it is not sufficient to protect against malware or software with serious security vulnerabilities.

Source: https://wiki.archlinux.org/index.php/Tor

Before run kalitorify you should change at least the hostname and the MAC address:

Setting the Hostname on Debian

Changing MAC Address on Linux


Transparent Proxy with kalitorify and Tor Browser

Don't start Tor Browser when transparent browsing (kalitorify) is active, this to avoid Tor over Tor Scenarios.


Checking for leaks

After starting kalitorify you can use tcpdump to check if there are any internet activity other the Tor:

First, get your network interface:

ip -o addr

or

tcpdump -D

We'll assume its eth0.

Next you need to identify the Tor guard IP, you can use ss, netstat or GETINFO entry-guards through the tor controller to identify the guard IP.

Example with ss:

ss -ntp | grep "$(cat /var/run/tor/tor.pid)"

With the interface and guard IP at hand, we can now use tcpdump to check for possible non-tor leaks. Replace IP.TO.TOR.GUARD with the IP you got from the ss output.

tcpdump -n -f -p -i eth0 not arp and not host IP.TO.TOR.GUARD

You are not supposed to see any output other than the first two header lines. You can remove and not host IP to see how it would look like otherwise.

Source: https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxy#Checkingforleaks


Demo

asciicast

Warning: the example video might refer to an older version.


Credits


Donate

Support kalitorify by making a donation:

Bitcoin

.

1B39SnAXcR2bkxNpNy3AuckgaTshqNc2ce

Monero

.

42HrxGUKPzNNJKFguPfFhXQajwNDnhLbogy6EWexWw9Sh5pTumVk7dkcD2PB4MuFgD1m8rnaR3pr1g852BWUTpXaTo9rQyr

About

Transparent proxy through Tor for Kali Linux OS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 97.1%
  • Makefile 2.9%