天天看點

為linux伺服器安裝rkhunter工具

1. 什麼是rootkit

rootkit指的是一項後門技術、一類後門軟體集,其表現形式是:攻擊者使用各種後門程式檔案替換系統中的正常程式檔案,例如login、ls、ps、top、ifconfig、crontab等,當受害者運作這些被替換的程式時,會執行竊取密碼、提升權限、發送敏感資料等後門任務,并且會隐藏相關的日志記錄、删除攻擊痕迹。

rootkit的目的在于隐藏自己不被發現,阻止使用者識别和删除攻擊程式檔案,以便允許攻擊者在受害機保持長期存在,持續執行各種後門任務。大多數使用者對系統中的rootkit程式可能毫無察覺,因為這些後門程式“看起來”和正常程式并無差别。

由于rootkit的隐蔽性和被動攻擊的特點,通常很難被發現。針對rootkit後門的獵殺手段,一方面可以使用各種病毒掃描軟體,另一方面可以針對系統程式做完整性檢查。在Linux伺服器中,可以使用Tripwire校驗工具、Rootkit Hunter獵殺工具等。對于找出的Rootkit,可能很難确認到底造成了那些損害,是以最好的應對方法是格式化後重新安裝系統,雖然這種手段很嚴厲,但這是已經證明的唯一可以徹底删除rootkit的方法。

2. 關于rkhunter

rkhunter是Linux平台下的一款開源入侵檢測工具,具有非常全面的掃描範圍,除了能夠檢測各種已知的rootkit特征碼以外,還支援端口掃描、常用程式檔案的變動情況檢查。rkhunter的官方網站位于http://www.rootkit.nl/,目前最新的版本是rkhunter-1.3.8。

3、安裝rkhunter

[root@localhost pub]# tar zxf rkhunter-1.3.8.tar.gz

[root@localhost pub]# cd rkhunter-1.3.8

[root@localhost rkhunter-1.3.8]# ./installer.sh --install

2)為基本系統程式建立校對樣本(幹淨的系統)

[root@localhost ~]# <b>rkhunter --propupd</b>

[ Rootkit Hunter version 1.3.8 ]

File created: searched for 165 files, found 136

[root@localhost ~]#<b> ls /var/lib/rkhunter/db/rkhunter.dat</b>

/var/lib/rkhunter/db/rkhunter.dat

3)運作rkhunter檢查系統

Checking system commands...

  Performing 'strings' command checks

    Checking 'strings' command                                                           [ OK ]

…… //省略部分資訊

  Performing file properties checks

    Checking for prerequisites                                                             [ OK ]

    /usr/local/bin/rkhunter                                                                   [ OK ]

    /sbin/chkconfig                                                                            [ OK ]

    /sbin/ifconfig                                                                               [ OK ]

    /sbin/ifdown                                                                                [ Warning ]

    /sbin/ifup                                                                                     [ Warning ]

    /usr/bin/GET                                                                                [ Warning ]

    …… //省略部分資訊

Checking for rootkits...

  Performing check of known rootkit files and directories

    55808 Trojan - Variant A                                                                      [ Not found ]

    ADM Worm                                                                                [ Not found ]

    AjaKit Rootkit                                                                                    [ Not found ]

    Adore Rootkit                                                                              [ Not found ]

    aPa Kit                                                                                        [ Not found ]

    Apache Worm                                                                              [ Not found ]

Checking the local host...

  Performing system boot checks

    Checking for local host name                                                         [ Found ]

    Checking for system startup files                                                    [ Found ]

    Checking system startup files for malware                                       [ None found ]

4)線上更新rkhunter

[root@localhost ~]# <b>rkhunter --update</b>

本文轉自1594cqb 51CTO部落格,原文連結:http://blog.51cto.com/wolfchen/849060,如需轉載請自行聯系原作者

繼續閱讀