Comment by hashstring
20 hours ago
Eh, if you can pollute page caches this won’t safe you.
Think modifying shared libraries, ld preload, cron, I guess on some systems /etc/passwd even.
There are a lot of files readable that should definitely not be writable.
Fair enough -- a simpler change might be to poison /etc/passwd and call `su` to a user that has uid 0, since that requires no shell code nor a readable binary, and this seems to have worked in a slightly modified POC:
There is a PoC that does exactly that here: https://github.com/tgies/copy-fail-c