Tor

Hidden chat with Whonix and socat

Back in 2013 I wrote about using socat with Tor to setup a Hidden Service chat. It was pretty simple to setup and I wanted to see how much harder it would be to do with Whonix, since the Gateway handles Tor and the Workstation should run socat. Ends up it isn’t hard at all. On the Gateway you need to edit /usr/local/etc/torrc.d/50_user.conf (as root) and add a Hidden Service to it:
Running Whonix using QEMU as a user

Running Whonix using QEMU as a user

Whonix has released version 14.0.0.9.6 of their XFCE KVM build. Whonix is a Debian based operating system that routes all network traffic through the Tor network. It is included as part of Qubes OS or you can run disk images using your favorite virtualization solution. Their KVM release includes xml files for importing into libvirt, but sometimes that’s a bit too heavy of a solution and you want something simple where you don’t need to be root to set it up or run it.

Chat with Tor and socat

It is easy to setup a simple chat over Tor using the socat utility. To receive incoming messages you first need to setup a Tor hidden service. Add this to the end of your /etc/tor/torrc file: HiddenServiceDir /var/lib/tor/hidden-chat/ HiddenServicePort 2330 127.0.0.1:2330 After restarting Tor check the /var/lib/tor/hidden-chat/hostname file for your hidden service .onion address. Use socat to setup a listener on port 2330, now incoming connections to ADDRESS.onion:2330 will show up on your terminal.