Without some active and responsible participation of the user, no real security is possible. Running Firefox inside of an AppVM does not automagically make it (or any other app) more secure. Programs themselves remain just as secure (or insecure) on Qubes as on a normal Linux or Windows OS. What drastically changes is the context in which your applications are used. This context is a responsibility of the user. But managing security in this context well requires knowledge of some new concepts and procedures. So it is worth stressing some basic items:
Verify the authenticity and integrity of your downloads, particularly the Qubes iso.
The internet is always a dangerous place. While your connection to the Qubes website and download mirrors is encrypted, meaning that your downloads from here can't be modified by a third party en route, there is always the chance that these websites themselves have been compromised. Signature verification allows us to validate for ourselves that these files were the ones authored and signed by their creators (in this case the Qubes development team).
Because it's so easy for a hacker who manages to tamper with the downloaded iso files this way to patch in malware, it is of the utmost importance that you verify the signature of the Qubes iso you use to install Qubes. See the page on Verifying Signatures for more information and a tutorial on how to accomplish this.
Once you have Qubes installed, the standard program installation command for Fedora and Qubes repositories
sudo dnf install <program>
automatically accomplishes this verification.
Custom user-added repositories might come with gpgcheck disabled. Check the config files and verify that
gpgcheck=1
Plus, make sure you also safely import their signing keys. This may require you to check from multiple sources that the signing key is always the same.
Even then, you might want to consider new repositories to be less secure and not use them in templates that feed your more trusted VMs.
If you need to download programs that cannot be verified, then it is much less dangerous to install them in a cloned template or a standalone VM.
Remember: Qubes cannot automatically verify the signature of files that come from other sources like your browser, torrenting client, or home-made tofu recipe downloader. If the providers of these downloads provide keys for you to verify the signatures of their downloads, do it!
Each VM is assigned a specific colour for its window borders. These borders are how Qubes displays the security context of applications and data so that users can be easily aware of this at all times. Be sure to check the colour of window borders before taking any action, particularly if it affects the security of your system. See this blog post for more information.
Always remember that any "red" window can draw "green" password prompts. Don't let yourself be tricked into entering credentials designated to one qube into a forged input box rendered by another. For XFCE users (which is the default desktop environment on QubesOS) it would be wise to manually move the more trusted window so that it is not displayed on top of a less trusted one, but rather over the trusted Dom0 wallpaper. If you use KDE, it has a helpful feature called Expose-like effect that is activated in System Tools -> System Settings -> Desktop Effects -> All Effects -> Desktop Grid Present Windows. Performing these steps makes it easier to tell the difference between when you're being phished and when you're genuinely being asked for credentials.
With the exception of a text editor used to modify configuration files, one should not run applications in either template VMs or in Dom0. From a security standpoint there is a great difference between installing a program and running it.
In Dom0 terminal, run:
qubes-hcl-report <userVM>
where \<userVM> is the name of the VM within which the report will be written (but the report will also be displayed in the Dom0 terminal). If it displays that VT-d (I/O MMU) is active, you should be able to assign PCIe devices to an HVM and enjoy DMA protection for your driver domains, so you successfully passed this step.
If VT-d (I/O MMU) is not active, attempt to activate it by selecting the VT-d flag within the BIOS settings. If your processor/BIOS does not allow VT-d activation you still enjoy much better security than alternative systems, but you may be vulnerable to DMA attacks. Next time you buy a computer consult our HCL (Hardware Compatibility List) and possibly contribute to it.
To keep your system regularly updated against security related bugs and get new features, run in Dom0:
sudo qubes-dom0-update
and run in templates and standalone VM
sudo dnf update
or use the equivalent items in Qubes Manager, which displays an icon when an update is available.
When you receive or download any file from an untrusted source, do not browse to it with a file manager which has preview enabled. Enabling previews in your file manager gives malware another attack vector. To disable preview in Nautilus: Gear (up-right-icon) -> Preferences -> Preview (tab) -> Show thumbnails: Never. Note that this change can be made in a TemplateVM (including the DispVM template) so that future AppVMs created from this TemplateVM will inherit this feature.
Also, do not open it in trusted VMs. Rather, open it in a disposable VM right-clicking on it. You may even modify it within the disposable VM and then copy it to other VM.
Alternatively PDFs may be converted to trusted PDFs by right clicking on them. This converts the PDF's text to graphic form, so the disk size these documents take up will increase.
If there is a risk that somebody may gain physical access to your computer when you leave it powered down, or if you use Qubes in dual boot mode, then you may want to install AEM (Anti Evil Maid). AEM will inform you of any unauthorized modifications to your BIOS or boot partition. If AEM alerts you of an attack, it is really bad news because there is no true fix. If you are really serious about security, you will have to buy a new laptop and install Qubes from a trusted ISO. Buying a used laptop runs a higher risk of tampering and is not an option for a security focused environment.
Before you assign a USB controller to a VM, check if any input devices are included in that controller.
Assigning a USB keyboard will deprive Dom0 VM of a keyboard. Since a USB controller assignment survives reboot, you may find yourself unable to access your system. Most non-Apple laptops have a PS/2 input for keyboard and mouse, so this problem does not exist.
But if you need to use a USB keyboard or mouse, identify the USB controller in which you have your keyboard/mouse plugged in and do NOT assign it to a VM. Also, makes sure you know all the other USB ports for that controller, and use them carefully, knowing you are exposing Dom0 (ie NO bluetooth device on it).
All USB devices should be assumed side channel attack vectors (mic via sound, others via power usage), so you might prefer to remove them. See this about rootkits
Using a web-cam also involves a risk, so better to physically cover it with adhesive tape or disconnect it if you do not use it. If you need it, you need to assign it to a VM and cover it with a cap or an elastic band when not in use. Attaching a microphone using Qubes VM Manager may also be risky, so attach it only when required.
It is preferable to avoid using Bluetooth if you travel or do not trust your neighbours. Kids with high-gain directional antennas might also gain long range access to your Bluetooth. In this case, buy a computer that does not have a Bluetooth hardware module, or, if you have it, assign it to an untrusted VM. Assigning it to its own Qube will also allow you to use Bluetooth without trusting it, if need be.
Many laptops allow one to disable various hardware (Camera, BT, Mic, etc) in BIOS. This might or might not be a dependable way of getting rid of those devices, depending on how much you trust your BIOS vendor.
If the VM will not start after you have assigned a USB controller, look at this FAQ.
See here.
As explained here, dom0 should not be used for any user operations. There are several reasons for this:
Once a TemplateBasedVM has been created, any changes in its /home
, /usr/local
, or /rw/config
directories will be persistent across reboots, which means that any files stored there will still be available after restarting the TemplateBasedVM. No changes in any other directories in TemplateBasedVMs persist in this manner. If you would like to make changes in other directories which do persist in this manner, you must make those changes in the parent TemplateVM.
See here for more detail and version specific information.
[details="This document was migrated from the qubes-community project"] - Page archive - First commit: 08 Dec 2020. Last commit: 14 May 2023. - Applicable Qubes OS releases based on commit dates and supported releases: 4.0, 4.1 - Original author(s) (GitHub usernames): imme-emosol, andrewdavidwong - Original author(s) (forum usernames): @adw
[/details]