tcpflow – TCP Flow Recorder for Protocol Analysis and Debugging

The New Acunetix V12 Engine


tcpflow is a program that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis or debugging. A program like ‘tcpdump’ shows a summary of packets seen on the wire, but usually doesn’t store the data that’s actually being transmitted. In contrast, tcpflow reconstructs the actual data streams and stores each flow in a separate file for later analysis.

tcpflow understands sequence numbers and will correctly reconstruct data streams regardless of retransmissions or out-of-order delivery. However, it currently does not understand IP fragments; flows containing IP fragments will not be recorded properly.

tcpflow is based on the LBL Packet Capture Library (available from LBL) and therefore supports the same rich filtering expressions that programs like ‘tcpdump’ support. It should compile under most popular versions of UNIX; see the INSTALL file for details.


tcpflow stores all captured data in files that have names of the form

Where the contents of the above file would be data transmitted from host 128.129.131.131 port 2345, to host 10.11.12.13 port 45103.

The only downside to this tool is that it’s not being actively maintained, the last version was released in 2003.

The upside is that the TCP protocol hasn’t changed, so the tool still work just fine.

Definitely extremely useful for network forensics, it’s one of the tools I use to demo network dissection in classes.

You can download it here:

Version 0.21 source tarball
Version 0.21 Source RPM

Or read more here.

Posted in: Forensics, Networking Hacking

, , ,


Latest Posts:


Eraser - Windows Secure Erase Hard Drive Wiper Eraser – Windows Secure Erase Hard Drive Wiper
Eraser is a hard drive wiper for Windows which allows you to run a secure erase and completely remove sensitive data from your hard drive by overwriting it several times with carefully selected patterns.
Insecure software versions are a problem Web Security Stats Show XSS & Outdated Software Are Major Problems
Netsparker just published some anonymized Web Security Stats about the security vulnerabilities their online solution identified on their users’ web applications and web services during the last 3 years.
CTFR - Abuse Certificate Transparency Logs For HTTPS Subdomains CTFR – Abuse Certificate Transparency Logs For HTTPS Subdomains
CTFR is a Python-based tool to Abuse Certificate Transparency Logs to get subdomains from a HTTPS website in a few seconds.
testssl.sh - Test SSL Security Including Ciphers, Protocols & Detect Flaws testssl.sh – Test SSL Security Including Ciphers, Protocols & Detect Flaws
testssl.sh is a free command line tool to test SSL security, it checks a server's service on any port for the support of TLS/SSL ciphers, protocols as well as recent cryptographic flaws and more.
Four Year Old libSSH Bug Leaves Servers Wide Open Four Year Old libssh Bug Leaves Servers Wide Open
A fairly serious 4-year old libssh bug has left servers vulnerable to remote compromise, fortunately, the attack surface isn't that big as neither OpenSSH or the GitHub implementation are affected.
CHIPSEC - Platform Security Assessment Framework CHIPSEC – Platform Security Assessment Framework For Firmware Hacking
CHIPSEC is a platform security assessment framework for PCs including hardware, system firmware (BIOS/UEFI), and platform components for firmware hacking.


6 Responses to tcpflow – TCP Flow Recorder for Protocol Analysis and Debugging

  1. Goodpeople November 26, 2007 at 12:29 pm #

    Can’t wait to have my students play with it.

  2. dirty November 26, 2007 at 5:25 pm #

    oldie but goodie…thanks for the info Darknet

  3. Pantagruel November 26, 2007 at 9:59 pm #

    A golden oldie, should be part of anyones network traffic analysis kit.
    A better maintained package with similar features is WireShark (http://www.wireshark.org/). The website even sports some tutorials and other nice tools.

  4. Reticent November 27, 2007 at 12:10 am #

    I figure you’d be better off using the still-maintained application ‘argus’ for this type of stuff. It captures tcp flow information but also comes with a suite of applications to manipulate that data – service distribution, host analysis, and even has a graphing function. http://qosient.com/argus/

    correction: It seems tcpflow does full packet captures rather than just summaries like argus does. Regardless, check it out if you’re into network security monitoring

  5. Darknet November 27, 2007 at 6:54 am #

    I still like tcpflow when I’m doing network forensics from tcpdump files. Wireshark is pretty nice for graphical interface too. Sometimes it’s just easier and faster on the commandline though.

    I’ll check argus out, thanks!

  6. dirty November 29, 2007 at 5:31 pm #

    I spoke (email) with the author of TCPFlow briefly…
    When asked if a new version was coming out, he said “probably not” and that he hadnt worked on it in years…

    oh well…as long as it still works huh?