溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Linux的常用工具有哪些

發(fā)布時(shí)間:2021-09-10 07:48:30 來(lái)源:億速云 閱讀:150 作者:chen 欄目:建站服務(wù)器

本篇內(nèi)容主要講解“Linux的常用工具有哪些”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“Linux的常用工具有哪些”吧!

01

日志工具

1

logdissect

    logdissect用于分析日志文件和其他數(shù)據(jù)的 CLI 實(shí)用程序和 Python API。它可以解析、融合、過(guò)濾和導(dǎo)出數(shù)據(jù)(日志文件或json格式)

2

安裝

安裝有兩種方法,通過(guò)github和PyPI

github

需要:python, python-setuptools 

    (and/or python3, python3-setuptools)

wget https://github.com/dogoncouch/logdissect/archive/v3.1.1.tar.gztar -xzf v3.1.1.tar.gzcd logdissect-3.1.1sudo make all

注:筆者在測(cè)試時(shí),發(fā)現(xiàn)當(dāng)電腦只存在python2時(shí),需要將logdissect/Makefile文件中以下關(guān)于python3的幾行注釋掉,才能正常安裝,否則會(huì)報(bào)錯(cuò)

Linux的常用工具有哪些

PyPI

 需要:pip

sudo pip install logdissect

3

選項(xiàng)介紹

用法: 

logdissect.py [-h] [--dhost DHOST] [--grep PATTERN][--last LAST][--process PROCESS][--protocol PROTOCOL][--range RANGE]              [--utc][--rdhost DHOST][--rgrep PATTERN][--rprocess PROCESS] [--rprotocol PROTOCOL][--rshost SHOST][--rsource SOURCE]              [--shost SHOST][--source SOURCE][--linejson LINEJSON] [--outlog OUTLOG][--label LABEL][--sojson SOJSON][--pretty][--version]              [--verbose] [-s] [--list-parsers][-p PARSER][-z]              [-t TZONE][file [file ...]]

位置參數(shù):

file    指定輸入文件

選項(xiàng)參數(shù):

-h, --help    查看幫助信息--version     查看程序版本號(hào)--verbose     設(shè)置詳細(xì)的終端輸出-s            靜默輸出--list-parsers查看可用的解析器-p PARSER     選擇解析器 (default: syslog)-z, --unzip   包含gzip壓縮文件-t TZONE      指定UTC時(shí)區(qū)偏移量 (例如 '+0500')

 過(guò)濾選項(xiàng):

--grep PATTERN     匹配目的主機(jī)--grep PATTERN     匹配模式--last LAST        匹配前一個(gè)時(shí)間段 (例如 5m/3h/2d/etc)--process PROCESS  匹配源進(jìn)程--protocol PROTOCOL匹配協(xié)議--range RANGE      匹配事件范圍 (YYYYMMDDhhmm-YYYYMMDDhhmm)(年月日時(shí)分)--utc              使用UTC進(jìn)行范圍匹配--rdhost DHOST     過(guò)濾掉目標(biāo)主機(jī)--rgrep PATTERN    過(guò)濾掉模式--rprocess PROCESS 過(guò)濾掉源進(jìn)程--rprotocol PROTOCOL過(guò)濾掉協(xié)議--rshost SHOST     過(guò)濾掉源主機(jī)--rsource SOURCE   過(guò)濾掉日志源--shost SHOST      匹配源主機(jī)--source SOURCE    匹配日志源

輸出選項(xiàng):

--linejson LINEJSON   設(shè)置逐行JSON輸出的輸出文件--outlog OUTLOG       設(shè)置標(biāo)準(zhǔn)日志輸出的輸出文件--label LABEL         設(shè)置輸出日志的標(biāo)簽類型 (fname|fpath)--sojson SOJSON       設(shè)置單個(gè)對(duì)象JSON輸出的輸出文件--pretty              對(duì)sojson輸出美化格式

4

解析器

--list-parsers    輸出==== 可用解析模塊: ====ciscoios:思科ios解析模塊emerge:gentoo emerge日志解析模塊linejson:logdissect每行對(duì)象JSON解析模塊sojson:logdissect單個(gè)對(duì)象JSON解析模塊syslog: syslog (標(biāo)準(zhǔn)時(shí)間戳)解析模塊syslogiso:syslog (ISO時(shí)間戳)解析模塊syslognohost:syslog (沒有主機(jī)的標(biāo)準(zhǔn)時(shí)間戳)解析模塊tcpdump:tcpdump終端輸出解析模塊webaccess:web訪問(wèn)日志解析模塊windowsrsyslog:windows rsyslog代理日志解析模塊

5

簡(jiǎn)單用法

查看過(guò)去一小時(shí)的登錄日志:

logdissect --last 1h secure

Linux的常用工具有哪些

查看過(guò)去30分鐘systemd和cron進(jìn)程的日志:

logdissect --last 30m --process systemd --process CRON messages

Linux的常用工具有哪些

結(jié)合詳細(xì)查看指定時(shí)間范圍的messages和dmesg日志

logdissect --verbose --range 20190428120000-20190428121000 --label fpath messages dmesg

Linux的常用工具有哪些

輸出過(guò)去30天183.238.151.209的訪問(wèn)記錄的文件

logdissect -s --outlog myaccess.log --grep 183.238.151.209 --last 30d --label fname /var/log/secure

Linux的常用工具有哪些

02

進(jìn)程工具

1

Linux Rootkit (vfs hook) 

    隱藏進(jìn)程檢測(cè)工具,一個(gè)linux內(nèi)核模塊,是用于檢測(cè)rootkit的一個(gè)小demo。通過(guò)讀取此內(nèi)核模塊創(chuàng)建的虛擬文件,可檢測(cè)通過(guò)Hook vfs 函數(shù)來(lái)隱藏的進(jìn)程。

下載鏈接:

https://security.tencent.com/index.php/opensource/down/16

2

安裝方法

unzip process_list.zipcd process_listmakemake install

使用效果:

Linux的常用工具有哪些

03

網(wǎng)絡(luò)分析工具

1

Tcpdump

  Tcpdump作為L(zhǎng)inux下一款經(jīng)典的抓包工具有必要進(jìn)行講解。

注:抓包只是一個(gè)數(shù)據(jù)包捕獲過(guò)程,最重要的是對(duì)結(jié)果的分析。分析過(guò)程中,需要掌握主流協(xié)議的包結(jié)構(gòu),否則一切都是徒勞。

2

基礎(chǔ)

常用選項(xiàng):

-i:指定網(wǎng)絡(luò)接口(如eth0,eth2。網(wǎng)絡(luò)接口使用ifconfig命令查看)-nn:不對(duì)IP地址進(jìn)行DNS反解析,并且不將端口轉(zhuǎn)換為字符-vv:詳細(xì)輸出數(shù)據(jù)包信息-w:將捕獲的結(jié)果存入指定文件,-w后接自定義文件名-r:將存入文件的結(jié)果讀取出來(lái)以便分析

    重要:在抓包過(guò)程中,個(gè)人強(qiáng)烈建議使用 -n 選項(xiàng)。如果不加-n 選項(xiàng),tcpdump程序就會(huì)對(duì)IP地址進(jìn)行DNS反解析,反解析的過(guò)程會(huì)耗費(fèi)相當(dāng)部分時(shí)間。因?yàn)檫@里牽涉到libcap緩沖區(qū),tcpdump捕獲的數(shù)據(jù)包首先會(huì)放入緩沖區(qū),然后上層提取。但是上層在嘗試做DNS反解析的時(shí)間里,緩沖區(qū)會(huì)由于數(shù)據(jù)包過(guò)多而導(dǎo)致緩沖區(qū)溢出,溢出的直接結(jié)果就是部分?jǐn)?shù)據(jù)包被drop,數(shù)據(jù)包被drop會(huì)對(duì)我們的分析過(guò)程造成極大影響——實(shí)際不丟包,但是數(shù)據(jù)顯示卻“丟包”。為了不影響我們的分析結(jié)果,個(gè)人建議加上-n選項(xiàng)

限定符:

    過(guò)濾器表達(dá)式由一個(gè)或多個(gè)基元組成,原語(yǔ)通常由id(名稱或數(shù)字)前面加一個(gè)或多個(gè)限定符),tcpdump提供了3種限定符,分別為type、direction、protocol

type(類型):

host    //host 192.168.1.1net     //net 192.168port    //port 80portrange    //portrange 22-801.2.2 direction(數(shù)據(jù)包方向)srcdstsrc or dstsrc and dst1.2.3 protocal(協(xié)議)etheriparprarptcpudpicmp

3

基本語(yǔ)法

過(guò)濾主機(jī):

tcpdump -i ehtN -n host IPADDRtcpdump -n -i eth2 host 192.168.1.1  抓取所有經(jīng)過(guò)eth2,目標(biāo)或源地址是192.168.1.1的數(shù)據(jù)包tcpdump -i eth2 -n src host 192.168.1.1  指定源地址tcpdump -i eth2 -n dst host 192.168.1.1  指定目標(biāo)地址

過(guò)濾端口:

tcpdump -i eth2 -n port PortNumtcpdump -i eth2 -n port 25 抓取所有經(jīng)過(guò)eth2,目的或源端口是25的網(wǎng)絡(luò)數(shù)據(jù)tcpdump -i eth2 -n src port 25    指定源端口

網(wǎng)絡(luò)過(guò)濾:

tcpdump -i eth2 -n net 192.168tcpdump -i eth2 -n src net 192.168

協(xié)議過(guò)濾:

tcpdump -i ethN -n Protocoltcpdump -i eth2 -n icmptcpdump -i eth2 -n ip

常用表達(dá)式:

非:!或者 not

與:&& 或者 and

或:|| 或者 or

tcpdump -i eth2 tcp and port 80 and (dst host 192.168.1.254 or dst host 192.168.1.200)  抓取所有經(jīng)過(guò)eth2,目的地址是192.168.1.254或192.168.1.200;端口是80的TCP數(shù)據(jù)或者tcpdump -i eth2 '((tcp) and (port 80) and ((dst host 192.168.1.254) or (dst host 192.168.1.200)))'  //前面一個(gè)的寫法括號(hào)需要轉(zhuǎn)義,后一種寫法是將表達(dá)式用引號(hào)引起來(lái)

4

包頭過(guò)濾

    如何從包頭過(guò)濾信息了?首先要熟悉IP、TCP等協(xié)議的包頭結(jié)構(gòu),此處不做贅述。包頭過(guò)濾的語(yǔ)法如下:

'protocol[x:y]':這里表示的是以protocol協(xié)議的第x字節(jié)起始,取后面的y字節(jié)(字節(jié)從0開始編號(hào))'proto[x:y] & z = 0'  : proto[x:y]和z的與操作為0'proto[x:y] & z !=0'  : proto[x:y]和z的與操作不為0'proto[x:y] & z = z'  : proto[x:y]和z的與操作為z'proto[x:y] = z'      : proto[x:y]等于z操作符 : >, <, >=, <=, =, !=

IP協(xié)議抓包:

tcpdump-i -n eth2'((ip[2:2] = 1024) and (src host 192.168.1.1'))  抓取經(jīng)過(guò)eth2網(wǎng)卡、數(shù)據(jù)包大小為1024并且源IP為192.168.1.1的數(shù)據(jù)包tcpdump -i -n eth2'((ip[2:2] > 1024) and (src host 192.168.1.1))'抓取經(jīng)過(guò)eth2網(wǎng)卡、數(shù)據(jù)包字節(jié)大于1024并且源IP為192.168.1.1的數(shù)據(jù)包

TCP協(xié)議抓包:

抓TCP包:tcpdump -i eth4 -nn -vv tcp and host 218.8.51.194tcpdump: listening on eth4, link-type EN10MB (Ethernet), capture size 65535 bytes17:41:00.159396 IP (tos 0x0, ttl 54, id 2335, offset 0, flags [DF], proto TCP (6), length 60)218.8.51.194.51003 > 182.118.126.96.80: Flags [S], cksum 0xe729 (correct), seq 3087933325, win 14600, options [mss 1460,sackOK,TS val 796071570 ecr 0,nop,wscale 7], length 017:41:00.159427 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)182.118.126.96.80 > 218.8.51.194.51003: Flags [S.], cksum 0xce85 (correct), seq 1946096042, ack 3087933326, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 017:41:00.190017 IP (tos 0x0, ttl 54, id 2336, offset 0, flags [DF], proto TCP (6), length 40)218.8.51.194.51003 > 182.118.126.96.80: Flags [.], cksum 0x47ed (correct), seq 1, ack 1, win 115, length 017:41:00.190354 IP (tos 0x0, ttl 54, id 2337, offset 0, flags [DF], proto TCP (6), length 40)218.8.51.194.51003 > 182.118.126.96.80: Flags [F.], cksum 0x47ec (correct), seq 1, ack 1, win 115, length 017:41:00.190402 IP (tos 0x0, ttl 64, id 57183, offset 0, flags [DF], proto TCP (6), length 40)182.118.126.96.80 > 218.8.51.194.51003: Flags [F.], cksum 0x47eb (correct), seq 1, ack 2, win 115, length 017:41:00.221104 IP (tos 0x0, ttl 54, id 2338, offset 0, flags [DF], proto TCP (6), length 40)218.8.51.194.51003 > 182.118.126.96.80: Flags [.], cksum 0x47eb (correct), seq 2, ack 2, win 115, length 0

結(jié)果分析:

上面的結(jié)果中,2-3行信息為TCP三次握手的過(guò)程,offset 表示偏移量

Flags 后面的標(biāo)識(shí)含義:

S (SYN)

F (FIN)

P (PUSH)

R (RST)

W (ECN CWR)

E (ECN-Echo)

. (no flags)

cksum 表示校驗(yàn)和,其中correct表示校驗(yàn)和正確

抓取目的端口等于80的報(bào)文:

tcpdump -i eth2 -nn -vv '((tcp[2:2] = 80))'  //TCP頭部的3-4字節(jié)為目的端口

抓取源端口等于80的報(bào)文:

tcpdump -i eht1 -nn -vv '((tcp[0:2] = 80))'  //TCP頭部的1-2字節(jié)為源端口

** TCP的8種標(biāo)記,這些標(biāo)記在TCP頭部的14字節(jié)——tcp[13]。TCP使用哪個(gè)標(biāo)記,就會(huì)將這個(gè)標(biāo)記的值置為1,如SYN包的二進(jìn)制表示為: 00000010,十進(jìn)制就是2

 +-+-+-+-+-+-+-+-+

 |C|E|U|A|P|R|S|F|

 |W|C|R|C|S|S|Y|I|

 |R|E|G|K|H|T|N|N|

 +-+-+-+-+-+-+-+-+

只抓TCP握手過(guò)程中的SYN包:

tcpdump -i eth2 -nn -vv '((tcp[13] = 2))'  這個(gè)時(shí)候標(biāo)識(shí)位的值為 00000010

抓標(biāo)記為SYN、ACK的包:

tcpdump -i eth4 -nn -vv '((tcp[13] = 18))'  此時(shí)標(biāo)識(shí)位的至為 00010010

其他標(biāo)識(shí)位抓包方法一次類推。這種通過(guò)數(shù)字計(jì)算的或許會(huì)比較麻煩,因此tcpdump支持了另一種寫法,上面兩種寫法分別如下:

tcpdump -i eth4 -n -vv "tcp[tcpflags] & (tcp-syn) != 0"

tcpdump -i eth4 -nn -vv '((tcp[tcpflags] & tcp-syn != 0) and (tcp[tcpflags] & tcp-ack != 0 ))'

[root@tw13c150 ~]# tcpdump -i eth4 -n -vv "tcp[tcpflags] & (tcp-ack) != 0" and \(host 218.8.51.194\)

tcpdump: listening on eth4, link-type EN10MB (Ethernet), capture size 65535 bytes

13:46:26.019271 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)

    182.118.126.96.http > 218.8.51.194.58137: Flags [S.], cksum 0xfbc7 (correct), seq 769939001, ack 1488795467, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0

13:46:26.049499 IP (tos 0x0, ttl 56, id 34444, offset 0, flags [DF], proto TCP (6), length 40)

    218.8.51.194.58137 > 182.118.126.96.http: Flags [.], cksum 0x752f (correct), seq 1488795467, ack 769939002, win 115, lengt

其他協(xié)議抓包(DNS、HTTP等)

HTTP:tcpdump -i eth4 -nn -vv 'tcp[20:2]=0x4745 or tcp[20:2]=0x4854'//tcp[20:2]=0x4745 表示'GET'的'GE',tcp[20:2]=0x4854 表示HTTP的 'HT'DNS:tcpdump -i eth2 udp dst port 53

    最后,如果需要查看數(shù)據(jù)內(nèi)容,可使用tcpdump -s 0 -w filename把數(shù)據(jù)包都保存下來(lái)(-s 0是抓取完整數(shù)據(jù)包,否則默認(rèn)只抓68字節(jié)。),然后用wireshark分析。

網(wǎng)絡(luò)丟包分析抓包技巧:

    我們公司的服務(wù)器上有很多ping程序,抓包時(shí)為了避免其它數(shù)據(jù)包的影響,我們可以抓特定長(zhǎng)度的包。

以ICMP為例:

A端指定數(shù)據(jù)字節(jié)為 1024 bytes pingping -c 400 -i 0.01 -s 1024 -f tw04008s2.sandai.net//那么B端抓IP數(shù)據(jù)包的長(zhǎng)度應(yīng)為1024(數(shù)據(jù)長(zhǎng)度)+8(8字節(jié)ICMP首部)+20(字節(jié)IP首部)tcpdump -i eth2 "(ip[2:2]=1052) and src host 123.59.127.2" -w loss.cap//這里的 ip[2:2] 指的是過(guò)濾從第三字節(jié)開始的兩個(gè)字節(jié)數(shù),因此我過(guò)濾出的就是3、4字節(jié)

    其實(shí)捕獲數(shù)據(jù)包不難,但是我們要學(xué)會(huì)分析、清洗數(shù)據(jù),這就需要十分熟悉各類協(xié)議,尤其是TCP,IP,HTTP等

04

內(nèi)存服務(wù)工具

1

Volatility 

volatility 是一款內(nèi)存取證和分析工具,可以對(duì) dump 出來(lái)的內(nèi)存進(jìn)行分析,并提取內(nèi)存中的文件。支持多平臺(tái)運(yùn)行(需要python環(huán)境),該工具支持 Windows 和 Linux,Kali 下面默認(rèn)已經(jīng)安裝。

    下載地址:http://www.volatilityfoundation.org/#!releases/component_71401

2

使用方法

要查看可用選項(xiàng),請(qǐng)運(yùn)行“python vol.py -h”或“python vol.py —info”

root@kali:~/volatility-master# python vol.py -hVolatility Foundation Volatility Framework 2.6.1Usage: Volatility - A memory forensics analysis platform.

Options:

-h, --help  //list all available options and their default values.Default values may be set in the configuration file(/etc/volatilityrc)--conf-file=/root/.volatilityrc  //User based configuration file-d, --debug  //Debug volatility--plugins=PLUGINS    //Additional plugin directories to use (colon separated)--info  //Print information about all registered objects--cache-directory=/root/.cache/volatility    //Directory where cache files are stored--cache    //Use caching--tz=TZ    //Sets the (Olson) timezone for displaying timestamps.using pytz (if installed) or tzset-f FILENAME, --filename=FILENAME    //Filename to use when opening an image--profile=WinXPSP2x86    //Name of the profile to load (use --info to see a list of supported profiles)-l LOCATION, --location=LOCATION    //A URN location from which to load an address space-w, --write    //Enable write support--dtb=DTB    //DTB Address--shift=SHIFT    //Mac KASLR shift address--output=text    //Output in this format (support is module specific, see the Module Output Options below)--output-file=OUTPUT_FILE    //Write output in this file-v, --verbose    //Verbose information--physical_shift=PHYSICAL_SHIFT    //Linux kernel physical shift address--virtual_shift=VIRTUAL_SHIFT    //Linux kernel virtual shift address-g KDBG, --kdbg=KDBG  //Specify a KDBG virtual address (Note: for 64-bit Windows 8 and above this is the address of KdCopyDataBlock)--force    //Force utilization of suspect profile-k KPCR, --kpcr=KPCR    //Specify a specific KPCR address--cookie=COOKIE    //Specify the address of nt!ObHeaderCookie (valid for Windows 10 only)

支持以下插件:

linux_apihooks  - 檢查userland apihookslinux_arp  - 打印ARP表linux_aslr_shift  - 自動(dòng)檢測(cè)Linux ASLR轉(zhuǎn)換linux_banner  - 打印Linux橫幅信息linux_bash  - 從bash進(jìn)程內(nèi)存中恢復(fù)bash歷史記錄linux_bash_env  - 恢復(fù)進(jìn)程的動(dòng)態(tài)環(huán)境變量linux_bash_hash  - 從bash進(jìn)程內(nèi)存中恢復(fù)bash哈希表linux_check_afinfo  - 驗(yàn)證網(wǎng)絡(luò)協(xié)議的操作函數(shù)指針linux_check_creds  - 檢查是否有任何進(jìn)程共享憑證結(jié)構(gòu)linux_check_evt_arm  - 檢查異常向量表以查找syscall表掛鉤linux_check_fop  - 檢查rootkit修改的文件操作結(jié)構(gòu)linux_check_idt  - 檢查IDT是否已被更改linux_check_inline_kernel  - 檢查內(nèi)聯(lián)內(nèi)核掛鉤linux_check_modules  - 將模塊列表與sysfs信息進(jìn)行比較(如果有)linux_check_syscall  - 檢查系統(tǒng)調(diào)用表是否已被更改linux_check_syscall_arm  - 檢查系統(tǒng)調(diào)用表是否已被更改linux_check_tty  - 檢查tty設(shè)備的掛鉤linux_cpuinfo  - 打印有關(guān)每個(gè)活動(dòng)處理器的信息linux_dentry_cache  - 從dentry緩存中收集文件linux_dmesg  - 收集dmesg緩沖區(qū)linux_dump_map  - 將選定的內(nèi)存映射寫入磁盤linux_dynamic_env  - 恢復(fù)進(jìn)程的動(dòng)態(tài)環(huán)境變量linux_elfs  - 在進(jìn)程映射中查找ELF二進(jìn)制文件linux_enumerate_files  - 列出文件系統(tǒng)緩存引用的文件linux_find_file  - 列出并恢復(fù)內(nèi)存中的文件linux_getcwd  - 列出每個(gè)進(jìn)程的當(dāng)前工作目錄linux_hidden_modules  - 刻錄內(nèi)存以查找隱藏的內(nèi)核模塊linux_ifconfig  - 收集活動(dòng)接口linux_info_regs  - 就像GDB中的'info registers'。它打印出所有的linux_iomem  - 提供類似于/ proc / iomem的輸出linux_kernel_opened_files  - 列出從內(nèi)核中打開的文件linux_keyboard_notifiers  - 解析鍵盤通知程序調(diào)用鏈linux_ldrmodules  - 將proc映射的輸出與libdl中的庫(kù)列表進(jìn)行比較linux_library_list  - 列出加載到進(jìn)程中的庫(kù)linux_librarydump  - 將進(jìn)程內(nèi)存中的共享庫(kù)轉(zhuǎn)儲(chǔ)到磁盤linux_list_raw  - 列出具有混雜套接字的應(yīng)用程序linux_lsmod  - 收集加載的內(nèi)核模塊linux_lsof  - 列出文件描述符及其路徑linux_malfind  - 查找可疑的進(jìn)程映射linux_memmap  - 轉(zhuǎn)儲(chǔ)linux任務(wù)的內(nèi)存映射linux_moddump  - 提取加載的內(nèi)核模塊linux_mount  - 收集已安裝的fs /設(shè)備linux_mount_cache  - 從kmem_cache收集已安裝的fs / deviceslinux_netfilter  - 列出Netfilter掛鉤linux_netscan  - 用于網(wǎng)絡(luò)連接結(jié)構(gòu)linux_netstat  - 列出打開的套接字linux_pidhashtable  - 通過(guò)PID哈希表枚舉進(jìn)程linux_pkt_queues  - 將每個(gè)進(jìn)程的數(shù)據(jù)包隊(duì)列寫入磁盤linux_plthook  - 掃描ELF二進(jìn)制文件的PLT以掛鉤到非NEEDED圖像linux_proc_maps  - 收集進(jìn)程內(nèi)存映射linux_proc_maps_rb  - 通過(guò)映射紅黑樹收集linux的進(jìn)程映射linux_procdump  - 將進(jìn)程的可執(zhí)行映像轉(zhuǎn)儲(chǔ)到磁盤linux_process_hollow  - 檢查進(jìn)程空洞的跡象linux_psaux  - 收集進(jìn)程以及完整的命令行和開始時(shí)間linux_psenv  - 收集進(jìn)程及其靜態(tài)環(huán)境變量linux_pslist  - 通過(guò)遍歷task_struct->任務(wù)列表來(lái)收集活動(dòng)任務(wù)linux_pslist_cache  - 從kmem_cache中收集任務(wù)linux_psscan  - 掃描進(jìn)程的物理內(nèi)存linux_pstree  - 顯示進(jìn)程之間的父/子關(guān)系linux_psxview  - 查找包含各種流程列表的隱藏流程linux_recover_filesystem  - 從內(nèi)存中恢復(fù)整個(gè)緩存的文件系統(tǒng)linux_route_cache  - 從內(nèi)存中恢復(fù)路由緩存linux_sk_buff_cache  - 從sk_buff kmem_cache中恢復(fù)數(shù)據(jù)包linux_slabinfo  - 正在運(yùn)行的機(jī)器上的Mimics / proc / slabinfolinux_strings  - 將物理偏移與虛擬地址匹配(可能需要一段時(shí)間,非常詳細(xì))linux_threads  - 打印進(jìn)程的線程linux_tmpfs  - 從內(nèi)存中恢復(fù)tmpfs文件系統(tǒng)linux_truecrypt_passphrase  - 恢復(fù)緩存的Truecrypt密碼linux_vma_cache  - 從vm_area_struct緩存中收集VMAlinux_volshell  - 內(nèi)存映像中的Shelllinux_yarascan  -  Linux內(nèi)存映像中的shell

下面簡(jiǎn)單介紹以Linux dump出來(lái)的內(nèi)存文件分析

查看網(wǎng)絡(luò)連接信息:

Linux的常用工具有哪些

查看進(jìn)程信息

Linux的常用工具有哪些

05

信息收集工具

1

FastIR Collector

   FastIR Collector Linux,可以快速完成Linux服務(wù)器各項(xiàng)數(shù)據(jù)的信息收集,無(wú)需掌握l(shuí)inux各種復(fù)雜的命令與參數(shù)。該工具可以收集:系統(tǒng)信息(內(nèi)核版本、內(nèi)核模塊、網(wǎng)絡(luò)接口、主機(jī)名、發(fā)行版本),用戶登錄信息,網(wǎng)絡(luò)連接,用戶數(shù)據(jù),自動(dòng)進(jìn)程,磁盤信息,文件系統(tǒng)信息等,并將結(jié)果輸出為csv文件。FastIRcollector同樣也有Windows的版本,可以用來(lái)收集Windows系統(tǒng)信息。

下載地址:git clone https://github.com/SekoiaLab/Fastir_Collector_Linux.git

運(yùn)行環(huán)境:代碼運(yùn)行在python2環(huán)境下,python 2.4以上版本。必須以root賬戶運(yùn)行

2

使用方法

cd Fastir_Collector_Linuxpython fastIR_collector_linux.py  www.gendan5.com

命令執(zhí)行后,會(huì)生成output目錄,收集的所有數(shù)據(jù)會(huì)打包放在該目錄下。

使用sz命令下載該壓縮包到本地環(huán)境。(yum install -y lszrz,可安裝rz與sz)

也可以使用ftp或sftp傳輸

Linux的常用工具有哪些

Linux的常用工具有哪些

參數(shù):

Linux的常用工具有哪些

到此,相信大家對(duì)“Linux的常用工具有哪些”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI