Security
Wireshark Filter Builder
Build Wireshark display filters — protocols, IPs, ports, TCP flags, compound expressions, and quick-copy library
What is a Wireshark Display Filter?
A display filter narrows which packets appear in the packet list without discarding captured data. Unlike capture filters (BPF syntax written before capture), display filters use Wireshark's own field-based syntax and can reference any decoded protocol field.
Display filter ≠ Capture filter. Capture filters use BPF syntax (e.g.,
tcp port 80). Display filters use Wireshark field notation (e.g., tcp.port == 80). They
are not interchangeable.
Comparison Operators
| English | Symbol | Example | Meaning |
|---|---|---|---|
| eq | == | ip.ttl == 64 | Equal to |
| ne | != | eth.type != 0x0800 | Not equal — see Gotchas! |
| gt | > | frame.len > 1000 | Greater than |
| lt | < | tcp.window_size < 1024 | Less than |
| ge | >= | udp.length >= 512 | Greater than or equal |
| le | <= | ip.ttl <= 10 | Less than or equal |
| contains | http contains "login" | Field or protocol contains value | |
| matches | ~ | http.host matches ".gov$" | PCRE regular expression |
Logical Operators
| English | Symbol | Example |
|---|---|---|
| and | && | ip.src == 10.0.0.1 && tcp.port == 443 |
| or | || | tcp.port == 80 || tcp.port == 443 |
| not | ! | !icmp |
Use parentheses to group: (ip.src == 10.0.0.1 || ip.src == 10.0.0.2) && tcp.port == 80 | ||
Gotchas — Read These!
-
ip.addr != 10.1.1.1does NOT exclude that IP. It matches any packet where at least one address field is not that value. Use!(ip.addr == 10.1.1.1)instead. Same trap applies totcp.port,udp.port, andeth.addr. -
Tunneled protocols (GRE, VXLAN) have two IP layers. Use
ip.src#1for outer,ip.src#2for inner (Wireshark 4.0+). -
String comparisons are case-sensitive:
http.request.method == "GET"works;"get"does not.
Protocol Field Reference
| Field | Scope | Example |
|---|---|---|
| ip.addr | IPv4 src or dst | ip.addr == 192.168.1.10 |
| ip.src / ip.dst | IPv4 directional | ip.src == 10.0.0.0/8 |
| ipv6.addr | IPv6 src or dst | ipv6.addr == fe80::1 |
| tcp.port / udp.port | src or dst port | tcp.port == 443 |
| tcp.srcport / tcp.dstport | Directional port | tcp.dstport == 80 |
| tcp.flags.syn / .ack / .fin / .rst | TCP flag bits | tcp.flags.syn == 1 |
| tcp.window_size | Receive window | tcp.window_size == 0 |
| eth.addr / eth.src / eth.dst | MAC address | eth.src == aa:bb:cc:dd:ee:ff |
| eth.addr[0:3] | OUI / vendor prefix | eth.addr[0:3] == 00:06:5b |
| frame.len | Total frame size | frame.len > 1500 |
| http.request.method | HTTP verb | http.request.method == "POST" |
| http.request.uri | HTTP URI | http.request.uri matches "login" |
| dns.qry.name | DNS query name | dns.qry.name contains "example" |
| sip.Method | SIP method | sip.Method == "INVITE" |
| vlan.id | 802.1Q VLAN ID | vlan.id == 100 |
| arp.opcode | ARP op (1=req, 2=reply) | arp.opcode == 1 |
| icmp.type | ICMP type number | icmp.type == 8 |
| rtp.ssrc | RTP stream SSRC ID | rtp.ssrc == 0xdeadbeef |
| tls.handshake.type | TLS handshake type | tls.handshake.type == 1 |
| ip.src#1 / ip.src#2 | Layer-specific (v4.0+) | ip.src#2 == 10.1.2.3 |
Display Filter Builder
Select a category, configure the condition, then click Add Condition.
Conditions stack — choose AND / OR to join them. Use Negate to wrap in !(…) for safe exclusions.
Built Filter
No conditions yet — add one above.
* Never use
!= to exclude an IP or port — use !(ip.addr == x.x.x.x) instead. The Negate button does this automatically.Common Display Filters
| Goal | Filter |
|---|---|
| HTTP traffic only | http |
| HTTPS / TLS | tls |
| DNS queries & responses | dns |
| ICMP (ping) | icmp |
| ARP traffic | arp |
| All TCP | tcp |
| All UDP | udp |
| TCP SYN only (new connections) | tcp.flags.syn == 1 && tcp.flags.ack == 0 |
| TCP RST (resets / drops) | tcp.flags.reset == 1 |
| TCP FIN (graceful close) | tcp.flags.fin == 1 |
| Zero-window (congestion) | tcp.window_size == 0 && tcp.flags.reset != 1 |
| Traffic to/from IP (either direction) | ip.addr == 192.168.1.10 |
| Source IP only | ip.src == 10.0.0.1 |
| Exclude an IP (correct method) | !(ip.addr == 10.43.54.65) |
| Subnet range | ip.addr == 192.168.0.0/24 |
| OSPF routing | ospf |
| BGP | tcp.port == 179 |
| SNMP traps | udp.port == 162 |
| NTP | udp.port == 123 |
| SSH | tcp.port == 22 |
| VLAN-tagged frames (any) | vlan |
| Specific VLAN ID | vlan.id == 100 |
| Frames larger than 1500 bytes | frame.len > 1500 |
| HTTP POST requests | http.request.method == "POST" |
| HTTP 404 responses | http.response.code == 404 |
| TLS ClientHello | tls.handshake.type == 1 |
| MAC OUI vendor match | eth.addr[0:3] == 00:06:5b |
| Inner IP in GRE/VXLAN tunnel (v4.0+) | ip.src#2 == 10.1.2.3 |
Broadcast / AV / Streaming
| Goal | Filter |
|---|---|
| All SIP signaling | sip |
| SIP INVITE | sip.Method == "INVITE" |
| SIP BYE | sip.Method == "BYE" |
| SIP REGISTER | sip.Method == "REGISTER" |
| RTP media streams | rtp |
| RTSP streaming | rtsp |
| Multicast traffic | ip.dst >= 224.0.0.0 && ip.dst <= 239.255.255.255 |
| IGMP (multicast group management) | igmp |
| mDNS (Bonjour / Avahi) | mdns |
| SSDP (UPnP discovery) | ssdp |
| PTP / IEEE 1588 precision time | ptp |
| AES67 / Ravenna RTP audio | rtp && udp.port >= 5004 |
| NMOS IS-04 mDNS discovery | mdns && dns.qry.name contains "_nmos" |
| Windows SMB file shares | smb || smb2 |
| NBT / NBNS name resolution | nbns |
| DCE-RPC | dcerpc |
| Suppress Windows domain noise | smb || nbns || dcerpc || nbss || dns |
Security / Anomaly Hunting
| Goal | Filter |
|---|---|
| Port scan indicators (many SYNs) | tcp.flags.syn == 1 && tcp.flags.ack == 0 |
| TCP RST storm | tcp.flags.reset == 1 |
| ICMP flood (echo requests) | icmp && icmp.type == 8 |
| Large DNS responses (possible exfil) | dns && udp.length > 512 |
| HTTP basic auth (credentials visible) | http.authorization |
| Cleartext password fields in HTTP | http contains "password" |
| TLS 1.0 (weak / legacy) | tls.record.version == 0x0301 |
| ARP spoofing / duplicate address | arp.duplicate-address-detected |
| ICMP redirects | icmp.type == 5 |
| Low TTL — possible spoofing | ip.ttl < 5 |
| String match in UDP payload | udp contains "MAGIC" |
| SIP excluding noisy host | sip && !(ip.addr == 10.1.1.99) |
| Destination unreachable | icmp.type == 3 |
| Time exceeded / traceroute hops | icmp.type == 11 |