安裝 chkrootkit報錯:/usr/bin/ld: cannot find -lc

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定時任務,定期進行掃描,看情況而定。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章