- Typical Linux desktop setup: unprivileged user but with sudo capabilities to do basically everything
- For the sake of argument let's forget about X11 and its way to allow trivial keyloggers, so let's say the distro is using Wayland or whatever
- Path is defined in bash profile so that ~/bin comes last, so running "firefox" should run the default firefox and not a custom "firefox" installed by the user in their home directory.
- .bashrc, .profile, .bash_profile, .bash_logout, etc. (all those kinds of files) are only writable by root, so the user needs to use sudo to edit them.
The attacker then gives the user a malicious file, the user runs it without privileges (without sudo), and... what could the attacker achieve? At the moment I can only think of "plain phishing", that is, the malicious code will try to imitate another application, for example telling you a system update is required, and asking for your sudo/root password. But I suspect there are much more possible vectors.
I'm asking this question because I read that preventing the abuse of bashrc and similar config files is useless if the attacker can run arbitrary code on your computer. Yet I can't think of all the things an attacker could do in practice in this situation. I'd like some practical examples.