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

 通过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

 

转载于:https://my.oschina.net/0eb1/blog/848405

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值