WIRESHARK FILTERS

Capture Only What Matters. Analyze Better, Faster.

🔽 Capture Filters

Used to control which packets are captured.

  • Applied before capture
  • Less resource usage
  • Syntax: Berkeley Packet Filter (BPF)

🔍 Display Filters

Used to refine packets that are already captured.

  • Applied after capture
  • More powerful & flexible
  • Syntax: Wireshark Display Filter

Display Filter Basics

==Equal
!=Not equal
>Greater than
<Less than
&&AND
||OR
!NOT
()Group expressions
FilterDescriptionExample / Use Case
IPv4ip.addr == 192.168.1.1Show packets to or from an IP addressTraffic involving host 192.168.1.1
IPv4ip.src == 10.0.0.5Show packets from source IPFind traffic sent by 10.0.0.5
IPv4ip.dst == 10.0.0.5Show packets to destination IPFind traffic sent to 10.0.0.5
IPv4ip.addr == 10.0.0.5Show packets to or from an IP (any direction)Detect all traffic with 10.0.0.5
TCPtcp.port == 80Show TCP packets on a specific portHTTP traffic
TCPtcp.port == 443Show TCP packets on a specific portHTTPS traffic
UDPudp.port == 53Show UDP packets on a specific portDNS traffic
TCPtcp.flags.syn == 1 && tcp.flags.ack == 0Show TCP SYN packets (connection attempts)Find connection attempts / port scans
HTTPhttpShow HTTP trafficAll HTTP requests & responses
dnsShow DNS trafficAll DNS queries & responses
icmpShow ICMP trafficPing & network diagnostics
!(arp)Exclude ARP packetsHide ARP, show other traffic
tcp.port == 80 || tcp.port == 443Show traffic for HTTP or HTTPSWeb traffic (HTTP/HTTPS)
ip.addr == 10.0.0.5 && tcp.port == 22Traffic with specific IP and portSSH traffic to/from 10.0.0.5
☠️

Threat Detection & Intrusion Analysis

For cybersecurity professionals

FilterDescriptionThreat / Use Case
SECtcp.flags.syn == 1 && tcp.flags.ack == 0 && ip.src != 10.0.0.0/8External SYN packets hitting internal hostsExternal port scan / reconnaissance
SECtcp.flags == 0x29TCP Xmas scan (FIN+PSH+URG set)Nmap Xmas stealth scan detection
SECtcp.flags == 0x00TCP NULL scan (no flags set)Null scan evasion attempt
SECicmp.type == 8 && ip.src == X.X.X.XICMP echo requests from a single sourceICMP flood / ping sweep
SECarp.duplicate-address-detectedDuplicate IP detected via ARPARP spoofing / MITM attack
SECarp.opcode == 2 && !(arp.src.proto_ipv4 == arp.dst.proto_ipv4)Unsolicited ARP repliesGratuitous ARP / cache poisoning
SMBsmb || smb2All SMB protocol trafficEternalBlue / ransomware lateral movement
SMBsmb2.cmd == 5 && smb2.flags.response == 0SMB2 Create requestsRemote file access / ransomware staging
TCPtcp.port == 4444 || tcp.port == 1337 || tcp.port == 31337Common backdoor/C2 portsMetasploit / reverse shell beaconing
TCPtcp.port == 6667 || tcp.port == 6697IRC protocol portsBotnet C2 over IRC
HTTPhttp.request.method == "POST" && http.content_type contains "application/x-www-form-urlencoded"Form POST submissions in plaintext HTTPCredential harvesting / data exfil
HTTPhttp.request.uri contains ".php" && http.request.method == "POST"POST to PHP endpointsWeb shell communication
HTTPhttp.response.code == 200 && http.content_type contains "application/octet-stream"Binary file delivery over HTTPMalware/dropper download
TLStls.handshake.type == 1TLS Client Hello packetsMap all TLS connections initiated
TLStls.record.version == 0x0300SSLv3 usage detectedPOODLE attack surface / deprecated TLS
UDPdns.qry.name contains ".onion"DNS queries for .onion domainsTor usage / dark web C2 contact
UDPdns.resp.ttl < 5DNS responses with extremely low TTLFast-flux DNS / botnet infrastructure
UDPdns && dns.qry.name.len > 50Unusually long DNS query namesDNS tunneling / data exfiltration
SECip.ttl < 5 && !icmpNon-ICMP packets with very low TTLTTL manipulation / traceroute evasion
SECframe.len > 1400 && icmpOversized ICMP packetsICMP tunneling / covert data channel
TCPtcp.analysis.retransmissionTCP retransmissionsNetwork stress / DoS indicators
TCPtcp.analysis.zero_windowTCP zero window conditionsResource exhaustion / slow loris DoS
SECftp.request.command == "PASS"FTP password transmissionPlaintext credential capture
SECtelnetAll Telnet protocol trafficUnencrypted remote access / keylogging
HTTPhttp.user_agent contains "sqlmap" || http.user_agent contains "Nikto" || http.user_agent contains "Nmap"Known scanner user-agent stringsActive exploitation tool detection
HTTPhttp.request.uri contains "union+select" || http.request.uri contains "../"SQLi and path traversal patterns in URIWeb application attack in progress
🌐

OSINT & Network Reconnaissance Filters

Passive intelligence gathering

FilterDescriptionOSINT Use Case
OSINThttp.hostExtract all HTTP Host header valuesMap all domains a host communicates with
OSINTdns.resp.name && dns.aDNS A record responsesBuild IP-to-domain mapping from passive DNS
OSINTdns.qry.type == 28DNS AAAA (IPv6) queriesDiscover IPv6 infrastructure in use
OSINTdns.qry.type == 15DNS MX record queriesIdentify mail infrastructure / mail providers
OSINTdns.qry.type == 16DNS TXT record queriesReveal SPF, DKIM, domain verification tokens
TLStls.handshake.extensions_server_nameTLS SNI (Server Name Indication) fieldExtract hostnames from encrypted HTTPS traffic
TLStls.handshake.certificateTLS certificate in handshakeExtract cert CN, SANs, issuer for target profiling
HTTPhttp.request.method == "GET" && http.request.uri contains "?"GET requests with query parametersMap API calls, track parameters passed to web apps
HTTPhttp.set_cookieHTTP Set-Cookie headersSession token harvesting / tracking cookie analysis
HTTPhttp.refererHTTP Referer headerTrace navigation paths / referral chains
OSINThttp.user_agentHTTP User-Agent stringsOS/browser fingerprinting of client devices
UDPdhcpAll DHCP trafficDiscover hostnames, MACs, vendor IDs on network
OSINTnbnsNetBIOS Name Service trafficEnumerate Windows hostnames without DNS
UDPmdnsMulticast DNS (mDNS) trafficDiscover .local devices — IoT, printers, Apple
OSINTssdpSimple Service Discovery ProtocolUPnP device enumeration on LAN
OSINTeth.addr == ff:ff:ff:ff:ff:ffAll broadcast Ethernet framesPassive network topology mapping
OSINTip.dst == 255.255.255.255IPv4 broadcast packetsIdentify broadcast-heavy protocols & services
OSINTip.dst >= 224.0.0.0 && ip.dst <= 239.255.255.255IPv4 multicast rangeDiscover multicast groups, routing protocols
OSINTsmtp || pop || imapEmail protocol trafficIdentify mail clients, servers, unencrypted content
OSINTftp.request.command == "USER" || ftp.request.command == "PASS"FTP authentication commandsCapture FTP credentials in plaintext
OSINThttp.serverHTTP Server response headerFingerprint web server software & version
OSINThttp.x_forwarded_forX-Forwarded-For headerReveal original client IPs behind proxies/CDNs
THREAT LEVEL: High — Likely malicious, investigate immediately Medium — Suspicious, context-dependent Low — Informational / audit use

Capture Filter Examples (BPF Syntax)

FilterDescription
host 192.168.1.1Capture traffic to or from a host
net 192.168.1.0/24Capture traffic for a network
port 80Capture traffic on port 80
host 192.168.1.1 and port 443Capture HTTPS traffic with a host
not port 22Capture all traffic except port 22

Tips

🔽

Use capture filters to reduce unnecessary packet capture.

🔍

Use display filters to drill down and analyze.

Combine filters with && and || for powerful results.

💾

Save frequently used filters in Wireshark for quick access.

💡 PRO TIP
Filter early. Focus sharp. Debug smart.
Wireshark gives you the visibility. Filters give you the clarity.
WIRESHARK

Leave a Reply