|
|
CHKRootkitFrom Security Lab WikiCHKROOTKIT
Environments: chkrootkit is tested on: Linux 2.0.x, 2.2.x, 2.4.x and 2.6.x,
chkrootkit checks for signs of rootkits. It has multiple modules: chkrootkit, ifpromisc.c, chklastlog.c, chkwtmp.c, check_wtmpx.c, chkproc.c, chkdirs.c, strings.c, chkutmp.c; chkrootkit is the main module which controls all other modules.
Next, it finds default files and directories of many rootkits (sniffer's logs, HiDrootkit's default dir, tOrn's default files and dirs...). Then, it is going to show you a long list of suspicious files and directories (this may take a while). After that, it continues to look for default files and directories of known rootkits (not sure why chkrootkit has to stop and then resume this process). It also checks for anomalies in history files, checks if the network inferface is in promiscuous mode, checks for lastlog, wtmp, wtmpx, utmp deletions, check for entries in /proc that are hidden from ps and readdir (a sign of infection by LKM trojan).
Options To be able to use chkrootkit, first, we need to compile it: From the installation directory: make sense To start chkrootkit with the default options (run all the tests): sudo ./chkrootkit
sudo ./chkrootkit [options] [testname ...]
aliens asp bindshell lkm rexedcs sniffer w55808 wted scalper slapper
Simple Examples -Check for trojaned find, grep and check if the network interface is in promiscuous mode: sudo ./chkrootkit find grep sniffer -Only show infections or suspicious results (q is short for quiet). sudo ./chkrootkit -q -Use -p to specify the path to the alternate system binaries which chkrootkit uses to perform the test if you think those system binaries might be infected. System binaries used by chkrootkits: awk, cut, egrep, find, head, id, ls, netstat, ps, strings, sed, uname. sudo ./chkrootkit -p /media/disk -You can specify the root directory if the system files to check in on another partion or disk: sudo ./chkrootkit -r /dev/sdb2
Linux-based Rootkit tools: Rootkit Hunter
RootkitRevealer Sophos Anti-Rootkit:
Official chkrootkit website: http://www.chkrootkit.org |