
[NFStream][repo] is a multiplatform Python framework providing fast, flexible, and expressive data structures designed to make
working with online or offline network data easy and intuitive. It aims to be Python's fundamental high-level
building block for doing practical, real-world network flow data analysis. Additionally, it has the broader
goal of becoming a unifying network data analytics framework for researchers providing data reproducibility
across experiments.
| Live Notebook |
|
| Project Website |
|
| Discussion Channel |
|
| Latest Release |
|
| Supported Versions |
|
| Project License |
|
| Continuous Integration |
|
| Code Quality |
|
Table of Contents
Main Features
- Performance: NFStream is designed to be fast: [AF_PACKET_V3/FANOUT][packet] on Linux, multiprocessing, native
[CFFI based][cffi] computation engine, and [PyPy][pypy] full support.
- Encrypted layer-7 visibility: NFStream deep packet inspection is based on [nDPI][ndpi].
It allows NFStream to perform [reliable][reliable] encrypted applications identification and metadata
fingerprinting (e.g. TLS, SSH, DHCP, HTTP).
- System visibility: NFStream probes the monitored system's kernel to obtain information on open Internet sockets
and collects guaranteed ground-truth (process name, PID, etc.) at the application level.
- Statistical features extraction: NFStream provides state of the art of flow-based statistical feature extraction.
It includes post-mortem statistical features (e.g., minimum, mean, standard deviation, and maximum of packet size and
inter-arrival time) and early flow features (e.g. sequence of first n packets sizes, inter-arrival times, and directions).
- Flexibility: NFStream is easily extensible using [NFPlugins][nfplugin]. It allows the creation of a new flow
feature within a few lines of Python.
- Machine Learning oriented: NFStream aims to make Machine Learning Approaches for network traffic management
reproducible and deployable. By using NFStream as a common framework, researchers ensure that models are trained using
the same feature computation logic, and thus, a fair comparison is possible. Moreover, trained models can be deployed
and evaluated on live networks using [NFPlugins][nfplugin].
How to get it?
Binary installers for the latest released version are available on Pypi.
pip install nfstream
Windows Notes: NFStream does not include capture drivers on Windows (license restrictions). It is required to
install [Npcap drivers][npcap] before installing NFStream.
If Wireshark is already installed on Windows, then Npcap drivers are already installed, and you do not need to perform
any additional action.
How to use it?
Dealing with a big pcap file and want to aggregate into labeled network flows? NFStream make this path easier in
a few lines: