WireSkark(六)
WireShack過(guò)濾規(guī)則書寫:
一、IP過(guò)濾:
(1)源IP:(以192.168.1.122為源IP舉例)
表達(dá)式:ip.src==192.168.1.122或ip.src eq 192.168.1.122 //篩選出源IP是192.168.1.122的數(shù)據(jù)包
(2)目標(biāo)IP:(以192.168.1.137為目的IP舉例)
表達(dá)式:ip.dst==192.168.1.137或ip.src eq 192.168.1.137 //篩選出目的IP是192.168.1.137的數(shù)據(jù)包
(3)直接按IP過(guò)濾:(以192.168.1.137為舉例IP)
表達(dá)式:ip.addr==192.168.1.137或ip.src eq 192.168.1.137 //篩選出與192.168.1.137相關(guān)的數(shù)據(jù)包
二、端口過(guò)濾:
比如:tcp.port eq 80 // 不管端口是來(lái)源的還是目標(biāo)的都顯示
tcp.port == 80
tcp.port eq 2722
tcp.port eq 80 or udp.port eq 80
tcp.dstport == 80 // 只顯tcp協(xié)議的目標(biāo)端口80
tcp.srcport == 80 // 只顯tcp協(xié)議的來(lái)源端口80
過(guò)濾端口范圍
tcp.port >= 1 and tcp.port <= 80
三、協(xié)議過(guò)濾:
tcp 、udp、 arp、 icmp、 http、 smtp、 ftp、 dns、 msnms、 ip、 ssl 等等 ,排除ssl包,如!ssl 或者 not ssl
四、包長(zhǎng)度過(guò)濾:
比如: udp.length == 26 這個(gè)長(zhǎng)度是指udp本身固定長(zhǎng)度8加上udp下面那塊數(shù)據(jù)包之和
tcp.len >= 7 指的是ip數(shù)據(jù)包(tcp下面那塊數(shù)據(jù)),不包括tcp本身
ip.len == 94 除了以太網(wǎng)頭固定長(zhǎng)度14,其它都算是ip.len,即從ip本身到最后
frame.len == 119 整個(gè)數(shù)據(jù)包長(zhǎng)度,從eth開(kāi)始到最后
五、http模式過(guò)濾:
例子: http.request.method == “GET”
?http.request.method == “POST”
?http.request.uri == “/img/logo-edu.gif”
?http contains “GET”
?http contains “HTTP/1.”
// GET包
?http.request.method == “GET” && http contains “Host: ”
?http.request.method == “GET” && http contains “User-Agent: ”
// POST包
http.request.method == “POST” && http contains “Host: ”
http.request.method == “POST” && http contains “User-Agent: ”
// 響應(yīng)包
http contains “HTTP/1.1 200 OK” && http contains “Content-Type: ”
http contains “HTTP/1.0 200 OK” && http contains “Content-Type: ”
一定包含如下: Content-Type:
六、連接符 and / or
七、表達(dá)式:!(arp.src==192.168.1.1) and !(arp.dst.proto_ipv4==192.168.1.243)
http://www.cnblogs.com/zhusd/archive/2010/11/16/1878375.html
總結(jié)
以上是生活随笔為你收集整理的WireSkark(六)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 适合网页设计师的11个不错的Chrome
- 下一篇: ubuntu下python thrift