Here’s a list of 50 different Wireshark or TCPDump filters that can help detect a variety of network attacks or anomalies. Filters are categorized for convenience.


1. General Malicious Traffic

  1. Capture non-standard ports:
    tcp.port != 80 and tcp.port != 443
  2. Detect empty or malformed packets:
    frame.len <= 64
  3. Identify high-volume traffic from a single source:
    ip.src == <specific IP> and frame.pkt_len > 1000

2. DDoS/DoS Detection

  1. Detect ICMP flood attacks:
    icmp
  2. Identify SYN flood:
    tcp.flags.syn == 1 and tcp.flags.ack == 0
  3. Detect fragmented packets:
    ip.flags.mf == 1
  4. UDP flood detection:
    udp
  5. Abnormal ICMP echo size (large pings):
    icmp and frame.len > 1024
  6. Amplification attack (source port 53, large UDP packets):
    udp.port == 53 and frame.len > 512

3. ARP Spoofing

  1. Detect duplicate ARP replies:
    arp.opcode == 2
  2. Identify ARP with conflicting MACs:
    arp.src.hw_mac != eth.src

4. DNS Attacks

  1. Detect DNS tunneling:
    udp.port == 53 and dns.qry.name contains "<suspicious domain>"
  2. Identify unusual DNS responses:
    dns.flags.rcode != 0
  3. Look for DNS amplification:
    udp.port == 53 and frame.len > 512

5. HTTP/HTTPS Attacks

  1. Detect HTTP POST flood:
    http.request.method == "POST"
  2. Look for HTTP request anomalies:
    http.request.uri contains "<specific string>"
  3. Identify HTTPS brute force attempts:
    ssl.handshake.type == 1

6. SQL Injection

  1. Detect SQLi keywords in HTTP payload:
    http contains "UNION SELECT"
  2. Identify suspicious query patterns:
    http.request.uri matches "(SELECT|INSERT|DELETE)"

7. FTP Attacks

  1. Detect FTP brute force attempts:
    ftp.request.command == "USER"
  2. Look for suspicious FTP commands:
    ftp contains "<suspicious command>"

8. Email/SMTP Attacks

  1. Identify spam:
    tcp.port == 25 and frame.len > 1000
  2. Detect SMTP relay attempts:
    smtp and frame.len > 1500

9. SSH Attacks

  1. Detect SSH brute force attempts:
    tcp.port == 22 and tcp.flags.syn == 1
  2. Look for unexpected SSH connections:
    tcp.port == 22 and ip.dst == <specific server IP>

10. Malware Detection

  1. Detect communication with known C&C servers:
    ip.addr == <C&C IP>
  2. Identify beaconing behavior:
    frame.time_delta < 1 and ip.src == <specific IP>
  3. Detect suspicious file downloads:
    http contains ".exe"

11. File Transfer/Exfiltration

  1. Detect large outbound data transfers:
    ip.dst == <external IP> and frame.len > 1500
  2. Identify potential sensitive file transfers:
    http contains ".zip"

12. MITM Attacks

  1. Look for unusual certificate exchanges:
    ssl.handshake.type == 11
  2. Detect unexpected ARP traffic:
    arp.opcode == 1 and eth.src != <expected MAC>

13. Port Scanning

  1. Identify SYN scans:
    tcp.flags.syn == 1 and tcp.flags.ack == 0
  2. Look for FIN scans:
    tcp.flags.fin == 1 and tcp.flags.ack == 0
  3. Detect NULL scans:
    tcp.flags == 0x00

14. SMB/NetBIOS Attacks

  1. Detect SMB brute force:
    tcp.port == 445 and smb.cmd == 0x73
  2. Look for suspicious NetBIOS traffic:
    nbns

15. Wireless Network Attacks

  1. Detect deauthentication frames:
    wlan.fc.type_subtype == 12
  2. Look for probe request flooding:
    wlan.fc.type_subtype == 4
  3. Identify suspicious EAPOL packets:
    eapol

16. VoIP/SIP Attacks

  1. Detect SIP brute force attempts:
    sip and frame.len > 1000
  2. Look for RTP flooding:
    rtp

17. IPv6 Specific Attacks

  1. Detect Router Advertisement spoofing:
    icmpv6.type == 134
  2. Identify unusual Neighbor Discovery messages:
    icmpv6.type == 135 or icmpv6.type == 136

18. Tor/VPN Usage

  1. Identify Tor traffic:
    tcp.port == 9001
  2. Detect OpenVPN traffic:
    udp.port == 1194

19. IoT Device Attacks

  1. Detect unusual IoT traffic:
    ip.src == <IoT Device IP> and tcp.port != <expected port>
  2. Look for unexpected DNS lookups:
    dns.qry.name contains "<IoT Device domain>"

20. Miscellaneous

  1. Detect IPv4 packets with invalid headers:
    ip.version != 4
  2. Identify TCP packets with mismatched flags:
    tcp.flags.urg == 1 and tcp.flags.psh == 0

These filters are starting points; they often need adjustment based on the network environment and traffic characteristics. For best results, combine with threat intelligence and anomaly detection tools.