服务器实战rootkit检测

简介:

服务器实战rootkit检测

本文主要介绍linux上检测rootkit的两种工具: Rootkit Hunter和Chkrootkit.

第一种:Rootkit Hunter

下载地址:http://ncu.dl.sourceforge.net/project/rkhunter/rkhunter/1.3.6/rkhunter-1.3.6.tar.gz

[root@master ~]# tar zxvf rkhunter-1.3.6.tar.gz

[root@master ~]# cd rkhunter-1.3.6

[root@master rkhunter-1.3.6]# ./installer.sh --install

 

 

[root@master master]# rkhunter  --update 

[root@master master]# rkhunter  -c

Checking system commands...

  Performing 'strings' command checks
    Checking 'strings' command                               [ OK ]

  Performing 'shared libraries' checks
    Checking for preloading variables                        [ None found ]
    Checking for preloaded libraries                         [ None found ]
    Checking LD_LIBRARY_PATH variable                        [ Not found ]

  Performing file properties checks
    Checking for prerequisites                               [ Warning ]
    /bin/awk                                                 [ OK ]
    /bin/basename                                            [ OK ]
    /bin/bash                                                [ OK ]
    /bin/cat                                                 [ OK ]
    /bin/chmod                                               [ OK ]
    /bin/chown                                               [ OK ]
    /bin/cp                                                  [ OK ]
    /bin/csh                                                 [ OK ]
    /bin/cut                                                 [ OK ]
    /bin/date                                                [ OK ]
    /bin/df                                                  [ OK ]
    /bin/dmesg                                               [ OK ]
    /bin/echo                                                [ OK ]
    /bin/ed                                                  [ OK ]
    /bin/egrep                                               [ OK ]
    /bin/env                                                 [ OK ]
    /bin/fgrep                                               [ OK ]
    /bin/grep                                                [ OK ]
    /bin/kill                                                [ OK ]
    /bin/logger                                              [ OK ]
    /bin/login                                               [ OK ]
    /bin/ls                                                  [ OK ]
    /bin/mail                                                [ OK ]
    /bin/mktemp                                              [ OK ]
    /bin/more                                                [ OK ]
    /bin/mount                                               [ OK ]
    /bin/mv                                                  [ OK ]
    /bin/netstat                                             [ OK ]
    /bin/ps                                                  [ OK ]
    /bin/pwd                                                 [ OK ]
    /bin/rpm                                                 [ OK ]
    /bin/sed                                                 [ OK ]
    /bin/sh                                                  [ OK ]
    /bin/sort                                                [ OK ]
    /bin/su                                                  [ OK ]
    /bin/touch                                               [ OK ]
    /bin/uname                                               [ OK ]
    /bin/gawk                                                [ OK ]
    /bin/tcsh                                                [ OK ]
    /usr/bin/awk                                             [ OK ]
    /usr/bin/chattr                                          [ OK ]
    /usr/bin/curl                                            [ OK ]
    /usr/bin/cut                                             [ OK ]
    /usr/bin/diff                                            [ OK ]
    /usr/bin/dirname                                         [ OK ]
    /usr/bin/du                                              [ OK ]
    /usr/bin/elinks                                          [ OK ]
    /usr/bin/env                                             [ OK ]
    /usr/bin/file                                            [ OK ]
    /usr/bin/find                                            [ OK ]
    /usr/bin/groups                                          [ Warning ]
    /usr/bin/head                                            [ OK ]
    /usr/bin/id                                              [ OK ]
    /usr/bin/kill                                            [ OK ]
    /usr/bin/killall                                         [ OK ]
    /usr/bin/last                                            [ OK ]
    /usr/bin/lastlog                                         [ OK ]
    /usr/bin/ldd                                             [ Warning ]
    /usr/bin/less                                            [ OK ]
    /usr/bin/links                                           [ OK ]
    /usr/bin/locate                                          [ OK ]
    /usr/bin/logger                                          [ OK ]
    /usr/bin/lsattr                                          [ OK ]
    /usr/bin/lynx                                            [ OK ]
    /usr/bin/md5sum                                          [ OK ]
    /usr/bin/newgrp                                          [ OK ]
    /usr/bin/passwd                                          [ OK ]
    /usr/bin/perl                                            [ OK ]
    /usr/bin/pgrep                                           [ OK ]
    /usr/bin/pstree                                          [ OK ]
    /usr/bin/readlink                                        [ OK ]
    /usr/bin/runcon                                          [ OK ]
    /usr/bin/sha1sum                                         [ OK ]
    /usr/bin/sha224sum                                       [ OK ]
    /usr/bin/sha256sum                                       [ OK ]
    /usr/bin/sha384sum                                       [ OK ]
    /usr/bin/sha512sum                                       [ OK ]
    /usr/bin/size                                            [ OK ]
    /usr/bin/stat                                            [ OK ]
    /usr/bin/strings                                         [ OK ]
    /usr/bin/sudo                                            [ OK ]
    /usr/bin/tail                                            [ OK ]
    /usr/bin/test                                            [ OK ]
    /usr/bin/top                                             [ OK ]
    /usr/bin/tr                                              [ OK ]
    /usr/bin/uniq                                            [ OK ]
    /usr/bin/users                                           [ OK ]
    /usr/bin/vmstat                                          [ OK ]
    /usr/bin/w                                               [ OK ]
    /usr/bin/watch                                           [ OK ]
    /usr/bin/wc                                              [ OK ]
    /usr/bin/wget                                            [ OK ]
    /usr/bin/whatis                                          [ Warning ]
    /usr/bin/whereis                                         [ OK ]
    /usr/bin/which                                           [ OK ]
    /usr/bin/who                                             [ OK ]
    /usr/bin/whoami                                          [ OK ]
    /usr/bin/gawk                                            [ OK ]
    /sbin/chkconfig                                          [ OK ]
    /sbin/depmod                                             [ OK ]
    /sbin/fuser                                              [ OK ]
    /sbin/ifconfig                                           [ OK ]
    /sbin/ifdown                                             [ Warning ]
    /sbin/ifup                                               [ Warning ]
    /sbin/init                                               [ OK ]
    /sbin/insmod                                             [ OK ]
    /sbin/ip                                                 [ OK ]
    /sbin/kudzu                                              [ OK ]
    /sbin/lsmod                                              [ OK ]
    /sbin/modinfo                                            [ OK ]
    /sbin/modprobe                                           [ OK ]
    /sbin/nologin                                            [ OK ]
    /sbin/rmmod                                              [ OK ]
    /sbin/runlevel                                           [ OK ]
    /sbin/sulogin                                            [ OK ]
    /sbin/sysctl                                             [ OK ]
    /sbin/syslogd                                            [ OK ]
    /usr/sbin/adduser                                        [ OK ]
    /usr/sbin/chroot                                         [ OK ]
    /usr/sbin/groupadd                                       [ OK ]
    /usr/sbin/groupdel                                       [ OK ]
    /usr/sbin/groupmod                                       [ OK ]
    /usr/sbin/grpck                                          [ OK ]
    /usr/sbin/kudzu                                          [ OK ]
    /usr/sbin/lsof                                           [ OK ]
    /usr/sbin/pwck                                           [ OK ]
    /usr/sbin/sestatus                                       [ OK ]
    /usr/sbin/tcpd                                           [ OK ]
    /usr/sbin/useradd                                        [ OK ]
    /usr/sbin/userdel                                        [ OK ]
    /usr/sbin/usermod                                        [ OK ]
    /usr/sbin/vipw                                           [ OK ]
    /usr/sbin/xinetd                                         [ OK ]
    /usr/local/bin/rkhunter                                  [ OK ]
    /etc/rkhunter.conf                                       [ OK ]

[Press <ENTER> to continue]



第二种:Chkrootkit

下载 http://www.chkrootkit.org/download/

[root@master ~]# wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz

[root@master ~]# tar zxvf chkrootkit.tar.gz

[root@master ~]# cd chkrootkit-0.49/

 

Chkrootkit

Chkrootkit由Nelson Murilo和Klaus Steding Jessen开发. 与Rootkit Hunter程序不同的是, chrootkit不需要installer安装程序, 你只需解开软件包后执行chrootkit即可, 然后将对一些二进制文件进行一系列的测试, 除了与Rootkit Hunter相同的测试外, Chkrootkit还对一些重要的二进制文件进行检测, 比如搜索入侵者已更改日志文件的特征信息等等. 而且, 如果你想列出已经测试的所有项目, 你可以运行带有’-l’参数的命令:

# chkrootkit -l

在测试过程中, 如果你想在屏幕上看到更多有用的信息, 执行下面命令:

# chkrootkit -x 

chkrootkit将在专家模式(expert mode)运行.

在Linux上组合使用Rootkit Hunter和Chkrootkit工具是检测rootkis不错的办法.

参考:
Various ways of detecting rootkits in GNU/Linux 



本文转自holy2009 51CTO博客,原文链接:http://blog.51cto.com/holy2010/511614

相关文章
|
30天前
|
机器学习/深度学习 弹性计算 运维
云计算系列之阿里云ECS服务器管理实战
本文档介绍了阿里云ECS(Elastic Compute Service)的基本概念、实例管理、磁盘操作、快照与镜像功能及其应用场景,最后通过具体案例解析ECS的实际应用。ECS是阿里云提供的高效、可靠的云计算服务,支持多种业务需求,如Web应用、高并发网站、数据库等,帮助企业快速构建稳定安全的应用,提升运维效率,降低IT成本。文档还详细说明了ECS实例的创建方式、连接方法及日常管理操作,帮助用户更好地利用ECS服务。
65 2
云计算系列之阿里云ECS服务器管理实战
|
5月前
|
Java 应用服务中间件 开发者
【实战指南】Java Socket编程:构建高效的客户端-服务器通信
【6月更文挑战第21天】Java Socket编程用于构建客户端-服务器通信。`Socket`和`ServerSocket`类分别处理两端的连接。实战案例展示了一个简单的聊天应用,服务器监听端口,接收客户端连接,并使用多线程处理每个客户端消息。客户端连接服务器,发送并接收消息。了解这些基础,加上错误处理和优化,能帮你开始构建高效网络应用。
430 10
|
5月前
|
IDE Java 开发工具
从零开始学Java Socket编程:客户端与服务器通信实战
【6月更文挑战第21天】Java Socket编程教程带你从零开始构建简单的客户端-服务器通信。安装JDK后,在命令行分别运行`SimpleServer`和`SimpleClient`。服务器监听端口,接收并回显客户端消息;客户端连接服务器,发送“Hello, Server!”并显示服务器响应。这是网络通信基础,为更复杂的网络应用打下基础。开始你的Socket编程之旅吧!
86 3
|
2月前
|
网络协议
keepalived对后端服务器的监测方式实战案例
关于使用keepalived进行后端服务器TCP监测的实战案例,包括配置文件的编辑和keepalived服务的重启,以确保配置生效。
62 1
keepalived对后端服务器的监测方式实战案例
|
3月前
|
SQL 缓存 自然语言处理
实战案例1:基于C语言的Web服务器实现。
实战案例1:基于C语言的Web服务器实现。
197 15
|
3月前
|
运维 数据安全/隐私保护 数据库管理
企业实战项目之服务器用户权限集中管理
企业实战项目之服务器用户权限集中管理
|
3月前
|
弹性计算 监控 网络安全
解锁云端力量:ECS全攻略,从新手到专家的实战之旅!轻松掌握云计算核心技能,驾驭数字浪潮之巅!
【8月更文挑战第22天】云计算中的弹性计算服务(ECS)让企业和开发者能按需获取虚拟服务器,灵活配置CPU、内存等资源。本文从零开始指导ECS的基础操作与高级技巧,包括实例创建、SSH连接、Web应用部署及利用ELB和自动伸缩优化性能。同时介绍监控工具和数据备份方法,帮助您全方位掌握ECS的高效运用,满足业务需求并保障数据安全。
69 3
|
4月前
|
SQL 缓存 前端开发
PHP性能优化实战:从代码到服务器的全方位攻略
【7月更文挑战第30天】在Web开发的世界里,PHP以其灵活性和易用性赢得了广泛的赞誉。然而,随着应用规模的扩大,性能问题逐渐浮现。本文将深入探讨PHP的性能优化策略,不仅涉及代码层面的精细调整,还包括服务器配置的优化技巧。我们将一起探索如何通过减少资源消耗、优化数据库交互以及利用缓存技术来提升PHP应用的性能表现。无论你是PHP新手还是资深开发者,这篇文章都将为你提供实用的优化建议,帮助你打造更快、更稳定的PHP应用。
89 4
|
3月前
|
移动开发 网络协议 编译器
实战案例3:C语言实现的HTTP服务器
实战案例3:C语言实现的HTTP服务器
212 0
|
3月前
|
存储 监控 Unix
下一篇
无影云桌面