Wireshark Filters Cheat Sheet for SOC: C2, Exfil, SMB
20 Wireshark display filters ordered by detection hypothesis: beaconing, DNS tunneling, exfil, SMB, SNI. Each has its false positive, plus BPF vs display.
23 min read

On this page
- How these filters were checked
- The 20 filters at a glance
- Beaconing and C2 traffic
- 1. SYN cadence to one destination
- 2. Data after a long silence in the same connection
- 3. HTTP requests from scripts or with no User-Agent
- DNS tunneling: Wireshark DNS filters
- 4. Long query names
- 5. TXT and NULL queries
- 6. NXDOMAIN volume
- 7. DNS that skips your resolvers
- Exfiltration: Wireshark HTTP filters for POST and PUT
- 8. Large POST requests
- 9. PUT requests
- 10. Large outbound segments to the internet
- 11. ICMP with a large payload
- Lateral movement over SMB
- 12. Tree connect to ADMIN$ or C$
- 13. Named pipes for services, tasks and the registry
- 14. Service creation over svcctl
- 15. Executables and scripts written to a share
- TLS and SNI: rare destinations and bad certificates
- 16. Every Client Hello, with the SNI as a column
- 17. Client Hello without SNI
- 18. Certificate with OpenSSL's default organization
- Scanning and reconnaissance
- 19. SYN without ACK
- 20. ICMP port unreachable
- Wireshark filter by IP
- Wireshark filter by port
- Filter by domain
- Capture filters vs display filters
- Common mistake: the upload that matches nothing
- Worked example: one host, three hypotheses
For SOC work, the Wireshark filters that matter are display filters tied to a hypothesis: dns.qry.name.len > 50 for DNS tunneling, http.request.method == "POST" for exfiltration, smb2.tree for admin share access, the TLS SNI field for rare destinations. Capture filters (BPF, such as host 10.1.4.23) only decide what gets saved to disk.
Most Wireshark cheat sheets list filters by protocol layer. This one groups 20 display filters by the question you are trying to answer during an investigation: is this host beaconing, tunneling through DNS, sending data out, moving laterally over SMB, talking to something odd over TLS, or scanning? Each filter comes with what it shows and the false positive that will show up first. After the list come the basics people search for (filter by IP, by port, by domain), capture filters next to display filters, and a worked example on a simulated capture.
How these filters were checked
The current stable release on wireshark.org's download page on November 12, 2026 is 4.6.9, with 4.4.19 as the old stable branch and 5.0.0rc2 in development. Every filter in this guide went through three checks:
- The field exists. We looked up each field name in the official Display Filter Reference, which lists the versions each field is present in. All the fields used here are listed through 4.6.9.
- The filter compiles. We ran each filter with
tshark -Yon TShark 4.2.2 (the Ubuntu 24.04 package). We also ran them against small synthetic captures to confirm they match what they claim to match, which is how theC$and POST problems described below turned up. Parts that were only compiled, never run against matching traffic: filter 14, both halves of filter 9, and filters 10, 16 and 17. - The capture filters compile. We compiled each BPF expression with libpcap through
tcpdump -d, and the syntax follows the pcap-filter(7) man page.
The examples use addresses from the documentation ranges in RFC 5737 for the internet side, 10.x for the internal network, and .example domains. Swap in your own values.
The 20 filters at a glance
| # | Hypothesis | Display filter | Typical false positive |
|---|---|---|---|
| 1 | C2 beacon, new connection per check-in | ip.dst == 203.0.113.50 && tcp.flags.syn == 1 && tcp.flags.ack == 0 | EDR, monitoring and update agents |
| 2 | C2 beacon over one long-lived connection | tcp.time_delta > 30 && tcp.len > 0 | Idle SSH and RDP sessions, WebSockets, IMAP IDLE |
| 3 | Scripted HTTP client | http.request && (!http.user_agent || http.user_agent matches "(?i)(curl|python|powershell|go-http-client|wget)") | Developer machines, package managers, IoT |
| 4 | DNS tunneling, long names | dns.flags.response == 0 && dns.qry.name.len > 50 | CDN and cloud hostnames, security product lookups |
| 5 | DNS tunneling, TXT or NULL records | dns.qry.type in {16, 10} | Mail servers checking SPF, DKIM and DMARC |
| 6 | DGA, NXDOMAIN volume | dns.flags.rcode == 3 | Typos, search suffixes, retired hostnames |
| 7 | DNS that skips your resolvers | dns && ip && dns.flags.response == 0 && !(ip.dst in {10.0.0.53, 10.0.0.54}) && !(ip.src in {10.0.0.53, 10.0.0.54}) | VPN clients, IoT with hardcoded DNS |
| 8 | Exfiltration over HTTP POST | http.request.method == "POST" && http.content_length > 1000000 | Cloud storage sync, backups, crash dumps |
| 9 | Exfiltration over HTTP PUT | http.request.method == "PUT" || http2.headers.method == "PUT" | WebDAV, S3-style object uploads |
| 10 | Large outbound segments to the internet | ip.src == 10.0.0.0/8 && !(ip.dst == 10.0.0.0/8 || ip.dst == 172.16.0.0/12 || ip.dst == 192.168.0.0/16) && tcp.len > 1000 | Backups, video uploads, software publishing |
| 11 | ICMP tunneling | icmp.type in {0, 8} && data.len > 64 | Admins testing MTU with large pings |
| 12 | SMB admin share access | smb2.cmd == 3 && smb2.tree matches r"\\(ADMIN|C)\$$" | SCCM, backup agents, IT admins |
| 13 | Remote service, task or registry pipe | smb2.cmd == 5 && smb2.filename in {"svcctl", "atsvc", "winreg"} | Credentialed vulnerability scans |
| 14 | Remote service creation (PsExec-style) | svcctl.opnum in {12, 19} | Software deployment, sc \\host by admins |
| 15 | Executable dropped on a share | smb2.cmd == 5 && smb2.filename matches "(?i)\\.(exe|dll|ps1|bat)$" | Software deployment shares, GPO installs |
| 16 | Rare TLS destinations | tls.handshake.type == 1 (plus an SNI column) | The long tail of legitimate SaaS |
| 17 | TLS without SNI | tls.handshake.type == 1 && !tls.handshake.extensions_server_name | Clients connecting to raw IPs, health checks |
| 18 | Throwaway self-signed certificate | tls.handshake.certificate contains "Internet Widgits Pty Ltd" | Lab gear, appliances, dev servers |
| 19 | TCP port scan | tcp.flags.syn == 1 && tcp.flags.ack == 0 | Busy clients, authorized scanners |
| 20 | UDP port scan | icmp.type == 3 && icmp.code == 3 | Traceroute, late DNS replies |
Beaconing and C2 traffic
A command and control implant checks in on a schedule: a sleep time plus some random jitter. In a capture that shows up as a steady cadence to one destination with little data each time. Each packet looks harmless on its own, so the evidence is the interval between them. The command and control traffic playbook covers what to pull from proxy and EDR once Wireshark has given you the candidate.
1. SYN cadence to one destination
ip.dst == 203.0.113.50 && tcp.flags.syn == 1 && tcp.flags.ack == 0Shows only the opening SYN of each connection to the suspect address. Then add frame.time_delta_displayed as a column (right-click the field in the packet details, Apply as Column). That field is the time since the previous displayed packet, so with this filter applied it is the time between check-ins. Values clustered around one number (57.8, 61.2, 59.4, 62.9 seconds) mean a 60-second sleep with jitter.
False positive: EDR, monitoring and update agents also call home on a timer. Compare the destination with your asset inventory before you escalate on rhythm alone.
2. Data after a long silence in the same connection
tcp.time_delta > 30 && tcp.len > 0Some beacons keep one TCP connection open and send a few bytes every interval. tcp.time_delta is the time since the previous frame in the same TCP stream; the Display Filter Reference describes it as "Time since previous frame in this TCP stream". The filter shows data packets that broke more than 30 seconds of silence. It depends on the TCP preference "Calculate conversation timestamps", which was on by default in the 4.2.2 build we tested; check it under Preferences, Protocols, TCP if the field is missing.
False positive: idle SSH and RDP sessions, WebSockets and IMAP IDLE all sit quiet and then send a few bytes. A beacon that opens a new connection each time gives 0 here, which is why filter 1 exists.
3. HTTP requests from scripts or with no User-Agent
http.request && (!http.user_agent || http.user_agent matches "(?i)(curl|python|powershell|go-http-client|wget)")Shows cleartext HTTP requests with no User-Agent header, or with the default User-Agent of a scripting tool. The wireshark-filter man page says matches is case-insensitive by default; the (?i) makes that explicit for anyone reading the filter later. Change the list to match what your fleet should never send. If the traffic looks like Cobalt Strike, the Cobalt Strike beacon playbook has the next steps.
False positive: developer workstations, package managers, printers and IoT devices. Scope it to user workstations if you can.
DNS tunneling: Wireshark DNS filters
DNS tunneling encodes data in the labels of queries to a domain the attacker controls, and reads replies from TXT or NULL records. ATT&CK tracks it as T1071.004 (DNS). Plain dns is the filter for all DNS traffic and dns.qry.name == "status.cdn-sync.example" finds one exact name; the four below look for tunneling, DGA lookups and DNS that skips your resolvers. The DNS tunneling playbook shows how to confirm it in resolver logs.
4. Long query names
dns.flags.response == 0 && dns.qry.name.len > 50dns.qry.name.len is the length of the full query name in characters (a 69-character name gives 69). RFC 1035 caps each label at 63 octets and the whole name at 255 octets, which works out to 253 characters in the dotted form Wireshark displays. Tunneling tools fill labels toward those caps because every character carries data. Treat 50 as a starting threshold and tune it: check what lengths your own network produces and raise or lower it from there. Sort by dns.qry.name afterwards: one parent domain with hundreds of different long subdomains is the pattern.
False positive: CDN and cloud service hostnames, and security products that encode file hashes or URLs into DNS lookups to a reputation service.
5. TXT and NULL queries
dns.qry.type in {16, 10}Type 16 is TXT and type 10 is NULL, as defined in RFC 1035. Both carry arbitrary data in the answer, which is why tunneling tools use them for the return channel.
False positive: mail servers look up TXT records all day, since SPF is published as TXT (RFC 7208) and DKIM and DMARC use TXT too. TXT queries from a workstation to the same domain every few seconds are a different story.
6. NXDOMAIN volume
dns.flags.rcode == 3Reply code 3 is Name Error (NXDOMAIN) in RFC 1035, which Wireshark labels "No such name". Malware that uses a domain generation algorithm tries many random names before one resolves, so a single host with a burst of NXDOMAIN replies for unrelated random-looking domains is the signal. Use Statistics, Endpoints with this filter applied to see which host collects them.
False positive: typos, misconfigured applications that keep asking for a retired hostname, and DNS search suffixes appended to short names, which turn one lookup into several NXDOMAIN replies.
7. DNS that skips your resolvers
dns && ip && dns.flags.response == 0 && !(ip.dst in {10.0.0.53, 10.0.0.54}) && !(ip.src in {10.0.0.53, 10.0.0.54})Replace both sets with your internal resolvers. Each part of the filter removes one kind of noise:
dns &&drops mDNS and LLMNR. Wireshark decodes both with the samedns.*fields, so without it every multicast lookup for a printer or a.localname, and every LLMNR query Windows sends when DNS fails, shows up in the result.ip &&limits the filter to IPv4. For IPv6, run it again withipv6in place ofip, andipv6.dstandipv6.srcin place ofip.dstandip.src, using the IPv6 addresses of your resolvers.- Excluding the resolvers as the source removes their own recursive queries to the internet, which are expected.
What remains is a client sending DNS straight to an outside server, which skips your DNS logs and any filtering on the resolver. Wrap the filter in parentheses and add || tcp.port == 853 to catch DNS over TLS (RFC 7858). DNS over HTTPS (RFC 8484) runs on 443 and looks like any other TLS session, so no DNS filter will see it.
False positive: VPN clients, developer machines and IoT devices with hardcoded public resolvers.
Exfiltration: Wireshark HTTP filters for POST and PUT
Exfiltration over HTTP uses the methods that carry a body. ATT&CK covers it under Exfiltration Over Alternative Protocol (T1048) and its siblings. http.request alone shows every cleartext request; the filters below narrow that to uploads and big outbound transfers. The data exfiltration playbook covers scoping once you have a destination.
8. Large POST requests
http.request.method == "POST" && http.content_length > 1000000Shows POST requests that declare a body over about 1 MB in their Content-Length header. Read the common mistake section below before trusting an empty result: on a capture that misses the end of the upload, this filter can return nothing.
False positive: cloud storage sync clients, backup agents and crash reporters.
9. PUT requests
http.request.method == "PUT" || http2.headers.method == "PUT"The first half covers HTTP/1.x, the second HTTP/2 in cleartext or in TLS you have decrypted with a key log. PUT is rarer than POST on most networks, so it is a quick place to look.
False positive: WebDAV clients and S3-style object storage uploads.
10. Large outbound segments to the internet
ip.src == 10.0.0.0/8 && !(ip.dst == 10.0.0.0/8 || ip.dst == 172.16.0.0/12 || ip.dst == 192.168.0.0/16) && tcp.len > 1000Shows full-size TCP segments leaving the private ranges, whatever the protocol, which also catches encrypted uploads. Then open Statistics, Conversations, IPv4 tab, tick "Limit to display filter" and sort by bytes from A to B. One internal host sending hundreds of megabytes to an address nobody recognizes is your lead.
False positive: backups to cloud storage, video uploads, developers pushing builds or container images.
11. ICMP with a large payload
icmp.type in {0, 8} && data.len > 64ICMP echo can carry data, and tunneling tools use that. Type 8 is echo request and type 0 is echo reply; limiting the filter to those two keeps out ICMP errors that quote a UDP or TCP datagram (port unreachable, TTL exceeded), which would otherwise match on the size of the quoted data. An error that quotes a large echo still matches, and it points at the same ping. A Windows ping sends 32 bytes of data by default (Microsoft's ping reference) and Linux ping sends 56 (ping(8)), so an echo request or reply with more than 64 bytes of data means someone chose a bigger payload.
False positive: admins testing MTU with ping -l 1472 or ping -s 1472. Those come in short bursts; a tunnel runs for minutes.
Lateral movement over SMB
Lateral movement on Windows networks often goes through SMB: connect to an admin share, copy a binary, start it as a service. ATT&CK splits this into SMB/Windows Admin Shares (T1021.002) and Service Execution (T1569.002), whose page names PsExec creating temporary services. Wireshark labels SMB2 command 3 "Tree Connect" and command 5 "Create", matching the command codes in MS-SMB2. One limit before you start: if the session uses SMB 3 encryption, the commands, share names and file names travel inside messages behind an SMB2 TRANSFORM_HEADER, which the spec reserves for encrypted messages, and these filters cannot read them. The lateral movement playbook covers the host-side evidence.
12. Tree connect to ADMIN$ or C$
smb2.cmd == 3 && smb2.tree matches r"\\(ADMIN|C)\$$"smb2.tree holds the full share path, such as \\10.1.4.40\ADMIN$. The r"..." is a raw string, which the man page describes as treating backslash as a literal character, so the regex reads as written: a backslash, then ADMIN or C, then a dollar sign at the end. Swap in D or E if your servers have more drive shares.
False positive: SCCM, backup agents and IT staff browsing C$. Know which accounts and source hosts normally do this.
13. Named pipes for services, tasks and the registry
smb2.cmd == 5 && smb2.filename in {"svcctl", "atsvc", "winreg"}These are Create requests on the IPC$ share that open the named pipes for the Service Control Manager, the Task Scheduler and Remote Registry. In our test capture, built by hand for this guide, Wireshark 4.2.2 showed the pipe name without a leading backslash, so the filter matches svcctl, not \svcctl. If it returns nothing on your traffic, check how the name appears in the packet details and adjust. Leave lsarpc and samr out unless you want every domain-joined client in the result: clients talk to domain controllers over those pipes all day.
False positive: credentialed vulnerability scans read the remote registry of every host they touch. Exclude the scanner's address first.
14. Service creation over svcctl
svcctl.opnum in {12, 19}Opnum 12 is RCreateServiceW and 19 is RStartServiceW in the Service Control Manager Remote Protocol. Together they are the remote "create a service and start it" sequence that PsExec and similar tools use. The RCreateServiceW request carries the service name and the binary to run (lpServiceName and lpBinaryPathName in the spec), so read both in the packet details.
False positive: software deployment tools and admins running sc \\host create. Read the binary path: a random name in ADMIN$ is not the same as an agent installer from a known share.
15. Executables and scripts written to a share
smb2.cmd == 5 && smb2.filename matches "(?i)\\.(exe|dll|ps1|bat)$"Shows Create requests for files ending in an executable or script extension. Create covers opening as well as writing, so check the Create Disposition in the details and pair the result with filter 12: an .exe on ADMIN$ followed by filter 14 on the same host is the PsExec pattern.
False positive: software deployment shares, GPO software installation and users running installers from a file server.
TLS and SNI: rare destinations and bad certificates
Most traffic is encrypted, but the start of a TLS session still gives something away. The client sends the hostname it wants in the Server Name Indication extension (RFC 6066), in cleartext, inside the Client Hello.
16. Every Client Hello, with the SNI as a column
tls.handshake.type == 1Handshake type 1 is Client Hello. Add tls.handshake.extensions_server_name as a column and sort. On a large capture, count with tshark and read the top of the output first:
tshark -r capture.pcapng -Y 'tls.handshake.type == 1' \
-T fields -e tls.handshake.extensions_server_name | sort | uniq -c | sort -nNames that appear once or twice and that you cannot place are the candidates. To match one domain, use tls.handshake.extensions_server_name contains "cdn-sync.example". Wireshark also computes JA3 and JA4 client fingerprints (tls.handshake.ja3, tls.handshake.ja4) if your threat intel gives you values to match.
False positive: the long tail of legitimate SaaS. A rare name earns a closer look and nothing more.
17. Client Hello without SNI
tls.handshake.type == 1 && !tls.handshake.extensions_server_nameBrowsers send SNI whenever they connect to a hostname. A Client Hello without it usually comes from software connecting to a raw IP address, and a C2 implant configured with an IP instead of a domain looks exactly like that.
False positive: load balancer health checks, monitoring probes and some older embedded clients that connect by IP.
18. Certificate with OpenSSL's default organization
tls.handshake.certificate contains "Internet Widgits Pty Ltd"When someone generates a certificate with OpenSSL and accepts the prompts, the organization name defaults to "Internet Widgits Pty Ltd" (it is in openssl.cnf). A server presenting one was set up in a hurry. This only works where the certificate is visible: in TLS 1.3 the Certificate message is encrypted (RFC 8446), so you will only see it on TLS 1.2 and older, or with decryption.
False positive: lab equipment, appliances with factory certificates and internal dev servers.
Scanning and reconnaissance
Scans are noisy and easy to spot once you count instead of reading packets. ATT&CK lists this as Network Service Discovery (T1046). The common ports cheat sheet helps you read which services a scan was looking for.
19. SYN without ACK
tcp.flags.syn == 1 && tcp.flags.ack == 0Shows connection attempts. Open Statistics, Conversations with "Limit to display filter" ticked: one source with SYNs to hundreds of ports or hosts is a scan. Its companion is tcp.flags.reset == 1 && tcp.flags.ack == 1, the RST/ACK that closed ports send back.
False positive: busy clients and servers open many connections, and your own vulnerability scanner does exactly this. Check the source against your list of authorized scanners.
20. ICMP port unreachable
icmp.type == 3 && icmp.code == 3A closed UDP port answers with ICMP type 3, code 3. Many of these going back to one source means a UDP scan.
False positive: traceroute on Linux sends UDP probes to port 33434 and up by default and finishes on port unreachable, and late DNS replies to a client port that already closed produce the same message.
Wireshark filter by IP
ip.addr == 10.1.4.23 shows every packet where 10.1.4.23 is the source or the destination. The variants you will use most:
| Goal | Display filter |
|---|---|
| One host, either direction | ip.addr == 10.1.4.23 |
| Only as source | ip.src == 10.1.4.23 |
| Only as destination | ip.dst == 10.1.4.23 |
| Traffic between two hosts | ip.addr == 10.1.4.23 && ip.addr == 203.0.113.50 |
| A whole subnet | ip.addr == 10.1.4.0/24 |
| Exclude your own IP | !(ip.addr == 10.1.4.23) |
| IPv6 host | ipv6.addr == 2001:db8::23 |
To filter out your own local IP, !(ip.addr == 10.1.4.23) is the form that has always meant what it says. You will also find older answers warning that ip.addr != 10.1.4.23 does not work. In current Wireshark, != means "All fields must be not equal" according to the wireshark-filter man page, and in our test on 4.2.2, on a capture with only IPv4 traffic, both forms returned the same packets. They differ on anything without an IPv4 header: ip.addr != 10.1.4.23 needs an ip.addr field to compare, so it also hides ARP and IPv6 frames, while !(ip.addr == 10.1.4.23) keeps them. Use the !( == ) form; it works the same way on old builds too.
Wireshark filter by port
tcp.port == 445 matches the port as source or destination; tcp.dstport == 3389 only as destination; udp.port == 53 for UDP. For several ports use a set, tcp.port in {80, 443, 8080}, and for a range, tcp.port in {8000..8999}. Note the commas: tcp.port in {80 443 8080} failed to compile on 4.2.2 even though older guides still show it.
Filter by domain
Wireshark has no single "domain" field, because the name lives in a different place for each protocol. Combine the three that carry it:
dns.qry.name contains "cdn-sync.example" || http.host contains "cdn-sync.example" || tls.handshake.extensions_server_name contains "cdn-sync.example"That covers the DNS lookup, the HTTP Host header and the TLS SNI. There is also ip.host, but it only matches if Wireshark has resolved the address to that name, which depends on your name resolution settings.
Capture filters vs display filters
Wireshark has two filter languages, and they are not interchangeable.
Capture filters use BPF, the syntax from libpcap documented in pcap-filter(7). You set them before the capture starts (in the capture options, or -f in tshark and dumpcap), they run before Wireshark decodes anything, and whatever they drop is never written. Use them when you capture on a busy link and need to keep the file small. The Wireshark User's Guide has a page of capture filter examples. The same tools work for attackers: capturing traffic to collect credentials is Network Sniffing (T1040) in ATT&CK, so a dumpcap or tcpdump process on a server nobody is troubleshooting deserves a question.
Display filters use Wireshark's field names. They run after dissection, hide packets without deleting them and can be changed as often as you like. Everything in the list above is a display filter. The User's Guide explains their syntax in Building Display Filter Expressions.
The same question in both languages:
| What you want | Capture filter (BPF) | Display filter |
|---|---|---|
| One host | host 10.1.4.23 | ip.addr == 10.1.4.23 |
| Everything except your own host | not host 10.1.4.23 | !(ip.addr == 10.1.4.23) |
| Traffic between two hosts | host 10.1.4.23 and host 203.0.113.50 | ip.addr == 10.1.4.23 && ip.addr == 203.0.113.50 |
| A subnet | net 10.1.4.0/24 | ip.addr == 10.1.4.0/24 |
| DNS | udp port 53 | dns |
| SMB | tcp port 445 | smb2 |
| A port range | tcp portrange 8000-8999 | tcp.port in {8000..8999} |
| Drop your SSH session | not tcp port 22 | !(tcp.port == 22) |
| SYN without ACK | tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-syn | tcp.flags.syn == 1 && tcp.flags.ack == 0 |
| RST packets | tcp[tcpflags] & (tcp-rst) != 0 | tcp.flags.reset == 1 |
| ICMP unreachable | icmp[icmptype] == icmp-unreach | icmp.type == 3 |
BPF cannot read decoded fields. There is no capture filter for "query name longer than 50", "SNI is missing" or "tree connect to ADMIN$". Those need a display filter, and that is why the usual workflow is a loose capture filter to keep the file manageable and display filters for the analysis.
Common mistake: the upload that matches nothing
You have a capture from a host you suspect of exfiltration, you type http.request.method == "POST" and get nothing. Before you conclude there was no POST, check how the capture ended.
By default Wireshark reassembles HTTP bodies using the Content-Length header (the TCP preference "Allow subdissector to reassemble TCP streams" plus the HTTP preference behind http.desegment_body). Until the whole body has arrived, the request is shown as a TCP segment of a reassembled PDU, and the HTTP fields only exist on the frame that completes it. The reassembly section of the User's Guide explains the mechanism. If the capture stopped mid-upload, a ring buffer rolled over or packets were dropped, that frame never comes, and every filter on http.request.method, http.content_length or http.host misses the request.
Two ways around it:
- Search the raw bytes:
tcp.payload contains "POST "matches the first segment whatever the reassembly state. - Turn off "Reassemble HTTP bodies spanning multiple TCP segments" in the HTTP preferences (or
-o http.desegment_body:FALSEin tshark). The headers are then decoded on the first segment and filter 8 works.
Two smaller traps from the same family, both shown above: smb2.tree contains "C$" also matches IPC$, and frame.time_delta measures from the previous captured frame, not the previous frame in the conversation, so it is useless for beacon intervals until you filter and switch to frame.time_delta_displayed.
Worked example: one host, three hypotheses
Note
Simulated example generated by SOCSimulator Research. The capture was generated for this guide; host, addresses and domains are fictional and IPs are from documentation and private ranges. Commands ran on TShark 4.2.2. In the -T fields output, times are seconds from the first packet rounded to 0.1 s; everything else is verbatim.
$ tshark -r host-10.1.4.23.pcap -Y 'dns.flags.response == 0 && dns.qry.name.len > 50' \
-T fields -e frame.time_relative -e dns.qry.type -e dns.qry.name.len -e dns.qry.name
1.9 16 69 mfzwizltoq2gk4tfmvzgk3tbnfzxiidpmrsxe2lofzxgc3lfei.t.cdn-sync.example
2.3 16 67 nbswy3dpeb3w64tmmqqhozdtfmzxgy3vojuxi6jsgezdgnbv.t.cdn-sync.example
2.6 16 67 gm2tqojqgeztsmrrgm4tsnzrgu2dqnzsgy3dimzzgqztqnjv.t.cdn-sync.example
$ tshark -r host-10.1.4.23.pcap -Y 'dns.flags.rcode == 3' -T fields -e frame.time_relative -e dns.qry.name
4.0 qxkzvbtrwe.example
4.2 plmzhrtyaq.example
4.4 wnvbxcqoie.example
$ tshark -r host-10.1.4.23.pcap -Y 'ip.dst == 203.0.113.50 && tcp.flags.syn == 1 && tcp.flags.ack == 0' \
-T fields -e frame.time_relative -e tcp.srcport -e frame.time_delta_displayed
9.9 49812 0.0
67.7 49815 57.8
128.9 49818 61.2
188.3 49821 59.4
251.2 49824 62.9
309.3 49827 58.1
$ tshark -r host-10.1.4.23.pcap -Y 'http.request.method == "POST"' | wc -l
0
$ tshark -r host-10.1.4.23.pcap -Y 'tcp.payload contains "POST "'
18 329.900001 10.1.4.23 → 198.51.100.20 TCP 811 POST /upload HTTP/1.1 [TCP segment of a reassembled PDU]
$ tshark -r host-10.1.4.23.pcap -o http.desegment_body:FALSE \
-Y 'http.request.method == "POST" && http.content_length > 1000000' -T fields -e ip.dst -e http.host -e http.content_length
198.51.100.20 files.cdn-sync.example 48213760How to read it:
- DNS first. Three TXT queries (type 16) of 67 to 69 characters to subdomains of
t.cdn-sync.example, within a second. The labels look like base32. That fits filters 4 and 5 at once, and the parent domain is now your main indicator. - The NXDOMAIN burst is a separate lead. Three random ten-letter names that do not exist, a second later. Not enough for a DGA verdict on its own, but worth a resolver log search across the fleet.
- The cadence confirms a beacon. Six new connections to 203.0.113.50, each from a new source port, spaced 57.8 to 62.9 seconds apart: a 60-second sleep with roughly 5% jitter.
tcp.time_deltawould show 0 for every one of them, because each check-in is a new stream. - The POST is there, the default filter cannot see it. The upload declares 48,213,760 bytes (about 48 MB) to
files.cdn-sync.example, and the capture ends long before the body does. Same parent domain as the DNS tunnel, a different IP. - Scope it. Search DNS and proxy logs for
cdn-sync.example,203.0.113.50and198.51.100.20across all hosts for the last 30 days, and pull the EDR process that owns the connections on 10.1.4.23.
If you want to work a case like this from the alert side, the Cobalt Strike beacon detection operation in SOCSimulator (a Pro operation) has you pin down the beacon's C2 destination and trace the intrusion around it across SIEM and XDR data.
Practice network triage on realistic alerts
Work beaconing, tunneling and lateral movement cases across SIEM, XDR and Firewall consoles and get scored on every call. The free tier includes all three.
Frequently asked questions
How to filter by IP in Wireshark?
Type ip.addr == 10.1.4.23 in the display filter bar to see every packet where that address is the source or the destination. Use ip.src or ip.dst when direction matters, ip.addr == 10.1.4.0/24 for a whole subnet and ipv6.addr for IPv6. If you only want that host's traffic on disk in the first place, use the capture filter host 10.1.4.23 before you start the capture.
How do I filter out my own local IP address in Wireshark?
Use !(ip.addr == 10.1.4.23) as a display filter, replacing the address with yours. It hides every packet where your address is the source or the destination. In current Wireshark ip.addr != 10.1.4.23 returns the same IPv4 packets, but it also hides frames with no IPv4 header (ARP, IPv6), which the !( == ) form keeps. To keep your own traffic out of the capture file itself, use the capture filter not host 10.1.4.23.
Which Wireshark filter would you use to search specifically for PUT requests?
http.request.method == "PUT" finds HTTP/1.x PUT requests. Add || http2.headers.method == "PUT" to cover HTTP/2 in cleartext or in decrypted TLS. If the upload body is not fully captured, Wireshark may hold the request as a TCP segment of a reassembled PDU and the filter will not match; tcp.payload contains "PUT " finds it anyway.
How to filter Wireshark by domain?
It depends on the protocol. For DNS lookups use dns.qry.name contains "example.com", for cleartext HTTP use http.host contains "example.com" and for HTTPS use tls.handshake.extensions_server_name contains "example.com", which reads the SNI in the TLS Client Hello. Join the three with || to catch the domain in all of them. ip.host only works if name resolution is enabled.
What is the difference between Wireshark capture filters and display filters?
Capture filters use BPF syntax (host, port, net, tcp[tcpflags]) and decide which packets are written to the capture; anything they drop is gone. Display filters use Wireshark field names (ip.addr, dns.qry.name, smb2.tree) and only hide packets in a capture you already have, so you can change them as often as you like. Display filters can test decoded protocol fields; capture filters mostly cannot.
Nicole researches and structures SOCSimulator's blog guides and product announcements, from SOC playbook templates and the differences between EDR, antivirus and XDR to the launch of the KQL Query tab. Nicole also looks after how each post is found in search, so the answer an analyst needs is the one they actually find.


