您的位置:首页 > 其它

chkrootkit安装过程中出现/usr/bin/ld: cannot find -lc的解决方法

2017-03-01 00:00 766 查看
通过chkrootkit官网下载chkrootkit源码包

wget -c ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz tar -zxvf chkrootkit.tar.gz
cd chkrootkit-0.51/

make sense的时候提示

[root@iZ25e5ix8j7Z chkrootkit-0.51]# make sense
cc -static  -o strings-static strings.c
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [strings-static] Error 1

解决方法

yum -y install glibc-static
make clean&&make sense

此时可以看到chkrootkit-0.51目录下有chkrootkit可执行文件生成

chkrootkit在检查rootkit的时候会调用部分系统命令,如果服务器已经被入侵,那么chkrootkit的监测结果将不可信。因此在服务器开放网络之前,需要将chkrootkit使用的系统指令进行备份。在进行rootkit检测的时候指定备份目录为使用系统指令的目录。

这些系统命令在chkrootkit的README中已经给出

# chkrootkit uses the following commands to make its tests: awk, cut,
# egrep, find, head, id, ls, netstat, ps, strings, sed, uname.  It is
# possible, with the `-p' option, to supply an alternate path to
# chkrootkit so it won't use the system's (possibly) compromised
# binaries to make its tests.

#备份指令到/usr/share/.cmd
cp `which --skip-alias ls ps awk cut echo find egrep id head netstat ps strings sed uname` -p /usr/share/.cmd/
#chkrootkit检测时指定目录.cmd
chkrootkit -p /usr/share/.cmd
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  chkrootkit