CERT/CC
background
background
CERT NetSA Security Suite 
Open Source Tools for Network Monitoring 
News | Downloads | Documentation | Wiki | Tooltips
SiLK 2.1.0 | YAF 1.0.0.2 | IPA 0.4.0 | fixbuf 0.8.0 | Portal 0.9.0 | RAVE 1.9.16 | iSiLK 0.1.6 | netsa-python 0.9
SiLK - Documentation
Documentation | Downloads | Release Notes | FAQ | License | Credits | Reference Data | Live CD

Handbooks

Analysts' Handbook: Using SiLK for Network Traffic Analysis ( 3.5MB pdf )
tutorial on the SiLK tools and on using them for analyzing network traffic
PySiLK: SiLK in Python ( html | 0.2MB pdf )
reference guide for manipulating SiLK Flow data from within Python
The SiLK Reference Guide ( 1.5MB html | 1.2MB pdf )
every SiLK manual page in a single document
SiLK Installation Handbook ( 0.5MB html | 1.4MB pdf )
instructions on configuring, building, and installing SiLK at your site

Tooltips Site

The SiLK Tooltips site includes tips and tricks to use with the SiLK analysis suite. These documents point out certain features of the tools that are not immediately obvious, but are very useful.

Alphabetized Index of Manuals

A
addrtype(3)
C
ccfilter(3)
F
flowcap(8)
flowrate(3)
M
mapsid(1)
N
num2dot(1)
P
pmapfilter(3)
pysilk(3)
rwA
rwaddrcount(1)
rwappend(1)
rwB
rwbag(1)
rwbagbuild(1)
rwbagcat(1)
rwbagtool(1)
rwC
rwcat(1)
rwcompare(1)
rwcount(1)
rwcut(1)
rwD
rwdedupe(1)
rwF
rwfglob(1)
rwfileinfo(1)
rwfilter(1)
rwflowappend(8)
rwflowpack(8)
rwG
rwgeoip2ccmap(1)
rwgroup(1)
rwguess(8)
rwI
rwidsquery(1)
rwip2cc(1)
rwipaexport(1)
rwipaimport(1)
rwipfix2silk(1)
rwM
rwmatch(1)
rwN
rwnetmask(1)
rwP
rwp2yaf2silk(1)
rwpackchecker(8)
rwpcut(1)
rwpdedupe(1)
rwpmapbuild(1)
rwpmapcat(1)
rwpmatch(1)
rwptoflow(1)
rwR
rwrandomizeip(1)
rwreceiver(8)
rwresolve(1)
rwS
rwscan(1)
rwscanquery(1)
rwsender(8)
rwset(1)
rwsetbuild(1)
rwsetcat(1)
rwsetintersect(1)
rwsetmember(1)
rwsettool(1)
rwsetunion(1)
rwsilk2ipfix(1)
rwsort(1)
rwsplit(1)
rwstats(1)
rwswapbytes(1)
rwT
rwtotal(1)
rwtuc(1)
rwU
rwuniq(1)
S
sensor.conf(5)
silk(7)
silk.conf(5)
silkpython(3)

Analysis Suite

The SiLK analysis suite is a collection of command-line tools for processing SiLK Flow records created by the SiLK packing system. These tools read binary files containing SiLK Flow records and partition, sort, and count these records. The most important analysis tool is rwfilter, an application for querying the central data repository for SiLK Flow records that satisfy a set of filtering options. The tools are intended to be combined in various ways to perform an analysis task. A typical analysis uses UNIX pipes and intermediate data files to share data between invocations of the tools.

The Analysts' Handbook: Using SiLK for Network Traffic Analysis (3.5MB pdf) gives a tutorial on the tools and describes using them for analysis.

Each tool is distributed with its own UNIX manual page (available through the links below). In addition, all the manual pages are available in a singe document: The SiLK Reference Guide (1.1MB pdf).

The tools, configuration files, and plug-in modules that make up the analysis tools are listed below, roughly grouped by functionality.

Filtering, sorting, and display

rwfilter

Partition SiLK Flow records into one or more 'pass' and/or 'fail' output streams. rwfilter is the primary tool for pulling flows from the data store.

rwsort

Sort SiLK Flow records using a user-specified key comprised of record attributes, and write the records to the named output path or to the standard output. Users can define new key fields using plug-ins written in C or PySiLK.

rwcut

Print the attributes of SiLK Flow records in a delimited, columnar, human-readable format. Users can define new printable attributes using plug-ins written in C or PySiLK.

SiLK Python Extension

PySiLK: SiLK in Python

The PySiLK extension allows one to read, manipulate, and write SiLK Flow records, IPsets, and Bags from within Python. PySiLK may be used in a stand-alone Python program or to write plug-ins for several SiLK applications. This document describes the objects, methods, and functions that PySiLK provides. The next entry describes using PySiLK from within a plug-in.

silkpython

The SiLK Python plug-in provides a way to use PySiLK to define new partitioning rules for rwfilter, new key fields for rwcut, rwgroup, and rwsort, and new key or value fields for rwstats and rwuniq.

Counting and statistics

rwuniq

Bin (group) SiLK Flow records by a user-specified key comprised of record attributes and print the total byte, packet, and/or flow counts for each bin. rwuniq can also print distinct source IP and destination IP counts. Users can define new key fields and value fields using plug-ins written in C or PySiLK.

rwcount

Summarize SiLK Flow records across time, producing textual output with counts of bytes, packets, and flow records for each time bin.

rwstats

Summarize SiLK Flow records by a user-specified key comprised of record attributes, compute values from the flow records that match each key, sort the results by the value to generate a Top-N or Bottom-N list, and print the results. Users can define new key fields and value fields using plug-ins written in C or PySiLK.

rwtotal

Summarize SiLK Flow records by a specified key and print the sum of the byte, packet, and flow counts for flows matching the key.

rwaddrcount

Summarize SiLK flow records by the source or destination IP and print the byte, packet, and flow counts for each IP.

IPset, Bag, and Prefix Map manipulation

rwset

Read SiLK Flow records and generate binary IPset file(s) containing the source IP addresses or destination IP addresses seen on the flow records.

rwsetbuild

Read (textual) IP addresses in dotted-quad or CIDR notation from an input file or from the standard input and write a binary IPset file.

rwsetcat

Print the contents of a binary IPset file as text. Additional information about the IPset file can be printed.

rwsettool

Perform union, intersection, difference, and sampling functions on the input IPset files, generating a new IPset file.

rwsetmember

Determine whether the IP address specified on the command line is contained in an IPset.

rwsetintersect

This command is deprecated; use rwsettool instead. Generate a new IPset file by performing intersection and/or difference operations on the IPset files listed on the command line.

rwsetunion

This command is deprecated; use rwsettool instead. Merge the input binary IPset files into the output IPset; an IP in any input file will be in the output file.

rwbag

Read SiLK Flow records and build binary Bag(s) containing key-count pairs. An example is a Bag containing the sum of the byte counts for each source port seen on the flow records.

rwbagbuild

Create a binary Bag file from a binary IPset file or from a textual input file.

rwbagcat

Print binary Bag files as text.

rwbagtool

Perform operations (e.g., addition, subtraction) on binary Bag files and produces a new Bag file.

rwpmapbuild

Read textual input and create a binary prefix map file for use with the Address Type (addrtype) and Prefix Map (pmapfilter) Plug-Ins.

rwpmapcat

Print information about a prefix map file as text. By default, print each IP range in the prefix map and its label.

rwipaimport

Import a SiLK IPset, Bag, or Prefix Map file into the IP Address Association (IPA) library.

rwipaexport

Export a set of IP addresses from the IP Address Association (IPA) library to a SiLK IPset, Bag, or Prefix Map.

Run time plug-ins

addrtype

The Address Type plug-in provides a way to map an IP address to an integer denoting the IP as internal, external, or non-routable.

ccfilter

The Country Code plug-in provides a mapping from an IP address to two-letter, lowercase abbreviation of the country that owns the IP address. The abbreviations used by the Country Code plug-in are those used by the Root-Zone Whois Index.

flowrate

The Flowrate plug-in, which must be loaded explicitly, adds switches and fields to compute packets/second, bytes/second, bytes/packet, payload-bytes, and payload-bytes/second.

pmapfilter

The Prefix Map plug-in provides a way to map field values to string labels based on a user-defined map file. The map file is created by rwpmapbuild.

Record grouping and masking

rwgroup

Group SiLK flow records by a user-specified key comprised of record attributes, label the records with a group ID that is stored in the next-hop IP field, and write the resulting flows to the specified output path or to the standard output. rwgroup requires that its input is sorted.

rwmatch

Match (mate) records as queries and responses and mark mated records with an ID that is stored in the next-hop IP field. rwmatch requires that its input is sorted.

rwnetmask

Read SiLK Flow records, zero the least significant bits of the source-, destination-, and/or next-hop-IP address(es), and write the resulting records to the named output path or to the standard output.

Packet and external flow-format processing

rwp2yaf2silk

Convert a packet capture (pcap) file---such as a file produced by tcpdump---to a single file of SiLK Flow records. rwp2yaf2silk assumes that the yaf and rwipfix2silk commands are available on your system as it is a simple Perl wrapper around those commands.

rwipfix2silk

Convert a stream of IPFIX (Internet Protocol Flow Information eXport) records to the SiLK Flow record format.

rwsilk2ipfix

Convert a stream of SiLK Flow records to an IPFIX (Internet Protocol Flow Information eXport) format.

rwpcut

Read a packet capture file and print its contents in a textual form similar to that produced by rwcut.

rwpdedupe

Detect and eliminate duplicate records from multiple packet capture input files. See also rwdedupe.

rwpmatch

Filter a packet capture file by writing only packets whose five-tuple and timestamp match corresponding records in a SiLK Flow file.

rwptoflow

Read a packet capture file and generate a SiLK Flow record for every packet.

Scan detection

rwscan

Attempt to detect scanning activity from SiLK Flow records. rwscan can produce files that can be loaded into a database and queried with rwscanquery.

rwscanquery

Query the scan database which has been populated from database load files generated by rwscan.

Utilities

mapsid

Map between sensor names and sensor IDs using the values specified in the silk.conf file.

num2dot

Read delimited text from the standard input, convert integer values in the specified column(s) to dotted-decimal IP address, and print the result to the standard output.

rwappend

Append the SiLK Flow records contained in the second through final file name arguments to the records contained in the first file name argument.

rwcat

Read SiLK Flow records from the files named on the command line, or from the standard input when no files are provided, and write the SiLK records to the specified output file or to the standard output if it is not connected to a terminal.

rwdedupe

Read SiLK Flow records from files named on the command line or from the standard input and write the records to the named output path or to the standard output, removing any duplicate flow records. Note that rwdedupe will reorder the records as part of its processing.

rwfglob

Print to the standard output the list of files that rwfilter would normally process for a given set of file selection switches.

rwcompare

Determine whether two SiLK Flow files contain the same flow records.

rwfileinfo

Print information (type, version, etc.) about a SiLK Flow, IPset, Bag, or Prefix Map file.

rwgeoip2ccmap

Create the country code prefix map required by the ccfilter plug-in from the MaxMind GeoIP database.

rwidsquery

Invoke rwfilter to find flow records matching Snort signatures.

rwip2cc

Map a (textual) list of IP addresses to their country code.

rwrandomizeip

Generate a new SiLK Flow file by substituting a pseudo-random IP address for the source and destination IP addresses in given input file.

rwresolve

Read delimited text from the standard input, attempt to resolve the IP addresses in the specified column(s) to host names, and print the result to the standard output.

rwsplit

Read SiLK Flow records and generate a set of sub-files from the input. The sub-files can be limited by flow-, byte-, or packet-counts, or by unique IP count. In addition, the sub-file may contain all the flows or only a sample of them.

rwswapbytes

Generate a new SiLK Flow file by changing the byte order of the records in a given input SiLK Flow file.

rwtuc

Generate SiLK Flow records from textual input; the input should be in a form similar to what rwcut generates.

SiLK Packing System

The SiLK Packing System is comprised of daemon applications that collect flow data (IPFIX flows from yaf or NetFlow v5 or v9 PDUs from a router) and convert them into a more space efficient format, storing the packed records into service-specific binary flat files for use by the analysis suite. Files are organized in a time-based directory hierarchy with files covering each hour at the leaves.

Installation and set up is described in the SiLK Installation Handbook (1.4MB pdf).

The tools that make up the SiLK Packing System are:

flowcap

Listen to flow generators (devices which produce network flow data) and store the data in temporary files prior to transferring the files to a remote machine for processing by rwflowpack.

rwflowpack

Read flow data either directly from a flow generator or from files generated by flowcap, convert the data to the SiLK Flow record format, categorize the flow records, and write the records either to hourly flat-files organized in a time-based directory structure or to files for transfer to a remote machine for processing by rwflowappend.

rwflowappend

Watch a directory for files containing small numbers of SiLK flow records and append those records to hourly files organized in a time-based directory tree.

rwsender

Watch an incoming directory for files, move the files into a processing directory, and transfer the files to one or more rwreceiver processes. Either rwsender or rwreceiver may act as the server (i.e., listen for incoming network connections) with the other acting as the client.

rwreceiver

Accept files transferred from one or more rwsender processes and store them in a destination directory. Either rwsender or rwreceiver may act as the server with the other acting as the client.

rwpackchecker

Read SiLK Flow records and check for unusual patterns that may indicate data file corruption.

rwguess

Read a file containing NetFlow v5 PDU records and print the SNMP interfaces that are used most often and the number of records seen for each interface.

sensor.conf

Configuration file for sensors and probes used by rwflowpack and flowcap.

Overview and Configuration

The following manual pages provide general information.

silk

An overview of SiLK and a list of environment variables that affect SiLK.

silk.conf

Configuration file naming the Classes, Types, and Sensors available at your installation.