centerOS安装chkrootkit

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

(1)centerOS安装chkrootkit

安装gcc编译环境yum install gcc gcc-c++ make -y

安装chkrootkit.tar.gz

解压后执行

#make sense

安装过程中常见报错

#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

# yum install glibc-static

# make clean

# ./chkrootkit -V

直接执行chkrootkit命令

# ./chkrootkit

Chkrootkit会对系统中的重要文件进行扫描。

一下是官方文档:

1. What‘s chkrootkit?
 ---------------------

chkrootkit is a tool to locally check for signs of a rootkit.  It
 contains:

* chkrootkit: a shell script that checks system binaries for
   rootkit modification.

* ifpromisc.c: checks if the network interface is in promiscuous
   mode.

* chklastlog.c: checks for lastlog deletions.

* chkwtmp.c: checks for wtmp deletions.

* check_wtmpx.c: checks for wtmpx deletions.  (Solaris only)

* chkproc.c: checks for signs of LKM trojans.

* chkdirs.c: checks for signs of LKM trojans.

* strings.c: quick and dirty strings replacement.

* chkutmp.c: checks for utmp deletions.

chkwtmp and chklastlog *try* to check for deleted entries in the wtmp
 and lastlog files, but it is *not* guaranteed that any modification
 will be detected.

Aliens tries to find sniffer logs and rootkit config files.  It looks
 for some default file locations -- so it is also not guaranteed it
 will succeed in all cases.

chkproc checks if /proc entries are hidden from ps and the readdir
 system call.  This could be the indication of a LKM trojan.  You can
 also run this command with the -v option (verbose).

2. Rootkits, Worms and LKMs detected
 ------------------------------------

For an updated list of rootkits, worms and LKMs detected by
 chkrootkit please visit: http://www.chkrootkit.org/

3. Supported Systems
 --------------------

chkrootkit has been tested on: Linux 2.0.x, 2.2.x, 2.4.x and 2.6.x,
 FreeBSD 2.2.x, 3.x, 4.x and 5.x, OpenBSD 2.x, 3.x and 4.x., NetBSD
 1.6.x, Solaris 2.5.1, 2.6, 8.0 and 9.0, HP-UX 11, Tru64, BSDI and Mac
 OS X.

4. Package Contents
 -------------------

README
 README.chklastlog
 README.chkwtmp
 COPYRIGHT
 chkrootkit.lsm

Makefile
 chklastlog.c
 chkproc.c
 chkdirs.c
 chkwtmp.c
 check_wtmpx.c
 ifpromisc.c
 strings.c
 chkutmp.c

chkrootkit

5. Installation
 ---------------

To compile the C programs type:

# make sense

After that it is ready to use and you can simply type:

# ./chkrootkit

6. Usage
 --------

chkrootkit must run as root.  The simplest way is:

# ./chkrootkit

This will perform all tests.  You can also specify only the tests you
 want, as shown below:

Usage: ./chkrootkit [options] [testname ...]
 Options:
         -h                show this help and exit
         -V                show version information and exit
         -l                show available tests
         -d                debug
         -q                quiet mode
         -x                expert mode
         -r dir            use dir as the root directory
         -p dir1:dir2:dirN path for the external commands used by chkrootkit
         -n                skip NFS mounted dirs

Where testname stands for one or more from the following list:

aliens asp bindshell lkm rexedcs sniffer w55808 wted scalper slapper
 z2 chkutmp amd basename biff chfn chsh cron crontab date du dirname
 echo egrep env find fingerd gpm grep hdparm su ifconfig inetd
 inetdconf identd init killall ldsopreload login ls lsof mail mingetty
 netstat named passwd pidof pop2 pop3 ps pstree rpcinfo rlogind rshd
 slogin sendmail sshd syslogd tar tcpd tcpdump top telnetd timed
 traceroute vdir w write

For example, the following command checks for trojaned ps and ls
 binaries and also checks if the network interface is in promiscuous
 mode.

# ./chkrootkit ps ls sniffer

The `-q‘ option can be used to put chkrootkit in quiet mode -- in
 this mode only output messages with `infected‘ status are shown.

With the `-x‘ option the user can examine suspicious strings in the
 binary programs that may indicate a trojan -- all the analysis is
 left to the user.

Lots of data can be seen with:

# ./chkrootkit -x | more

Pathnames inside system commands:

# ./chkrootkit -x | egrep ‘^/‘

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.

To use, for example, binaries in /cdrom/bin:

# ./chkrootkit -p /cdrom/bin

It is possible to add more paths with a `:‘

# ./chkrootkit -p /cdrom/bin:/floppy/mybin

Sometimes is a good idea to mount the disk from a compromised machine
 on a machine you trust.  Just mount the disk and specify a new
 rootdir with the `-r‘ option.

For example, suppose the disk you want to check is mounted under
 /mnt, then:

# ./chkrootkit -r /mnt

7. Output Messages
 ------------------

The following messages are printed by chkrootkit (except with the -x
 and -q command options) during its tests:

"INFECTED": the test has identified a command probably modified by
   a known rootkit;

"not infected": the test didn‘t find any known rootkit signature.

"not tested": the test was not performed -- this could happen in
   the following situations:
     a) the test is OS specific;
     b) the test depends on an external program that is not available;
     c) some specific command line options are given. (e.g. -r ).

"not found": the command to be tested is not available;

"Vulnerable but disabled": the command is infected but not in use.
   (not running or commented in inetd.conf)

8. A trojaned command has been found.  What should I do now?
 ------------------------------------------------------------

Your biggest problem is that your machine has been compromised and
 this bad guy has root privileges.

Maybe you can solve the problem by just replacing the trojaned
 command -- the best way is to reinstall the machine from a safe media
 and to follow your vendor‘s security recommendations.

9. Reports and questions
 ------------------------

Please send comments, questions and bug reports to
 [email protected] and [email protected]

A simple FAQ and Related information about rootkits and security can
 be found at chkrootkit‘s homepage, http://www.chkrootkit.org.

10. ACKNOWLEDGMENTS
 -------------------

See the ACKNOWLEDGMENTS file.

11. ChangeLog
 -------------

时间: 2024-10-24 15:19:31

centerOS安装chkrootkit的相关文章

CenterOS安装

安装虚拟机: 指定磁盘容量 分配磁盘大小 默认为20GB,然后选择“单个文件存储虚拟磁盘” :不要选中立即分配所有的磁盘空间 然后点击[下一步]按钮: 安装时,网络选择了: 虚拟机安装完成之后,在 本机网络设置里面出现 两个网卡VMware Network Adapter VMnet1和VMware Network Adapter Vmnet8.联网用Vmnet8. 安装后,网络无法连接? 设置连接网络用的网卡,我用的无线上网所以我设置无线网卡,红色框中Vmware Bridge Protoco

centerOS安装rkhunter

rkhunter是专业检测系统是否感染rootkit的一个工具: rkhunter-1.4.2.tar.gz 解压后直接安装: #./installer.sh --layout defualt --install #rkhunter --help #rkhunter -c -c, --check                       Check the local system 检测结果的详细日志默认保留在:/var/log/rkhunter.log 跳过输入回车,自动运行#rkhunte

编译安装chkrootkit出现的问题

tar xf chkrootkit.tar.gz cd chkrootkit-* make sense的时候出现make: *** [strings-static] Error 1,解决办法:yum install glibc-static -y 即可 cd ../ cp -r chkrootkit-* /usr/local/chkrootkit rm -rf chkrootkit-* 用法: /usr/local/chkrootkit/chkrootkit [[email protected]

阿里云 CenterOS 安装mysql java tomcat gcc nginx步骤

由于公司需要,申请了一台阿里云服务器,购买的过程很简单.买完后系统就安装好了,可以直接使用.在使用的过程中遇到了些问题,再次记录一下. 我用的操作系统是centos 5.4 32位的. 1.磁盘挂载 初始化按照后只有一个系统盘,没有数据盘.所以第一步要挂在数据盘. 可以用  fdisk -l|grep Disk  查看你的系统有几块盘. 如: Disk /dev/hda: 21.4 GB, 21474836480 bytes Disk /dev/xvdb: 85.8 GB, 8589934592

centeros 安装 java resin

cd /usr/local/ chmod 777 jdk-6u45-linux-x64.bin ./jdk-6u45-linux-x64.bin 安装成功后 export JAVA_HOME=/usr/local/java/ export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin./httpd.sh st

mysql centeros 安装

http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html linux mysql允许远程连接 1.登录数据库:mysql -u root -p 2.使用数据库:use mysql; 3.更新user表:update user set host = '%' where user = 'root'; 4.查看数据:select host, user from user; ,如果有host为%则该用户已经可以远程连接

chkrootkit 编译报错的解决/usr/bin/ld: cannot find -lc

1:Centos6.5安装chkrootkit wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz tar xvf chkrootkit.tar.gz cd chkrootkit-0.51/ make sense报错如下: /usr/bin/ld: cannot find -lc collect2: ld returned 1 exit status make: *** [strings-static] Error 1 2:解决

rootkit后门检测工具chkrootkit

项目背景: 为了保护我们的系统免受rootkit后门攻击!我们需要一个免费而且强大的软件去保护我们的服务器. 试验环境: vmware workstation 11 服务器:centos6.5  ip:192.168.0.53 chkrootkit-0.39a.tar.gz SecureCRT (ssh远程连接软件) 实验流程: 一.首先安装一下软件所依赖的一些软件包. 我注释的这个一定安装,不然会报错!!!! 二.安装chkrootkit软件 1.下载源码包. 2.软件安装 三.软件测试使用!

Linux后门入侵检测工具,附bash漏洞解决方法[转载]

转自:http://blog.jobbole.com/77663/ 官网 ClamAV杀毒软件介绍 ClamAV是一个在命令行下查毒软件,因为它不将杀毒作为主要功能,默认只能查出您计算机内的病毒,但是无法清除,至多删除文件.ClamAV可以工作很多的平台上,但是有少数无法支持,这就要取决您所使用的平台的流行程度了.另外它主要是来防护一些WINDOWS病毒和木马程序.另外,这是一个面向服务端的软件. 下载ClamAV安装包 ClamAV的官方下载地址为http://www.clamav.net/d