2022-08-06 23:45:00 +00:00
|
|
|
---
|
|
|
|
layout: default1
|
2022-09-02 11:17:25 +00:00
|
|
|
description: For Qubes OS
|
2022-08-06 23:45:00 +00:00
|
|
|
title: Qubes Notes
|
2022-08-06 23:48:45 +00:00
|
|
|
permalink: /qubes
|
2022-08-06 23:45:00 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
<div style="text-align:center;">
|
2022-09-02 11:17:25 +00:00
|
|
|
A collection of Qubes OS-related information.
|
2022-08-06 23:45:00 +00:00
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
|
|
|
|
#### Table of contents:
|
|
|
|
|
|
|
|
|
|
|
|
-\>> [Template Setup](#template-setup) <br>
|
|
|
|
- -\> *[Debian](#debian)* <br>
|
|
|
|
- -\> *[Security](#debian-security)* <br>
|
|
|
|
- -\> *[Fedora](#fedora)* <br>
|
|
|
|
- -\> *[Upgrading Fedora](#upgrading-fedora)* <br>
|
2022-08-31 23:50:40 +00:00
|
|
|
|
|
|
|
-\>> [Links & Resources](#links--resources) <br>
|
|
|
|
- -\> *[Guides](#guides)* <br>
|
|
|
|
- -\> *[Wiki](#wiki)* <br>
|
|
|
|
|
2022-08-06 23:45:00 +00:00
|
|
|
<br>
|
|
|
|
|
|
|
|
### Template Setup
|
|
|
|
|
|
|
|
Small notes for template setup
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
#### Debian
|
|
|
|
|
|
|
|
Running in Dom0:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo qubes-dom0-update qubes-template-debian-11-minimal
|
|
|
|
```
|
|
|
|
|
2022-08-30 02:48:36 +00:00
|
|
|
```
|
|
|
|
qvm-run --pass-io -u root template-debian-11-minimal 'apt instal qubes-core-agent-passwordless-root'
|
|
|
|
```
|
|
|
|
|
2022-08-06 23:45:00 +00:00
|
|
|
Running inside the template:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo apt update
|
|
|
|
```
|
|
|
|
|
|
|
|
Installing packages
|
|
|
|
|
|
|
|
```
|
2022-08-31 23:50:40 +00:00
|
|
|
sudo apt install qubes-core-agent-dom0-updates qubes-usb-proxy qubes-gpg-split qubes-core-agent-networking git apt-transport-tor curl
|
2022-08-06 23:45:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Configuring git proxy
|
|
|
|
|
|
|
|
```
|
2022-08-12 17:12:22 +00:00
|
|
|
git config --global http.proxy http://127.0.0.1:8082/
|
2022-08-06 23:45:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
#### Debian Security
|
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
sudo apt-get install grub2 qubes-kernel-vm-support
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo apt-get -t bullseye-backports --no-install-recommends install linux-image-amd64 linux-headers-amd64
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
grub-install /dev/xvda
|
|
|
|
```
|
|
|
|
|
2022-08-07 13:28:46 +00:00
|
|
|
Adding the Kicksecure repository:
|
2022-08-06 23:45:00 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
curl --proxy http://127.0.0.1:8082/ --tlsv1.3 --proto =https --max-time 180 --output ~/derivative.asc https://www.kicksecure.com/derivative.asc
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo cp ~/derivative.asc /usr/share/keyrings/derivative.asc
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
echo "deb [signed-by=/usr/share/keyrings/derivative.asc] tor+http://deb.w5j6stm77zs6652pgsij4awcjeel3eco7kvipheu6mtr623eyyehj4yd.onion bullseye main contrib non-free" | sudo tee /etc/apt/sources.list.d/derivative.list
|
|
|
|
```
|
2022-08-07 13:28:46 +00:00
|
|
|
Installing Kicksecure package:
|
2022-08-06 23:45:00 +00:00
|
|
|
|
2022-08-07 13:28:46 +00:00
|
|
|
``kicksecure-qubes-cli`` and ``kicksecure-qubes-gui`` are available.
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo apt install --no-install-recommends kicksecure-qubes-cli
|
|
|
|
```
|
|
|
|
|
|
|
|
Installing LKRG:
|
2022-08-06 23:45:00 +00:00
|
|
|
|
|
|
|
```
|
2022-08-31 23:50:40 +00:00
|
|
|
sudo apt install --no-install-recommends lkrg-dkms
|
2022-08-06 23:48:45 +00:00
|
|
|
|
2022-08-06 23:45:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Enabling Hardened Malloc:
|
|
|
|
|
|
|
|
```
|
2022-08-07 13:51:15 +00:00
|
|
|
echo "/usr/lib/libhardened_malloc.so/libhardened_malloc.so" | sudo tee /etc/ld.so.preload
|
2022-08-06 23:45:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
#### Fedora
|
|
|
|
|
|
|
|
Running in Dom0:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo qubes-dom0-update qubes-template-fedora-36-minimal
|
|
|
|
```
|
|
|
|
|
2022-08-30 02:49:13 +00:00
|
|
|
```
|
|
|
|
qvm-run --pass-io -u root template-fedora-36-minimal 'apt instal qubes-core-agent-passwordless-root'
|
|
|
|
```
|
|
|
|
|
2022-08-06 23:45:00 +00:00
|
|
|
Running inside the template:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo dnf update
|
|
|
|
```
|
|
|
|
|
|
|
|
Installing packages
|
|
|
|
|
|
|
|
```
|
2022-08-31 23:50:40 +00:00
|
|
|
sudo dnf install qubes-core-agent-passwordless-root qubes-core-agent-dom0-updates qubes-usb-proxy qubes-gpg-split qubes-core-agent-networking git
|
2022-08-06 23:45:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Configuring git proxy
|
|
|
|
|
|
|
|
```
|
2022-08-12 17:12:22 +00:00
|
|
|
git config --global http.proxy http://127.0.0.1:8082/
|
2022-08-06 23:45:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
#### Upgrading Fedora
|
|
|
|
|
|
|
|
Running in Dom0:
|
|
|
|
|
|
|
|
```
|
|
|
|
qvm-clone fedora-35 fedora-36
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
truncate -s 5GB /var/tmp/template-upgrade-cache.img
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
qvm-run -a fedora-36 gnome-terminal
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
dev=$(sudo losetup -f --show /var/tmp/template-upgrade-cache.img)
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-12 17:12:22 +00:00
|
|
|
qvm-block attach fedora-36 dom0:${dev##*/}
|
2022-08-06 23:45:00 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Running inside Fedora-36:
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo mkfs.ext4 /dev/xvdi
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
sudo mount /dev/xvdi /mnt/removable
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
sudo dnf clean all
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
sudo dnf --releasever=36--setopt=cachedir=/mnt/removable --best --allowerasing distro-sync
|
|
|
|
```
|
|
|
|
|
|
|
|
Running inside Dom0:
|
|
|
|
|
|
|
|
```
|
|
|
|
qvm-shutdown fedora-36
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
sudo losetup -d $dev
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
```
|
2022-08-06 23:45:00 +00:00
|
|
|
rm /var/tmp/template-upgrade-cache.img
|
2022-09-02 11:17:25 +00:00
|
|
|
```
|
2022-08-31 23:50:40 +00:00
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
### Links & Resources
|
|
|
|
|
|
|
|
- [Qubes for security auditing](https://forum.qubes-os.org/t/qubes-for-organizational-security-auditing-talk-notes/199)
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
#### Guides
|
|
|
|
|
|
|
|
- [Fully ephemeral dispvms](https://forum.qubes-os.org/t/fully-ephemeral-dispvms/12030)
|
|
|
|
|
|
|
|
- [Opening all files in disposable qube](https://forum.qubes-os.org/t/opening-all-files-in-disposable-qube/4674)
|
|
|
|
|
|
|
|
- [Kicksecure Guide](https://forum.qubes-os.org/t/guide-kicksecure-for-disp-sys/13324)
|
|
|
|
|
2022-09-03 14:24:21 +00:00
|
|
|
- [Qubes OS installation encrypted boot and header](https://forum.qubes-os.org/t/qubes-os-installation-detached-encrypted-boot-and-header/6205)
|
2022-09-01 00:38:01 +00:00
|
|
|
|
2022-08-31 23:50:40 +00:00
|
|
|
<br>
|
|
|
|
|
|
|
|
#### Wiki
|
|
|
|
|
|
|
|
- [Hardened-Kernel](https://www.kicksecure.com/wiki/Hardened-kernel) <button type="button" class="btn btn-xs btn-xs"><a href="http://www.w5j6stm77zs6652pgsij4awcjeel3eco7kvipheu6mtr623eyyehj4yd.onion/wiki/Hardened-kernel">Tor</a></button>
|
|
|
|
|
|
|
|
- [VM Fingerprinting](https://www.whonix.org/wiki/VM_Fingerprinting) <button type="button" class="btn btn-xs btn-xs"><a href="http://www.w5j6stm77zs6652pgsij4awcjeel3eco7kvipheu6mtr623eyyehj4yd.onion/wiki/VM_Fingerprinting">Tor</a></button>
|