温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

安装 chkrootkit报错:/usr/bin/ld: cannot find -lc

发布时间:2020-05-16 17:40:41 来源:网络 阅读:1458 作者:carvingcui 栏目:安全技术

Chkrootkit是一个在本地系统检查rootkit痕迹的工具,它是检查系统二进制文件是否被rootkit病毒修改的一个shell脚本。

系统环境 Centos 6.4

chkrootkit-0.50(目前最新版本)

# tar xf chkrootkit.tar.gz

# cd chkrootkit

chkrootkit-0.50/   chkrootkit.tar.gz  

# cd chkrootkit-0.50/

# make sense

cc -DHAVE_LASTLOG_H -o chklastlog chklastlog.c

make: cc: Command not found

make: *** [chklastlog] Error 127

# yum install gcc

然后再次 make sense

cc -DHAVE_LASTLOG_H -o chklastlog chklastlog.c

cc -DHAVE_LASTLOG_H -o chkwtmp chkwtmp.c

cc -DHAVE_LASTLOG_H   -D_FILE_OFFSET_BITS=64 -o ifpromisc ifpromisc.c

cc  -o chkproc chkproc.c

cc  -o chkdirs chkdirs.c

cc  -o check_wtmpx check_wtmpx.c

cc -static  -o strings-static strings.c

/usr/bin/ld: cannot find -lc

collect2: ld returned 1 exit status

make: *** [strings-static] Error 1

这个错误在网上查找了半天,终于在一个fedora相关的论坛上找到了答案。个人感觉这个错误别人安装的时候遇到的不多,或者是直接 yum安装的。

# yum install glibc-static

# make clean

# make sense

cc -DHAVE_LASTLOG_H -o chklastlog chklastlog.c

cc -DHAVE_LASTLOG_H -o chkwtmp chkwtmp.c

cc -DHAVE_LASTLOG_H   -D_FILE_OFFSET_BITS=64 -o ifpromisc ifpromisc.c

cc  -o chkproc chkproc.c

cc  -o chkdirs chkdirs.c

cc  -o check_wtmpx check_wtmpx.c

cc -static  -o strings-static strings.c

cc  -o chkutmp chkutmp.c

# ./chkrootkit -V

直接执行chkrootkit命令

# ./chkrootkit

ROOTDIR is `/'

Checking `amd'... not found

Checking `basename'... not infected

Checking `biff'... not found

Checking `chfn'... not infected

Checking `chsh'... not infected

......

Checking `sniffer'... eth0: PF_PACKET(/sbin/dhclient)

Checking `w55808'... not infected

Checking `wted'... chkwtmp: nothing deleted

Checking `scalper'... not infected

Checking `slapper'... not infected

Checking `z2'... chklastlog: nothing deleted

Checking `chkutmp'... chkutmp: nothing deleted

Checking `OSX_RSPLUG'... not infected

Chkrootkit会对系统中的重要文件进行扫描,以上结果显示系统还是比较干净的。

可以将其加入crontab定时任务,定期进行扫描,看情况而定。


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI