logoalt Hacker News

CGamesPlaytoday at 2:19 PM2 repliesview on HN

Proc title is very easily forged (without root even). Obviously a real privileged process could modify the kernel and do whatever it wants, but if I were trying to detect this I would start with /proc/$id/exe.


Replies

Retr0idtoday at 2:39 PM

/proc/pid/exe is also easily forged, without root. For example you can do LD_PRELOAD=evil.so /bin/foo on any dynamic executable, or spawn /bin/foo unmodified and inject code via ptrace or /proc/pid/mem.

I have a fileless, execless copyfail exploit that works by injecting shellcode directly into systemd's pid 1. (I should probably publish it at some point...)

show 1 reply
jeffbeetoday at 2:34 PM

Maybe, but there's a prctl to change that reference which a root process can use.