Skip to content
Peter Boraros edited this page Jan 2, 2013 · 3 revisions

Welcome to PyNfSA's documentation!

.. toctree::
   :maxdepth: 2

Introduction

PyNfSA - NetFlow Spectral Analyzer for Python is software to conveniently perform frequency analysis on PCAP or NetFlow dataset.

Installation

  1. installation of dependecies
  2. download pynfsa repository at github
  3. enter the directory and invoke
    python nfsa.py load dataset.h5 (dataset will be created if not existing and interactive mode will be entered)

Dependencies

Usage

nfsa.py [-h]

nfsa.py [--version]

nfsa.py [<options>] raw|flow|sample|model|filter|load|annotate <database file> [<input file> [<input file> ...]]

Positional arguments

  • raw|flow|sample|model|filter|load|annotate action to execute; raw stores "pcap" or netflow data in h5 database, "flow" marks flows and extracts attributes, "sample" computes sampling at given sample rate and tranformations at given windowing, "model" fits model to data stored in database, filter converts XML Ip filters to JSON format and "load" loads database into memory
  • <database file> hdf5 array database
  • <input file> input files to process

Optional arguments

  • -h, --help show this help message and exit
  • --version show version information
  • -f pcap|netflow input file format
  • -o <output file> output file
  • -m <min packets> min packets per flow
  • -n don`t do reverse dns
  • -v, --verbose increase verbosity
  • -q, --quiet do not dump to terminal

Flow extraction options Required for "flow", "sample" and "model" actions

  • -i 3|4 flow identification <3-tuple or 4-tuple>
  • -u don`t use SYN packets to distinguish flow start
  • -p <protocol> protocol to take in account, default = 6 <TCP>

Sampling options Required for "sample" and "model" actions

  • -s <sample rate> sample rate to use, can be specified multiple times
  • -w <window length> window lengths to use, can be specified multiple times
  • -t csd|psd tranformation to use, can be: "csd" for cross spectral density or "psd" for power spectral density

Model estimation options Required for "model" action

  • -a <file> annotation file
  • --legit <int>,<int>,.. comma-separated list of classes considered legitimate
  • --malicious <int>,<int>,.. comma-separated list of classes considered malicious
  • --model <int>,<int>,.. comma-separated list of classes included in model
  • --sample <pattern> regex to filter sampleset by name
  • --computation <step>,<step>,... computation to evaluate
  • --tex <file> append tex-like tables into <file>

Indices and tables

Class Reference

.. automodule:: pynfsa.models
   :members:
.. automodule:: pynfsa.sampler
   :members:
.. automodule:: pynfsa.dataset
    :members:
.. automodule:: pynfsa.labeling
   :members:
.. automodule:: pynfsa.extractor
    :members:
.. automodule:: pynfsa.flowizer
    :members:
.. automodule:: pynfsa.util
    :members: