4 ms·
Why not make a proper link /sudo so you don't have to type out the full path every time, which is very inconvenient? (but the fact that such workarounds are nee
by eviks 5mo ago
Why not make a proper link /sudo so you don't have to type out the full path every time, which is very inconvenient? (but the fact that such workarounds are needed still means it's a theater)
- sinsudo 5mo agoAnything that can be modified by an attacker can not be used to secure the sudo command. This is a recursive requirementor hierarchy for secure systems.
- eviks 5mo agoYou can set the permissions so that the attacker can't modify it?
- lrvick 5mo agoYou would need to prevent an attacker from installing shell aliases, or shell config files, or altering any binaries in PATH. Like, sure you could, but you end up with a very useless system. Easier to just use VMs for each security context.
- eviks 5mo agoIs any of this specific to a link vs tyre original full-pathed sudo?
- lrvick 5mo agoA simple LD_PRELOAD command can cause your shell to run "rm -rf /" when you type "/sudo". If your unprivileged user is compromised, you are pretty hosed.
- anthk 5mo agoIt should be a way to make system env vars (profile.d or simlar) as readonly so every users' shell had these set to empty values and unable to change them.
- deleted 5mo ago[deleted]
- marshray 5mo agoShell-only, but https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#readonly https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
- anthk 5mo agoYes; I'm aware, but for some environments writting a custom shell as the one for SDF would be an easier task. Or maybe a really restricted "ash" called "rash" -because it is- with maybe autocomplete and that's it. Hardcoded $PATH and the like.