Wireshark的使用姿势

时间:2023-04-12 阅读:314 评论:0 作者:xirui

1.1 过滤报文

wireshark的过滤器和过滤规则能够帮助我们迅速定位到要分析的报文。下面列举几种比较常见的过滤数据包的语法,具体的还请百度。

 1.    过滤IP,如源IP或者目标 x.x.x.x 

ip.src eq x.x.x.x or ip.dst eq x.x.x.x 或者 ip.addr eq x.x.x.x

2.过滤端口 

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

3.过滤协议 

tcp/udp/arp/icmp/http/ftp/dns/ip……

4.过滤MAC 

eth.dst ==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" 

ttp contains"GET" 

ttp contains"HTTP/1." 

ttp.request.method== "GET" && http contains "User-Agent:"


本文链接: https://www.5240.net/?id=19 转载请注明出处!