Actions

Qubes Disposables

From Whonix

< Qubes



Ambox warning pn.svg.png These Disposable instructions only apply to Qubes-Whonix ™ 16 in Qubes R4. [1] [2] [3]


A few usability issues in Disposables affect anonymity. If the risks are unknown to the user, then first carefully read this page.

Qubesdisposable123123123.png

What are Disposables?[edit]

In the Qubes Template model, [4] any changes made to a root filesystem of an App Qube [archive] are lost upon reboot. This is advantageous for several reasons: it saves time and disk space, and allows faster, centralized updates for applications that are usually found inside the root filesystem. However, certain directories are designed to persist between reboots in order to store files and settings. These directories are stored in /rw, including /home/user and /usr/local as well as additional directories defined by "bind directory" settings. [5]

Qubes does not have a built-in snapshot capability like VirtualBox that can completely revert all changes back to a previous VM state. [6] [7] In other words, no method exists within App Qubes to reverse changes made to the persistent file system without implementing some type of custom solution. To ensure that all filesystem changes are discarded after a session, Qubes offers Disposables. When a Disposable is shutdown, the VM is removed from Qubes and all related VM images are deleted from the host filesystem. This method is not yet amnesic and should not be relied upon for anti-forensics!

While Disposables ensure that files do not persist without user intervention, the downside is the user can no longer decide whether or not the current VM state should be kept or destroyed; users must choose beforehand to use a standard App Qube or a Disposable.

Table: Qubes R4 Inheritance and Persistence

Inheritance [8] Persistence [9]
Template [archive] [10] [11] n/a Everything
App Qubes [archive] [12] /etc/skel/ to /home/ /rw/ (includes /home/ and bind-dirs [archive])
Disposable Template [archive] [13] [14] /etc/skel/ to /home/ /rw/ (includes /home/, /usr/local and bind-dirs [archive])
Disposable [archive] [15] [16] /rw/ (includes /home/, /usr/local and bind-dirs [archive]) Nothing

The Layered Disposable System[edit]

Qubes uses a two-layered approach to Disposables. At the core of the system is a Template [archive] upon which a Disposable Template [archive] is based. Every time a new Disposable is launched it is based on the Disposable Template - hence, two layers. In a standard Qubes-Whonix ™ installation:

  • The Whonix-Workstation ™ default Template is whonix-ws-16.
  • The Whonix-Workstation ™ default Disposable Template is called whonix-ws-16-dvm.
  • Each Whonix-Workstation ™ default Disposable (disp1, disp2, ...) is based on whonix-ws-16-dvm.

Once a Disposable Template is created, its /home/user/ directory can be customized [17] independently of the Template. In this special case, the Disposable Template will continue to inherit changes from the base Template's root filesystem (like package updates), but user files in /home/user/ will persist independently.

It is possible to have multiple Disposable Templates and Disposables at the same time. Any App Qube can be enabled for use as a template for Disposables, by setting its template_for_dispvms [archive] property.

In Qubes R4, Qubes-Whonix ™ 16's default Disposable Template (whonix-ws-16-dvm) can be easily created using salt and will have this property set.

Disposable Traffic Stream Isolation[edit]

Disposables work especially well with Whonix-Gateway ™. [18] All Disposable traffic is stream-isolated from the traffic of other VMs running in parallel.

Warnings[edit]

Table: Disposable Warnings

Category Warning
Amnesic Capability
  • All changes to a Disposable's file system are discarded upon shutdown. However, Disposables are similar to snapshots insofar as they can leave traces of their activity on storage and in memory. These traces may be later recoverable through data forensics.
  • This is further justification for using full disk encryption on the Qubes host and completely shutting down the system when it is not in use. Laptop users may wish to remove batteries to ensure that power to the RAM is definitely disconnected. [19] [20] [21] [22]
Ephemeral Whonix-Gateway ™ ProxyVMs Using Disposables for both the Whonix ™ Gateway and Workstation in Qubes R4 does not increase security without any corresponding privacy downside, for the following reasons: [23] [24] [25]
  • Disposables are not amnesic. In practice this means traces of their activity can be left on storage or in memory, making them vulnerable to forensic operations. [26]
  • Using a Disposable for the Whonix-Gateway ™ results in non-persistent entry guards to the Tor network; behavior unlike the default configurations for Whonix ™, Tor, and the Tor Browser Bundle. Mathematically speaking, end-to-end correlation attacks are more likely to succeed when a user chooses many random entry and exit points in the Tor network, rather than semi-permanent entry guards which are only rotated every few months. [27] [28]
  • See additional footnote. [29]
Named Disposables: Manual Shutdown Unlike Disposables spawned from the Whonix ™ default Disposable Template,[30] named Disposables do not automatically shutdown when the first user process is terminated. If a fresh Named Disposable is needed, users must first shutdown the named Disposable and start a new Disposable instance. [31] Failure to do so could lead to session data from previous activities persisting until the Disposable is properly shutdown.
Spawning Disposables
  • If a Disposable is spawned from within a VM that is not connected to Whonix-Gateway ™, the new Disposable may route its traffic over clearnet. [32]
  • The reason is because Disposables inherit their NetVMs from the calling VM, or the calling VM's dispvm_netvm setting (if different). The dispvm_netvm setting can be configured per VM via: dom0Qube ManagerVM SettingsAdvancedNetVM for Disposable [33]
  • If the calling VM is connected to Whonix-Gateway ™, this step is not necessary and the Disposable's traffic will be routed over Tor. See: Whonix ™ default NetVM settings fixes [archive].
Tor Browser in a Disposable Template Do not start Tor Browser in a Disposable Template! For reasons why, see: Running Tor Browser in Qubes Template. Only start Tor Browser in App Qubes or Disposables, see: Start Tor Browser in a Disposable.
Tor Browser Updater in a Disposable Template Do not start Tor Browser Updater in a Disposable Template! For reasons why, see: tb-updater in Qubes Disposable Template. Instead, run Tor Browser Downloader by Whonix ™ developers in Whonix-Workstation ™ Template (whonix-ws-16).
Tor Browser Version
Verify Disposable Status
  • Use caution when spawning a Disposable for the first time when it is based on a freshly created Disposable Template. This Qubes bug [archive] can lead to the Disposable Template starting instead of the Disposable. [34] [35] There could be serious consequences if an application like Tor Browser was started in a Disposable Template and used extensively for web browsing. Compromise of the Disposable Template would mean all Disposables spawned from it would be similarly compromised; see Running Tor Browser in Qubes Template.
  • To check the freshly started VM is a Disposable, verify it is named [disp xxxx] where xxxx is the number assigned to that Disposable. If the Disposable Template was started instead, then it should be shut down immediately. If the Disposable Template is ever inadvertently used for a dangerous activity like web browsing, then delete it and create a new one.
Whonix-Gateway ™ Linkability The Tor Project developer Teor has stated that Tor caches DNS, HS descriptors, pre-emptive circuits, etc. [36] which may lead to linkage between App Qubes and Disposables sharing the same Whonix-Gateway ™. The extent to which this is a threat for Whonix ™ users has now been documented; see Multiple Whonix-Workstation ™.

Setup[edit]

Note: Examples below reference GUI steps whenever possible, but Qube Manager configuration options in R4 are limited in comparison to earlier releases. [37] Where relevant, additional command line commands are listed in the footnotes.

Create a Whonix ™ Default Disposable Template based on Whonix-Workstation ™[edit]

  1. Update Qubes-Whonix ™.
  2. Open a dom0 terminal: Qubes App Launcher (blue/grey "Q")System ToolsXfce Terminal
  3. Create whonix-ws-16-dvm Disposable Template.

sudo qubesctl state.sls qvm.whonix-ws-dvm

Qubes-Whonix ™ Dispoables are now ready for use.

Create a Named Whonix ™ Disposable based on Whonix-Workstation ™[edit]

Info Nearly all users can skip steps 1 and 2 below. A specific use case for Disposable naming conventions has not (yet) been identified.

Do not include -dvm when naming Disposables! Tor Browser will not be inherited from Whonix-Workstation ™ Template (whonix-ws-16) if this advice is ignored.

Before creating named Disposables, familiarize yourself with their behavior and read all relevant warnings. Failure to do so could lead to unwanted behavior which occurs without the user's knowledge.

1. Create a Disposable called anon-whonix-disp based on the whonix-ws-16-dvm Template.

In dom0 run.

qvm-create -C DispVM -l red --template whonix-ws-16-dvm anon-whonix-disp

2. Launch Xfce Terminal in the Disposable.

qvm-run -a anon-whonix-disp xfce4-terminal

TODO - Investigate use cases for this procedure:

  • A named Disposable might be useful for a larger root/private image.
  • It might also be useful for activities such as building Templates in a Disposable.

Customization[edit]

Disposable Templates[edit]

Extra caution must be exercised when customizing a Disposable Template. [38] From a privacy perspective, it is ideal to have a Disposable Template that is indistinguishable from any other Whonix-Workstation ™. If changes are made to the Disposable Template, these may link all of the Disposables via a uniquely generated fingerprint should they be compromised independently. Risky changes include, but are not limited to:

  • Installation of obscure programs;
  • Uncommon configuration settings; or
  • The placement of unique data files.

Always keep in mind the Disposable will likely be exposed to the greatest Internet threats.

Tor Browser is specifically designed to prevent website fingerprinting or identification based on the user's browser fingerprint. It is safest to run Tor Browser in its stock configuration so the fingerprint is less unique, due to commonality with the larger Tor Browser user pool. Each individual browser change can significantly worsen the fingerprint because of the associated entropy, [39] so only make alterations if the impacts are known. See also: tb-updater in Qubes Disposable Template.

A decision must be made in advance whether to disable JavaScript by default. There is a usability-security trade-off to consider: fingerprinting and usability is worsened by disabled JavaScript, but this provides better protection against vulnerabilities. Conversely, enabled JavaScript improves usability and increases the risk of exploitation, but the browser fingerprint is (likely) more common.

Tor Browser in Disposable Template[edit]

For most users, Tor Browser customizations in the Disposable Template or Template are discouraged. Advanced users who wish to customize the Disposable Template despite the risks should follow these steps.

Applications other than Torbrowser in Disposable Template[edit]

Info Customization is completely optional. Only files in /home/user (or more generally, in /rw) can be customized in a Disposable Template.

1. Launch the application in the Disposable Template.

Either open dom0 terminal and run.

qvm-run -a whonix-ws-16-dvm <app>

Or use Qube Manager:

dom0Qube Managerright-click 'whonix-ws-16-dvm'Run command in qubetype name of the <app>

2. Customize application settings.

Customize the application as per normal procedures.

3. Exit the application.

If required, save application-specific settings, then exit the application so settings are stored on the disk.

4. Shutdown the Disposable Template.

Either use a dom0 terminal.

qvm-shutdown whonix-ws-16-dvm

Or use Qube Manager:

dom0Qube Managerright-click 'whonix-ws-16-dvm'left-click 'Shutdown qube'

The changes will be available when the Disposable is restarted.

Delete a Disposable Template[edit]

If a Disposable Template has been customized and it is necessary to revert these changes, a Disposable Template can be deleted the same way as any other VM.

Note the Disposable Template cannot be deleted while it is the default Disposable of another VM, otherwise an error message appears. In that case, follow tips found here [archive] on how to manually change the default Disposable of VMs to another setting, then repeat the procedure.

dom0Qube Managerright-click 'whonix-ws-16-dvm'left-click 'Delete qube' [40]

Keep Tor Browser Up-to-date[edit]

To obtain the latest Tor Browser, the simplest method is to use Whonix ™ built-in Tor Browser downloader functionality. Simply update using Tor Browser Downloader by Whonix ™ (tb-updater) in Whonix-Workstation ™ Template (whonix-ws-16) when performing your usual maintenance updating:

Qubes App Launcher (blue/grey "Q")whonix-ws-16Xfce Terminal [41] [42]

Update the package lists.

sudo apt update

Upgrade.

sudo apt full-upgrade

If Tor Browser is not upgraded, use update-torbrowser to download a new copy.

Launch Tor Browser Downloader by Whonix ™ and follow the instructions. [43]

update-torbrowser --input gui

Shutdown the Disposable Template: [44]

dom0Qube Managerright-click on 'whonix-ws-16-dvm'click 'Shutdown qube'

Update a Disposable Template[edit]

Changes to the underlying Template (whonix-ws-16) are detected automatically and the Disposable Template is updated without user intervention. That means package updates that are applied to whonix-ws-16 are also applied to the whonix-ws-16-dvm.

Usage[edit]

Disposables are well-suited for risky and largely independent activities, like web browsing or opening untrusted files. In contrast, App Qubes might be better suited for activities necessitating file persistence, like email clients with local email storage.

With either kind of VM, Qubes' VM integration tools like secure file copy [archive] and secure clipboard [archive] ensure that clean, trusted files and text can be easily and safely transferred to trusted VMs (if necessary).

User Tips[edit]

Table: Disposable User Tips

Category Recommendation
Data Storage
  • In Qubes, it is unrecommended to store any valuable data in an untrusted VM. This perspective is reinforced by the Tor Browser design which similarly does not remember bookmarks or credentials. Best practice is to store sensitive data in an offline vault VM; for instance, when accessing passwords with a password manager.
  • @rustybird has announced a new "split-tor-browser" [45] package that can retrieve urls and credentials from a trusted VM for use in a Disposable's browser. This package is yet to be tested or endorsed by Whonix ™, but it looks promising.
Disposable Shutdown A Disposable automatically shuts down when the first user-launched process is terminated. For example, if a new Disposable is created by launching Tor Browser and a user simultaneously starts typing in an editor later on, all this work will be lost after Tor Browser is closed. To avoid this, first launch a terminal in the Disposable and then launch additional applications from the terminal. This way the Disposable is only destroyed after exiting the terminal.
Offline Disposables
  • Use utmost caution if deciding to re-establish network connectivity for off-line Disposables! No mechanism is currently available to prevent connections to a clearnet NetVM.
  • Non-networked Disposables are useful for opening untrusted files that potentially might try to use the network maliciously. Like all Qubes VMs, the NetVM for a Disposable can be changed dynamically while the VM is still running. Simply set the NetVM to "none" using Qube Manager or the command line interface. [46]
Shortcuts
  • Disposables can be created directly by launching programs from the application menu using shortcuts; see below for instructions.
  • Disposables can also be spawned by using context-menus or the command line interface in other App Qubes. Refer to the Qubes Disposable documentation [archive] for instructions on different methods.
  • Note the relevant warning concerning shortcuts in this chapter ("Spawning Disposables").
Spawning Disposables from other App Qubes
  • There are several ways to spawn Disposables from App Qubes. In fact, in addition to the dom0 terminal and application menu, users can also spawn Disposables from the App Qube terminal emulator or context-menu. [47] These tools provide a safe and convenient way to open files and email attachments that could contain malicious code. There is also an option to convert potentially dangerous PDFs [archive] into trusted PDFs and open it in a Disposable. [48]
  • The most commonly used methods to spawn Disposables from App Qubes are listed below. It is recommended to read the "Spawning Disposables" warning detailing Disposable network settings before proceeding:
  1. Context-menu
  2. Dolphin file manager - open file in Disposable: FileActionsEdit/View in Disposable
  3. Nautilus file manager - open file in Disposable: FileEdit/View in Disposable
  4. Nautilus file manager- sanitize PDF: PDFConvert to Trusted PDF
  5. Thunderbird E-mail client - open email attachment in Disposable: EmailAttachmentsOpen in Disposable
  6. Command line interface - open file in Disposable:
    qvm-open-in-dvm <file_name>

Add a Desktop Shortcut[edit]

  1. From the Qubes application menu, drag and drop a menu item onto the desktop.
  2. Double-click the newly created launcher to start it.
  3. At first start, it is safe to click "Mark Executable".

Add an XFCE4 Panel Shortcut[edit]

From the Qubes application menu, drag and drop the menu item onto the panel.

Start Tor Browser in a Disposable[edit]

Tor Browser can be started via the GUI or on the command line.

If you are using a GUI, complete the following steps.

Qubes App Launcher (blue/grey "Q")Disposable: whonix-ws-16-dvmTor Browser (AnonDist)

If you are using a terminal, complete the following steps.

qvm-run --dispvm=whonix-ws-16-dvm torbrowser

After launch, always first check the Tor Browser version!

Figure: Tor Browser in Qubes-Whonix ™ Disposable

QubesDispVM.png

Start Terminal Emulator in a Disposable[edit]

Terminal emulator xfce4-terminal can be started via the GUI or on the command line.

If you are using a GUI, complete the following steps.

Qubes App Launcher (blue/grey "Q")Disposable: whonix-ws-16-dvmXfce Terminal

If you are using a terminal, complete the following steps.

qvm-run --dispvm=whonix-ws-16-dvm xfce4-terminal

TODO[edit]

Footnotes[edit]

  1. Disposables have significant improvements; see https://github.com/QubesOS/qubes-issues/issues/866#issuecomment-220495485 [archive]
  2. Qubes R3.2 is unsupported by Whonix ™ developers and reached EOL [archive] on 28 March, 2019.
  3. A serious privacy bug [archive] is unresolved in Qubes R3.2 / R3.2.1 and below.
  4. App Qubes and Templates [archive].
  5. How to make any file persistent (bind-dirs) [archive].
  6. Apart from qvm-revert-template-changes [archive] which can only revert to the state existing before the last shutdown of the Template.
  7. Qubes VM snapshots using git / SVN [archive].
  8. Upon creation.
  9. Following shutdown.
  10. https://www.qubes-os.org/doc/templates/ [archive]
  11. The former name was TemplateVM.
  12. The former name was AppVM or TemplateBasedVM.
  13. https://github.com/QubesOS/qubes-issues/issues/4175 [archive]
  14. Former names included DisposableVM Template, DVM Template, and DVM.
  15. https://www.qubes-os.org/doc/glossary/#disposable [archive]
  16. Former names included DisposableVM and DispVM.
  17. https://www.qubes-os.org/doc/disposable-customization/ [archive]
  18. Because each VM is assigned a unique, internal IP address.
  19. Is there a substitute for Whonix ™ lack of an Amnesic feature?
  20. Disposables do not run entirely in RAM [archive].
  21. Disposables: support for in-RAM execution only (for anti-forensics) #904 [archive]
  22. 4.0rc1 dirty shutdown causes disposables to remain persistent #3037 [archive]
  23. Disposables are not Amnesic.
  24. https://github.com/QubesOS/qubes-issues/issues/904 [archive]
  25. Tor Entry Guards.
  26. This is another reminder of why full disk encryption should always be used on the host.
  27. https://gitlab.torproject.org/legacy/trac/-/issues/8240 [archive]
  28. The reason is there are both malicious and benign guards in the Tor network. The more often the user "rolls the dice" (changes guards), the greater the chance of striking out.
  29. The solution to the first problem is only allowing in-RAM execution of Disposables [archive], but this is not planned for implementation in the short-term. There is no perfect solution to the second problem. That said, there is an actual unstated security-privacy trade-off by running this configuration. Theoretically, an ephemeral Whonix-Gateway ™ ProxyVM is only able to be infected for a single session (via the /home, /usr/local and /rw directories), since it is discarded upon shutdown. This provides a counterbalance to the increased threat of malicious guards, as Whonix ™ becomes more "Tails-like" [archive].
  30. See Disposable Shutdown for more on this.
  31. This is because named Disposables are created using a similar method to that which is used to create App Qubes. This means that named Disposables -- in some respects -- exhibit behavior similar to that of an App Qube. For example, behavior such as persistent VM settings across restarts; this includes, but is not limited to settings like --netvm, --autostart and --label to name a few. Before starting a new named Disposable instance, first verify in Qube Manager that the VM is fully shutdown.
  32. Disposables are created in one of two ways: Open in Disposable. On the command line (domU), run.
    qvm-open-in-dvm

    Edit/View in Disposable. From the GUI context-menu (domU). FileActionsEdit/View in Disposable

  33. On the command line (dom0), run.
    qvm-prefs -s vmname dispvm_netvm sys-whonix

  34. https://forums.whonix.org/t/whonix-14-starting-a-whonix-14-dispvm-actually-starts-the-templatebasedvm-instead/5579 [archive]
  35. After creation of a new Disposable Template, all VMs spawned from the Disposable Template should be Disposables by design. This includes the first start and all subsequent starts thereafter. While this is expected behavior, it is safest to confirm the Disposable was correctly spawned on each occasion it is used.
  36. https://lists.torproject.org/pipermail/tor-dev/2016-October/011591.html [archive]
  37. For instance, Dispoable networking can no longer be set from Qube Manager.
  38. Qubes documentation: Disposable Customization [archive].
  39. 33 bits of entropy will identify one individual out of several billion.
  40. Or on the command line (dom0), run.
    qvm-remove <vmname>

  41. dom0Qube Managerright-click on 'whonix-ws-16'click 'Run command in qube'type 'xfce4-terminal'
  42. On the command line (dom0), run.
    qvm-run -a whonix-ws-16 xfce4-terminal

  43. update-torbrowser

  44. On the command line (dom0), run.
    qvm-shutdown whonix-ws-16-dvm

    or
    Disposable Template command line (domU), run.

    sudo poweroff

  45. Github: Split Browser [archive]
  46. On the command line (dom0), run.
    qvm-prefs disp<1 | 2 | ...> netvm none

  47. See: Qubes Disposables [archive].
  48. See Micahflee's blog on How Qubes makes handling pdfs way safer [archive].


Fosshost is sponsors Kicksecure ™ stage server 100px
Fosshost About Advertisements

Search engines: YaCy | Qwant | ecosia | MetaGer | peekier | Whonix ™ Wiki


Follow: 1024px-Telegram 2019 Logo.svg.png Iconfinder Apple Mail 2697658.png Twitter.png Facebook.png Rss.png Reddit.jpg 200px-Mastodon Logotype (Simple).svg.png

Support: Discourse logo.png

Donate: Donate Bank Wire Paypal Bitcoin accepted here Monero accepted here Contribute

Whonix donate bitcoin.png Monero donate Whonix.png United Federation of Planets 1000px.png

Twitter-share-button.png Facebook-share-button.png Telegram-share.png Iconfinder Apple Mail 2697658.png Reddit.jpg Hacker.news.jpg 200px-Mastodon Logotype (Simple).svg.png

We are looking for contributors and developers.

https link onion link Priority Support | Investors | Professional Support

Whonix | © ENCRYPTED SUPPORT LP | Heckert gnu.big.png Freedom Software / Osi standard logo 0.png Open Source (Why?)

The personal opinions of moderators or contributors to the Whonix ™ project do not represent the project as a whole.

By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent.