Forked from githubfoam/wireshark filters network forensics
Created
October 18, 2021 10:33
-
-
Save hakxcore/14ded8432010197c07c7f4700e892727 to your computer and use it in GitHub Desktop.
wireshark filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
#wireshark version 3.4.9 | |
ip.addr == 10.43.54.0/24 | |
ip.dst == 10.43.54.0/24 | |
ip.src == 10.43.54.0/24 | |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
eth.dst == 00:0C:CC:76:4E:07 #source mac filter | |
eth.src == 00:0C:CC:76:4E:07 #destination mac filter | |
ether host 00:18:0a:aa:bb:cc #a specific mac. This will not work on interfaces where traffic has been NATed like NAT mode SSID or an Internet interface | |
bootp.hw.mac_addr == 00:0C:29:D5:AA:AA | |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
Protocol filter | |
tcp - will only display TCP packets | |
udp - will only display UDP packets | |
icmp - will only display ICMP (ping) packets | |
dhcp - will display DHCP packets (if you are using an old version of Wireshark you'll need to use bootp) | |
dns - will display DNS packets | |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
#DORA - Discover, Offer, Request, and Ack | |
#Display Filter Reference: Dynamic Host Configuration Protocol https://www.wireshark.org/docs/dfref/d/dhcp.html | |
dhcp and ip.addr == 10.43.54.0/24 #only dhcp | |
dhcp.hw.mac_addr == a4:83:e7:c9:37:cd #find DORA - Discover, Offer, Request, and Ack.The DORA all has the same ID | |
(dhcp and ip.addr == 10.43.54.0/24) and ip.addr == 10.43.54.99 # DHCP MMC - Client IP Address | |
(dhcp and ip.addr == 10.43.54.0/24) and dhcp.hw.mac_addr == a4:83:e7:c9:37:cd # DHCP MMC - Unique ID (Client MAC Address) | |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
tcp.port == 80 - this will display un-encrypted TCP traffic on port 80. | |
tcp.port == 443 - this will only show encrypted TCP traffic using port 443. | |
udp.port == 53 - another way of specifying DNS traffic, this will filter off of DNS's use of UDP port 53. | |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
DNS Zone Transfer request | |
(tcp.dstport == 53) && (dns.flags.response == 0) && (dns.qry.type == 0x00fc) | |
DNS Zone Transfer response | |
(tcp.srcport == 53) && (dns.flags.response == 1) && (dns.qry.type == 0x00fc) | |
DNS pointer(PTR) query/response | |
dns.qry.type == 12 | |
udp.port == 53 | |
port 53 #Capture only DNS (port 53) traffic | |
!dns.response_in and dns.flags.response == 0 and dns # the lack of a recorded reply (!dns.response_in) combined with only looking for DNS queries (dns.flags.response == 0) that are only UDP port 53 (dns) | |
port not 53 and not arp #Capture except all ARP and DNS traffic | |
Ping sweep | |
icmp.type == 8 || icmp.type == 0 | |
ICMP Type 8 = ECHO Request | |
ICMP Type 0 = ECHO Reply | |
icmp || icmpv6 | |
(icmp.type==3) && (icmp.code==1) # | |
tcp.dstport == 25 #Wireshark Filter Destination Port | |
tcp.port in {443 4430..4434} | |
tcp.flags.reset == 1 && tcp.flags.ack == 1 && tcp.seq == 1 && tcp.ack == 1 #connection refusal ACK scan | |
http.request.method == GET | |
http.request.method == POST #Wireshark Filter HTTP POST | |
http.request.method == POST && frame contains "login" #Wireshark Filter HTTP POST | |
#Capture HTTP GET requests | |
port 80 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420 #looks for the bytes 'G', 'E', 'T', and ' ' (hex values 47, 45, 54, and 20) just after the TCP header. "tcp[12:1] & 0xf0) >> 2" | |
ip.addr == 10.43.54.65 | |
ip.addr == 10.92.182.6 or ip.addr == 172.16.7.7 - is going to display both 10.92.182.6 as well as 172.16.7.7 | |
ip.addr >= 10.80.211.140 and ip.addr <= 10.80.211.142 | |
ip.addr == 10.92.182.6 and dns - will only show the host 10.92.182.6 and it's DNS traffic. | |
(ip.addr == 172.16.7.42 or ip.addr == 172.16.7.7) and dns - is going to show dns traffic for two IPs 172.16.7.42 OR 172.16.7.7 | |
(ip.addr == 172.16.7.42 and dns) or (172.16.7.7 and icmp) - here the parentheses are being used to combine two completely different filters. DNS traffic for 172.16.7.42 as well as icmp traffic for 172.16.7.7. | |
not ip.addr == 172.16.7.7 - is going to exclude all traffic that has an IP of 172.16.7.7 | |
ip.dst == 10.43.54.65 | |
ip.src == 10.43.54.65 | |
Wireshark Filter SYN | |
tcp.flags.syn == 1 | |
tcp.flags.syn == 1 && tcp.flags.ack == 0 | |
SYN/ACK packets(bitwise filter) | |
tcp.flags & 0x12 | |
tcp.flags.syn == 1 && tcp.flags.ack == 0 && tcp.ack == 0 | |
TLS handshake | |
tls.record.content_type == 22 | |
only TLS traffice | |
tls | |
client Hello | |
tls.handshake.type == 1 | |
server Hello | |
tls.handshake.type == 2 | |
connection close | |
tls.record.content_type == 21 | |
tls.handshake.extensions_server_name contains "badsite" | |
frame contains "tls" | |
net 192.168.0.0/24 #Capture traffic to or from a range of IP addresses | |
dst net 192.168.0.0/24 #Capture traffic to a range of IP addresses | |
src net 192.168.0.0/24 | |
src net 192.168.0.0 mask 255.255.255.0 | |
host 172.18.5.4 #Capture only traffic to or from IP address 172.18.5.4 | |
host www.example.com and not (port 80 or port 25) #Capture non-HTTP and non-SMTP traffic on your server (both are equivalent) | |
host www.example.com and not port 80 and not port 25 | |
host 8.8.8.8 # capture traffic going to the Google DNS server 8.8.8.8. | |
(tcp[0:2] > 1500 and tcp[0:2] < 1550) or (tcp[2:2] > 1500 and tcp[2:2] < 1550) #Capture traffic within a range of ports | |
tcp portrange 1501-1549 | |
ether proto 0x888e #Capture only Ethernet type EAPOL | |
not ether dst 01:80:c2:00:00:0e #Reject ethernet frames towards the Link Layer Discovery Protocol Multicast group | |
not broadcast and not multicast | |
ip #Capture only IPv4 traffic,get rid of lower layer protocols like ARP and STP | |
dst port 135 and tcp port 135 and ip[2:2]==48 #Blaster worm | |
#Welchia worm | |
#looks for an icmp echo request that is 92 bytes long and has an icmp payload that begins with 4 bytes of A's (hex) | |
#the signature of the welchia worm just before it tries to compromise a system | |
icmp[icmptype]==icmp-echo and ip[2:2]==92 and icmp[8:4]==0xAAAAAAAA | |
# worm query | |
#looks for SYN packets originating from a local network on those specific ports,contacting other hosts on ports 135, 445, or 1433 | |
dst port 135 or dst port 445 or dst port 1433 and tcp[tcpflags] & (tcp-syn) != 0 and tcp[tcpflags] & (tcp-ack) = 0 and src net 192.168.0.0/24 | |
#Heartbleed Exploit | |
tcp src port 443 and (tcp[((tcp[12] & 0xF0) >> 4 ) * 4] = 0x18) and (tcp[((tcp[12] & 0xF0) >> 4 ) * 4 + 1] = 0x03) and (tcp[((tcp[12] & 0xF0) >> 4 ) * 4 + 2] < 0x04) and ((ip[2:2] - 4 * (ip[0] & 0x0F) - 4 * ((tcp[12] & 0xF0) >> 4) > 69)) | |
------------------------------------------------IPv6 basecamp------------------------------------------------ | |
dst host ff02::1 #Capture IPv6 "all nodes" ,find rogue RAs | |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment