On this page 44 sections
  1. Display filters vs capture filters
  2. Basic HTTP filtering
  3. HTTP response codes
  4. HTTP request methods
  5. HTTP hosts and URIs
  6. Search for file extensions
  7. frame contains
  8. contains operator
  9. HTTP User-Agent
  10. Useful HTTP headers
  11. Combine filters with &&
  12. Combine filters with ||
  13. Negate filters
  14. Filter by IP address
  15. Filter by TCP or UDP port
  16. DNS filtering
  17. DNS record types
  18. SMB2 filtering
  19. SMB2 common commands
  20. TCP conversations
  21. Follow TCP Stream
  22. Why Follow TCP Stream is useful
  23. Follow HTTP Stream
  24. Stream colours
  25. Filter automatically after following a stream
  26. Find with Ctrl + F
  27. Packet List search
  28. Packet Details search
  29. Packet Bytes search
  30. String vs hexadecimal search
  31. When to use Ctrl + F vs display filters
  32. TCP connection problems
  33. Find new TCP connections
  34. ICMP filtering
  35. ARP filtering
  36. Find plaintext credentials or parameters
  37. HTTP vs HTTPS
  38. Useful TLS filters
  39. Useful DHCP filter
  40. Filter conversations between two hosts
  41. Useful investigation sequence
  42. High-value quick filters
  43. Important filter syntax
  44. Quick reference
01

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.

Show HTTP traffic
http
Show DNS traffic
dns
Show SMB2 traffic
smb2
02

Basic 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.

All HTTP traffic
http
HTTP requests
http.request
HTTP responses
http.response
03

HTTP response codes

HTTP response codes are useful for finding successful requests, redirects, authentication failures and server errors.

HTTP 200 OK
http.response.code == 200
HTTP redirects
http.response.code >= 300 && http.response.code < 400
HTTP 401 Unauthorized
http.response.code == 401
HTTP 403 Forbidden
http.response.code == 403
HTTP 404 Not Found
http.response.code == 404
Server errors
http.response.code >= 500
04

HTTP request methods

Filtering by method quickly separates browsing activity, submitted forms, uploaded data and other request types.

GET requests
http.request.method == "GET"
POST requests
http.request.method == "POST"
PUT requests
http.request.method == "PUT"
DELETE requests
http.request.method == "DELETE"
05

HTTP hosts and URIs

HTTP host and URI fields are especially useful when the capture contains traffic to many websites or endpoints.

Show HTTP hosts
http.host
Specific host
http.host == "example.com"
URI contains login
http.request.uri contains "login"
URI contains admin
http.request.uri contains "admin"
06

Search for file extensions

URI filtering can quickly reveal downloads or requests involving scripts, documents, executables and archives.

PowerShell files
http.request.uri contains ".ps1"
Executable files
http.request.uri contains ".exe"
ZIP files
http.request.uri contains ".zip"
PHP files
http.request.uri contains ".php"
JavaScript files
http.request.uri contains ".js"
07

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.

Search for .ps1 anywhere in the frame
frame contains ".ps1"
Search for password
frame contains "password"
Search for admin
frame contains "admin"
08

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.

URI contains api
http.request.uri contains "api"
Host contains internal
http.host contains "internal"
DNS name contains microsoft
dns.qry.name contains "microsoft"
09

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.

Packets containing User-Agent
http.user_agent
Firefox User-Agent
http.user_agent contains "Firefox"
Chrome User-Agent
http.user_agent contains "Chrome"
curl User-Agent
http.user_agent contains "curl"
PowerShell User-Agent
http.user_agent contains "PowerShell"
10

Useful HTTP headers

HTTP header fields can reveal client behaviour, server software, authentication information, cookies and content types.

User-Agent
http.user_agent
Server header
http.server
Content-Type
http.content_type
Cookie header
http.cookie
Set-Cookie header
http.set_cookie
Authorization header
http.authorization
11

Combine filters with &&

The && operator means AND. Both conditions must be true. Combining protocol fields is one of the fastest ways to reduce large captures.

Successful GET requests
http.request.method == "GET" && http.request.uri contains ".php"
HTTP traffic from one host
http && ip.addr == 192.168.1.10
POST requests to login
http.request.method == "POST" && http.request.uri contains "login"
12

Combine filters with ||

The || operator means OR. It is useful when several values should be included in the same view.

GET or POST
http.request.method == "GET" || http.request.method == "POST"
HTTP or DNS
http || dns
Ports 80 or 443
tcp.port == 80 || tcp.port == 443
13

Negate filters

The ! operator excludes matching traffic. This is useful for removing noisy protocols or known hosts.

HTTP excluding one host
http && !(ip.addr == 192.168.1.1)
Exclude DNS
!dns
14

Filter by IP address

IP filters are essential when following traffic associated with a particular client or server.

Source IP
ip.src == 192.168.1.10
Destination IP
ip.dst == 192.168.1.20
Either source or destination
ip.addr == 192.168.1.10
15

Filter 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 80
tcp.port == 80
TCP port 443
tcp.port == 443
UDP port 53
udp.port == 53
SMB port
tcp.port == 445
16

DNS 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.

All DNS traffic
dns
DNS queries
dns.flags.response == 0
DNS responses
dns.flags.response == 1
Query name
dns.qry.name
Specific domain
dns.qry.name == "example.com"
Domain contains string
dns.qry.name contains "example"
17

DNS record types

DNS query types can isolate address lookups, IPv6 lookups, mail servers or other record types.

A records
dns.qry.type == 1
AAAA records
dns.qry.type == 28
MX records
dns.qry.type == 15
18

SMB2 filtering

SMB2 filters help analyse Windows file-sharing activity, authentication-related traffic and access to network shares.

All SMB2 traffic
smb2
SMB2 commands
smb2.cmd
SMB2 filenames
smb2.filename
Filename contains ps1
smb2.filename contains ".ps1"
19

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.

Session Setup
smb2.cmd == 1
Tree Connect
smb2.cmd == 3
Create
smb2.cmd == 5
Read
smb2.cmd == 8
Write
smb2.cmd == 9
20

TCP 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.

Specific TCP stream
tcp.stream == 5
21

Follow 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.

22

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.

23

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.

24

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.

25

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.

Example generated filter
tcp.stream == 12
26

Find 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.

27

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.

28

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.

29

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.

30

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.

31

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.

32

TCP connection problems

TCP analysis filters help identify retransmissions, resets and repeated connection attempts.

TCP retransmissions
tcp.analysis.retransmission
Fast retransmissions
tcp.analysis.fast_retransmission
TCP resets
tcp.flags.reset == 1
SYN packets
tcp.flags.syn == 1
SYN without ACK
tcp.flags.syn == 1 && tcp.flags.ack == 0
33

Find 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.

Connection attempts
tcp.flags.syn == 1 && tcp.flags.ack == 0
34

ICMP filtering

ICMP is useful for identifying ping traffic and network errors.

All ICMP
icmp
Echo requests
icmp.type == 8
Echo replies
icmp.type == 0
35

ARP filtering

ARP traffic maps IPv4 addresses to MAC addresses on the local network and can help identify local hosts and address resolution activity.

All ARP traffic
arp
ARP requests
arp.opcode == 1
ARP replies
arp.opcode == 2
36

Find 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.

POST traffic
http.request.method == "POST"
Authorization header
http.authorization
Cookies
http.cookie
Search packet data for password
frame contains "password"
37

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.

TLS traffic
tls
Common HTTPS port
tcp.port == 443
38

Useful TLS filters

Even when encrypted payloads cannot be inspected, TLS metadata can still reveal useful information such as handshake activity and server names.

TLS handshake traffic
tls.handshake
TLS Client Hello
tls.handshake.type == 1
Server Name Indication
tls.handshake.extensions_server_name
39

Useful DHCP filter

DHCP traffic can reveal host configuration activity, assigned addresses and network infrastructure information.

DHCP traffic
dhcp
40

Filter conversations between two hosts

Combining ip.addr conditions isolates traffic exchanged between two systems regardless of direction.

Traffic between two hosts
ip.addr == 192.168.1.10 && ip.addr == 192.168.1.20
41

Useful 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.

1. DNS activity
dns
2. New TCP connections
tcp.flags.syn == 1 && tcp.flags.ack == 0
3. HTTP requests
http.request
4. Interesting HTTP files
http.request.uri contains ".ps1" || http.request.uri contains ".exe"
5. Isolate one connection
tcp.stream == 0
42

High-value quick filters

These filters are useful when quickly reviewing an unfamiliar packet capture.

HTTP
http
DNS
dns
SMB2
smb2
User-Agent
http.user_agent
Successful HTTP responses
http.response.code == 200
POST requests
http.request.method == "POST"
PowerShell-related traffic
frame contains ".ps1"
TCP resets
tcp.flags.reset == 1
Retransmissions
tcp.analysis.retransmission
43

Important 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.

Exact value
http.response.code == 200
Contains
http.request.uri contains "login"
AND
http && ip.addr == 192.168.1.10
OR
dns || http
Grouped filter
ip.addr == 192.168.1.10 && (http || dns)
44

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.