Ha ha ha Dyslexia at its finest. Yep - that works.
What about an entry something like this below? (DebianVM Firefox-ESR tested; Whonix-WS Tor Browser tested) - please point out my many errors, misunderstandings and poor, non-canonical method.
To Do: Non-Qubes-Whonix only - Running Tor Browser in the Alpha Tor Sandbox
[Copy working instructions from sandboxing thread]
Sandboxing Tor Browser and Firefox with Firejail in Qubes-Whonix
Until the alpha Tor Browser sandbox is fully integrated into Qubes-Whonix (experimental instructions are now available for non-Qubes-Whonix), Qubes-Whonix users should strongly consider running instances of the Tor Browser in a restricted environment using the Firejail Security Sandbox.
It must be remembered that the Tor Browser is an untrusted application with a huge attack surface. It is frequently, and successfully, attacked in the wild. Therefore, it makes sense to mitigate the risk of security breaches with a sandboxing approach. According to the Firejail project page:
https://firejail.wordpress.com/
Firejail is a SUID program that reduces the risk of security breaches by restricting the running environment of untrusted applications using Linux namespaces and seccomp-bpf. It allows a process and all its descendants to have their own private view of the globally shared kernel resources, such as the network stack, process table, mount table.
Written in C with virtually no dependencies, the software runs on any Linux computer with a 3.x kernel version or newer. The sandbox is lightweight, the overhead is low. There are no complicated configuration files to edit, no socket connections open, no daemons running in the background. All security features are implemented directly in Linux kernel and available on any Linux computer. The program is released under GPL v2 license.
Best of all, Firejail has built-in profiles for a large number of popular Linux programs including: Firefox, Chromium, VLC and Transmission. Sandboxes can be started by simply prefixing your program command with âfirejailâ in a terminal e.g. âfirejail firefoxâ, âfirejail vlcâ etc.
Alternatively, a simple work-around in Qubes-Whonix is to edit the relevant .desktop file that launches a process and prepend the executable path with the firejail command.[1][2]
Running Tor Browser in a Firejail Sandbox (tested)
Note: preferably clone your Whonix-Workstation-TemplateVM prior to taking these steps below, as some dependencies will be added.
(1) Open /etc/apt/preferences.d/debian-pinning.pref in an editor with root rights.[3][4]
If you are using a graphical Whonix or Qubes-Whonix, run:
kdesudo kwrite /etc/apt/preferences.d/debian-pinning.pref
If you are using a terminal-only Whonix, run:
sudo nano /etc/apt/preferences.d/debian-pinning.pref
(2) Paste:
Package: *
Pin: release a=stable
Pin-Priority: 700
Package: *
Pin: release a=jessie-backports
Pin-Priority: 650
Package: *
Pin: release a=testing
Pin-Priority: 600
Package: *
Pin: release a=unstable
Pin-Priority: 550
Package: *
Pin: release a=experimental
Pin-Priority: 500
Save.
(3) Add Debian Backports to the Debian sources file
If you are using a graphical Whonix or Qubes-Whonix, run:
kdesudo kwrite /etc/apt/sources.list.d/debian.list
If you are using a terminal-only Whonix, run:
sudo nano /etc/apt/sources.list.d/debian.list
Cut and paste the following Debian Backports mirror (choose the http OR .onion mirror):
deb Index of /debian jessie-backports main contrib non-free
OR
deb http://vwakviie2ienjx6t.onion/debian jessie-backports main contrib non-free
Save and exit.
(4) Update the TemplateVM and Install Firejail from the backports mirror
sudo apt-get update
sudo apt-get -t jessie-backports install firejail
(5) Create a local directory for the Tor Browser desktop file
mkdir -p /home/user/.local/share/applications
(6) Copy the existing Tor Browser desktop file to the local directory
sudo cp /usr/share/applications/janondisttorbrowser.desktop /home/user/.local/share/applications/janondisttorbrowser.desktop
(7) Edit janondisttorbrowser.desktop in an editor with root rights.[5]
If you are using a graphical Whonix or Qubes-Whonix, run:
kdesudo kwrite /home/user/.local/share/applications/janondisttorbrowser.desktop
If you are using a terminal-only Whonix, run:
sudo nano /home/user/.local/share/applications/janondisttorbrowser.desktop
(8) Prepend the Exec= line with âfirejailâ[6]
Exec=firejail torbrowser %u
OR to use the existing Firefox profile with Tor
Exec=firejail --profile=/etc/firejail/firefox.profile torbrowser %u
Save and exit
(9) Populate the newly created folder in the TemplateVM
Note: change the name of the template below if you created a whonix-ws-clone-1 to test this procedure.
While Whonix-Workstation TemplateVM is still running, in dom0 run:
qvm-sync-appmenus whonix-ws
(10) Create a new Whonix-Workstation-AppVM based on your modified template
The Tor Browser entry will now point to the modified janondisttorbrowser.desktop file in the .local directory which is prepended with firejail.
Running Firefox-ESR in a Firejail Sandbox (Qubes Debian-8 Template only; tested)
Note: preferably clone your Debian-8 TemplateVM prior to taking these steps below, as some dependencies will be added.[7]
Repeat the steps above for the Tor Browser entry, EXCEPT:
At steps (6) and (7), edit the following file:
/usr/share/applications/firefox-esr.desktop
At step (9), run in dom0:
qvm-sync-appmenus debian-8
Note: change the name of the template if you cloned it at an earlier step.
Footnotes:
[1] Dev/Firejail - Kicksecure
[2] This process can be repeated with every .desktop application file if desired
[3]Template:Apt-Pinning - Whonix
[4] Apt-Pinning allows the user to mix and match packages from different Debian repos without breaking the base distro
[5] Yawningâs script for Firejail integration with Tor Browser is no longer available at https://git.schwanenlied.me/yawning/tor-firejail/src/master/start-tor-browser
[6] Advanced users can create a custom profile for Tor Browser by following these steps at Building Custom Profiles | Firejail
[7] Users should NOT use Firefox in a Whonix template. It is easily fingerprinted and less secure than Tor Browser