On this page 44 sections
- Display filters vs capture filters
- Basic HTTP filtering
- HTTP response codes
- HTTP request methods
- HTTP hosts and URIs
- Search for file extensions
- frame contains
- contains operator
- HTTP User-Agent
- Useful HTTP headers
- Combine filters with &&
- Combine filters with ||
- Negate filters
- Filter by IP address
- Filter by TCP or UDP port
- DNS filtering
- DNS record types
- SMB2 filtering
- SMB2 common commands
- TCP conversations
- Follow TCP Stream
- Why Follow TCP Stream is useful
- Follow HTTP Stream
- Stream colours
- Filter automatically after following a stream
- Find with Ctrl + F
- Packet List search
- Packet Details search
- Packet Bytes search
- String vs hexadecimal search
- When to use Ctrl + F vs display filters
- TCP connection problems
- Find new TCP connections
- ICMP filtering
- ARP filtering
- Find plaintext credentials or parameters
- HTTP vs HTTPS
- Useful TLS filters
- Useful DHCP filter
- Filter conversations between two hosts
- Useful investigation sequence
- High-value quick filters
- Important filter syntax
- Quick reference
Display filters vs capture filters
Wireshark uses two different filtering systems. Capture filters decide which packets are collected, while display filters decide which already captured packets are shown. Most interactive analysis inside Wireshark uses display filters.
httpdnssmb2Basic HTTP filtering
The http protocol filter displays packets decoded by Wireshark as HTTP. More specific fields can then be used to isolate requests, responses, hosts, methods or status codes.
httphttp.requesthttp.responseHTTP response codes
HTTP response codes are useful for finding successful requests, redirects, authentication failures and server errors.
http.response.code == 200http.response.code >= 300 && http.response.code < 400http.response.code == 401http.response.code == 403http.response.code == 404http.response.code >= 500HTTP request methods
Filtering by method quickly separates browsing activity, submitted forms, uploaded data and other request types.
http.request.method == "GET"http.request.method == "POST"http.request.method == "PUT"http.request.method == "DELETE"HTTP hosts and URIs
HTTP host and URI fields are especially useful when the capture contains traffic to many websites or endpoints.
http.hosthttp.host == "example.com"http.request.uri contains "login"http.request.uri contains "admin"Search for file extensions
URI filtering can quickly reveal downloads or requests involving scripts, documents, executables and archives.
http.request.uri contains ".ps1"http.request.uri contains ".exe"http.request.uri contains ".zip"http.request.uri contains ".php"http.request.uri contains ".js"frame contains
frame contains performs a broad search through packet data for a value. It is useful when the exact protocol field is unknown, although protocol-specific filters are usually cleaner and faster.
frame contains ".ps1"frame contains "password"frame contains "admin"contains operator
The contains operator checks whether a field includes a particular value. It is very useful for strings such as URIs, hostnames, User-Agent values and DNS names.
http.request.uri contains "api"http.host contains "internal"dns.qry.name contains "microsoft"HTTP User-Agent
The User-Agent identifies the client software presented to the HTTP server. It can reveal browsers, operating systems, command-line tools, scripts and automated clients.
http.user_agenthttp.user_agent contains "Firefox"http.user_agent contains "Chrome"http.user_agent contains "curl"http.user_agent contains "PowerShell"Useful HTTP headers
HTTP header fields can reveal client behaviour, server software, authentication information, cookies and content types.
http.user_agenthttp.serverhttp.content_typehttp.cookiehttp.set_cookiehttp.authorizationCombine filters with &&
The && operator means AND. Both conditions must be true. Combining protocol fields is one of the fastest ways to reduce large captures.
http.request.method == "GET" && http.request.uri contains ".php"http && ip.addr == 192.168.1.10http.request.method == "POST" && http.request.uri contains "login"Combine filters with ||
The || operator means OR. It is useful when several values should be included in the same view.
http.request.method == "GET" || http.request.method == "POST"http || dnstcp.port == 80 || tcp.port == 443Negate filters
The ! operator excludes matching traffic. This is useful for removing noisy protocols or known hosts.
http && !(ip.addr == 192.168.1.1)!dnsFilter by IP address
IP filters are essential when following traffic associated with a particular client or server.
ip.src == 192.168.1.10ip.dst == 192.168.1.20ip.addr == 192.168.1.10Filter by TCP or UDP port
Port filters are useful when a protocol is running on a non-standard port or when Wireshark cannot automatically decode it.
tcp.port == 80tcp.port == 443udp.port == 53tcp.port == 445DNS filtering
DNS filters help identify which domains a system queried and which addresses were returned. This is one of the fastest ways to understand external communication in a capture.
dnsdns.flags.response == 0dns.flags.response == 1dns.qry.namedns.qry.name == "example.com"dns.qry.name contains "example"DNS record types
DNS query types can isolate address lookups, IPv6 lookups, mail servers or other record types.
dns.qry.type == 1dns.qry.type == 28dns.qry.type == 15SMB2 filtering
SMB2 filters help analyse Windows file-sharing activity, authentication-related traffic and access to network shares.
smb2smb2.cmdsmb2.filenamesmb2.filename contains ".ps1"SMB2 common commands
SMB2 commands represent operations such as session creation, tree connections, file creation, reads and writes. Filtering by command can reduce a large SMB capture to a particular operation.
smb2.cmd == 1smb2.cmd == 3smb2.cmd == 5smb2.cmd == 8smb2.cmd == 9TCP conversations
Filtering by tcp.stream isolates all packets belonging to one TCP conversation. This is one of the most useful techniques when analysing application traffic.
tcp.stream == 5Follow TCP Stream
Follow TCP Stream reconstructs the application conversation carried inside a TCP connection. Right-click a TCP packet and select Follow → TCP Stream. Wireshark then displays the client-to-server and server-to-client data together in the order in which it was transmitted.
Why Follow TCP Stream is useful
It is especially useful for reconstructing HTTP requests and responses, reading plaintext protocols, reviewing submitted parameters, seeing downloaded content and understanding a conversation without inspecting each packet individually.
Follow HTTP Stream
For HTTP traffic, Wireshark may also provide Follow → HTTP Stream. This focuses on HTTP-layer data while Follow TCP Stream reconstructs the underlying TCP connection.
Stream colours
In the Follow Stream window, Wireshark normally uses different colours to distinguish each direction of the conversation. One colour represents client-to-server data and the other represents server-to-client data.
Filter automatically after following a stream
When a TCP stream is followed, Wireshark automatically generates a tcp.stream filter. Closing the stream window often leaves that filter applied, making it easy to inspect the individual packets that formed the reconstructed conversation.
tcp.stream == 12Find with Ctrl + F
Ctrl + F opens Wireshark packet search. The search can operate against different parts of the capture depending on what you are trying to find.
Packet List search
Packet List searches the text visible in the main packet list columns, such as Source, Destination, Protocol, Length and Info. It is useful when searching for something already visible in the summary column.
Packet Details search
Packet Details searches decoded protocol fields shown in the middle pane. This is useful when looking for field names, protocol values or decoded headers.
Packet Bytes search
Packet Bytes searches the raw data represented in the packet bytes pane. This is useful when searching for strings that may not have been decoded into a dedicated Wireshark field.
String vs hexadecimal search
The Find Packet dialog can search for text strings, hexadecimal byte sequences or display-filter expressions. Text is useful for names and URIs, while hexadecimal searches are useful when looking for known byte patterns.
When to use Ctrl + F vs display filters
Display filters are better when the protocol field is known because they reduce the entire packet list to matching traffic. Ctrl + F is better when you want to jump through occurrences without changing the current view or when the exact protocol field is unknown.
TCP connection problems
TCP analysis filters help identify retransmissions, resets and repeated connection attempts.
tcp.analysis.retransmissiontcp.analysis.fast_retransmissiontcp.flags.reset == 1tcp.flags.syn == 1tcp.flags.syn == 1 && tcp.flags.ack == 0Find new TCP connections
A SYN packet without the ACK flag normally represents the beginning of a TCP connection attempt. This filter provides a quick overview of connection targets.
tcp.flags.syn == 1 && tcp.flags.ack == 0ICMP filtering
ICMP is useful for identifying ping traffic and network errors.
icmpicmp.type == 8icmp.type == 0ARP filtering
ARP traffic maps IPv4 addresses to MAC addresses on the local network and can help identify local hosts and address resolution activity.
arparp.opcode == 1arp.opcode == 2Find plaintext credentials or parameters
Plain HTTP traffic may expose form parameters, cookies, authentication headers or other application data because HTTP itself does not provide encryption.
http.request.method == "POST"http.authorizationhttp.cookieframe contains "password"HTTP vs HTTPS
HTTP traffic can normally be inspected directly because application data is plaintext. HTTPS uses TLS encryption, so HTTP fields are generally unavailable unless Wireshark has the necessary session keys to decrypt the traffic.
tlstcp.port == 443Useful TLS filters
Even when encrypted payloads cannot be inspected, TLS metadata can still reveal useful information such as handshake activity and server names.
tls.handshaketls.handshake.type == 1tls.handshake.extensions_server_nameUseful DHCP filter
DHCP traffic can reveal host configuration activity, assigned addresses and network infrastructure information.
dhcpFilter conversations between two hosts
Combining ip.addr conditions isolates traffic exchanged between two systems regardless of direction.
ip.addr == 192.168.1.10 && ip.addr == 192.168.1.20Useful investigation sequence
A practical workflow is to first identify the hosts involved, then inspect DNS queries, look at new TCP connections, filter the relevant application protocol, identify interesting requests or filenames and finally reconstruct important TCP streams.
dnstcp.flags.syn == 1 && tcp.flags.ack == 0http.requesthttp.request.uri contains ".ps1" || http.request.uri contains ".exe"tcp.stream == 0High-value quick filters
These filters are useful when quickly reviewing an unfamiliar packet capture.
httpdnssmb2http.user_agenthttp.response.code == 200http.request.method == "POST"frame contains ".ps1"tcp.flags.reset == 1tcp.analysis.retransmissionImportant filter syntax
Use == for exact equality, != for inequality, contains for substring matching, && for AND, || for OR and ! for negation. Parentheses help keep complex filters readable.
http.response.code == 200http.request.uri contains "login"http && ip.addr == 192.168.1.10dns || httpip.addr == 192.168.1.10 && (http || dns)Quick reference
Use protocol fields whenever possible instead of broad frame searches. Use Ctrl + F when you want to jump to specific text or bytes without changing the packet view. Use tcp.stream to isolate a TCP conversation and Follow TCP Stream to reconstruct it. DNS often reveals where a host is communicating, HTTP reveals application requests and SMB2 reveals Windows file-sharing activity.