ToDo for Developers
< Dev
TODO
TODO DEV[edit]
user-sysmaint-split - ISO - sysmaint mode - #3[edit]
- follow-up
- live-config-dist: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/sysmaint
- Patrick: Not merged. Needs revision to be compatible with "traditional boot mode" when user-sysmaint-split is not installed -> copied to new ticket
- live-config-dist: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/sysmaint
user-sysmaint-split - Qubes support[edit]
- sysmaint-panel is probably functional as is?
- user-sysmaint-split - useful to install in Qubes for Kicksecure or Qubes-Whonix? Probably yes, due to sudo hardening.
- Plan for Qubes?
- No longer install qubes-core-agent-passwordless-root by default.
- Install user-sysmaint-split by default in new templates.
- Users could not really use account sysmaint due to missing X server. Instead, user needs to use a Qubes Root Console.
- user documentation
- suggestions for https://github.com/QubesOS/qubes-issues/issues/9519?
user-sysmaint-split - Wayland support[edit]
- todo
- ssdm support (because that is LXQt's default login manager)
grml-debootstrap - fix UEFI bootloader updates[edit]
- https://github.com/grml/grml-debootstrap/issues/297
- please send a pull request upstream
calamares dual legacy + efi booting support[edit]
- as discussed
investigate Debian Rolling[edit]
- investigate why Debian Rolling initiative failed
- From initial research:
- Lots of disagreement about how exactly to implement it, although https://lists.debian.org/debian-devel/2011/05/msg00275.html had a very large amount of positive feedback compared to other proposals
- See also DEP-10 (https://dep-team.pages.debian.net/deps/dep10/) which is somewhat orthogonal but related
- Limited manpower, no one appears to have tried to actually do it
- Need to cope with the activity occurring in Debian's unstable and testing repositories, which have some turbulence and can cause issues if one isn't careful
- Likely worth trying to resurrect
- Lots of disagreement about how exactly to implement it, although https://lists.debian.org/debian-devel/2011/05/msg00275.html had a very large amount of positive feedback compared to other proposals
- From initial research:
- contact people involved previously, if that makes sense
- suggest prospective developers
- Started to write tooling for this: https://github.com/ArrayBolt3/drk Very incomplete, nowhere near usable. Will keep developing this.
qubes-template-kicksecure[edit]
- https://github.com/QubesOS/qubes-issues/issues/9573
- try if https://github.com/Kicksecure/qubes-template-kicksecure can be built locally
- document on Dev/Qubes how to download, verify Qubes builder v2 (or fix upstream documentation if that seems more feasible)
implement sudoless[edit]
user-sysmaint-split - enable user-sysmaint-split by default for Xfce version[edit]
#--sysmaint-enable \\ #--unrestricted-admin-enable \\
- and for VM images as "loose packages"
- not for Whonix-Gateway?
default password[edit]
- rationale: virtual console based login attempts. An attacker could connect a keyboard to a server to login.
- review wiki: Default Passwords
- helper-scripts: add a tool that looks user accounts with empty passwords, if feasible
- GUI ISO: calamares.
- link to documentation
- choices:
- default: none (user must choose)
- passwordless
- set a password
- CLI ISO: non-existent, therefore non-issue for now
- GUI VM images: A setup-wizard-dist popup should explain this.
- CLI: an INFO message after login if there are any unlocked passwordless accounts
audio[edit]
audio generally[edit]
- https://forums.whonix.org/t/port-from-pulseaudio-to-pipewire-for-audio-support/16879/40
- please read, comment if something useful to share
VirtualBox Intel HD Audio and PipeWire Incompatibility / Audio broken after increasing ram to 5 GB / No sound after latest updates - PipeWire Bug?[edit]
- https://forums.whonix.org/t/virtualbox-intel-hd-audio-and-pipewire-incompatibility-audio-broken-after-increasing-ram-to-5-gb-no-sound-after-latest-updates-pipewire-bug/18211
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1081965
- please investigate if doable with reasonable effort
- Tried switching between Pulseaudio and Pipewire on a booted VM, discovered I could "initialize" the speakers with Pulseaudio and then Pipewire would work thereafter
- Virtually certain this is an upstream bug, was able to reproduce with both Ubuntu 24.04 and Arch Linux.
- Suggest switching to AC97 audio (even Arch Linux defaults to this under Virtualbox).
- Need to investigate upstream code
- Could not get any meaningful hints from pipewire, wireplumber, and pipewire-pulse logs. Pulseaudio shows an "alsa woke us up to write new data to the device but there was actually nothing to write" error in its logs. At this point this is likely to be a bug in VirtualBox or the snd-hda-intel kernel driver.
live-build - test lb config --dm-verity[edit]
- Does the ISO still function if build with
lb config --dm-verity
? - Does it break apt-get install pkg-name? It might not break it due to overlayfs.
- Lacks live-build support when used with dracut:
lb config
won't even run if you try to enable verity and dracut at the same time, unless you override live-build by commenting that sanity check out- The ISO won't build initially because the dm-verity building code is trying to find the live filesystem in the wrong location
- dracut isn't configured to include systemd-veritysetup-generator, needed for verifying the root FS in the first place
- No kernel command line options are added to the ISO for verity setup
[edit]
- https://github.com/Kicksecure/security-misc/issues/187
- This is in preparation for the next task.
- Discussion on how best to do this posted at https://forums.kicksecure.com/t/splitting-security-misc-into-shared-desktop-and-server-packages/674
Kicksecure Firewall[edit]
https://forums.kicksecure.com/t/kicksecure-firewall/378/10
Meta Packages, Kicksecure, Whonix - Desktop versus Server[edit]
https://forums.kicksecure.com/t/meta-packages-kicksecure-desktop-versus-kicksecure-server/415
Secure Mount Options for better Security Hardening[edit]
- review discussions, wiki
- comment
- improve the solutions research
- https://www.kicksecure.com/wiki/Dev/remount-secure
- https://www.kicksecure.com/wiki/Noexec
- https://forums.whonix.org/t/re-mount-home-and-other-with-noexec-and-nosuid-among-other-useful-mount-options-for-better-security/7707
- vm-config-dist chmod 777 on /mnt/shared conflicts with noexec
wipe video RAM[edit]
- add wipe video RAM support to ram-wipe
- maybe based on https://wiki.archlinux.org/title/Swap_on_video_RAM
- maybe also based on https://github.com/divestedcg/Brace/blob/master/brace/etc/profile.d/brace-env-overrides.sh
# zero video RAM to prevent leakage # see (CC BY-SA 4.0): https://www.adlerweb.info/blog/2012/06/20/nvidia-x-org-video-ram-information-leak export R600_DEBUG=zerovram; export AMD_DEBUG=zerovram; export RADV_DEBUG=zerovram;
- if doable with reasonable effort
Tor 0.4.8.9 broken in combination with vanguards[edit]
- https://gitlab.torproject.org/tpo/core/tor/-/issues/40892
- write a script to use git bisect to auto test which commit introduced this issue maybe based on https://forums.whonix.org/t/vanguards-additional-protections-for-tor-onion-services/8064/64
- if not done by upstream yet
- if doable with reasonable effort
VirtualBox serial console[edit]
- sudo apt install serial-console-enable
- Serial Console
- causes bug (spam of journal)
- https://forums.whonix.org/t/serial-console-in-virtualbox/8021/13
- fixable? upstream bug report?
- would installation by default be sane or a security issue?
[edit]
KVM - 3D Graphics Acceleration - SPICE - Testing - drm[edit]
- please test: https://www.whonix.org/wiki/KVM#3D_Graphics_Acceleration_-_Testing_-_drm
- please mention your configuration (still using SPICE), quote Patrick and report here: https://forums.whonix.org/t/how-to-enable-3d-acceleration-in-kvm/16501/22
- test if DRM (direct rendering manager) is enabled as per https://www.whonix.org/wiki/KVM#3D_Graphics_Acceleration_-_Testing_-_drm
- test performance as per https://www.whonix.org/wiki/KVM#3D_Graphics_Acceleration_-_Testing_-_Performance
KVM - 3D Graphics Acceleration - Performance Test - Display SDL[edit]
- https://forums.whonix.org/t/how-to-enable-3d-acceleration-in-kvm/16501/22
- test SDL
- test if DRM (direct rendering manager) is enabled as per https://www.whonix.org/wiki/KVM#3D_Graphics_Acceleration_-_Testing_-_drm
- test performance as per https://www.whonix.org/wiki/KVM#3D_Graphics_Acceleration_-_Testing_-_Performance
KVM - 3D Graphics Acceleration - Performance Test - Display GDK[edit]
- https://forums.whonix.org/t/how-to-enable-3d-acceleration-in-kvm/16501/22
- test GTK
- test if DRM (direct rendering manager) is enabled as per https://www.whonix.org/wiki/KVM#3D_Graphics_Acceleration_-_Testing_-_drm
- test performance as per https://www.whonix.org/wiki/KVM#3D_Graphics_Acceleration_-_Testing_-_Performance
machine-id research[edit]
- in preparation for the next task
- please read prior discussions
- https://www.whonix.org/wiki/Protocol-Leak-Protection_and_Fingerprinting-Protection#Identifiers_Design_Goals
- https://forums.whonix.org/t/revisit-handling-of-var-lib-dbus-machine-id/18827
- https://forums.whonix.org/t/anonymize-etc-machine-id/7721
- https://gitlab.tails.boum.org/tails/tails/-/issues/7100
- nowadays implemented in dist-base-files
- ./packages/kicksecure/dist-base-files/var/lib/dbus/machine-id
- ./packages/kicksecure/dist-base-files/etc/machine-id
- but maybe needs to be moved back to anon-base-files when porting to Debian trixie? (hard to migrate within the same release codename)
- The machine-id files should not be shipped by a package. They are intended to be generated, not hardcoded, thus Debian's code is probably not going to cope well when a package ships these files. Case in point, live-build deleting them to avoid machines with duplicate IDs in the wild, when we want machines with duplicate IDs in the wild.
- Calamares is designed to write the machine-id files at instalation time. It has a dedicated module for this purpose. However, it does not permit specifying a hardcoded machine-id other than a literal "uninitialized" value or an empty file. So we will have to resort to using a shellprocess for Whonix-Host that will detect when Whonix is in use, and overwrite the machine-id files with a static machine-id. Calamares is the proper location to do this at IMO, since it's designed for this, systemd's docs suggest using the installer for this, and I fear we could run into problems trying to do this on first boot with a systemd unit.
- Patrick: Please implement.
- Patrick: Note, Whonix VMs are built using grml-debootstrap. While using a package to handle these files might be the wrong way. Whonix VMs still need these.
check out bubblejail[edit]
- https://github.com/igo95862/bubblejail
- in preparation for next task
sandbox-app-launcher[edit]
- sandbox-app-launcher
- review
- promising? worth bringing back to life, polishing?
- at odds with apparmor.d?
- better using bubblejail?
automated test suite - cli version[edit]
- todo: discuss
apparmor.d review[edit]
- https://github.com/roddhjav/apparmor.d
- https://forums.whonix.org/t/apparmor-d-full-set-of-apparmor-profiles-1500-profiles/17389
- review
- https://github.com/roddhjav/apparmor.d/issues?q=is%3Aissue+author%3Aadrelanos
- check ticket status
- lightweight security review
- conceivable or too much effort?
apt-get - implement --restrict-install-recommends proof of concept[edit]
- todo
improved server support[edit]
- documentation
- rebrand wiki CLI for server
- Linux account passwords?
- cloudinit?
- vm-config-dist versus autologin CLI vs GUI vs server
WAITING ON[edit]
calamares - investigate keyboard layout issue[edit]
- https://forums.kicksecure.com/t/problems-with-the-installation/836
- Asked user for more information, cannot reproduce.
trixie port - misc[edit]
- waiting for trixie to get frozen and stable enough
- 1) SSH configurations
- move configuration snippets from SSH wiki page to security-misc [not completed at time of writing in end of 2024 but should be early next year]
- https://github.com/Kicksecure/legacy-dist/blob/master/usr/sbin/release-upgrade
- add ominous message to release-upgrade script if SSH client or server is installed
- point out in distribution morphing instructions
- 2) repository codename split project names
- update repository origin value as per https://www.kicksecure.com/wiki/Dev/APT#changed_its_'Origin'_value_from_'whonix'_to_'kicksecure'
- (revert the revert of https://github.com/Kicksecure/derivative-maker/commit/25f5c7e11afd23f58f40286be1fd9097c31a705e)
- 3) move pwchange from usability-misc to to helper-scripts
- 4) convert user-sysmaint-split and sysmaint-panel from "loose packages" to dependencies of the respective meta packages
- add ominous message to release-upgrade script
- 5) Check if /etc/grub.d/10_linux was updated in Debian. If so, update our fork in dist-base-files.
trixie port - meta packages[edit]
- implement Dev/Metapackages when porting to trixie
review and test IPv6 support pull requests[edit]
- https://forums.whonix.org/t/add-ipv6-support/19893
- https://www.whonix.org/wiki/Dev/ipv6
- please review for Non-Qubes-Whonix, Qubes-Whonix
- goal: merge as much as doable/possible without breaking networking
- enabling IPv6 support in Qubes-Whonix might only be possible during release upgrade to trixie based and orchestration with Qubes
- Waiting for planned fixes to land in PRs.
- Update 1:
- Please recheck.
- Notes:
- square brackets aren't supported in systemd: https://github.com/systemd/systemd/issues/35621
- quote "The only issue is that VirtualBox only supports IPv6 if we switch to bridged interface, which exposes whonix gateway to the network. libvirt requires adding custom NAT rules for IPv6, which are only automatically managed for IPv4. If we want to add this, we'd need to add a static IP configuration and give the user instructions on how to add NAT rules on the host. So for now only Qubes will have direct support for IPv6 for outgoing transactions, without further instructions a user needs to do on the host."
- Can't get it working in VBox (even with bridged networking), libvirt (even with a custom network interface), or Qubes (apparent bug in Qubes R4.3 prevents me from making a new network-providing qube). See https://forum.qubes-os.org/t/qubes-4-3-cannot-create-a-new-appvm-that-provides-network-to-other-qubes/30906/2.
calamares - make 3.3.12 available in Bookworm[edit]
- necessary to fix bugs related to the disk encryption user interface
- Sid and Trixie are still at 3.3.9, does maintainer need help packaging 3.3.12?
- Maintainer uploaded 3.3.12 to Sid, should migrate to Testing relatively soon.
- 3.3.11 was hung up on calamares-extensions 3.3.1, and while calamares-extensions 3.3.11 is technically available, a real release of it hasn't been made. Pinged the Calamares devs to see if they could do that, after than I'll ping the Debian Qt/KDE team to get them to package it and that should release calamares into Trixie.
- 3.3.12 was uploaded but was slightly wonky, wasn't migrating, maintainer wasn't fixing the issue yet. Got a DD friend to sponsor an NMU to fix the problem, should hopefully migrate on December 22nd if all goes well. (Thanks to Simon Quigley for sponsorship!)
- Backport 3.3.12 after it is available in Trixie
ISO - GRUB - silence cosmetic errors in live ISO GRUB[edit]
- Earlier attempts to fix cosmetic errors in GRUB failed, since they introduced bugs into the live-build-provided boot screen.
- Investigate how to fix this, potentially make an upstream feature request or patch if needed
- Errors include loadfont issues, Secure Boot loading issues
- Sent email to grub-devel mailing list to investigate this
ISO - memtest86+[edit]
error: bad shim signature
- Fixable?
- Apparently requires a security review: Meta: Signing memtest86+ v6.10
- memtest86+: fails to work with Secure Boot enabled
- Asked about what contributions would allow this to move forward on the debian-efi mailing list: Memtest86+ Secure Boot signing
test SysRq keys under LXQt Wayland[edit]
- ensure SysRq+unraw, SysRq+k behave as expected in context of Login spoofing
- Has issues, wlroots bug reported at https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3930
ISO - btrfs versus grub-live bug - real fix[edit]
- todo
- report bug upstream
- systemd bug report: https://github.com/systemd/systemd/issues/35540
- fix in dracut
- Cannot be fixed in dracut, dracut doesn't handle mounting /home. Instead opting to fix in grub-live.
- Might use kernel parameters using systemd features that may be available in trixie?
ISO - changed files issues[edit]
(annoted)
+ debsums --silent debsums: changed file /usr/sbin/sources-media (from calamares-settings-debian package) - issue for future verified boot debsums: missing file /var/lib/dbus/machine-id (from dist-base-files package) - issue for Whonix-Host, non-ideal for Kicksecure but not a blocker
+ debsums --config --silent debsums: changed file /etc/calamares/modules/unpackfs.conf (from calamares-settings-debian package) - issue for future verified boot debsums: changed file /etc/cryptsetup-initramfs/conf-hook (from cryptsetup-initramfs package) - issue for future verified boot debsums: changed file /etc/machine-id (from dist-base-files package) - issue for Whonix-Host, non-ideal for Kicksecure but not a blocker
- All of these are modified by live-build itself:
/usr/sbin/sources-media
is modified bylive-build/share/hooks/normal/5050-dracut.hook.chroot
so that it points to the proper location of the on-ISO apt repo when dracut is in use (the location is different when initramfs-tools is used). The need for this could potentially be removed by modifying thesources-media
script to autodetect the correct location, though this requires upstream to be receptive to the idea.- Please discuss upstream. Since there is already some sort of dm-verity support in upstream live-build (scripts/build/binary_dm-verity), upstream might be receiptive.
- Feature request filed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1089618
- Please discuss upstream. Since there is already some sort of dm-verity support in upstream live-build (scripts/build/binary_dm-verity), upstream might be receiptive.
/var/lib/dbus/machine-id
is deleted bylive-build/share/hooks/normal/8020-remove-dbus-machine-id.hook.chroot
, which has a note in it as follows: "This removes dbus machine id that cache that makes each system unique." This seems important and I can't think of an obvious way to avoid needing to do this. My Kicksecure VMs appear to have machine IDs, but it's unclear how they're being generated originally, so it may be worth enabling the machineid module in our Calamares configuration to ensure that the machine ID is properly generated.- See also: https://www.whonix.org/wiki/Protocol-Leak-Protection_and_Fingerprinting-Protection#Identifiers_Design_Goals
- TODO: Discuss.
- Proposal for fixing this made.
/etc/calamares/modules/unpackfs.conf
is modified bylive-build/share/hooks/normal/5050-dracut.hook.chroot
so that it points to the proper location of the on-ISO squashfs containing the operating system. Again, the location is different when initramfs-tools is used. This is a "hardcoded" configuration file, there isn't a way to add autodetection logic here. It might be possible to make a pull request to Calamares that would allow it to skip squashfses that didn't exist?- Yes, please discuss upstream.
- Feature request filed: https://github.com/calamares/calamares/issues/2409
- Yes, please discuss upstream.
/etc/cryptsetup-initramfs/conf-hook
is modified bylive-build/share/hooks/normal/1010-enable-cryptsetup.hook.chroot
, where it is used to enable cryptsetup in initramfs-tools. Assuming this isn't legacy configuration, this seems important and I can't think of an obvious way to avoid needing to do this. Might be worth testing to see if this is still necessary though.- Yes, please.
- Bug report made: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1089624
- Yes, please.
/etc/machine-id
is deleted bylive-build/share/hooks/normal/8020-remove-dbus-machine-id.hook.chroot
. Has a very similar note to the other machine ID deletion hook. Same concerns apply.- Proposal for fixing this made.
ISO - Finish Module Action Follow-Up[edit]
- https://github.com/calamares/calamares/issues/2321
- please follow-up
- Followed up on Matrix, will follow up again soon on Github if I don't get a response.
- Was informed by Adriaan de Groot that the code is still unfinished, and also on his radar.
lightdm ssdm[edit]
- bug report: https://forums.kicksecure.com/t/kicksecure-inside-lmde-5/46/11
- cause of bug could be in rads or security-misc
- Unable to reproduce bug, request for more information at https://forums.kicksecure.com/t/kicksecure-inside-lmde-5/46/13
- More information received, need to retry this one more time
- Tested, finally managed to partially reproduce. Issue appears to be in SDDM.
- Debugging complete, bug report with fix filed. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1089004
iso - calamares - Argon2id[edit]
- are we using Argon2id because it is a cryptsetup default?
- please follow-up if useful on these tickets
- https://github.com/calamares/calamares/issues/2127
- https://invent.kde.org/system/kpmcore/-/merge_requests/43
- We are currently using Argon2id, but only because it is the default in Debian's cryptsetup.
- Followed up at https://invent.kde.org/system/kpmcore/-/merge_requests/43#note_1084941. No follow up needed on the Calamares ticket, the choice of which version of LUKS to use is already configurable and there's a good reason for Calamares to not default to LUKS2 yet.
- Waiting on a response from the original MR creator. Will make an MR of my own if allowed or if the original author doesn't respond in a week or so.
- Original MR creator did not respond, filed my own MR: https://invent.kde.org/system/kpmcore/-/merge_requests/56
live-build - add mmdebstrap support[edit]
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031932
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031929
- Merge request: https://salsa.debian.org/live-team/live-build/-/merge_requests/370
live-build - use APT with error-on-any[edit]
- use option
apt --error-on=any
for all invocations of apt-get (update) - only needed for apt-get update, otherwise superfluous but non-issue
- this is a security feature
- this is to prevent inconsistent images that succeeded connecting to the "normal" repository but failed to connect to the security repository
- can be implemented using already existing live-build option
--apt-options OPTION|"OPTIONS"
? - Requires a patch to live-build. Using
--apt-options
results in a build failure withE: Command line option --error-on=any is not understood in combination with the other options
- Patch written, submitted upstream as https://salsa.debian.org/live-team/live-build/-/merge_requests/371. New configuration option now used in my branch of live-build.
security-misc - investigate PAM[edit]
- there is /etc/pam.d/sudo-i for interactive and /etc/pam.d/sudo
- pam has concepts of common-session-noninteractive vs common-session (non-interactive)
- how could we on the PAM level notice if faillock is used interactively or non-interactively?
- if non-interactive, skip faillock
- if interactive, do not skip faillock
- Bug reports:
live-build - local repository support[edit]
- add support to build from local repository
- Merge request: https://salsa.debian.org/live-team/live-build/-/merge_requests/369
live-build - grub.cfg GRUB configuration - loopback.cfg[edit]
- add https://www.supergrubdisk.org/wiki/Loopback.cfg compatibility (as as Debian Live ISO)
- Requires fixes in live-build and Dracut to make work:
- live-build is specifying the wrong kernel parameter for loopback booting when using dracut - it's using
findiso
when it should be usingiso-scan/filename
. A fix for this has been integrated into my fork of live-build. MR to upstream here: https://salsa.debian.org/live-team/live-build/-/merge_requests/376 - dracut is failing to run
udevadm trigger
during its device scanning, so even when it finds the ISO and attaches it as a loopback device, it never finds it. Only appears to be a problem on Debian Bookworm, Trixie works just fine.- Task is on hold until we migrate to Trixie.
- (Side note: At least on QEMU, loopback mounts in GRUB fail with out-of-memory errors if the system uses UEFI. With BIOS it works fine. Not quite sure why this happens, very well may be an issue with QEMU's implementation of UEFI hardware or my usage thereof.)
- live-build is specifying the wrong kernel parameter for loopback booting when using dracut - it's using
live-build - lb-binary should not run apt-get update[edit]
- todo
- Bug filed at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1087470
- Note that the use of apt-get in the binary stage appears to be very baked into live-build's logic. It's pretty unlikely this will change.
REVIEW PLEASE[edit]
permission-hardener refactor[edit]
- Avoid lazy loading, instead build state arrays and apply them in an idempotent fashion
- Currently planned algorithm:
- Build the state first, starting with an empty state array if there is no state or loading an existing state array if there is state. For each file mentioned in the policy, check to see if it's in the state array, and if not, add its current user owner, group owner, and permissions state to the array. (TODO: How to handle capabilities? For now we can just support stripping them and not support adding them back.)
- Next, apply the policy to the state. Copy the state array to a new array, and then change the user owner, group owner, permissions state, and capabilities to match the policy. It is important that it be done this way, because this means if the policy used to modify a file, but now no longer does, that file's original permissions state will exist in the state array, and thus will be considered part of the state that permissions-hardener applies.
- Apply the built, policy-enhanced state to the filesystem's active state. For each file in the state array, delete the file's entry in dpkg-statoverride, then change the file's actual state to match the state array (again using dpkg-statoverride to do this)
- To undo a policy for a file, load the state file, wipe the dpkg-statoverride entry for it, and then apply the stored state to the real file.
- Ready for review: https://github.com/ArrayBolt3/security-misc/tree/arraybolt3/permission-hardener-refactor
- PR: https://github.com/Kicksecure/security-misc/pull/293
ARCHIVED[edit]
research verified boot and measured boot[edit]
- https://www.kicksecure.com/wiki/Dev/About_Computer_(In)Security
- https://www.kicksecure.com/wiki/Hardware_Wallet_Security
- https://www.kicksecure.com/wiki/Verified_Boot
- https://www.kicksecure.com/wiki/Measured_boot
- review, watch, improve, keep notes
- in preparation for consultation with firmware developer
Update #1:
Please review:
- https://www.kicksecure.com/wiki/Verified_Boot#Boot_Block_versus_TPM
- Aaron: Reviewed, updated. Note, the TPM doesn't use XOR when extending PCR values, and banks don't really matter half so much as PCRs, based on my research.
- https://www.kicksecure.com/wiki/Verified_Boot#Boot_Block_Based_Attacks_Against_Measured_Boot
- Aaron: Reviewed, updated, but I'm not sure where the fake TPM comes into play so I'm not sure I correctly understood this.
- https://www.kicksecure.com/wiki/Verified_Boot#TPM_EK_-_Endorsement_Key
- Aaron: Reviewed, updated.
Considered:
How does android implement relock bootloader with user custom keys?
- Document shortcomings with a vendor-provided, no-true-ROM solution
- There may not be serious shortcomings with this after all.
- Android trusts the hardcoded android hardcoded bootloader?
- The firmware does appear to be implicitly trusted. It is possible that the device SoC cryptographically verifies the firmware similar to Boot Guard, but if so, this isn't documented anywhere obvious, and it doesn't appear that Android Verified Boot considers malicious system firwmare in the threat model.
- https://android.stackexchange.com/questions/238980/why-is-it-possible-to-re-lock-the-bootloader-after-installing-a-custom-rom-on-s
- Android: User-settable root of trust
- Android: Boot Flow
- Android: Figure 1. Verified boot flow.
- rollback protection
- theft protection
- factory reset protection
- watch some videos on how Android is flashed, locked, unlocked, relocked
- Figure out how Heads avoids relay attacks with firmware verification, if it does -> https://github.com/linuxboot/heads/issues/1881
- android hardware keystore (HSM)
- This is of questionable use for verified boot. It might be useful for factory reset protection but there may be better ways to do that. It also relies on an ARM TrustZone "secure world" which is scary.
- See if adding some sort of secure, append-only storage is useful and work it in if so (hardware keystore hsm)
- Most likely is useful for rollback protection, documented. It could be implemented using a "secure world" similar to TrustZone but it seems better to implement it in hardware, potentially.
- TPM MITM issue
- This is only really a problem if the attacker can modify the motherboard, which is a threat model that is extremely difficult to defend against and should probably be considered out-of-scope.
- offline theft protection
- online theft protection (remote locking)
- Likely too difficult. Requires a cloud service in the middle, which is bad for privacy and a potential security hole itself.
- compare TOTP vs challenge response based (NitroKey). Or "nothing" (Android)?
- TOTP and HOTP are both potentially vulnerable to relay attacks, HOTP less so if used carefully. Better yet still would be a data signature challenge (i.e. here's a blob of random data, sign it and send it back to me so I can check that your signature is good).
gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is 6e:45:f9:a8:af:38:3d:a1:a5:c7:76:1d:02:f8:77:00. Please contact your system administrator. Add correct host key in /home/hostname /.ssh/known_hosts to get rid of this message. Offending RSA key in /var/lib/sss/pubconf/known_hosts:4 RSA host key for pong has changed and you have requested strict checking. Host key verification failed.
- either send own hardware or TOFU
- Send own hardware is highly preferable
- maybe solvable if cloud vendor reveals TPM EK fingerprint beforehand?
- Not sufficient. The TPM can be fooled by firmware if Boot Guard isn't in use, and the user can't be sure that Boot Guard is in use unless they can either remotely verify the authenticity of the CPU (likely not possible unless using Intel TDX or AMD SEV) or they can verify it locally.
- explain how others do it, compare: With Android, where companies are protecting themselves from the user, the same thing is true. The "owner" (manufacturer) can provision the system the way they want and the "attacker" (user) can't do anything about it (Device Attestation such as SafetyNet)
- remote attestation is possible without verified boot? if known, please document, if unknown answer, please mention.
- Yes, it is possible, see https://safeboot.dev/attestation/. It appears that TPM measurements are used by the machine being attested to prove its identity to the machine doing the attesting.
- custom kernel modules? re-invent MOK?
- If we're using UEFI Secure Boot like our current plan states, we can just use the MOK mechanism as-is. We also could have the user sign their kernel modules so they pass Secure Boot normally.
- boot guard -> dasharo (3MDEB) firmware -> heads (?) -> verify Debian's kernel against Debian's key?
- No need for Heads, we're just using UEFI.
- maybe the unchangeable root of trust would be well placed with boot guard, dasharo. the hopefully socially incorruptible organisation becoming the caretaker of taking care the most difficult parts.
- Easier to have no single root of trust, instead have toggleable roots of trust for each distro and also allow the user to set their own root of trust.
- key management could be done at a "simpler level". at the level of heads (or similar).
- Some sort of key management tooling will be needed, and since we're using UEFI directly this may be difficult. Perhaps a UEFI application can be made that will make this easier? Or do we just need special firmware features? (We may need some way for the user to change Secure Boot keys remotely for the purposes of credential rotation, although this might not be needed and could be scary.
Concept improvements:
- stage 0 - super simple, write firmware from USB, no display graphical output support, truly read-only
- stage 1 - dasharo default firmware
- stage 2
- Verify distribution (Debian) kernel against distribution public key. Making use of EFI signatures but without using EFI.
- Mention why not using EFI.
- What if evil maid flashes using stage 0? -> Should break TOTP or similar mechanism.
- stage 1 preinstalled dasharo/heads firmware is required to match usability of user-settable root of trust, re-lock bootloader with user key supported Android phones such as Google Pixel.
- OS rollback protection
- factory reset protection
- Firmware rollback protection? if the user changes firmware keys on every update that might give us this "for free", but the key changes could be an expensive operation
- Document the need for a true ROM for firmware installation in the current design
- Create alternate design that involves no true ROM and vendor-provided firmware
- Review Google's Android docs more and pull in anything that would make either design better
- usability: at least as good as Android phones, if not better
- no concept of OEM ROMs -> user chosen operating systems are the primary focus
- compatibility with standard Linux distributions, if possible
- windows compatibility? Probably not, unless there's an alternative enable EFI option in the firmware
- android: users can their own key but they can also use images by distributions
- replay attacks
- relay attacks
user-sysmaint-split - remove advanced boot options for first time start[edit]
- rationale: "advanced boot options" are useless (because there are no multiple kernel versions for new VM images or after ISO installation) and confusing for new users
- helper-script: invent a new script grub-cfg-remove-advanced-boot-options to edit /boot/grub/grub.cfg directly
- run_once:
- chroot-scripts
- calamares
- document this on the Grub wiki page
- Ended up going with a different solution that moves all of the advanced boot entries to the end of the list. Looks cleaner, all functionality is retained. Changes were made to the following packages:
- dist-base-files: https://github.com/ArrayBolt3/dist-base-files/tree/arraybolt3/grub-cfg
- grub-live: https://github.com/ArrayBolt3/grub-live/tree/arraybolt3/grub-cfg
- user-sysmaint-split: https://github.com/ArrayBolt3/user-sysmaint-split
iso sysmaint mode - #2[edit]
- as discussed
- Current state (WIP):
- live-config-dist changes for unrestricted admin mode, probably shouldn't be merged until Trixie: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/sysmaint
- Patrick: merged
- user-sysmaint-split bugfix: https://github.com/ArrayBolt3/user-sysmaint-split
- Patrick: merged
- sysmaint-panel Calamares support: https://github.com/ArrayBolt3/sysmaint-panel
- Patrick: merged
- live-build changes to add sysmaint and unrestricted admin changes (PROBABLY SHOULD HAVE PUSHED THIS TO A DIFFERENT BRANCH, DO NOT MERGE): https://salsa.debian.org/ArrayBolt3/live-build/-/tree/arraybolt3/lb-dracut?ref_type=heads
- Patrick:
merged - should(resolved as discussed)git revert 4f1f20bb6f86e6a8ff2ae3aed450d83eb726a55e
?
- Patrick:
- derivative-maker changes to enable sysmaint and unrestricted admin changes, probably shouldn't be merged until Trixie: https://github.com/ArrayBolt3/derivative-maker/tree/arraybolt3/sysmaint
- Patrick:
merged - should I(resolved as discussed)git revert 68a91cb9a00a5e9f00947e002e2642f3da14e800
? - Patrick: What is the significance of Trixie here?
- Aaron: I had thought we wanted to wait until Trixie to enable user-sysmaint-split by default, however as we discussed we could enable it earlier.
- Patrick:
- live-config-dist changes for unrestricted admin mode, probably shouldn't be merged until Trixie: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/sysmaint
- Next round of changes, all should be merge-ready:
- helper-scripts: https://github.com/ArrayBolt3/helper-scripts/tree/arraybolt3/sysmaint
- live-config-dist: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/sysmaint
- usability-misc: https://github.com/ArrayBolt3/usability-misc/tree/arraybolt3/sysmaint
- sysmaint-panel: https://github.com/ArrayBolt3/sysmaint-panel/commit/f8db224e179ca7b32cffe7c21d8a159ef3e5abc3
- security-misc: https://github.com/ArrayBolt3/security-misc/tree/arraybolt3/sysmaint
- user-sysmaint-split: https://github.com/ArrayBolt3/user-sysmaint-split
- Patrick: all merged
- Another batch of patches:
- user-sysmaint-split: https://github.com/ArrayBolt3/user-sysmaint-split
- Patrick: merged
- kicksecure-base-files: https://github.com/ArrayBolt3/kicksecure-base-files/tree/arraybolt3/sysmaint
- Patrick: needs revision as discussed
- grub-live: https://github.com/ArrayBolt3/grub-live/tree/arraybolt3/sysmaint
- Patrick: same as above
- helper-scripts: https://github.com/ArrayBolt3/helper-scripts/tree/arraybolt3/sysmaint
- Patrick: merged
- live-build: https://salsa.debian.org/ArrayBolt3/live-build/-/commit/8484b589775c9783d396a84babd3c6c4eb53b7c2
- Patrick: merged
- live-config-dist: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/sysmaint
- Patrick: not merged -> but broken: breaks unrestricted admin mode
- user-sysmaint-split: https://github.com/ArrayBolt3/user-sysmaint-split
- Patrick: TODO:
- use config-package-dev displace for /etc/grub.d/10-linux for generic GRUB_DISTRIBUTOR setting based on already existing marker files
- Ended up not doing this as it was avoidable and avoiding modifying 10_linux is probably a good idea for safety and maintainability reasons.
- live-config-dist: fix restricted admin mode
- use config-package-dev displace for /etc/grub.d/10-linux for generic GRUB_DISTRIBUTOR setting based on already existing marker files
- Revised patches:
- live-config-dist: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/sysmaint
- Patrick: Not merged. Needs revision to be compatible with "traditional boot mode" when user-sysmaint-split is not installed -> copied to new ticket
- user-sysmaint-split: https://github.com/ArrayBolt3/user-sysmaint-split
- Patrick: Merged.
- grub-live: https://github.com/ArrayBolt3/grub-live/tree/arraybolt3/sysmaint
- Patrick: Merged.
- kicksecure-base-files: none, patch deleted as it is no longer needed
- live-config-dist: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/sysmaint
review wiki - shadow and ssh[edit]
- https://www.kicksecure.com/wiki/User#Meanings_of_Special_Characters_in_the_Password_Field_of_/etc/shadow_File
- https://www.kicksecure.com/wiki/SSH#SSH_Login_Comparison_Table
- Reviewed, added some info to both pages.
sysmaint - no autologin if password is set - #2[edit]
- If there's a password set, do not auto login. Prompt for password using normal login or display manager mechanism instead.
- users always need an opt-in way to set passwords, disable autologin.
- Done: https://github.com/ArrayBolt3/user-sysmaint-split
- Patrick: bug found
- /usr/libexec/user-sysmaint-split/sysmaint-boot. currently we're checking twice kernel boot parameter. i think the logic can be simplified.
- if in non-sysmaint (user) boot mode -> lock sysmaint and safe-rm any autologin config files that might exist
- bug: and let's say "/usr/sbin/lightdm" does exist. but we're not in sysmaint mode. currently what happens: do not delete the lightdm configuration file.
- Both issues fixed: https://github.com/ArrayBolt3/user-sysmaint-split
- /usr/libexec/user-sysmaint-split/sysmaint-boot. currently we're checking twice kernel boot parameter. i think the logic can be simplified.
live-config-dist- check-unrestricted-admin TMP folder[edit]
- /usr/libexec/live-config-dist/check-unrestricted-admin
export TMPDIR='/tmp'
- necessary? needs to be commented or removed
- Fixed dummy-dependency and removed this from check-unrestricted-admin.
calamares - implement - Allow distros to restrict what filesystems can be used in manual partitioning[edit]
- https://github.com/calamares/calamares/issues/2397
- PR here: https://github.com/calamares/calamares/pull/2400 Awaiting full review from devs.
- Reviewed and merged.
fix Secure Boot fallback bootloader problems[edit]
- as discussed
- Fix part 1: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/secure-boot-fix
- Patrick: merged
- Fix part 2: https://github.com/ArrayBolt3/derivative-maker/commit/2ddc2dd7b8275cb440223c57a95305d8fb40cddc
- Patrick: merged
ISO - Debug chsh failure[edit]
/var/lib/dpkg/info/dist-base-files.postinst: INFO: Setting shell for user 'user' to zsh. Password: chsh: PAM: Authentication failure /var/lib/dpkg/info/dist-base-files.postinst: ERROR: Command 'chsh --shell /usr/bin/zsh user' failed. This is only a minor issue.
- Possibly caused by this commit? https://github.com/Kicksecure/dist-base-files/commit/e4ba4e8ffc43f5ec3326c742bf86d56c34f23d79
- We're trying to set the shell to zsh before the /etc/shells file is updated. Setting zsh as a Pre-Depends of dist-base-files silently failed to resolve this, thus had to be added to Kicksecure's package list at the appropriate location.
- Fixed: https://github.com/ArrayBolt3/derivative-maker/commit/ce6e8e5da6b3428eb36b1f7650edfab54436e5d2
- Patrick: merged
ISO - use BUILD_INITRAMFS_PKGS[edit]
- todo: could you please use $BUILD_INITRAMFS_PKGS (already existing variable) instead of hardcoding dracut as initramfs generator?
- Done: https://github.com/ArrayBolt3/derivative-maker/tree/master
- Patrick: merged
boot modes wiki page review[edit]
- Dev/user-sysmaint-split has been updated
- Please review.
- Ideas for chapter Server Support, and
- chapter Todo?
- Related to upcoming tasks run0, sudoless, doas.
- I do not believe we should be implementing opt-out by having the user uninstall or delete things. Instead, let's provide a "Classic" option that the user can select at the boot menu, and provide guidance on modifying the default boot option.
- Patrick: The "classic" option would be confusing in the boot menu. Better to make user-sysmaint-split package uninstallable: dummy-dependency user-sysmaint-split
- Aaron: Sounds good.
- Patrick: Wiki page updated.
- Aaron: Sounds good.
- Patrick: The "classic" option would be confusing in the boot menu. Better to make user-sysmaint-split package uninstallable: dummy-dependency user-sysmaint-split
- Do we really want a recovery mode admin option? We specifically wanted to get rid of easy recovery mode access elsewhere.
- Patrick: Wiki was outdated on that. Recovery mode can stay disabled. Wiki has been updated to remove recovery mode.
- Server support can be handled by changing the default boot entry using
grub-set-default
most likely.- Patrick: This would mean to boot the server always into admin mode? In that case, perhaps better to go back to "classic"?
- Aaron: Yes, and that's included in the dummy-dependency user-sysmaint-split plan, so that's what we can do. Perhaps kicksecure-host-cli should use "classic" mode by default and kicksecure-host-xfce should use "user-sysmaint-split" by default?
- Patrick: Yes. Wiki page updated.
- Aaron: Yes, and that's included in the dummy-dependency user-sysmaint-split plan, so that's what we can do. Perhaps kicksecure-host-cli should use "classic" mode by default and kicksecure-host-xfce should use "user-sysmaint-split" by default?
- Patrick: This would mean to boot the server always into admin mode? In that case, perhaps better to go back to "classic"?
- We need to choose what the default, topmost boot entry will become. Should that be "PERSISTENT mode User"?
- Patrick: Yes.
- We may want to prepend "Kicksecure" to all of these boot menu entries for clarity as to which operating system is which. For Whonix, we can prepend "Whonix" to the boot menu entries.
- Patrick: Yes.
- Added some more ideas, including thoughts for server support. I don't think we need a todo chapter since this dev/todo document works as that.
review USBGuard pull request[edit]
- https://github.com/Kicksecure/security-misc/pull/166
- https://usb-ids.gowdy.us/read/UC/
- Reviewed PR, requested changes, did some simple tests to make sure it didn't cause major issues.
[edit]
- https://github.com/Kicksecure/security-misc/pull/279
- Reviewed, can document if desirable
document sysmaint warnings in wiki[edit]
- as discussed
- sysmaint
- Documented. Didn't add a screenshot of the warnings from LightDM though since I didn't think they were worth the space on the page, I can add them if desirable.
user-sysmaint-split and sysmaint-panel improvements[edit]
- rationale:
- A single command
dummy-dependency --yes --purge user-sysmaint-split
would be sufficient to go back to classic sudo setup. Uninstallation ofsysmaint-panel
would be unnecessary. Users could usesysmaint-panel
even in classic sudo setup. - sysmaint-panel should be fully independent from user-sysmaint-split. It could also be used in classic sudo mode, where user "user" has access to sudo/pkexec.
- easier to test sysmaint-panel
- Qubes compatible
- A single command
subprocess.Popen(["/usr/libexec/helper-scripts/terminal-wrapper", "/bin/sh", "-c", "$SHELL"])
- Is
/bin/sh
needed?/usr/libexec/helper-scripts/terminal-wrapper "$SHELL"
works for me (manually tested). - https://github.com/Kicksecure/sysmaint-panel/blob/master/etc/X11/Xsession.d/15_no_sysmaint_xfce
- remove xfce from the name, if applicable
- move to user-sysmaint-split
- sysmaint-panel Depends: usability-misc or is that a superfluous dependency?
echo "[Desktop] Session=sysmaint-session" \ | sponge -- '/home/sysmaint/.dmrc'
- needs to be run under user sysmaint to avoid permission issues
- needs Depends: safe-rm maybe?
- sysmaint-panel folder /usr/lib/systemd/system doesn’t seem right for a gui package. Maybe...
- user-sysmaint-split-cli
- user-sysmaint-split-gui
- sysmaint-panel
- would be a good split?
- But actually we can get that down to 2 packages only. user-sysmaint-split + sysmaint-panel
- move https://github.com/Kicksecure/sysmaint-panel/blob/master/usr/libexec/sysmaint-panel/sysmaint-session
- to user-sysmaint-split
- How? By making sysmaint-panel a "plugin" or "extension".
xfwm4 & # Needed to prevent window ordering problems sleep 1; sysmaint-panel
- could be changed to: if available, run sysmaint-panel. otherwise, just open a terminal. Pseudo code, untested:
xfwm4 & # Needed to prevent window ordering problems sleep 1; ## NOTE: bashism if command -v sysmaint-panel &>/dev/null ; then sysmaint-panel else /usr/libexec/helper-scripts/terminal-wrapper "$SHELL" fi
- add a sysmaint-panel
/usr/share/desktop/sysmaint-panel.desktop
file - check file
help-steps/pre
functionroot_check
- something similar is required for sysmaint-panel
- if sudo cannot be executed -> show an error message, explain to boot into sysmaint, show a link
- sysmaint-panel: honor signal sigterm
- https://github.com/ArrayBolt3/sysmaint-panel
- Patrick: merged
- https://github.com/ArrayBolt3/user-sysmaint-split
- Patrick: merged
- https://github.com/ArrayBolt3/security-misc/tree/arraybolt3/sysmaint
- Patrick: merged
investigate dracut-config-generic[edit]
- VM images use dracut-config-generic because help-steps/variables has:
[ -n "$BUILD_INITRAMFS_DRACUT" ] || BUILD_INITRAMFS_DRACUT="dracut dracut-live dracut-config-generic binutils dmsetup pigz"
- ISO images do not have dracut-config-generic
apt-file list dracut-config-generic dracut-config-generic: /etc/dracut.conf.d/20-generic-image.conf cat /etc/dracut.conf.d/20-generic-image.conf hostonly="no"
- TODO: Would it be useful to have this package also on the ISO? Specifically since it would be useful if this package ends up on the installed system to always have a generic initial ramdisk as well as for feature/bug parity with VM images.
- Patrick: Seems actually already done as per:
live-build/scripts/build/config: NEEDED_PACKAGES="live-config live-config-systemd systemd-sysv dracut-live dracut-config-generic dracut"
- Aaron: Confirmed, chrooting into the squashfs on a live-build-built Kicksecure ISO and running
dpkg-query -s dracut-config-generic
shows that it isinstall ok installed
. Furthermore the20-generic-image.conf
file exists on the ISO.
investigate sudoless[edit]
- https://github.com/secureblue/secureblue/releases/tag/v4.2.0
- https://www.kicksecure.com/wiki/Dev/secureblue#sudoless
- Could we go sudoless by default?
sudo
no longer readable/executable by useruser
should be equally good or better as sudoless? sudo SUID issues would not be a problem if useruser
cannot execute sudo anymore? Only user admin would be allowed to executesudo
.- In case going "sudoless" (actually similar to sudoless), it would not even be required to port to either run0 or doas?
- This would require finding solutions for existing sudoers.d exceptions. This is can be drafted on the Dev/sudo wiki page.
- Sudoless desktop-config-dist: https://github.com/ArrayBolt3/desktop-config-dist/tree/arraybolt3/sudoless Ready for merge whenever desirable.
- Patrick: Was merged.
- WIP Persistent admin mode (EDIT: this is now bitrotten and is not the direction we're going in to implement this):
- Currently missing separate user account support!
- grub-live: https://github.com/ArrayBolt3/grub-live/tree/arraybolt3/sudoless Adds an admin mode boot entry.
- This may be the wrong package to put this in, do we want a new package for this?
- Patrick: grub configuration looks good but requires dedicated package.
- This may be the wrong package to put this in, do we want a new package for this?
- security-misc: https://github.com/ArrayBolt3/security-misc/tree/arraybolt3/sudoless Actually implements the permissions changes for user and admin modes.
- Patrick: Does not really? Does not belong into security-misc. Dedicated package required.
user-sysmaint-split[edit]
- implement package user-sysmaint-split as per Dev/user-sysmaint-split
- Control panel app for sysmaint mode: https://github.com/ArrayBolt3/sysmaint-panel
- Updated user-sysmaint-split with fixes, integrates with control panel app: https://github.com/ArrayBolt3/user-sysmaint-split
- sysmaint user account lock detection: https://github.com/ArrayBolt3/security-misc/tree/arraybolt3/sysmaint
- terminal-wrapper fix for better UX: https://github.com/ArrayBolt3/helper-scripts/tree/arraybolt3/terminal-wrapper
pam-info improvements for user-sysmaint-split[edit]
admin-gui[edit]
- open terminals - helper-scripts /usr/libexec/helper-scripts/terminal-wrapper
- update software
- reboot
- shut down
- Done: https://github.com/ArrayBolt3/sysmaint-panel
VirtualBox unattended installation pass-through[edit]
- how does that mechanism work?
- Short, highly simplified answer: for Debian, it finds a file on the ISO at
/.disk/info
and parses it for info. This file identifies Kicksecure ISOs as being Debian, and it's difficult to customize the contents in live-build. Needs either customization options added or downstream patches. - Might be worth asking the VirtualBox people if they would consider adding a feature that would allow ISOs to "opt out" of autoinstall support, so that the user can't even try to use it in autoinstall mode.
investigate dracut-config-rescue[edit]
- https://forums.whonix.org/t/replacing-initramfs-tools-with-dracut/4487/8
- https://packages.debian.org/bookworm/dracut-config-rescue
cat /etc/dracut.conf.d/20-rescue.conf dracut_rescue_image="yes"
- related to https://forums.kicksecure.com/t/harden-dracut-initramfs-generator-by-disabling-recovery-console/724?
- TODO: good to keep or should be omitted?
- There appears to be no differences between an initramfs built with
dracut-config-rescue
installed and one without it. According to the Arch Wiki (https://wiki.archlinux.org/title/Dracut), the "rescue" module is supposed to provide tools such asvi
,ping
, etc., which are useful in the rescue shell, but I know from experience those are NOT present in Kicksecure's initramfs images. Thus I don't think it makes any difference either way. We could remove it in order to lighten our images, I don't expect this will cause any harm. - Diff output between initramfs generated with
dracut-config-rescue
present (old-unpack), and initramfs generated without it (newer-unpack):
root@localhost:~# diff -r -u old-unpack/ newer-unpack/ File old-unpack/main/dev/console is a character special file while file newer-unpack/main/dev/console is a character special file File old-unpack/main/dev/kmsg is a character special file while file newer-unpack/main/dev/kmsg is a character special file File old-unpack/main/dev/null is a character special file while file newer-unpack/main/dev/null is a character special file File old-unpack/main/dev/random is a character special file while file newer-unpack/main/dev/random is a character special file File old-unpack/main/dev/urandom is a character special file while file newer-unpack/main/dev/urandom is a character special file diff: old-unpack/main/etc/systemd/system/initrd.target.wants/dracut-cmdline-ask.service: No such file or directory diff: newer-unpack/main/etc/systemd/system/initrd.target.wants/dracut-cmdline-ask.service: No such file or directory diff: old-unpack/main/var/lock: No such file or directory diff: newer-unpack/main/var/lock: No such file or directory
dummy-dependency purge feature[edit]
dummy-dependency [remove|purge] pkgname
dracut rescue shell disablement maybe broken - VirtualBox install unattended option result in dracut rescue shell[edit]
- todo
- Fixed: https://salsa.debian.org/ArrayBolt3/live-build/-/tree/arraybolt3/lb-dracut?ref_type=heads The ISO will no longer be detected as an autoinstallable Debian ISO any longer after merging this.
simple integrity check boot option[edit]
- not hidden under utilities
- simple hash check
- probably an existing dracut feature
- At ISO build time, a utility
implantisomd5
(from the packageisomd5sum
) must be run on the built ISO to embed the md5 sum into it. - Passing the kernel command line argument
rd.live.check
will trigger Dracut to runisomd5check
to check the ISO's contents against this embedded md5 sum at boot time. - Could add this to derivative-maker or live-build. Willing to implement wherever is preferred.
- Patrick (from chat): best upstream
- Upstream MR: https://salsa.debian.org/live-team/live-build/-/merge_requests/392
- live-build fork with enhancements: https://salsa.debian.org/ArrayBolt3/live-build/-/tree/arraybolt3/lb-dracut?ref_type=heads
- derivative-maker change to enable the feature: https://github.com/ArrayBolt3/derivative-maker/tree/master
ISO - GRUB - failing to boot after installation[edit]
- version 17.2.8.2
- environment VirtualBox, EFI, Secure Boot
- ISO is booting
- after installation, does not boot
- Secure Boot issue: functional after disabling Secure Boot
- Fixed: https://github.com/ArrayBolt3/derivative-maker/tree/master
ISO - GRUB - cosmetic GRUB error message[edit]
- environment: VirtualBox + EFI + Secure Boot (might be reproducible elsewhere too)
error: prohibited by secure boot policy
- Turns out you can't load unsigned fonts when Secure Boot is enabled. It's possible that even the default unicode.pf2 font in GRUB is unsigned.
- Can't find an easy way to detect Secure Boot so that we can avoid running commands that will result in errors.
- There probably isn't an easy way to fix this, combining this into the "silence cosmetic errors" task.
recovery mode disabling[edit]
- https://forums.kicksecure.com/t/harden-dracut-initramfs-generator-by-disabling-recovery-console/724
- https://forums.kicksecure.com/t/remove-linux-recovery-mode-boot-option-from-default-grub-boot-menu/727
- Done, but bootloader password still needs implemented. https://github.com/ArrayBolt3/security-misc/tree/arraybolt3/no-recovery-mode
[edit]
- todo
- Done: https://github.com/ArrayBolt3/derivative-maker
- Requires live-build changes from https://salsa.debian.org/ArrayBolt3/live-build/-/tree/arraybolt3/lb-dracut?ref_type=heads for all changes to work.
[edit]
- tested where: inside Qubes OS VM
- is memtest missing on the ISO?
- Yes, it is. Adding it should fix this issue.
- Done: https://github.com/ArrayBolt3/derivative-maker
- Requires live-build changes from https://salsa.debian.org/ArrayBolt3/live-build/-/tree/arraybolt3/lb-dracut?ref_type=heads for all changes to work.
- note: increase RAM in Qubes VM to avoid dropping to CLI (no GUI). Full instructions are here: Qubes, ISO
ISO - GRUB boot options text - add version number[edit]
Kicksecure Live ISO 17.2.8.1 GNU/Linux
${dist_build_type_short_pretty} Live ISO ${dist_build_version} GNU/Linux
- remove: built
- remove: linux
- remove: live-build
- remove: live-config
- possible to use live-build-data/grub-config/splash.svg as a template, copy it to temporary folder (as usual? derivative-binary?) and adjust?
- reason: dist_build_version is the most important if user post screenshots with this. everything else adds confusion?
- Done: https://github.com/ArrayBolt3/derivative-maker
- Requires live-build changes from https://salsa.debian.org/ArrayBolt3/live-build/-/tree/arraybolt3/lb-dracut?ref_type=heads for all changes to work.
[edit]
- tested where: inside Qubes OS VM
- difficult to see unless recorded on video
error: file `/boot/grub/i386-pc/efi_gop.mod' not found. error: file `/boot/grub/i386-pc/efi_uga.mod' not found.
- Debian bug for the core image? Got some search results:
site:debian.org error: file `/boot/grub/i386-pc/efi_gop.mod' not found.
- Maybe live-build fails to install a grub package?
- Side effect of no longer installing Debian-Installer?
- This is the result of fixing the missing font bug. If the unicode.pf2 font can be loaded, GRUB sets a static display resolution of 800x600 and attempts to load four different video drivers, two of which are the efi_gop.mod and efi_uga.mod drivers, and the other two of which are video_bochs and video_cirrus. If the font load fails, it allows the resolution to be automatically detected, and loads a driver called all_video. We're now ending up with the codepath involving the efi_gop and efi_uga drivers always hit since the font is now always found.
- Coincidentally, I noticed a bug where VMs with virtio graphics would not get a fancy graphical prompt, presumably because virtio is handled by the all_video driver and not the other four drivers.
- I think it would be best to just unconditionally use the all_video driver and autodetect resolution. The existing logic doesn't make sense to me, and because the font didn't even exist in the expected spot previously, we'd just be going back to the codepath we were hitting previously.
- After experimentation, this didn't work well at all. Went back to old GRUB config code from upstream with a note that it does not work. Fixing this will require more study to see how to get GRUB to not show cosmetic errors like this.
ISO - btrfs versus grub-live bug - hotfix[edit]
- bug: btrfs is persistent in grub-live mode, while it should not be
- hotfix: please disable btrfs
- Hotfixed and merged into Kicksecure.
derivative-maker git tag following[edit]
- to empower reviewers to follow changes from one tag to another
- as discussed
- TODO: a generic script to reviews any (nested) git submodules going from one tag (or commit) to another
- This turned out to be nearly impossible and definitely impractical.
- TODO: document this on Dev/git
- Discovered
git diff --submodule=diff
, which is useful - Created sample script that provides difftool-like features with meld, and shared it with Patrick.
- Sent feature request / offer to contribute for
git difftool --submodule=diff
support in Git: https://lore.kernel.org/git/20241208030222.60e7ac70@kf-ir16/T/#u - Found PatchViewer tool and documented use under Dev/git
investigate run0[edit]
- https://forums.whonix.org/t/replace-sudo-with-doas/17482/28
- https://www.freedesktop.org/software/systemd/man/256/run0.html
- as alternative to doas
- does run0 abolish the need for Dev/user-sysmaint-split?
- It does not, in fact its presence may make implementing the user/admin split difficult since it means systemd is providing a "backdoor" for running programs as root even without SUID bits being used.
- Can be disabled using polkit config, change all auth options to
no
in theorg.freedesktop.systemd1.manage-units
section of/usr/share/polkit-1/actions/org.freedesktop.systemd1.policy
- Can be disabled using polkit config, change all auth options to
- It does not, in fact its presence may make implementing the user/admin split difficult since it means systemd is providing a "backdoor" for running programs as root even without SUID bits being used.
- Posted reasons to avoid use at https://forums.whonix.org/t/replace-sudo-with-doas/17482/29
grub-live debian control best practices[edit]
- please review, improve
- https://github.com/Kicksecure/grub-live/blob/master/debian/control
- Should grub-live
Depends: grub-live-dracut | grub-live-initramfs-tools
?- The existing setup seems fine to me. It is unfortunate that Debian lacks the ability to specify a group of packages in a dependency declaration, as the existing structure seems like an awful lot of work to depend on either dracut, or live-boot + live-tools. But, it works, and it seems to me like the best way to do this given Debian's limitations and structure.
ISO - fwupd[edit]
- Add fwupd
- fwupd-signed
- note: architecture specific? (As it turns out, yes.)
- Done: https://github.com/ArrayBolt3/derivative-maker/tree/master
ISO - GRUB unicode.pf2 error message[edit]
error: `/grub2/fonts/unicode.pf2' not found
- Please fix.
- Should be fixed in latest derivative-maker improvements.
ISO - live-build - misc improvements[edit]
- Any other misc improvements?
- live-config-dist: https://github.com/ArrayBolt3/live-config-dist/tree/arraybolt3/d-i-disable
- derivative-maker: https://github.com/ArrayBolt3/derivative-maker
advice on safe_echo vs dist-installer-cli[edit]
- https://github.com/Kicksecure/usability-misc/blob/master/usr/bin/dist-installer-cli
- https://forums.whonix.org/t/whonix-linux-installer-development-discussion/15917/188
- Comment left, can work on implementing suggested fix if desired
live-build downloads[edit]
- investigate
- Handled.
review source code - str_replace file garbage bug - str_match[edit]
- already fixed in git master
- please review
- str_replace
- str_match
- Determined root cause - failing to truncate file when rewriting.
- Reviewed code, added minor improvements to reliability and performance: https://github.com/ArrayBolt3/helper-scripts/tree/arraybolt3/str_python_scripts
swap-file-creator improvements[edit]
- https://forums.kicksecure.com/t/enhanced-heuristics-for-determining-the-swap-file-size-in-swap-file-creator/749/2
- swap-file-creator changes: https://github.com/ArrayBolt3/swap-file-creator/tree/arraybolt3/heuristics
- helper-scripts changes: https://github.com/ArrayBolt3/helper-scripts/tree/arraybolt3/heuristics
ISO - consider installing by default on ISO[edit]
packages_to_be_installed+=" mokutil " packages_to_be_installed+=" keyutils " packages_to_be_installed+=" efibootmgr "
- mokutil is already installed.
- How about the others?
- Note: architecture specific. AMD64 vs PPC etc.
- These packages don't really cause any harm if installed on a BIOS machine, and both amd64 and arm64 UEFI machines may benefit from them. I don't see any reason why not to include them by default.
- All of these are being installed by default on both amd64 and arm64 builds, and appear to be pulled in either by Calamares or by GRUB. I think we should leave these up to live-build to choose whether to automatically install them or not, since if we end up supporting platforms that use firmware other than BIOS or UEFI in the future, these might not be relevant.
multi architecture support[edit]
- the following code can be removed from build-steps.d/1200_prepare-build-machine?
- required by grml-debootstrap for arm64 builds?
- please add support for other architectures to build-steps.d/2800_create-lb-iso
- just only mostly generic code. theoretical support only. no actual builds test needed for all architectures at this time.
## The following grub packages are (partially) build dependencies by Debian live-build. ## Certainly required for amd64 ISO images booted with shim and grub. if [ "${host_architecture}" = "amd64" ]; then ## These packages are all available for the amd64 platform. ## "grub-mkrescue will automatically include every platform it finds." [1] ## [1] https://lists.gnu.org/archive/html/grub-devel/2014-03/msg00009.html ## Install them all for best compatibility and reproducible builds. ## Some might be unnecessary and waste a bit space. ## Maybe this can be optimized later. packages_to_be_installed+=" grub-efi-amd64-bin grub-pc-bin grub-coreboot-bin grub-efi-ia32-bin grub-xen-bin grub-ieee1275-bin " packages_to_be_installed+=" grub-efi-amd64-signed " packages_to_be_installed+=" shim-unsigned shim-signed shim-signed-common " packages_to_be_installed+=" shim-helpers-amd64-signed " elif [ "${host_architecture}" = "i386" ]; then packages_to_be_installed+=" grub-efi-amd64-bin grub-pc-bin grub-coreboot-bin grub-efi-ia32-bin grub-xen-bin grub-ieee1275-bin " packages_to_be_installed+=" grub-efi-ia32-signed " packages_to_be_installed+=" shim-unsigned shim-signed shim-signed-common " packages_to_be_installed+=" shim-helpers-i386-signed " elif [ "${host_architecture}" = "ppc64el" ]; then packages_to_be_installed+=" grub-ieee1275-bin " elif [ "${host_architecture}" = "ppc64" ]; then packages_to_be_installed+=" grub-ieee1275-bin " elif [ "${host_architecture}" = "sparc64" ]; then packages_to_be_installed+=" grub-ieee1275-bin " elif [ "${host_architecture}" = "arm64" ]; then packages_to_be_installed+=" grub-efi-arm64-bin " packages_to_be_installed+=" shim-unsigned shim-signed shim-signed-common " elif [ "${host_architecture}" = "riscv64" ]; then packages_to_be_installed+=" grub-efi-riscv64-bin " else true "${red}${bold}WARNING:${reset} ${under}The ISO to be build might be unbootable!${eunder} - This is because bootloader support is not implemented when building on this systems's host_architecture. - Either the build script does not know how to install the required grub '-bin' package for this architecture or the package is simply unavailable. - Therefore ISO cross builds are unsupported. Patches welcome. Might be possible to implement this by running image-to-iso using qemu. - There is also a small chance that host_architecture detection failed. (Using multiarch, wine?)" fi
- Better multi-arch support now at https://github.com/ArrayBolt3/derivative-maker/tree/master
- I tested amd64 and arm64 builds to reduce the risk of breaking things, but I did not test other architectures
older[edit]
backlog - one day[edit]
Qubes doas ticket[edit]
- feature request doas support for Qubes
- ask if Qubes would accept doas configuration snippets
- https://forums.whonix.org/t/replace-sudo-with-doas/17482/22
- Ticket filed as an enhancement request: https://github.com/QubesOS/qubes-issues/issues/9599
- Backlogged, we're going sudoless rather than porting to doas for now.
Qubes umask ticket[edit]
- /etc/sudoers.d/umask
- https://forums.whonix.org/t/replace-sudo-with-doas/17482/22
- This was only needed if migrating to doas. Superceded by sudoless mode, moved to backlog
investigate porting from sudo to doas[edit]
- https://forums.whonix.org/t/replace-sudo-with-doas/17482
- can our /etc/sudoers.d snippets be ported to doas? is doas powerful enough for our requirements based on our already existing /etc/sudoers.d snippets?
- could we have a system that no longer requires sudo or would we end up with a system that comes with both, sudo and doas? ("double" attack surface)
- use ReplaceText as a wiki search engine to find our current uses of sudo because these would need to be ported to doas
- https://www.kicksecure.com/wiki/Special:ReplaceText
- https://www.whonix.org/wiki/Special:ReplaceText
- search terms:
sudo
lxsudo
- Ensure sudoers.d config files used in Kicksecure and Whonix on Qubes OS can be ported to doas
- Did an audit of all uses of sudo in kickseure and whonix codebases, and how difficult they should be to port to doas. Results: https://gist.github.com/ArrayBolt3/6699ec4c631fec28e1f4c0a2e657fcd7
- Superceded by sudoless mode, moved to backlog
doas - send pull requests to Qubes[edit]
- Qubes doas ticket might be unlikely to get rejected. But replies could take a while.
- Please send a pull requests. Since it is only 2 packages, 3 files the wasted effort if this gets rejected might be low enough?
qubes-core-agent: /etc/sudoers.d/qt_x11_no_mitshm qubes-core-agent: /etc/sudoers.d/umask qubes-input-proxy-sender: /etc/sudoers.d/qubes-input-trigger
- Superceded by sudoless mode, moved to backlog
create /usr/local/etc/doas.d /etc/doas.d parser and /etc/doas.conf configuration file creator[edit]
- parse /usr/local/etc/doas.d
- parse /etc/doas.d
- parse only configuration files ending with
.conf
- do not overwrite a file that does not contain our auto generated configuration file (could be user custom file)
- echo a warning in that case
- atomic, create variable then use sponge
- add to security-misc
- add a dpkg trigger
/etc/doas.conf
would require a header pointing out it is auto-generated.
## Do not edit this file! ## Please create and add modifications to the following file instead: ## /usr/local/etc/torrc.d/50_user.conf ## This file was auto generated by '$BASH_SOURCE' at APT package installation time (a dpkg trigger).
- Superceded by sudoless mode, moved to backlog
doas - add to security-misc permission hardener whitelist[edit]
- todo
- Superceded by sudoless mode, moved to backlog
doas - create /etc/doas.d configuration snippets[edit]
- add /etc/doas.d configuration snippets to the various packages needing these
- if possible, pending discussion in https://forums.whonix.org/t/replace-sudo-with-doas/17482/19 for review of sudoers.d snippets by upstream
- Superceded by sudoless mode, moved to backlog
bootloader password[edit]
vm-config-dist re-installs same version[edit]
- Why a freshly built ova image attempts to upgrade vm-config-dist, even though it is already the latest version?
- https://download.kicksecure.com/ova/17.2.7.8/
- please investigate
[user ~]% dpkg -l | grep vm-config ii vm-config-dist 3:10.5-1 all usability enhancements inside virtual machines [user ~]% upgrade-nonroot Get:1 tor+https://deb.debian.org/debian bookworm InRelease [151 kB] Get:2 tor+https://fasttrack.debian.net/debian bookworm-fasttrack InRelease [12.9 kB] Get:3 tor+https://fasttrack.debian.net/debian bookworm-fasttrack/main amd64 Packages [5296 B] Get:4 tor+https://deb.debian.org/debian bookworm-updates InRelease [55.4 kB] Get:5 tor+https://fasttrack.debian.net/debian bookworm-fasttrack/non-free amd64 Packages [492 B] Get:6 tor+https://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB] Get:7 tor+https://fasttrack.debian.net/debian bookworm-fasttrack/contrib amd64 Packages [7332 B] Get:8 tor+https://deb.kicksecure.com bookworm InRelease [62.0 kB] Get:9 tor+https://deb.debian.org/debian bookworm-backports InRelease [59.0 kB] Get:10 tor+https://deb.kicksecure.com bookworm/non-free amd64 Packages [913 B] Get:11 tor+https://deb.debian.org/debian bookworm/non-free amd64 Packages [97.3 kB] Get:12 tor+https://deb.debian.org/debian bookworm/non-free-firmware amd64 Packages [6236 B] Get:13 tor+https://deb.debian.org/debian bookworm/contrib amd64 Packages [54.1 kB] Get:14 tor+https://deb.debian.org/debian bookworm/main amd64 Packages [8789 kB] Get:15 tor+https://deb.kicksecure.com bookworm/main amd64 Packages [33.7 kB] Get:16 tor+https://deb.kicksecure.com bookworm/contrib amd64 Packages [509 B] Get:17 tor+https://deb.debian.org/debian bookworm-updates/non-free-firmware amd64 Packages [616 B] Get:18 tor+https://deb.debian.org/debian bookworm-updates/main amd64 Packages [2712 B] Get:19 tor+https://deb.debian.org/debian bookworm-updates/non-free amd64 Packages [12.8 kB] Get:20 tor+https://deb.debian.org/debian bookworm-updates/contrib amd64 Packages [768 B] Get:21 tor+https://deb.debian.org/debian-security bookworm-security/contrib amd64 Packages [644 B] Get:22 tor+https://deb.debian.org/debian-security bookworm-security/non-free-firmware amd64 Packages [688 B] Get:23 tor+https://deb.debian.org/debian-security bookworm-security/main amd64 Packages [206 kB] Get:24 tor+https://deb.debian.org/debian bookworm-backports/main amd64 Packages [264 kB] Get:25 tor+https://deb.debian.org/debian bookworm-backports/contrib amd64 Packages [5624 B] Get:26 tor+https://deb.debian.org/debian bookworm-backports/non-free-firmware amd64 Packages [3852 B] Get:27 tor+https://deb.debian.org/debian bookworm-backports/non-free amd64 Packages [11.1 kB] Fetched 9891 kB in 8s (1227 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: vm-config-dist 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 40.2 kB of archives. After this operation, 2048 B of additional disk space will be used. Do you want to continue? [Y/n] ^Czsh: exit 130 upgrade-nonroot
[user ~]% apt-cache show vm-config-dist Package: vm-config-dist Version: 3:10.5-1 Architecture: all Maintainer: Patrick Schleizer <adrelanos@kicksecure.com> Installed-Size: 135 Depends: sudo, adduser, p7zip-full Replaces: power-savings-disable-in-vms, shared-folder-help Homepage: https://github.com/Kicksecure/vm-config-dist Priority: optional Section: misc Filename: pool/main/v/vm-config-dist/vm-config-dist_10.5-1_all.deb Size: 40244 SHA256: 41fc4cd7e2f97bdcf23ff80b91cbbc339aca3c60445ffaa4725147e4e28d048a SHA1: d150305c67a4d3949c714c4b16a6a2c1ebe63353 MD5sum: 471286ecd49b36d287b50f807685036b Description: usability enhancements inside virtual machines Sets environment variable `QMLSCENE_DEVICE=softwarecontext` as workaround for "Automatic fallback to softwarecontext renderer". . It is not useful to open a screensaver or to power down the desktop for operating systems that are run inside VMs. There is no real display that could be saved and no real power that could be saved. From usability perspective it also is counter intuitive when looking at the VM window and only seeing a black screen. Therefore it makes sense to disable power savings in VMs. `/etc/X11/Xsession.d/20_kde_screen_locker_disable_in_vms.sh` `/etc/profile.d/20_power_savings_disable_in_vms.sh` `/etc/X11/Xsession.d/20_software_rendering_in_vms.sh` `/usr/share/kde-power-savings-disable-in-vms/kdedrc` `/usr/share/kde-screen-locker-disable-in-vms/kscreenlockerrc` . Disables screen locker when running in VMs because that is not useful either. . Makes setting up a shared folder for virtual machines a bit easier. . * Creates a folder `/mnt/shared` with `chmod 777`, adds a group "vboxsf", adds user "user" to group "vboxsf". Facilitates auto-mounting of shared folders. . * Helps using shared folders with VirtualBox and KVM a bit easier (as in requiring fewer manual steps from the user). . * `/lib/systemd/system/mnt-shared-vbox.service` * `/lib/systemd/system/mnt-shared-kvm.service` . Set screen resolution 1920x1080 by default for VM in VirtualBox and KVM. Workaround for low screen resolution 1024x768 at first boot. When using lower screen resolutions, Xfce will automatically scale down. `/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml` . Installs VirtualBox guest additions if package `virtualbox-guest-additions-iso` is installed if environment variable `dist_build_virtualbox=true` or if running inside VirtualBox. (`systemd-detect-virt` returning `oracle`) `/usr/bin/vbox-guest-installer` Description-md5: 09e095e928a4c962e728f72d712b4c34 Package: vm-config-dist Status: install ok installed Priority: optional Section: misc Installed-Size: 133 Maintainer: Patrick Schleizer <adrelanos@kicksecure.com> Architecture: all Version: 3:10.5-1 Replaces: power-savings-disable-in-vms, shared-folder-help Depends: sudo, adduser, p7zip-full Conffiles: /etc/dracut.conf.d/30-vm-config-dist.conf 4b17a68bed81773993a0c46d79148986 /etc/gdm3/daemon.conf.dist b1f35c9655abcc3171af5c10ce4d8292 /etc/profile.d/20_kde_screen_locker_disable_in_vms.sh e45dd471bc555b906c6c04b208f4066b /etc/profile.d/20_power_savings_disable_in_vms.sh bfef62e0edc770197204884b9fc3baea /etc/profile.d/20_software_rendering_in_vms.sh 32d99ab4948878c5c790145bdafa88ea /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml 573a4880ca28e8e094ea78fa76fb875e Description: usability enhancements inside virtual machines Sets environment variable `QMLSCENE_DEVICE=softwarecontext` as workaround for "Automatic fallback to softwarecontext renderer". . It is not useful to open a screensaver or to power down the desktop for operating systems that are run inside VMs. There is no real display that could be saved and no real power that could be saved. From usability perspective it also is counter intuitive when looking at the VM window and only seeing a black screen. Therefore it makes sense to disable power savings in VMs. `/etc/X11/Xsession.d/20_kde_screen_locker_disable_in_vms.sh` `/etc/profile.d/20_power_savings_disable_in_vms.sh` `/etc/X11/Xsession.d/20_software_rendering_in_vms.sh` `/usr/share/kde-power-savings-disable-in-vms/kdedrc` `/usr/share/kde-screen-locker-disable-in-vms/kscreenlockerrc` . Disables screen locker when running in VMs because that is not useful either. . Makes setting up a shared folder for virtual machines a bit easier. . * Creates a folder `/mnt/shared` with `chmod 777`, adds a group "vboxsf", adds user "user" to group "vboxsf". Facilitates auto-mounting of shared folders. . * Helps using shared folders with VirtualBox and KVM a bit easier (as in requiring fewer manual steps from the user). . * `/lib/systemd/system/mnt-shared-vbox.service` * `/lib/systemd/system/mnt-shared-kvm.service` . Set screen resolution 1920x1080 by default for VM in VirtualBox and KVM. Workaround for low screen resolution 1024x768 at first boot. When using lower screen resolutions, Xfce will automatically scale down. `/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml` . Installs VirtualBox guest additions if package `virtualbox-guest-additions-iso` is installed if environment variable `dist_build_virtualbox=true` or if running inside VirtualBox. (`systemd-detect-virt` returning `oracle`) `/usr/bin/vbox-guest-installer` Description-md5: 09e095e928a4c962e728f72d712b4c34 Homepage: https://github.com/Kicksecure/vm-config-dist [user ~]%
- SHA256 is OK and matches my locally built package.
myfind . | grep vm-config-dist | grep '.deb$' | xargs sha256sum + set -e + find . -type f -not -iwholename '*.git*' 41fc4cd7e2f97bdcf23ff80b91cbbc339aca3c60445ffaa4725147e4e28d048a ./genmkfile-packages-result/vm-config-dist_10.5-1_all.deb 41fc4cd7e2f97bdcf23ff80b91cbbc339aca3c60445ffaa4725147e4e28d048a ./aptrepo_local/kicksecure/pool/main/v/vm-config-dist/vm-config-dist_10.5-1_all.deb 41fc4cd7e2f97bdcf23ff80b91cbbc339aca3c60445ffaa4725147e4e28d048a ./aptrepo_remote/kicksecure/pool/main/v/vm-config-dist/vm-config-dist_10.5-1_all.deb
- The Installed-Size of the package on the VM is listed as one size, but the Packages file in Kicksecure's remote repo lists a different Installed-Size. Thus even though the debs are identical, apt believes the packages are different and wants to update to the remote version of the package as a result. See https://unix.stackexchange.com/questions/581291/why-apt-wants-to-upgrade-already-up-to-date-package. Why this is happening is unclear. Perhaps something is going wrong with using reprepro? See below.
# From https://deb.kicksecure.com/dists/bookworm/main/binary-amd64/Packages: Package: vm-config-dist ... Installed-Size: 135 ... # From /var/lib/dpkg/status from the linked OVA file: Package: vm-config-dist ... Installed-Size: 133 ...
- I did an OVA build in the background to see what Installed-Size it resulted in, but then accidentally deleted it, I can do redo the build and check it if desired.
str_replace utf-8 bug[edit]
str_replace %%replace-me-clearnet-replace-me%% kicksecure.com /etc/postfix/header_checks.db
Traceback (most recent call last): File "/usr/bin/str_replace", line 49, in <module> main() File "/usr/bin/str_replace", line 26, in main file_data = source_fh.read() ^^^^^^^^^^^^^^^^ File "<frozen codecs>", line 322, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8e in position 54: invalid start byte
- Low-priority, could be difficult to fix.
Qubes graphical-session.target missing bug[edit]
- Which source code file does enable systemd graphical-session.target target on Debian?
- https://github.com/QubesOS/qubes-issues/issues/9576
- Patrick: msgcollector now starts the systemd unit from /etc/xdg/autostart, that is good enough.
add date and time detection to archive.today frontend[edit]
- This is necessary for the next task.
- If a link has been archived once in the past, but is severely outdated, we should probably request that archive.today rearchive it. This requires that we know when archive.today archived each page.
- (It might be worthwhile to detect when a link was added to the Wiki and use that as a deciding factor as to whether or not we should archive the link again. Might be doable by using the archive.today backups from Github.)
- We decided to not attempt re-archiving already archived content, thus this is no longer needed for now.
mediawiki bot setup[edit]
- no wiki mass editing required for now
- will be required for mediawiki mass editing
- https://www.kicksecure.com/wiki/Special:BotPasswords
- https://www.kicksecure.com/wiki/Special:BotPasswords/botname
- https://www.whonix.org/wiki/Special:BotPasswords
- https://www.whonix.org/wiki/Special:BotPasswords/botname
- note: replace
botname
with actual name of bot
rootless X11[edit]
- only if doable with low effort such as just changing some configs (such as in lightdm config) or changing some installed packages
- Would require switching away from LightDM or enabling rootless X11 support in LightDM, thus moving to backlog.
power9 RAM encryption research[edit]
- todo
auto-detect, prompt for potential root devices in case the root= device is misconfigured or missing[edit]
- https://github.com/dracutdevs/dracut/issues/2589
- if doable with reasonable effort please send a pull request to dracut-ng
- Pull request: https://github.com/dracut-ng/dracut-ng/pull/694
- update: as discussed, low priority if effort is too high
dracut add support for undeclared CDLABEL[edit]
as discussed
live-build - Retry button in derivative-maker doesn't work[edit]
- low priority, move to backlog please
Footnotes[edit]
We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!