预配置网络包搜索规则

您可以使用使用 BPF 和正则表达式的预配置规则在流量中进行搜索。

要使用预配置规则搜索网络数据包:

  1. 在应用程序 Web 界面窗口中选择“网络地图”部分。
  2. 转到“网络会话”选项卡。
  3. 单击“在数据包中搜索”。

    这将打开带有网络数据包搜索设置的窗口。

  4. 在“要下载的流量期限”字段中,设置您想要搜索网络数据包的范围。
  5. 在下表中,从“使用 BPF 过滤”或“使用正则表达式过滤”列中复制一个过滤表达式,并将其粘贴到 Web 界面的相应部分,以便在网络数据包中进行搜索。
  6. 单击“搜索”。

表格显示符合过滤条件的数据。

预配置的规则如下表所列。

预配置网络包搜索规则

规则目的

使用 BPF 进行过滤

使用正则表达式进行过滤

解释

示例

按 IP 地址搜索流量

host <地址>

 

<地址> 是 IPv4 地址

host 10.10.0.1

搜索两台主机之间的流量

host <地址 1> and host <地址 2>

 

<地址 1><地址 2> 是 IPv4 地址

host 10.10.0.1 and host 10.10.0.2

搜索单个 TCP 会话的流量

tcp <端口 1> and host <地址 1> and tcp <端口 2> and host <地址 2>

 

  • <地址 1><地址 2> 是通信 IPv4 地址
  • <端口 1><端口 2>是通信端口

tcp port 80 and tcp port 53567

and host 10.10.0.1 and host 10.10.0.2

按多个 IP 地址搜索流量

host <地址 1> or host <地址 2> or ... host <地址 N>

 

<地址 1-N>是 IPv4 地址

host 10.10.0.1 and host 10.10.0.2 and host 10.10.0.3

查找来自一组主机的所有 DNS 查询

udp and dst port 53 and ( src host <地址 1> or src host <地址 2> or ... src host <地址 N> )

 

<地址 1-N>是 IPv4 地址

udp and dst port 53 and ( src host 10.10.0.1 or src host 10.10.0.2 )

搜索 HTTP 流量

 

" HTTP/"

过滤器必须不带引号使用

 

搜索 DNS 流量

udp dst port 53 or tcp dst port 53

 

仅限标准 DNS

 

使用针对特定域的 GET 请求搜索 HTTP 流量

tcp port 80 or tcp port 8000 or tcp port 8080 or tcp port 8888

GET.{1,1000}<域>

<域>要找到的域

 

搜索特定主机的 ICMP 流量

icmp and host <地址>

 

<地址>是 IPv4 地址

icmp and host 10.10.10.1

搜索以纯文本传输的身份验证数据

tcp port 80 or tcp port 8000 or tcp port 8080 or tcp port 8888 or port ftp or port smtp or port imap or port pop3 or port

telnet

"pass=|pwd=|log=|login=|user=|username=|pw=|passw=|passwd=|password=|pass:|user:|username:|password:|Username:|Password:|login:|pass |user|VXNlcm5hbWU6|UGFzc3dvcmQ6|LOGIN |USER|PASS "

过滤器必须不带引号使用

 

搜索主机作为客户端的 TCP 会话

tcp[tcpflags] = tcp-syn and host <address>

 

<地址>是 IPv4 地址

tcp[tcpflags] = tcp-syn and host 10.10.10.1

在给定子网中搜索 HTTP 流量

net xx.xx.xx.xx/yy and ( port 8080 or port 80 )

 

xx.xx.xx.xx/yy 是带掩码的 IPv4 子网

net 10.10.10.0 /24 and ( port 8080 or port 80 )

搜索本地交互流量

ip and src net (10 or 172.16/12 or 192.168/16) and dst net (10 or 172.16/12 or 192.168/16)

 

 

 

搜索与互联网上对象交互的流量

ip and not (src net (10 or 172.16/12 or 192.168/16) and dst net (10 or 172.16/12 or 192.168/16)) and not multicast and not broadcast and not net 169.254/16

 

 

 

根据 HTTP 流量中的 UserAgent 字段搜索流量

用户代理:

 

 

 

页面顶部