Wireshark Display Filters: Syntax, Useful Examples and SOC Use Cases

Wireshark display filters hide packets you do not need after capture, so you can focus on what matters. A filter is a field name, an operator and a value, such as ip.addr == 10.0.0.5 or dns.flags.rcode == 3. Combine filters with and, or and not, search payloads with contains and matches, and test for a protocol simply by typing its name, such as tls.

Jun 20, 2025 - 11:27
Updated: 
105.8k

Security Tools, Authorized Labs & CTFs in Cybersecurity & Ethical Hacking · Commands & reference

SOC & Blue Team

Wireshark Display Filters: Syntax, Useful Examples and SOC Use Cases

Quick answer: Wireshark display filters hide packets you do not need after capture, so you can focus on what matters. A filter is a field name, an operator and a value, such as ip.addr == 10.0.0.5 or dns.flags.rcode == 3. Combine filters with and, or and not, search payloads with contains and matches, and test for a protocol simply by typing its name, such as tls. Display filters are different from capture filters, which use BPF syntax like host 10.0.0.5 and decide what is recorded at all. SOC analysts use display filters to triage alerts, spot failed connections and confirm suspicious traffic.

Key takeaways

  • Display filters work on a capture already taken; capture filters limit what is saved.
  • The syntax is field, operator, value; the filter bar turns green when it is valid.
  • Field names come from the official display filter reference.
  • Use filters to narrow an investigation, not as proof of an attack on their own.
  • Capture only on networks you own or are authorised to monitor.

Table of Contents

How Are Display Filters Different From Capture Filters?

FeatureDisplay filterCapture filter
When appliedAfter capture, while viewingBefore capture, while recording
SyntaxWireshark fields, e.g. tcp.port == 443BPF, e.g. tcp port 443
EffectHides packets; nothing deletedUnmatched packets are never saved
DepthThousands of protocol fieldsMostly addresses, ports, protocols

The capture filter guide and pcap-filter(7) describe BPF syntax. When in doubt, capture broadly and filter on display.

What Is the Basic Display Filter Syntax?

Each filter names a protocol field, compares it and gives a value. The User's Guide explains the grammar, and the field reference lists every field. A shortcut: right-click any field in the packet details pane and choose Apply as Filter.

ip.src == 192.168.1.10
tcp.port == 443
http.request.method == "POST"
dns

Typing only a protocol or field name, like dns or tcp.analysis.retransmission, shows packets where it exists.

Which Operators and Functions Should You Know?

OperatorMeaningExample
== or eqEqualip.addr == 10.0.0.5
!= or neNot equaltcp.port != 22
> < >= <=Greater or less thanframe.len > 1000
and, or, notCombine conditionstcp and not tcp.port == 443
containsBytes or text inside a fieldhttp.host contains example
matchesRegular expression, case-insensitive by defaulthttp.user_agent matches curl
inValue in a settcp.port in {80 443 8080}

The wireshark-filter(4) page documents these, plus functions such as len() and lower().

What Are Useful Everyday Display Filters?

ip.addr == 10.0.0.5 and tcp.port == 443     # one host, HTTPS
tcp.flags.syn == 1 and tcp.flags.ack == 0   # new connection attempts
tcp.analysis.flags                          # retransmissions, resets, issues
icmp                                        # ping and errors
arp                                         # address resolution
dhcp                                        # IP lease traffic (bootp on old versions)

Which Filters Help SOC Analysts Triage Alerts?

During triage, filters help answer one question at a time, which fits the analysis phase in NIST SP 800-61 Rev. 3.

QuestionDisplay filter
Are connections being refused?tcp.flags.reset == 1
Are there failed DNS lookups (possible DGA)?dns.flags.rcode == 3
Are credentials sent in clear text?http.request.method == "POST" or ftp or telnet
Which TLS sites were contacted?tls.handshake.extensions_server_name
Is there unexpected SMB traffic?smb2 and not ip.dst == 10.0.0.0/8
Are large DNS answers present (possible tunnelling)?dns and frame.len > 512

For regular beacons, filter on the suspicious host, then use Statistics, Conversations and I/O Graphs to see the timing pattern. Malware often hides command traffic inside normal protocols, as described in MITRE ATT&CK T1071. Treat any match as a lead to confirm with logs, EDR and threat intelligence.

What Common Filter Mistakes Should You Avoid?

  • Using != on multi-value fields: ip.addr != 10.0.0.5 can still match. Use !(ip.addr == 10.0.0.5).
  • Mixing up syntaxes: host 10.0.0.5 is a capture filter and fails in the display bar.
  • Expecting to read encrypted payloads: TLS content stays hidden without the session keys.
  • Forgetting non-standard ports: filter on the protocol name, not only the port number.

Packets can contain personal data, so a capture falls under India's DPDP Act 2023 as well as company policy. Capture only on networks you own or are authorised to monitor in writing; unauthorised interception can breach the IT Act 2000. Store captures securely and delete them when the case closes.

New to the tool? Start with Wireshark for beginners, then compare with our list of the most important Wireshark filters. Our SOC analyst training includes packet analysis labs.

References

Frequently Asked Questions

It is an expression that hides packets which do not match, so you can study only the traffic relevant to your question.

Capture filters use BPF syntax and decide what gets saved; display filters use Wireshark fields and only change what you see.

Use ip.addr == followed by the address to show packets where it is either the source or the destination.

Use dns.flags.rcode == 3, which shows NXDOMAIN responses for names that do not exist, often seen with typos or malware.

Because ip.addr matches source or destination, so a packet can still match. Use !(ip.addr == x) to exclude a host.

No. Filters can see TLS handshake fields such as the server name, but payloads stay encrypted without the session keys.

The official Wireshark display filter reference lists every field by protocol, and right-clicking a field also builds the filter.

Only on networks you own or are authorised to monitor. Unauthorised interception can breach the IT Act and the DPDP Act.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.