rkhunter和chkrootkit

Posted on 2013-09-18 17:16  NooBkey  阅读(948)  评论(0编辑  收藏  举报

 

今天继续检查我的Linux,所以下来rkhunter和chkrootkit一个一个来,下面只记录命令,少些说明不截图了。

1、rkhunter

#cd /temp

#wget http://downloads.sourceforge.net/rkhunter/rkhunter-1.3.4.tar.gz?use_mirror=jaist

#tar -zxvf rkhunter-1.3.4.tar.gz

#cd rkhunter-1.3.4

#./installer.sh -h

#./installer.sh --layout default --install

#cd /usr/local/bin

#rkhunter --update

#rkhunter --propupd

#rkhunter -c --sk --rwo

有问题会红色的Warning 提示。

rkhunter参数说明 #/usr/local/bin/rkhunter Usage: rkhunter {--check | --update | --versioncheck |                  --propupd [{filename | directory | package name},...] |                  --list [{tests | {lang | languages} | rootkits},...] |                  --version | --help} [options]

Current options are:          --append-log                  在日志文件后追加日志,而不覆盖原有日志          --bindir <directory>...       Use the specified command directories      -c, --check                       检测当前系统 --cs2, --color-set2                  Use the second color set for output          --configfile <file>           使用特定的配置文件          --cronjob                     作为cron定期运行                                        (包含参数 -c, --sk , --nocolors )          --dbdir <directory>           Use the specified database directory          --debug                       Debug模式(不要使用除非要求使用)          --disable <test>[,<test>...] 跳过指定检查对象(默认为无)          --display-logfile             在最后显示日志文件内容          --enable <test>[,<test>...] 对指定检测对象进行检查(默认检测所有对象)          --hash {MD5 | SHA1 | NONE |   使用指定的文件哈希函数                  <command>}            (Default is SHA1)      -h, --help                        显示帮助菜单 --lang, --language <language>         指定使用的语言(默认是英文)          --list [tests | languages |   罗列测试对象明朝,使用语言,可检测的木马程序                  rootkits]                   -l, --logfile [file]              写到指定的日志文件名 (Default is /var/log/rkhunter.log)          --noappend-log                不追加日志,直接覆盖日志文件          --nocolors                    输出只显示黑白两色          --nolog                       不写入日志文件 --nomow, --no-mail-on-warning          如果有警告信息,不发送邮件    --ns, --nosummary                   不显示检查结果的统计数据 --novl, --no-verbose-logging          不显示详细记录          --pkgmgr {RPM | DPKG | BSD | 使用特定的包管理用于文件的哈希值验证                    NONE}               (Default is NONE)          --propupd [file | directory | 更新整个文件属性数据库或仅仅更新指定条目                     package]...              -q, --quiet                       安静模式(no output at all) --rwo, --report-warnings-only        只显示警告信息      -r, --rootdir <directory>         使用指定的root目录    --sk, --skip-keypress               自动完成所有检测,跳过键盘输入          --summary                     显示检测结果的统计信息 (This is the default)          --syslog [facility.priority] 记录检测启动和结束时间到系统日志中 (Default level is authpriv.notice)          --tmpdir <directory>          使用指定的临时目录          --update                      检测更新内容    --vl, --verbose-logging             使用详细日志记录 (on by default)      -V, --version                     显示版本信息          --versioncheck                检测最新版本      -x, --autox                       当X在使用时,自动启动检测      -X, --no-autox                    当X在使用时,不自启检测

2、chkrootkit

#cd /temp

#wget

#tar -zxvf chkrootkit.tar.gz

#cd chkrootkit-0.48

#make sense

#./chkrootkit -n -q

有问题会报INFECTED,没问题就是NOT INFECTED,呵呵~

chkrootkit参数说明

Usage: ./chkrootkit [options] [test ...] Options:         -h                 显示帮助信息         -V                 显示版本信息         -l                 显示测试内容         -d                debug模式,显示检测过程的相关指令程序         -q                 安静模式,只显示有问题部分,         -x                 高级模式,显示所有检测结果         -r dir             设定指定的目录为根目录         -p dir1:dir2:dirN 检测指定目录         -n                跳过NFS连接的目录

看图的话可以参考<简单chkrootkit使用>

Copyright © 2024 NooBkey
Powered by .NET 8.0 on Kubernetes