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
?nelson@pangeia.com.br and jessen@cert.br.

?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
?-------------

轉載于:https://www.cnblogs.com/jjzd/p/6220427.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/255693.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/255693.shtml
英文地址,請注明出處:http://en.pswp.cn/news/255693.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

微軟Visual Studio 2012軟件功能介紹

對于從事.net程序開發的我們,都要用到C#依附的Visual Studio平臺!Visual Studio是目前最流行的Windows平臺應用程序開發環境。最新版本為 Visual Studio 2012 版本,基于 NET Framework4.5 。. Visual Studio 2012內置的測試工具可以幫助開發者打造高質量…

Spring Boot輕松理解動態注入,刪除bean

2019獨角獸企業重金招聘Python工程師標準>>> 我們通過getBean來獲得對象,但這些對象都是事先定義好的,我們有時候要在程序中動態的加入對象.因為如果采用配置文件或者注解,我們要加入對象的話,還要重啟服務,如果我們想要避免這一情況就得采用動態處理bea…

對象的深度克隆

最近在復習javascript,然而我的讀書筆記,以及技術博客,已經轉戰cmd Markdown。所以這里就只寫了一個對象的深度克隆方法: 這個克隆方法可以讓我很深刻的了解到了js中,萬物皆對象,對js有更深入的了解。轉載于…

【pyqt5學習】——TextEdit屬性,將滑條始終置于最后

法一: # 向文本框中添加字符串,自動換行,不會覆蓋之前的內容 self.textEdit.append(datetime.datetime.strftime(datetime.datetime.now(),"%Y-%m-%D %H:%M:%S")" 共%d個文件,剩余%d個文件,耗時%.5f(…

VS2012 中 c++項目中的各個選項介紹

MFC(Microsoft Foundation Classes),是一個微軟公司提供的類庫(class libraries),以C類的形式封裝了Windows的API,并且包含一個應用程序框架,以減少應用程序開發人員的工作量。其中包含的類包含大量Windows…

Java基于springMVC的驗證碼案例

1 2 Java驗證碼案例(基于springMVC方式)3 4 驗證碼工具類5 package com.ekyb.common.util;6 7 import java.awt.Color;8 import java.awt.Font;9 import java.awt.Graphics;10 11 import java.awt.image.BufferedImage;12 import java.util.ArrayList;13…

eval函數的工作原理

eval函數的工作原理 eval函數會評估一個給定的含有JavaScript代碼的字符串,并且試圖去執行包含在字符串里的表達式或者一系列的合法的JavaScript語句。eval函數將把最后一個表達式或者語句所包含的值或引用作為返回值。 舉例說明 eval評估JavaScript表達式var bar …

CMake使用入門

一、開胃菜 hello目錄下的文件結構: ├── CMakeLists.txt ├── hello.c ├── hello.h └── main.c C代碼見下節。 最簡單的cmake配置文件: project(HELLO) set(SRC_LIST main.c hello.c) add_executable(hello ${SRC_LIST}) 如果要編譯成gdb可調…

【pyqt5學習】——給窗口添加圖標

from PyQt5.QtGui import QIcon# 當前文件的目錄 self.dir os.path.dirname(os.path.abspath(__file__)) # 圖標ico文件存放的絕對路徑 icoPath self.dir r"\data\favicon.ico" # 添加圖標 self.setWindowIcon(QIcon(icoPath))

C/C++語言變量聲明內存分配

[cpp] view plaincopy<span style"font-family: Verdana, Arial, Helvetica, sans-serif; ">一個由c/C編譯的程序占用的內存分為以下幾個部分</span> 1、棧區&#xff08;stack&#xff09;— 程序運行時由編譯器自動分配&#xff0c;存放函數的參數值…

sql server數據庫實現保留指定位數小數的函數

有時候需要對一個特定的含有小數點的數字保留指定位數&#xff0c;比如“123.123600”。 在數據庫中以函數的形式實現如下&#xff1a; USE [數據庫名稱] GO /****** Object: UserDefinedFunction [dbo].[AvgLimit] Script Date: 2016/12/29 11:30:44 ******/ SET ANSI_NUL…

Centos7下安裝netstat

剛安裝centos7發想沒有查看端口的命令 netstat yum install net-tools轉載于:https://www.cnblogs.com/cuizhipeng/p/5329811.html

【pyqt5學習】——items view相關控件(list view、table view)

目錄 list view——列表視圖 table view——表格視圖 list view——列表視圖 PyQt5-高級控件使用&#xff08;QListView&#xff09; - ygzhaof_100 - 博客園QListView用于展示數據&#xff0c;子類是QListWidget。QlistView基于模型Mode&#xff0c;需要程序創建Model然后保…

變量定義和聲明的區別~~~概念上千萬不要栽跟頭!!!

變量的聲明有兩種情況&#xff1a; 1、一種是需要建立存儲空間的。例如&#xff1a;int a 在聲明的時候就已經建立了存儲空間。 2、另一種是不需要建立存儲空間的。 例如&#xff1a;extern int a 其中變量a是在別的文件中定義的。 聲明是向編譯器介紹名字&#xff0d;&…

解決Ajax不能跨域的方法

1. Ajax不能跨域請求的原因 同源策略(Same Origin Policy)&#xff0c;是一種約定&#xff0c;該約定阻止當前腳本獲取或者操作另一個域下的內容。所有支持Javascript的瀏覽器都支持同源策略&#xff0c;也就是說瀏覽器可以隔離來自不同源的內容&#xff0c;阻止跨域請求的發生…

【pyqt5學習】——containers相關控件(tab widget、scroll area、stack widget、tool box、MDI area、dock widget)

目錄 1、tab widget 2、scroll area 2.1 使用方法 Step1.拖入QScrollArea ?Step2.改變widget控件布局 ?Step3.設置scrollAreaWidgetContents大小 3、Tool Box 4、Stacked Widget 4.1 案例展示 5、frame 6、MDI AREA 7、dock widget 7.1 懸浮狀態 7.2 吸附狀態 conta…

Java使用原子類進行多線程的 i++ 操作示例

2019獨角獸企業重金招聘Python工程師標準>>> 使用AtomicInteger原子類進行 i 操作 可以有類似 synchronized 實現同步的效果。 原子操作是不能分割的整體&#xff0c;沒有其他線程能夠中斷或檢查正在原子操作中的變量。一個原子類型就是一個原子操作可用的類型&…

深入理解面向對象設計的七大原則

一&#xff0e;面向對象設計的七大原則是什么&#xff1f; 1.開放封閉原則 2.里氏轉換原則 3.依賴倒轉原則 4.組合/聚合原則 5.接口隔離原則 6.“迪米特”法則 7.單一職責原則 二&#xff0e;七大原則是什么含義&#xff1f; 序號 面向對象設計七大原則 偶的理解 1 …

mybatis實戰教程(mybatis in action)之二:以接口的方式編程

前面一章&#xff0c;已經搭建好了eclipse,mybatis,mysql的環境&#xff0c;并且實現了一個簡單的查詢。請注意&#xff0c;這種方式是用SqlSession實例來直接執行已映射的SQL語句&#xff1a;session.selectOne("com.yihaomen.mybatis.models.UserMapper.selectUserByID&…

Linux內核分析06

進程的描述和進程的創建 一&#xff0c;進程的描述 進程控制塊PCB——task_struct &#xff08;進程描述符&#xff09;&#xff0c;為了管理進程&#xff0c;內核必須對每個進程進行清晰的描述&#xff0c;進程描述符提供了內核所需了解的進程信息。 struct task_struct數據結…