Traffic analysis using tcpdump and wireshark

Useful capture filters

To and from a particular IP
host x.x.x.x

All traffic in a particular subnet
net 192.168.0.0/24

Focus on a particular mac
ether dst xx:xx:xx:xx:xx

To a particular IP
dst host x.x.x.x

Capture traffic on particular port only
port 53

Capture all traffic except DNS and ARP traffic
port not 53 and not arp

Useful wireshark display filters

Focus on traffic between x.x.x.x and y.y.y.y
(ip.src == x.x.x.x and ip.dst == y.y.y.y) || (ip.src = y.y.y.y and ip.dst == x.x.x.x)

Focus on particular port
tcp.port eq 25

Focus on particular protocol
icmp

See if there are any retransmitted packets (due to previous loss)
tcp.analysis.retransmission or tcp.analysis.fast_retransmission

Look at ip traffic only
ip

Look at vlan traffic only
vlan

Parts of packets to look at 

14:02:09.181190 specto.ksl.com.33248 > quasi.ksl.com.ftp: S 1191864640:1191864640(0) win 5840 (DF)

win * 2^wscale: receive buffer size. You could find them in SYN and SYN/ACK packets that the parties use to exchange maximum available buffer for the communication session.

Packet flow to look at

If you see a TCP session can't be established, check whether the three-way handshake packets (SYN, SYN/ACK, ACK) can pass through the channel. Some firewall rules may block these packets essential to establish a TCP connection.
A ---   SYN   --> B
A <-- ---="" b="" span="" syn="">
A ---   ACK   --> B 
established

Reference

https://www.varonis.com/blog/how-to-use-wireshark/
https://wiki.wireshark.org/CaptureFilters 

Comments

Popular posts from this blog

Using PlayStation 1 Densha de Go controller on emulators

Using PS1/PC Densha de Go! controller SLPH-00051/TCPP-20001/DGOC-44U on PS4/Switch Densha de Go!!

Play octoshape stream on windows with VLC player