How To Install tcpflow on Kali Linux

In this tutorial we learn how to install tcpflow on Kali Linux. tcpflow is TCP flow recorder

Introduction

In this tutorial we learn how to install tcpflow on Kali Linux.

What is tcpflow

tcpflow is:

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 and therefore supports the same rich filtering expressions that programs like ’tcpdump’ support. tcpflow can also rebuild flows from data captured with ’tcpdump -w'.

There are three methods to install tcpflow on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install tcpflow Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install tcpflow using apt-get by running the following command:

sudo apt-get -y install tcpflow

Install tcpflow Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install tcpflow using apt by running the following command:

sudo apt -y install tcpflow

Install tcpflow Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install tcpflow using aptitude by running the following command:

sudo aptitude -y install tcpflow

How To Uninstall tcpflow on Kali Linux

To uninstall only the tcpflow package we can use the following command:

sudo apt-get remove tcpflow

Uninstall tcpflow And Its Dependencies

To uninstall tcpflow and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove tcpflow

Remove tcpflow Configurations and Data

To remove tcpflow configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge tcpflow

Remove tcpflow configuration, data, and all of its dependencies

We can use the following command to remove tcpflow configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge tcpflow

Dependencies

tcpflow have the following dependencies:

References

Summary

In this tutorial we learn how to install tcpflow package on Kali Linux using different package management tools: apt, apt-get and aptitude.