Wireshark-BPF 필터 규칙
, , filter_app , , , 。 , tcpdump , 。 , tcpdump 。
。 (id, ) 。
, type、dir proto。
1.type
, , 。 host、net port 。 ’host foo’, ’net 128.3’, ’port 20’。 , host。
2.dir
, , 。 src, dst, src or dst src and dst。 ,’src foo’, ’dst net 128.3’, ’src or dst port ftp-data’。 , src or dst。 ’null’ ( slip ), inbound outbound 。
3.proto
, 。 : ether, fddi, ip, arp, rarp, decnet,lat, sca, moprc, mopdl, tcp udp。 ,’ether src foo’, ’arp net 128.3’, ’tcp port 21’。 , 。 ,’src foo’ (ip arp rarp)src foo’ , ’netbar’ ’ (ip arp rarp) net bar’, ’port 53’ (tcp udp)port 53’。
and(&&), or(||) not(!) 。 ,’host foo and notport ftp and not port ftp-data’。 , 。 ,’tcp dst port ftp orftp-data or domain’ ’tcp dst port ftp or tcp dst port ftp-data or tcp dst port domain’。
, 。
dst host host1
IP host1, 。host1 , 。 host1 。
src host host1
IP host1, 。 host1 。
host host1
IP host1, 。 host1 。
host ip, arp rarp , :
ip host host1
:
ether proto \ip and host host1
host1 IP , 。
ether dst ehost
ehost, 。 ehost 。 ehost , eth0 (/etc/ethers ), 。
ether src ehost
ehost, 。 ehost 。
ether host ehost
ehost, 。 ehost 。
gateway host
host , 。 , host, IP host。 host , /etc/hosts /etc/ethers 。 :
ether host ehost and not host host1
host1 ehost, , 。
dst net net1
IP net1, 。net1 ( /etc/networks ), 。 net1 。
src net net1
IP net1, 。 net1 。
net net1
IP net1, 。 net1 。
net net1 mask mask1
IP mask1 net1, 。 src dst 。
net net1/len
IP net1, , len。 src dst 。
dst port port1
ip/tcp ip/udp, port1, 。port1 , /etc/services 。 , 。 , , 。 ,dst port 513 tcp/login udp/who , port domain tcp/domain udp/domain 。
src port port1
port1, 。 port1 。
port port
port, , tcp udp , :
tcp src port port1
port1 TCP 。 port1 tcp 。
less length
length, 。 length 。 :len <= length.
greater length
length, 。 length 。 :len >= length.
ip proto protocol
IP , protocol, 。 protocol ip 。protocol , :icmp, igrp,udp, nd tcp。 tcp, udp icmp , (\) , C-shell \\。
ether broadcast
, 。 。 ether 。
ip broadcast
IP , 。 0 1 , 。
ether multicast
(multicast), 。 ether 。 ’ether[0] & 1 != 0’ 。
ip multicast
IP , 。 ip 。
ether proto protocol
protocol, 。Protocol , , ip, arp rarp。 , (\) 。 FDDI( ,’fddi protocol arp’), 802.2 (LLC) , FDDI 。 , FDDI LLC , LLC SNAP 。
decnet src host
DECNET host, , ’’10.123’’, DECNET 。 DECNET Ultrix DECNET 。
decnet dst host
DECNET host, 。
decnet host host
DECNET host, 。
ip, arp, rarp, decnet ether proto p , p 。
tcp, udp, icmp ip proto p , p 。
expr relop expr
, , relop >, =, <=, =, != , expr , ( C ), [+, -, *, /, &, |], , 。 , :
proto [ expr : size ]
proto ether, fddi, ip, arp, rarp, tcp, udp, or icmp , 。
expr , 。Size , ; 1, 2, 4, 1 。 len 。
; 1, 2, 4, 1 。 len 。
,’ether[0] & 1 != 0’ 。 ’ip[0] & 0xf != 5’ IP 。 ’ip[6:2] & 0x1fff = 0’ 0 。 tcp udp 。 ,tcp[0] TCP , IP 。
:
。 (’!’ or ’not’), (’&&’ or ’and’) (’||’ or ’or’)。 。 , 。 and , 。
, , 。 ,not host vs and ace
not host vs and host ace , not ( host vs or ace ) 。 , , 。
a
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.