wireshark and tcpdump
Network Traffic Analysis tcpdump
capture all traffic:
tcpdump -i <interface>capture traffic to and from specific host:
tcpdump -i <interface> host 192.168.11.112capture incoming traffic from certain host:
tcpdump -i <interface> src host 192.168.77.90capture outgoing traffic to certain host:
tcpdump -i <interface> dst host 192.168.99.110capture and save to pcap:
tcpdump -i <interface> -w capture.pcapcapture specific port traffic:
tcpdump -i <interface> port 80capture traffic from certain host to port 443 of compromised workstation:
tcpdump -i <interface> src host 133.34.55.66 and dst host <our host> and dst port 443capture all traffic from certain destination:
tcpdump dst 133.44.56.54capture traffic to and from network destination:
tcpdump net 192.168.11.0/24capture traffic using port ranges:
tcpdump portrange 1-1000
Wireshark filters
specific ip:
ip.addr == <ip>source ip:
ip.src == <ip>destination ip:
ip.dst == <ip>exclude ip:
!(ip.addr == <ip>)
Wireshark tcp/udp/dns/http filters
tcp only:
tcpudp only:
udpsmb only:
smbarp only:
arpsyn packets:
tcp.flags.syn == 1 && tcp.flags.ack == 0## tcp syn scansyn-ack:
tcp.flags.syn == 1 && tcp.flags.ack == 1RST:
tcp.flags.reset == 1FIN:
tcp.flags.fin == 1UDP only:
udpudp port:
udp.port == 53DNS traffic:
dnsDNS queries:
dns.flags.response == 0DNS responses:
dns.flags.response == 1NXDOMAIN:
dns.flags.rcode == 3TXT Records:
dns.qry.type == 16HTTP only:
httpGET requests:
http.request.method == "GET"POST requests:
http.request.method == "POST"HTTP 401:
http.response.code == 401HTTP 500:
http.response.code == 500
Wireshark credential hunting
Stream reconstruction
Right click packet -> Follow -> TCP Stream/HTTP Stream/UDP Stream
Last updated