logoalt Hacker News

tomrodtoday at 5:13 PM3 repliesview on HN

What? Why is sudo security theater?


Replies

novafunctoday at 5:18 PM

Any user process can append anything they want to your shell rc (.bashrc, .zshrc). In this case, they added a bash function for a fake sudo prompt. It then uses the password the user entered to run a malicious payload as root.

show 1 reply
charrondevtoday at 5:19 PM

It’s not, but the grandparent does point out 1 major flaw with sudo being a typically command that goes through normal path discovery. It makes it easier to escalate from a compromised user account to a compromised root account, since the end user is likely to type the root password into a command that can be shadowed in their user space.

lrvicktoday at 5:15 PM

Because it is trivial for unprivileged malware to phish the password and escalate to root. No production system should ever ship with sudo.

show 1 reply