Torctl

Full System Anonymization

Privacy and security in the digital age is becoming more complex every day. Corporations, governments, and threat actors are constantly finding new ways to track users. Thankfully, we have tools that can help combat this. A determined enough user can hide themselves from even a well funded threat like governments.

The Tor network is a commonly used tool to hide a user's activities and IP. It works well, is a reasonable speed, and is stupidly easy to get working. It also is able to evade censorship and firewalls. However, it does have a few issues. The most common problem is programs that refuse to route through Tor.

Torsocks solves this problem for some apps, however it doesn't work with everything. I've specifically had trouble getting nmap, discord, and spotify to work using it.


Nmap and Torsocks

The Solution

So how does one solve this problem? I've found the Torctl works best. It was developed for BlackArch but also works on debian and ubuntu distros.


Torctl

The program routes all network traffic through the Tor network. It doesn't matter if it's HTTP, FTP, SMTP, IMAP, or any other protocol, It'll get routed through Tor. The command format is extremely simple too, making it so even new linux users can quickly learn and memorize it's usage. Installation can be a little complicated though so I'll try my best to explain it.

Torctl

Installation

BlackArch

Torctl is built for BlackArch so it's no surprise it has the easiest installation. Just run
sudo pacman -S torctl
in your terminal.

Debian and Ubuntu

The first thing we need to do is install the program's dependancies. It needs Tor, MacChanger, and Secure Delete. You'll also need git for the installation process. You can install them by running
sudo apt install git tor macchanger secure-delete
in your terminal.

Next, you need to clone the git repository and enter it.
git clone https://github.com/BlackArch/torctl && cd torctl

Now you need to move the service folder and the Torctl program to the proper directories. Run the two following commands.
sudo mv service/* /etc/systemd/system/
sudo mv bash-completion/torctl /usr/share/bash-completion/completions/torctl

Now you should finish configuring torctl
sed -i 's/start_service iptables//' torctl
sed -i 's/TOR_UID="tor"/TOR_UID="debian-tor"/' torctl

Lastly, we need to move Torctl into the binaries folder
sudo mv torctl /usr/local/bin/torctl

Congratulations, you've sucessfully installed Torctl.

Usage

Torctl is so simple, you'll probably be able to figure out how it works by just reading the help page.
torctl --help


Torctl help page

To start Torctl and route your connection through Tor, use this command
sudo torctl start

You can also stop the program and route your connection through the clearnet
sudo torctl stop

Sometimes, you'll need a new Tor circut
sudo torctl chngid

There are other commands and I suggest looking through them just to get a better understanding of the program as a whole.


Torctl is a great tool for keeping your data private, hopefully you've learned how to install and use it. If you have any questions, feel free to contact me. I'm happy to help.