wireshark过滤规则

1.过滤IP
ip.addr eq <ip_addr>
ip.src eq <ip_addr>
ip.dst eq <ip_addr>
2.过滤端口
tcp.port eq <port>
tcp.port == <port>
tcp.port eq <port>
tcp.port eq 80 or udp.port eq <port>
tcp.dstport == <port>
tcp.srcport == <port>
udp.port eq <port>
过滤端口范围
tcp.port >= <port> and tcp.port <= <port>
3.过滤协议
tcp
udp
arp
icmp
http
smtp
ftp
dns
msnms
ip
ssl
oicq
bootp
等等
排除arp包,如!arp   或者   not arp
4.过滤MAC
eth.dst == <MAC_addr>
eth.src eq <MAC_addr>
eth.dst==00:00:00:00:00:00
eth.dst==00-00-00-00-00-00
eth.addr eq <MAC_addr>
less than 小于 < lt 
小于等于 le
等于 eq
大于 gt
大于等于 ge
不等 ne
5.包长度过滤
udp.length == 26 这个长度是指udp本身固定长度8加上udp下面那块数据包之和
tcp.len >= 7   指的是ip数据包(tcp下面那块数据),不包括tcp本身
ip.len == 94 除了以太网头固定长度14,其它都算是ip.len,即从ip本身到最后
frame.len == 119 整个数据包长度,从eth开始到最后
eth —> ip or arp —> tcp or udp —> data
6.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: “
7.DHCP
注意:DHCP协议的检索规则不是dhcp/DHCP, 而是bootp
以寻找伪造DHCP服务器为例,介绍Wireshark的用法。在显示过滤器中加入过滤规则,
显示所有非来自DHCP服务器并且bootp.type==0x02(Offer/Ack/NAK)的信息:
bootp.type==0x02 and not ip.src==192.168.1.1

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值