How can I find hidden processes on my server?

How can I find hidden processes on my server?

Сообщение admin » Пн сен 29, 2008 11:23 am

The following line can be used to list out all running processes, regardless of whether or not they show up in 'top'.

mypid=`sysctl kernel.pid_max | cut -d " " -f3`; for rkit in `seq 1 $mypid`; do \
test -f /proc/$rkit/cmdline && (echo -n "[$rkit] "; strings /proc/$rkit/cmdline; echo); done


Using this from a shell will print out quite a bit of information, so it is suggested that you pipe it to a file. To do that, you only need to modify the command like so:

mypid=`sysctl kernel.pid_max | cut -d " " -f3`; for rkit in `seq 1 $mypid`; do \
test -f /proc/$rkit/cmdline && (echo -n "[$rkit] "; strings /proc/$rkit/cmdline; echo) >> /root/processes.txt; done


This should allow you to find anything hidden by a root kit, or other users for that matter. Please note that all of the previous goes on one line. The \ character is there to split the line on your screen only, and should be removed if you paste this into an ssh session.
Аватара пользователя
admin
Site Admin
 
Сообщения: 3
Зарегистрирован: Пт сен 26, 2008 1:55 pm

Вернуться в Полезная информация

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1

cron