wireshark常用过滤规则

2021-02-22  本文已影响0人  a风风a

可使用单个或多个过滤条件(可使用==,>=等),多个条件时使用and or进行连接

1.过滤IP,如来源IP或者目标IP等于某个IP

例子:ip.src ==192.168.1.107 or ip.dst ==192.168.1.107

2.过滤端口

例子:

tcp.port eq 80 // 不管端口是来源的还是目标的都显示

tcp.port == 80

tcp.dstport == 80 // 只显tcp协议的目标端口80tcp.srcport == 80 // 只显tcp协议的来源端口80

过滤端口范围tcp.port >= 1 and tcp.port <= 80

3.过滤协议

例子:

tcp udp arp icmp http smtp ftp dns等等

排除arp包,如!arp   或者   not arp

4.过滤MAC

例子太以网头过滤

eth.dst == A0:00:00:04:C5:84 // 过滤目标mac

eth.src eq A0:00:00:04:C5:84 // 过滤来源mac

5.包长度过滤

例子:

udp.length == 26 这个长度是指udp本身固定长度8加上udp下面那块数据包之和

tcp.len >= 7   指的是ip数据包(tcp下面那块数据),不包括tcp本身

ip.len == 94 除了以太网头固定长度14,其它都算是ip.len,即从ip本身到最后

frame.len == 119 整个数据包长度,从eth开始到最后

6.http模式过滤

例子:

http.request.method == “GET”

http.request.method == “POST”

http.request.uri == “/img/logo-edu.gif”

http contains “GET”

http contains “HTTP/1.”

7.TCP参数过滤

tcp.flags 显示包含TCP标志的封包。

tcp.flags.syn == 0x02     显示包含TCP SYN标志的封包。

8.报文

https://wiki.wireshark.org/SampleCaptures

上一篇 下一篇

猜你喜欢

热点阅读