To ensure your server will not be installed rootkits or trojans as well as worm without your approval, you should check it frequently.
ChkRootKit
Get the chkrootkit package :
sudo apt-get install chkrootkit
sudo crontab -e
0 7 * * * /usr/sbin/chkrootkit; /usr/sbin/chkrootkit -q 2 >&1 | mail -s "Daily ChkRootKit Scan" me@mail.com
sudo /usr/sbin/chkrootkit
Rootkit Hunter (Optional)
sudo apt-get install rkhunter
sudo crontab -e
0 5 * * * rkhunter --cronjob --rwo | mail -s "Daily Rootkit Hunter Scan" me@mail.com
sudo rkhunter --check
Forensic tool to find hidden processes and ports – unhide
Get the unhide package :
sudo apt-get install unhide
sudo crontab -e
0 8 * * * unhide proc; unhide proc -q 2 >&1 | mail -s "Daily unhide proc Scan" me@mail.com
30 8 * * * unhide sys; unhide sys -q 2 >&1 | mail -s "Daily unhide sys Scan" me@mail.com
0 9 * * * unhide brute; unhide brute -q 2 >&1 | mail -s "Daily unhide brute Scan" me@mail.com
30 9 * * * unhide-tcp; unhide-tcp -q 2 >&1 | mail -s "Daily unhide-tcp Scan" me@mail.com
sudo unhide proc
sudo unhide sys
sudo unhide brute
sudo unhide-tcp
There will be produced some false positive by RootKit Hunter or ChkRootKit when your packages or files had been updated or have the similar behavior as the rootkit.
Remarks :
It is not 100% to proof that your system is away from the attack of Rootkits.
No comments:
Post a Comment
tag ur valuable ideas below