WireShark 基础使用指北

过滤规则

过滤 IP

来源 IP:ip.src eq x.x.x.x

目的 IP:ip.dst eq x.x.x.x

过滤端口

指定的全部 TCP 端口(包括来源和目的):tcp.port eq 80

指定的全部 UDP 端口(包括来源和目的):udp.port eq 53

指定的目的 TCP 端口:tcp.dstport eq 80

指定的来源 UDP 端口:udp.srcport eq 53

指定端口范围:tcp.port ≥ 1 and tcp.port ≤80

过滤协议

直接写协议名:tcp udp arp icmp http smtp ftp dns ssl

排除某个协议:!tcp 或 not tcp

过滤 MAC

过滤目标 MAC:eth.dst eq XX:XX:XX:XX:XX:XX

过滤来源 MAC:eth.src eq XX:XX:XX:XX:XX:XX

来源和目的均包含:eth.addr eq XX:XX:XX:XX:XX:XX

HTTP 模式过滤

http.request.method == “GET”

http.request.method == “POST”

http.request.uri == “/img”

http contains “User-Agent”

http contains “HTTP/1.1 200 OK”

过滤包长度

udp.length: UDP 协议总长,包含协议头和数据部分

udp.len: 不包含协议头的数据部分长度

ip.len: 除去以太网头固定部分的长度

frame.len: 整个数据包长度


参考


WireShark 基础使用指北
https://blog.tddt.cc/posts/8.WireShark-Basic-Learning.html
作者
TechPANG
发布于
2024年9月29日
许可协议