Limit rights of programs #35

Open
opened 2024-08-23 19:13:17 +02:00 by Benjamin_Loison · 26 comments

Like disk and network access. Maybe like snap and flatpak.

+11

Like disk and network access. Maybe like snap and flatpak. +11
Author
Owner
Related to [Benjamin-Loison/keepassxc/issues/59](https://github.com/Benjamin-Loison/keepassxc/issues/59).
Author
Owner
https://www.reddit.com/r/privacy/comments/fwux29/signal_desktop_stores_the_encryption_key_in_a/
Author
Owner
Related to [Benjamin-Loison/termux-app/issues/36#issuecomment-2322872930](https://github.com/Benjamin-Loison/termux-app/issues/36#issuecomment-2322872930).
Author
Owner
Related to [Benjamin-Loison/android/issues/46](https://github.com/Benjamin-Loison/android/issues/46).
Author
Owner

Not sudo programs can't access other programs memory right?

Can any selected program get clipboard content/keyboard strokes (even background ones)? If so, then Benjamin-Loison/keepassxc/issues/6 looks important.

Not `sudo` programs can't access other programs memory right? Can any selected program get clipboard content/keyboard strokes (even background ones)? If so, then [Benjamin-Loison/keepassxc/issues/6](https://github.com/Benjamin-Loison/keepassxc/issues/6) looks important.
Author
Owner
Related to [Benjamin_Loison/Thunderbird/issues/89#issuecomment-2447527](https://codeberg.org/Benjamin_Loison/Thunderbird/issues/89#issuecomment-2447527).
Author
Owner
Related to [Benjamin_Loison/gpg/issues/26](https://codeberg.org/Benjamin_Loison/gpg/issues/26).
Author
Owner
[Wikipedia: Qubes OS](https://en.wikipedia.org/wiki/Qubes_OS)
Author
Owner
Related to [Benjamin_Loison/openssh/issues/43](https://salsa.debian.org/Benjamin_Loison/openssh/-/issues/43).
Author
Owner
[Wikipedia: Access control list](https://en.wikipedia.org/wiki/Access_control_list) may help.
Author
Owner

See on my Linux Mint 22 Cinnamon Framework 13 benjamin-less-safe user.

See on my Linux Mint 22 Cinnamon Framework 13 `benjamin-less-safe` user.
Author
Owner
Related to [Benjamin_Loison/shred/issues/](https://codeberg.org/Benjamin_Loison/shred/issues){[18](https://codeberg.org/Benjamin_Loison/shred/issues/18),[17](https://codeberg.org/Benjamin_Loison/shred/issues/17)}.
Author
Owner

Note that I am fine having to specify which file(s) or/and folder(s) I give access to a program, possibly even if need a reboot.

Note that I am fine having to specify which file(s) or/and folder(s) I give access to a program, possibly even if need a reboot.
Author
Owner
The person:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAiLznqw6nY2r8aPkAEOnzWgC/lDTqc6sZhSdMStOZHA4w
8ibuzUS1nzBeDLbU5vaLcfXfCKx+GT7iOGf2qYeo6NvNsVRuqHObFc/j2+kJBYim
0kEBTPe8GLlrZ/HyzPNR6Ac0USlnfKr+f0IOZzhP02dP+k96RgzGcRSKP4fpkbDc
BJuMrd6Wms3f95GkBkceDvdeBA==
=ESEq
-----END PGP MESSAGE-----

limited file system access of Firefox to downloads for instance if I remember correctly.

<details> <summary>The person:</summary> ``` -----BEGIN PGP MESSAGE----- hF4DTQa9Wom5MBgSAQdAiLznqw6nY2r8aPkAEOnzWgC/lDTqc6sZhSdMStOZHA4w 8ibuzUS1nzBeDLbU5vaLcfXfCKx+GT7iOGf2qYeo6NvNsVRuqHObFc/j2+kJBYim 0kEBTPe8GLlrZ/HyzPNR6Ac0USlnfKr+f0IOZzhP02dP+k96RgzGcRSKP4fpkbDc BJuMrd6Wms3f95GkBkceDvdeBA== =ESEq -----END PGP MESSAGE----- ``` </details> limited file system access of Firefox to downloads for instance if I remember correctly.
Author
Owner

Vagrant may help, see Benjamin_Loison/fennecbuild/issues/8.

Vagrant may help, see [Benjamin_Loison/fennecbuild/issues/8](https://gitlab.com/Benjamin_Loison/fennecbuild/-/issues/8).
Author
Owner
Related to [Benjamin-Loison/shotcut/issues/5](https://github.com/Benjamin-Loison/shotcut/issues/5).
Author
Owner
Related to [Benjamin-Loison/selenium/issues/22](https://github.com/Benjamin-Loison/selenium/issues/22).
Author
Owner
Related to [Benjamin-Loison/nemo/issues/27](https://github.com/Benjamin-Loison/nemo/issues/27).
Author
Owner
Related to [Benjamin-Loison/android/issues/222](https://github.com/Benjamin-Loison/android/issues/222).
Author
Owner
Should read [Wikipedia: Security-Enhanced Linux (1298109462)](https://en.m.wikipedia.org/w/index.php?title=Security-Enhanced_Linux&oldid=1298109462).
Author
Owner
https://www.privacyguides.org/en/desktop/#security-focused-distributions
Author
Owner
https://www.privacyguides.org/en/desktop/#whonix [apparmor.d](https://github.com/roddhjav/apparmor.d) https://whonix.org/wiki/Sandbox-app-launcher
Author
Owner

Concerning Docker, see for instance Benjamin_Loison/etesync-dav/issues/4#issuecomment-7661008.

Concerning Docker, see for instance [Benjamin_Loison/etesync-dav/issues/4#issuecomment-7661008](https://codeberg.org/Benjamin_Loison/etesync-dav/issues/4#issuecomment-7661008).
Author
Owner

In the context of Benjamin_Loison/Debian/issues/21#issuecomment-8186555 after having killed Prism Launcher with pkill -f.

ps aux | grep -i [b]wrap
Output:
benjami+ 3136507  0.0  0.0   3576  1852 ?        S    Nov08   0:00 bwrap --args 45 -- prismlauncher
benjami+ 3136515  0.0  0.0   3576  1840 ?        S    Nov08   0:00 bwrap --args 45 -- xdg-dbus-proxy --args=47
benjami+ 3136519  0.0  0.0   3584  1268 ?        S    Nov08   0:00 bwrap --args 45 -- prismlauncher
man bwrap
Output:
...
DESCRIPTION
       bwrap is a unprivileged low-level sandboxing tool (optionally setuid on older distributions). You are unlikely to use it directly from the commandline, although that is possible.

       It works by creating a new, completely empty, filesystem namespace where the root is on a tmpfs that is invisible from the host, and which will be automatically cleaned up when the last process exits.
       You can then use commandline options to construct the root filesystem and process environment for the command to run in the namespace.

       By default, bwrap creates a new mount namespace for the sandbox. Optionally it also sets up new user, ipc, pid, network and uts namespaces (but note the user namespace is required if bwrap is not
       installed setuid root). The application in the sandbox can be made to run with a different UID and GID.

       If needed (e.g. when using a PID namespace) bwrap is running a minimal pid 1 process in the sandbox that is responsible for reaping zombies. It also detects when the initial application process (pid 2)
       dies and reports its exit status back to the original spawner. The pid 1 process exits to clean up the sandbox when there are no other processes in the sandbox left.
...
In the context of [Benjamin_Loison/Debian/issues/21#issuecomment-8186555](https://codeberg.org/Benjamin_Loison/Debian/issues/21#issuecomment-8186555) after having killed Prism Launcher with `pkill -f`. ``` ps aux | grep -i [b]wrap ``` <details> <summary>Output:</summary> ``` benjami+ 3136507 0.0 0.0 3576 1852 ? S Nov08 0:00 bwrap --args 45 -- prismlauncher benjami+ 3136515 0.0 0.0 3576 1840 ? S Nov08 0:00 bwrap --args 45 -- xdg-dbus-proxy --args=47 benjami+ 3136519 0.0 0.0 3584 1268 ? S Nov08 0:00 bwrap --args 45 -- prismlauncher ``` </details> ```bash man bwrap ``` <details> <summary>Output:</summary> ``` ... DESCRIPTION bwrap is a unprivileged low-level sandboxing tool (optionally setuid on older distributions). You are unlikely to use it directly from the commandline, although that is possible. It works by creating a new, completely empty, filesystem namespace where the root is on a tmpfs that is invisible from the host, and which will be automatically cleaned up when the last process exits. You can then use commandline options to construct the root filesystem and process environment for the command to run in the namespace. By default, bwrap creates a new mount namespace for the sandbox. Optionally it also sets up new user, ipc, pid, network and uts namespaces (but note the user namespace is required if bwrap is not installed setuid root). The application in the sandbox can be made to run with a different UID and GID. If needed (e.g. when using a PID namespace) bwrap is running a minimal pid 1 process in the sandbox that is responsible for reaping zombies. It also detects when the initial application process (pid 2) dies and reports its exit status back to the original spawner. The pid 1 process exits to clean up the sandbox when there are no other processes in the sandbox left. ... ``` </details>
Author
Owner
Maybe related to [containers/bubblewrap](https://github.com/containers/bubblewrap), source: [GNOME/nautilus/blob/b6b0b45c3e089e04dd65380f89bd7a27bbbe22af/README.md?plain=1#L12](https://gitlab.gnome.org/GNOME/nautilus/-/blob/b6b0b45c3e089e04dd65380f89bd7a27bbbe22af/README.md?plain=1#L12).
Author
Owner
Related to [Benjamin_Loison/gnome-control-center/issues/57](https://gitlab.gnome.org/Benjamin_Loison/gnome-control-center/-/issues/57).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Benjamin_Loison/linux#35