Sharing large packet captures

There are few things more frustrating then waiting for large wireshark captures to download or filters to execute.  tshark, a utility included with wireshark, can help you very quickly slice and dice large captures to share with friends & family after you've found something interesting.

For example, if you know the ephemeral port involved, create a new packet capture:
tshark -r big.cap -Y "tcp.port eq 35979" -w filtered.cap
Or if you know that things really got interesting after some specific time (as copied from the time value in an Ethernet frame)

tshark -Y '(frame.time >= "Oct 15, 2012 16:00:00") && frame.time <= "Oct 15, 2012 17:00:00")' -r big.cap -w filtered.cap
A similar tool named editcap can be used to split a large capture into multiple time-based intervals:

editcap -i 60 big.cap split.cap

Note: When dealing with captures in a non-native format, I've found you have to explicitly add -F to specify the output format just to get it to not completely fail. This is commonly needed on AIX, where you'd specify "nettl".

Comments

Popular posts from this blog

systemd unit for WebSphere Liberty (wlp)

Showing HTTP requests with no HTTP responses in wireshark

openssl and atexit