Tcpdump - Advanced 2 (Redirection & Parsing)

8 Jul 2015 · 15 min
14:58

In this tutorial Jon Schipp demonstrates advanced usage of tcpdump focusing on stdin/stdout handling, binary stream redirection, and parsing of captured data with standard Unix tools. He shows how to read a pcap file or live capture by using the dash '-' as a filename to make tcpdump read from stdin or write to stdout, and explains the need to redirect binary output to a file when displaying on the terminal. The video covers live piping between two tcpdump instances, highlighting the buffering issue that prevents immediate data transfer and introducing the -l (line‑buffered) option to force packets to be passed as they arrive. Schipp then illustrates how to pipe tcpdump’s ASCII output to grep and awk for quick extraction of HTTP GET requests, source/destination IPs, and port information, and walks through example awk scripts bundled with the Debian tcpdump package (packetdat.awk, send‑ack) that tally packets, ACKs, and display TCP sequence numbers. Finally, he discusses processing multiple pcap files: why concatenating raw files fails due to global headers, how to correctly merge files with mergecap, and how to iterate over files in a shell loop to invoke tcpdump on each. The lesson concludes with a recap of these techniques for flexible packet capture and analysis.

Chapters

More from Jon

youtube.com

Wrestling with Cybersecurity

4mo ago
youtube.com

What No One Knows the Podcast / Vodcast featuring The Tampa Bay Wave and Jon Schipp

6mo ago
youtube.com

Meeting the Exposure Management Challenge: Key Use Cases for Success | @OfficialRapid7 #SolutionSpotlight

1y ago
youtu.be

Spot Security Control Gaps and Non-Compliant Resources Across Your Attack Surface

2y ago
youtu.be

Maintain a Single Source of Truth for your Digital Estate

2y ago
youtu.be

Identify Accounts Without MFA Enabled Across Your Organization

2y ago
youtu.be

Understand Potential Blast Radius and Attackers' Cloud Network Spot Avenues

2y ago
youtu.be

Measure Security Data Accuracy and Quality with Rapid7 Exposure Command

2y ago
youtube.com

The Netsniff Ng Toolkit Jon Schipp DerbyCon 3

4y ago
youtube.com

OpenNSM (Scaling OSSEC)

10y ago
youtube.com

OpenNSM (Flow Indexer)

10y ago
See all content