Re:Unprivileged Process Injection Techniques in Linux
by codethief on Monday January 08, 2024 @03:13PM
(#38917469)
My apologies for the delay, Joe, I was on vacation. Now that I'm home, I gave this a try but at least on my machine writing to /dev/shm/ works as I remembered, even with --read-only:
So, again, couldn't you just write your binary to /dev/shm and execute it?
[ Parent
| on HN ]
Re:Unprivileged Process Injection Techniques in Linux
by infotogivenm on Tuesday January 09, 2024 @05:24PM
(#38933129)
It is fairly common to have noexec on /dev/shm; filesystem configurations are always up to the admin so they could feasibly set anything.
Re:Unprivileged Process Injection Techniques in Linux
by codethief on Wednesday January 10, 2024 @05:48PM
(#38944568)
Thanks for reminding me of noexec; I'm no Linux security expert by any means, so I was merely trying to figure out what's possible and what's not.
It looks like mounting /dev/shm with noexec is not that common, though, is it? See e.g.
https://unix.stackexchange.com/questions/670362/mounting-dev...
More generally, it regularly blows my mind how hard it is to harden a Linux installation, and how many pitfalls and caveats there are.