2011-10-27 87 views
0

我試圖創建一個Wireshark的過濾器,將抓住所有的SMB響應返回發送數據包「錯誤:STATUS_NO_SUCH_FILE」。我也希望能夠在過濾之前抓取數據包。這裏有一個例子:Wireshark的過濾器:獲取那是以前將過濾

No. Time  Source  Destination Proto. Length Info 
26482 24.832997 192.168.1.62 192.168.1.4 SMB 288 Trans2 Request, QUERY_PATH_INFO, Query File Basic Info, Path: \1_CLIENTS\CLIENTS\ACME INC 
26483 24.833122 192.168.1.4 192.168.1.62 SMB 158 Trans2 Response, QUERY_PATH_INFO 
26484 24.833232 192.168.1.62 192.168.1.4 SMB 306 Trans2 Request, FIND_FIRST2, Pattern: \1_CLIENTS\CLIENTS\ACME INC\<.AC_ 
26485 24.833909 192.168.1.4 192.168.1.62 SMB 126 Trans2 Response, FIND_FIRST2, Error: STATUS_NO_SUCH_FILE 

以下過濾抓住「STATUS_NO_SUCH_FILE」數據包:

((ip.src == 192.168.1.4) && (ip.dst == 192.168.1.62)) || ((ip.src == 192.168.1.62) && (ip.dst == 192.168.1.4)) && (smb.nt_status == 0xC000000F) 

但我也想將數據包之前的那一個,以及讓我知道哪些文件路徑WASN沒有發現。

回答

0

您可以使用TShark,Wireshark的發行版的一部分,得到的概述。運行以下命令:
$ tshark -r FS01-Test.pcap -R smb.nt_status == 0xc000000f -T fields -e frame.number -e smb.nt_status -e smb.response_to -E header = y - ë隔板=,> smb.csv

輸出:
frame.number,smb.nt_status,smb.response_to
6242,0xc000000f,6238
6247,0xc000000f,6246
6331,0xc000000f,6269
6338 ,0xc000000f,6336

另一個示例:
$ tshark -r FS01-Test.pcap -R smb.nt_status == 0xc000000f -T fields -e frame.number -e smb.nt_status -e smb.response_to -e smb.search_pattern -E header = y -E separator = ,> smb02.csv

輸出:
frame.number,smb.nt_status,smb.response_to,smb.search_pattern
6242,0xc000000f,6238,\\乙\\迪\\ folder.jpg
6247, 0xc000000f,6246,\\ B \\ Di \\ folder.gif
6331,0xc000000f,6269,\\ B \\ Ex \\ folder.jpg
6338,0xc000000f,6336,\\ B \\ Ex \\ folder.gif