1、安装
下载:
Wget https://sourceforge.net/projects/rkhunter/files/rkhunter/1.4.6/rkhunter-1.4.6.tar.gz/download
具体的使用方法:
mv download rkhunter-1.4.6.tar.gz
tar xf rkhunter-1.4.6.tar.gz
./installer.sh --layout default --install //安装脚本,安装后可以使用--remove参数卸载。
./installer.sh --show //查看安装后的信息。
/usr/local/bin/ //安装后的默认路径,安装的时候已经设置环境变量,不需要切换到此目录下运行。
2、运行
[root@node1 ~]# rkhunter -c
[ Rootkit Hunter version 1.4.6 ]
第一部分:检测系统命令,主要检测系统的二进制文件,这些文件最容易被rootkit攻击;
[ OK ]表示正常,[ Warning ]表示有异常,[ None found ]未找到
第二部分:检测rootkit,主要检测常见的rootkit程序;
第三部分:特殊或附加检测:对rootkit文件或目录检测、对恶意软件检测、对指定内核检测等
第四部分:检测网络、系统端口、系统启动文件、系统用户和组配置、ssh配置、文件系统等
第五部分:应用程序版本检测
第六部分:总结服务器目前的安全状态
3、检查:
rkhunter --check --skip-keypress
4、操作日志:
tail -f /var/log/rkhunter.log
5、定时任务:
10 03 * * * /usr/local/bin/rkhunter --check --skip-keypress >/home/field/check_rkhunter/chk.txt