Using tcpdump

The tcpdump tool is used to collect and analyze network packets. It is ideal for the analysis of individual packages and for their consistency. In the case of automatic processing, tcpdump has several advantages.

To read a previously recorded pcap file, you can use the following command:

tcpdump -nnr dump.pcap

The default tcpdump displays information about each packet, while the output format is protocol-dependent:

TCP:

[Timestamp] [Layer 3 Protocol] [Source IP].
    [Source Port]> [Destination IP]. [Destination Port]:
    [TCP Flags], [TCP Sequence Number],
    [TCP Acknowledgement Number], [TCP Windows Size] ,
    [Data Length]

UDP:

[Timestamp] [Layer 3 Protocol] [Source IP]. [Source Port]> [Destination IP]. [Destination Port]: [Layer 4 Protocol], ...

Get Practical Windows Forensics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.