• 0 Posts
  • 42 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle







  • I don’t understand how this is any improvement over pkexec

    That has the same problem as sudo: the SUID bit is set for it.

    The fact that run0 uses polkit is more of a byproduct that this kinda authentication is already done with polkit all over the place in systemd. You can have individual subcommand accessible to different users (for example everyone can systemctl status, but systemctl reboot needs to be in the wheel group) which is why its generally used within systemd already. And it wouldn’t surprise me if again you can do it with this as well, limiting what commands can unconditionally run, need prompt or are completely blocked.











  • The thing with this is: its just a symlink to the systemd-run binary, which talks to PID1 to spawn new processes (in separate cgroups IIRC). Its one of the most fundamental parts of systemd. Even the debian systemd package includes systemd-run.

    I guess the other question is if some tools the distro provides might switch to supporting it by default. For example on Arch there is makepkg that should never be executed as root, but does internally call some things with elevated privileges (mostly pacman to install and remove packages). Currently it checks for sudo and if not falls back to su, but maybe it might be worth considering changing su for run0 if its guaranteed to be there.



  • I don’t really bother with AV on my linux system. What I do is just use trusted software from my repos and run containerized applications.

    What I am currently working on is using secure boot with a Unified Kernel Image (already doing that) that boot into a read-only /usr/ partition with verity + signature (one UKI only loads a certain partition with a specific signature, or nothing at all). Any other things I need I create a systemd sysext that gets overlayed ontop of /usr/ (also read-only) or they get installed as flatpak. For development I would just be using nspawn containers and podman/OCI containers for services that are outside of the other scopes.

    This is all based on https://0pointer.net/blog/fitting-everything-together.html which is a nice write down of what I am doing/following.

    That already covers a lot of different attack vectors by just not having my system be modifyable outside of my control or apps just being containerized.