yaf

YAF (Yet Another Flowmeter)

License

YAF is Yet Another Flowmeter. It processes packet data from pcap(3) dumpfiles (as generated by tcpdump(1)) or via live capture from an interface. YAF can capture from standard interfaces using pcap(3), an Endace DAG card, or a Napatech adapter.

It converts packet data into bidirectional flows and then exports those flows to IPFIX Collecting Processes or into an IPFIX-based file format. YAF’s output is designed to be used with the SiLK flow analysis tools and the NetSA Aggregated Flow (NAF) toolchain.

YAF also supports partial payload capture. This feature is intended for “banner grabbing” for protocol verification and service presence detection, and is presently experimental.

Why YAF?

YAF is intended as an experimental implementation tracking developments in the IETF IPFIX working group, specifically:

It is designed to perform acceptably as a flow sensor on any network where white-box flow collection with commodity hardware is appropriate. However, tradeoffs between raw performance and clarity of design have generally been made in favor of the latter.

Table of Contents

YAF Toolchain

The YAF toolchain presently consists of several tools:

How YAF Defines a Flow

By default, YAF generates flows based on the standard 5-tuple and the VLAN tag, if available. The 5-tuple consists of:

  1. Source IP address
  2. Destination IP address
  3. Source port
  4. Destination port
  5. Protocol

If YAF is configured with MPLS support, it will use the top three MPLS labels from the stack in addition to the 5-tuple and VLAN to determine the flow. In MPLS mode, it will also export these labels in the IPFIX record.

Furthermore, if YAF is configured with --enable-nonip, it will accept non-IP data and generate flow data using just the MPLS labels. The 5-tuple and VLAN fields will be set to 0.

Building from Source

YAF uses a standard autotools-based build system.

Prerequisites

Before building YAF, you must install its dependencies.

Library Version Notes
GLib >= 2.34.0 Available at gtk.org.
libfixbuf >= 2.3.0 Available at tools.netsa.cert.org/fixbuf.
libpcap - Available at tcpdump.org. Included in many OSes.
libairframe - Built and installed with the YAF distribution.
libyaf - Built and installed with the YAF distribution.

Optional Dependencies

Build Instructions

  1. Configure the build: If dependencies like libfixbuf are in a non-standard location, you may need to set PKG_CONFIG_PATH.
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
    ./configure
    
  2. Compile and Install:
    make
    sudo make install
    

Troubleshooting

Here are solutions to some common issues.

configure: error: Cannot find a suitable libfixbuf

yaf: error while loading shared libraries

couldn't open library "dnsplugin": file not found

TLS: Failed to load certificate file: ... no start line

TLS: Failed to load private key file: ... bad password read

TLS: Failed to load private key file: ... bad decrypt

Known Issues

Bug Reports & Feature Requests

Please send bug reports, feature requests, and questions to netsa-help@cert.org.

License

This project is licensed under a GNU GPL 2.0-style license. Please see the LICENSE.txt file for full terms.

@DISTRIBUTION_STATEMENT_BEGIN@
YAF 2.16

Copyright 2024 Carnegie Mellon University.

NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING
INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON
UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR
PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF
THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF
ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT
INFRINGEMENT.

Licensed under a GNU GPL 2.0-style license, please see LICENSE.txt or
contact permission@sei.cmu.edu for full terms.

[DISTRIBUTION STATEMENT A] This material has been approved for public
release and unlimited distribution.  Please see Copyright notice for
non-US Government use and distribution.

This Software includes and/or makes use of Third-Party Software each
subject to its own license.

DM24-1063
@DISTRIBUTION_STATEMENT_END@