logoalt Hacker News

alancetoday at 12:23 PM5 repliesview on HN

Just on your first suggestion, this also means that if a person or process can drop a file (unknown to you) into your ~/bin/ then they can wreak havoc. Eg they can override `sudo` to capture your password, or override `rm` to send your files somewhere interesting, and so on.

Btw on the second suggestion, I think there's a command named `command` that can help with that sort of thing, avoids recursive pitfalls.


Replies

functionmousetoday at 12:44 PM

That would require someone to already want to sabotage me in particular, learn my private workflows, and also have write access to my home folder. At that point, All is Lost.

Don't tell people to sacrifice agency for apocalypse insurance that doesn't work, lol

latexrtoday at 12:56 PM

If someone can drop a file in your ~/bin, they can also edit your shell’s startup files to add their malicious command.

wtetznertoday at 1:30 PM

I think it's already game over if they have access to your home directory. They can also edit your path at that point.

dieulottoday at 2:09 PM

The issue of rootless malicious command overrides is solved by typing the whole path, such as "/bin/sudo".

show 1 reply
znpytoday at 12:36 PM

While true, what you describe is very unlikely to happen and most definitely won’t happens on systems where i’m the only users.