Wireshark過濾規則

 

Wireshark過濾規則



一、IP過濾:包括來源IP或者目標IP等於某個IP

比如:ip.src addr==192.168.0.208 or ip.src addr eq 192.168.0.208 顯示來源IP
ip.dst addr==192.168.0.208 or ip.dst addr eq 192.168.0.208 顯示目標IP

二、端口過濾:
比如:tcp.port eq 80 // 不管端口是來源的還是目標的都顯示
tcp.port == 80
tcp.port eq 2722
tcp.port eq 80 or udp.port eq 80
tcp.dstport == 80 // 只顯tcp協議的目標端口80
tcp.srcport == 80 // 只顯tcp協議的來源端口80
過濾端口範圍
tcp.port >= 1 and tcp.port <= 80

三、協議過濾:tcp
udp
arp
icmp
http
smtp
ftp
dns
msnms
ip
ssl
等等
排除ssl包,如!ssl 或者 not ssl

四、包長度過濾:
比如:
udp.length == 26 這個長度是指udp本身固定長度8加上udp下面那塊數據包之和
tcp.len >= 7 指的是ip數據包(tcp下面那塊數據),不包括tcp本身
ip.len == 94 除了以太網頭固定長度14,其它都算是ip.len,即從ip本身到最後
frame.len == 119 整個數據包長度,從eth開始到最後

五、http模式過濾:
例子:
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: ”
// 響應包包含某頭字段
http contains “HTTP/1.1 200 OK” && http contains “Content-Type: ”
http contains “HTTP/1.0 200 OK” && http contains “Content-Type: ”

六、連接符 and / or


七、表達式:!(arp.src==192.168.1.1) and !(arp.dst.proto_ipv4==192.168.1.243)


八、expert.message是用來對info信息過濾,主要配合contains來使用



感謝原作者,原文地址:http://blog.csdn.net/futuresuper/article/details/6791976


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章