Wireshark 抓包過濾規則

來源:互聯網
上載者:User

一、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: ”
一定包含如下
Content-Type:

六、串連符 and / or

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.