How could you launch a process and make it invisible to the top command? The process is started by a normal user (not root), and should not be visible to other normal users.
|
|
||||
migrated from stackoverflow.com Jul 21 '11 at 19:57
|
The Aside from using a security framework like SELinux and grsecurity (mentioned in the other answers), rootkit-style code is your only remaining option. I say "style" because a "rootkit" by itself isn't bad, it's how it's used. There are perfectly legitimate reasons behind hiding processes from other users, which is why this capability exists in security frameworks. The basic route you'd have to follow to get this to work is to hook into (or hijack, depending on how you look at it) the function(s) in the linux kernel that hand out the https://github.com/cormander/tpe-lkm The "high level" code for this is in the You'll likely find the function(s) you'll want to hook into in the UPDATE: If you wrap the https://github.com/cormander/tpe-lkm/commit/899bd5d74764af343d5fee1d8058756ddc63bfe3 You could do something similar by making the processes of a certain user or group not viewable by anyone except root and that user. Doing it by process name is a bit more complex, but possible. Have a look at the |
||||
|
|
|
Linux kernel since 3.3 contains support for hiding processes to other users. It is done by Debian Wheezy, which will become the next Debian stable release, also includes this feature. |
||||
|
|
|
It seems the two main options.
If for some reason you want to do this without the addition of a security framework like selinux or grsecurity, please explain how what you are doing is not writing a root-kit. |
|||
|
|
|
It is not so simple on standard linux box. Look at the grsecurity, but it requires patching kernel etc. |
|||||
|
|
you could override your argv[0] with another name... but strictely speaking, you're looking for some kind of rootkit. this may help you out: http://stupefydeveloper.blogspot.com/2008/10/linux-change-process-name.html |
|||
|
|
|
You could write an equivalent command that works just like |
|||||||||
|

this_is_not_the_process_you_are_looking_for? – Marc B Jul 21 '11 at 19:13