Securing a Qubes OS and Windows 11 Dual Boot

Hello, I want to discuss my specific use case that requires a dual boot configuration and some measures that I am putting in place to secure it. Any suggestions would be greatly welcomed. This will likely be a lengthy post, so please bear with me.

To begin, I’ve read similar posts and the documentation on this topic before posting so I don’t want to retread ground that’s already been covered. Yes, a dual boot between Qubes and an insecure OS is not a good idea 99% of the time. So to anyone who doesn’t have a very specific reason for doing so, do not do it. Beyond the security implications, it will save you a lot of headache.

Now, what’s my use case then? I’m a cybersecurity student and my university has proctored exams that only work on Windows. The exam software will fail you if it detects virtualization. This means I have to keep Windows just for these exams. However, I really would like to install Qubes both as a learning tool and my primary OS for security reasons. Buying a second computer is out of the question financially for me at the time. This greatly limits my options, but I’ve made the decision that dual booting is the way to go over a live USB, or host VM (Qubes of course uses Xen, which is a Type 1 hypervisor; Windows running Qubes in a VM seems very insecure as well).

I haven’t installed Qubes yet, but I’ve already taken many of these steps to move to it as my primary OS and ensure it will be as secure as possible given the circumstances. In no particular order:

1.) Backup important files (pictures, documents, etc.) to external USB drive.
2.) Partition Windows disk by shrinking the volume to make room for Qubes.
3.) Delete ALL unnecessary programs, disable ALL unnecessary services, delete ALL files that have been backed up or are no longer needed, block internet access to every program not necessary using simplewall (including telemetry, update, and UWP apps, only disabled once a week to check for updates).
this is because I will only be using Windows to take exams, reduces attack surface
4.) Set UEFI/BIOs password to secure access to firmware settings. This is important because I will have to turn secure boot off to install Qubes, and my HP laptop is incompatible with coreboot and other open source firmwares.
5.) Keep firmware and both operating systems updated regularly after installation.
6.) Encrypt Windows partition with Bitlocker AFTER installing Qubes (to avoid potential install issues), encrypt Qubes with LUKS.
7.) Disable network boot and other unused options in UEFI.
8.) After installing Qubes, perform regular data backups.
9.) Use Windows ONLY for taking exams.
10.) Use VPN and firewall on both operating systems.

Security Risks:
Transferring files - To make Qubes my primary OS, there are files that I need to transfer from Windows, bringing the risk of cross contamination.

Secure boot disabled - Disabling secure boot to install Qubes presents a vulnerability for potential threats to take advantage of, which could be allayed by something like Libreboot or Heads but…

Proprietary firmware - Classic HP and their terrible proprietary systems… I’m using an Omen 15 laptop which is not compatible with coreboot, therefore not compatible with Heads or Libreboot. This means there is not alternative to secure boot (that I’m aware of) for firmware security.

These are all considerations that I’ve made going into this dual boot configuration, it definitely feels like something is missing and I would love to hear from any experienced Qubes experts here. I’m very new to Qubes and this forum. Thanks! :grin:

Hi,

Did you think about using a second dedicated laptop/computer for your Windows exam need? Refurbished hardware from ~2016/2017 are still relevant for today’s computing and can be found for very cheap, it solves all problems (if you can afford it).

Yes, this is an option I’m still considering. Although if I buy another laptop, it’ll probably be for dedicated Qubes use and must support coreboot. I’d rather use the HP laptop for Windows because of the proprietary firmware security concerns I have. I initially bought it to play games but I don’t game anymore. I could get an old Thinkpad but I need something with a lot more RAM and storage, so I’ve been looking at System76 or Nitropad, but these are outside my price range currently. It just makes more sense to use what I have and dual boot Qubes currently… but maybe I’m looking at it from the wrong perspective.

1 Like

The dual boot could be quite secure (depends on your threat model though) if you could have a second drive for Qubes OS, that you would remove when you use Windows.

In should be fast to keep Qubes OS usable, so an usb 3 nvme or a thunderbolt drive could work, but I’m afraid a laptop would be cheaper than that :astonished:

IMO, the biggest threat from the dual boot would be to have Windows installing a malware payload to Qubes OS bootloader. Maybe just having the dual boot but Qubes OS bootloader on an usb memory stick (that you would always keep a backup of in sync in case it dies) would be enough.

1 Like

I didn’t think about using a USB to separate the bootloader! That’s an ingenious solution and seems a lot more secure than storing it on the same drive as Windows. So when I install Qubes, will it give me the option to choose which partition /boot goes to? And I can select a USB drive from there?

This is what I have done. I have a Kanguru verified firmware flash drive with a hardware write protect switch for boot and efi partitions. It’s the best option I can come up with as my laptop only takes a single nvme drive. I am still working out some issues.

During installation of Qubes OS, select both USB drive and main drive for installation. There is a button bottom left that opens a selection for boot drive, choose flash drive. Choose manual partitioning and click “make partitions for me”. Then click on both /boot and EFI partitions and make sure only flash drive is selected as storage medium (both drives will be selected). Click on root partition and you can modify the size of your Qubes OS LVM pool if you wish. That’s it. It installs fine for you.

Pitfalls:

This requires having the usb controller that your boot drive will be on directly attached to Dom0. Therefore, the standard option in the docs of adding usbcore.authorized_default=0 to boot options will not work as it restricts usb access to only HIDs during boot. It’s also problematic on my laptop as for some horrendous reason my keyboard is on the same controller as my external USB-A ports. So I need to have that controller permanently attached to Dom0. Depending on the internal connections of your laptop you may have trouble restricting USB devices from Dom0 at all.

It might be worth booting the Qubes installer and having a poke around in the teminal to see how many usb controllers you have and what is attached to each one so you know what you’re dealing with beforehand.

It’s not required for USB controller to be connected to dom0 so you can have usbcore.authorized_default=0/rd.qubes.hide_all_usb in dom0.
When you boot from USB flash drive it’ll load initramfs from it and after decrypting LUKS partition it can continue to boot into dom0 without a need for USB flash drive.
But you need to attach the /boot and /boot/efi partitions from sys-usb to dom0 as block devices and mount them when you need to update dom0 so it’ll update grub/initramfs/xen there.

You can also consider using Anti evil maid with TrenchBoot to check that your boot files are not modified:
https://blog.3mdeb.com/2024/2024-04-11-aem_phase4/

Oh yes you’re right. It doesn’t like it when the flash drive is write protected and kicks to a recovery console. I had just assumed this was due to the usbguard settings. Not sure why /boot needs to be RW to load the system though.

This kinda went over my head as its quite technical. Does this mean you could boot into qubes like it were Tails OS?

Can you remove the flash drive after you’ve logged into qubes?

Could this solve the plausible deniability issue with Qubes?

Are there any performance/security downsides installing qubes this way?

Would trenchboot prevent malicious payloads from exposing bios vulnerabilities?

No.

Yes. You can remove the flash drive after the LUKS partition is unlocked.

Yes, see this guide:

It could boot a little slower since the USB flash drive read speed is lower than SSD but it’s neglectable since it’ll only read somewhere like 200 MiB from the USB flash drive.
But it has a security downside, the same one that described here:

Not sure what do you mean by this.
Can you provide a description of an attack that you have in mind?

Yes, the site seems to be down, it’s not working for me right now as well.
You can read the link in the archive:
https://web.archive.org/web/20240603054254/https://blog.3mdeb.com/2024/2024-04-11-aem_phase4/

1 Like