wireshark常用过滤

wireshark常用过滤 wireshark怎么过滤端口?

wireshark怎么过滤端口?

wireshark怎么过滤端口?

方法/步骤过滤源ip、目的ip。在wireshark的过滤规则框Filter中输入过滤条件。如查找目的地址为192.168.101.8的包,ip.dst==192.168.101.8;查找源地址为ip.src==1.1.1.1;端口过滤。如过滤80端口,在Filter中输入,tcp.port==80,这条规则是把源端口和目的端口为80的都过滤出来。使用tcp.dstport==80只过滤目的端口为80的,tcp.srcport==80只过滤源端口为80的包;协议过滤比较简单,直接在Filter框中直接输入协议名即可,如过滤HTTP的协议;http模式过滤。如过滤get包,http.request.method==\

wireshark怎么过滤特定消息?

过滤方法:

一、针对IP地址的过滤。

(1)源地址

表达式为:ip.src == 192.168.0.1

ip.src == 10.230.0.0/16 显示来自10.230网段的封包。

(2)目的地址

表达式为:ip.dst == 192.168.0.1

(3)源或者目的地址

表达式为:ip.addr == 192.168.0.1,

或者 ip.src == 192.168.0.1 or ip.dst == 192.168.0.1

ip.src == 192.168.0.1 || ip.dst == 192.168.0.1

(4)排除以上数据包

表达式为:!(ip.src == 192.168.0.1)

或者:ip.src != 10.1.2.3

二、针对协议的过滤

(1)仅仅输入协议名即可。

表达式为:http

(2)多种协议, 需对协议进行逻辑组合

表达式为:http or telnet

或者: tcp || udp

(3)排除某种协议的数据包

表达式为:not arp

或者:!tcp

三、针对端口的过滤

(1)某一端口

表达式为:tcp.port == 80

tcp.dstport == 25 显示目的TCP端口号为25的封包。

(2)多端口

表达式为:udp.port gt= 2048 (捕获高端口)

可用or连接:tcp.dstportgt=33758 or tcp.dstportlt=33755

and多条件组合:tcp.dstportgt=33758 and tcp.srcport==20

四、针对长度和内容的过滤

(1)数据段的长度

表达式为:udp.length lt 30 http.content_length lt=20

(2)数据包内容

表达式为:http.request.uri matches “vipscu” (匹配http请求中含有vipscu字段的请求信息)

  

五、深度字符串匹配

contains :Does the protocol, field or slice contain a value

示例

tcp contains “http” 显示payload中包含