Major script update!
DVMs now feature ephemeral encryption for volatile, private, and root volumes! You are now protected from forensic analysis even before dom0 is rebooted! You can now work in the default vm-pool without needing large amounts of memory - amnestic DVMs can run even on devices with as little as 8-12 GB of RAM!
Qubes OS has long included support for ephemeral encryption for the volatile volume. Later, this mechanism was extended to redirect the root volume into an ephemeral layer:
qvm-volume config VMNAME:root rw False
However, the private volume remained a challenge - arguably the most valuable source of data for forensic analysis, as it serves as the main working volume within appVMs.
I conducted numerous tests to find a reliable method to redirect the private volume into an ephemeral layer without breaking appVM functionality, ensuring that applications could still launch and operate normally. Ultimately, the only stable solution was to move the directories /home/user and /usr/local to /tmp and use bind mounts to operate within isolated copies. This approach isolates /home/user and /usr/local and enables operation entirely in RAM (tmpfs), seamlessly masking any changes
[user@disp3499 ~]$ df /usr/local
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 2097152 351812 1745340 17% /usr/local
[user@disp3499 ~]$ df /home/user
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 2097152 351812 1745340 17% /home/user
[user ~]% mount | grep ' /home/user '
tmpfs on /home/user type tmpfs (rw,nosuid,nodev,size=2097152k,nr_inodes=1048576,inode64)
By using a bind mount, /home/user is redirected into a tmpfs-backed directory, so /home/user and /tmp/home-user are simply two paths to the same RAM-backed data: the file is logically visible in both locations but physically stored only in memory and never written to persistent storage.
As a result, appVMs, DVMs, and DVM templates run /home/user and /usr/local fully in memory and persist no modifications. Therefore, all saved files and settings will disappear after shutting down the appVM or DVM template! If you wish to customize a browser, you must do so before running the script or temporarily comment out /rw/config/rc.local, reboot the DVM template, perform your customization, then uncomment the commands again.
If you need to increase the size of the private storage (to download a large file), you should add more RAM to the appVM / dvm-template in Qube Manager and then modify that line in /rw/config/rc.local:
mount -o remount,size=2G /home/user
However, donāt set it to 100% of VM Max memory.
This approach greatly improves memory efficiency and usability, since the volatile layer operates in the appVMās own memory rather than in dom0. When dom0 runs in overlay mode, you will still see 100% of its storage space available even on devices with as little as 8 GB of RAM - the overlay keeps only active data in memory, preventing dom0 from freezing regardless of how many amnesic DVMs are launched.
The previously used varlibqubes pool relied on an outdated driver, which lacked support for discard (TRIM), causing appVMs to continuously grow in size and consume excessive memory. Ephemeral encryption for the volatile volume now provides a substantial boost in forensic resistance - ensuring that no private data from a terminated DVM can be accessed even if dom0 remains booted and decrypted.
I will keep working on it. It may not be a perfect scenario yet, but it works great. In other scenarios, the application didnāt start. For an ultraāparanoid secure, use a DVMs in the varlibqubes pool - Iāve also added ephemeral encryption for this pool.
@deeplow Hi. I can no longer edit the topic title. Since I added ephemeral encryption, could you please add āephemeral encryptionā to the topic title?