Using Tor Browser Launcher in Qubes

Posted May 9, 2014 in tor qubes

I maintain a piece of software called Tor Browser Launcher. It takes care of downloading Tor Browser Bundle for you, verifying the gpg signature, making sure you’re always using the latest version of Tor Browser, and making it easier to launch.

I originally only made Tor Browser Launcher work in Debian-based distributions, but since the default templates in Qubes are based on Fedora, I recently ported it to RPM-based distributions as well. Here’s how to set it up.

You’ll need to build an RPM from the torbrowser-launcher source code first. Create a new appvm (I called mine tbl-builder), open a terminal in it, and follow these steps:

sudo yum -y install git python-psutil python-twisted pygame wmctrl gnupg fakeroot
git clone https://github.com/micahflee/torbrowser-launcher.git
cd torbrowser-launcher
./build_rpm.sh

When you’re done, it should have built an RPM package in dist/torbrowser-launcher-[version]-1.noarch.rpm. Go ahead and copy this to your templatevm:

qvm-copy-to-vm fedora-20-x64 dist/torbrowser-launcher-*.rpm

Now that you’ve copied the RPM to your templatevm, you can shut down and delete the appvm you just created. Next, open a terminal in your templatevm (e.g. fedora-20-x64), install torbrowser-launcher (and then cleanup your templatevm’s home dir):

sudo yum install QubesIncoming/tbl-builder/torbrowser-launcher-*-1.noarch.rpm
rm -r QubesIncoming

Now shut down your templatevm. Now all you have to do to add Tor Browser to your menu is go to an appvm’s settings, switch to the Applications tab, and move “Tor Browser” and “Tor Browser Settings” from Available to Selected, and save. If your appvm was already running when you installed torbrowser-launcher in your templatevm you’ll have to shut it down and restart it.

Now you can open Tor Browser the way you open any other software in any of your appvms.

Qubes also supports a special kind of netvm called a torvm. You can read about it here. If you set an appvm’s netvm to be your torvm (making your appvm an anonvm), then all internet traffic in that appvm gets transparently proxied through Tor. This is great for a wide variety of things, but using the Tor Browser itself is still much wiser, because it does a lot of anti-forensics tricks that keep you anonymous. If you just use Firefox in an anonvm, your browser can much more easily be fingerprinted.

If you’d like to use Tor Browser in an anonvm, you have to do one more step to stop yourself from connecting to Tor through the Tor network. Open Tor Browser in your anonvm, click the onion icon and open Preferences. Under Proxy Settings, change “Use the recommended proxy settings for my version of Firefox” to “Transparent Torification (Requires custom transproxy or Tor router)”. Then go to https://check.torproject.org/ to verify that you’re still connected to the Tor network.

That’s it. Now if your Tor Browser gets hacked and the attacker tries to leak your real IP address, it just won’t work. They’ll have to break out of Qubes isolation first.