| ▲ | mr_mitm 6 hours ago | |||||||||||||||||||
I can type up a test case on my phone: The malware puts this in your bashrc or equivalent:
In /tmp/malware/bin/sudo:
You get the idea. It can do something similar to the git binary and hijack "git commit" such that it will amend whatever it wants and you will happily sign it and push it using your hardened SSH agent.You say it's unlikely, fine, so your risk appetite is sufficiently high. I just want to highlight the risk. If your machine is compromised, it's game over. | ||||||||||||||||||||
| ▲ | otterley 6 hours ago | parent [-] | |||||||||||||||||||
Typical defense against this is to mount all user-writable filesystems as `noexec` but unfortunately most OSes don't do that out of the box. | ||||||||||||||||||||
| ||||||||||||||||||||