logoalt Hacker News

throwaway7356today at 8:52 AM2 repliesview on HN

Yeah, works well:

$ /usr/bin/sudo() { echo Not the real sudo.; }

$ /usr/bin/sudo

Not the real sudo.

And every other suggestion also doesn't work if the attacker can just replace the shell.


Replies

anthktoday at 10:37 AM

/usr/bin/sudo isn't evaluated as a function under ksh.