|
NAMEsuper_mediator - IPFIX MediatorSYNOPSISsuper_mediator [--config CONFIG_FILE_NAME] [--in INPUT_SPECIFIER] [--out OUTPUT_SPECIFIER] [--ipfix-port PORT] [--export-port PORT] [--ipfix-input TRANSPORT_PROTOCOL] [--output-mode TRANSPORT_PROTOCOL] [--watch POLL_TIME] [--move PROCESSED_INPUT_DIRECTORY] [--lock] [--rotate ROTATE_SECONDS] [--no-stats] [--dns-dedup] [--groups SPREAD_GROUPS] [--udp-temp-timeout TIMEOUT_SECONDS] [--log LOG_SPECIFIER] [--log-dir LOG_PATH] [--daemonize] [--pidfile PIDFILE_NAME] [--fields FIELD_LIST] [--print-headers] [--sleep MICROSECONDS] [--verbose] [--quiet] [--version] [--become-user UNPRIVILEGED_USER] [--become-group UNPRIVILEGED_GROUP] [--metadata-export] DESCRIPTIONsuper_mediator is an IPFIX Mediator to be used as a manifold for yaf(1) IPFIX export data. It has multiple means of reading and writing IPFIX. A limited number of options can be specified on the command line. For advanced configuration with multiple collectors, multiple exporters, and filtering, the configuration file super_mediator.conf(1) should be used. Command line arguments for collection will override collectors defined in the configuration file. Command line arguments for exporters will be ignored if a configuration file is provided.super_mediator can read from an IPFIX file, watch for files in a given directory, collect IPFIX from yaf(1) via TCP or UDP on a given host and port, or subscribe to a series of Spread Groups. It can have multiple incoming sources and export to multiple collectors. It can export to a single or rotating IPFIX, CSV, or JSON files, via UDP or TCP, and to multiple Spread Groups. super_mediator can filter on import and/or export. Filters can be defined in the configuration file. super_mediator is capable of collecting all of YAF Deep Packet Inspection data (see yafdpi(1)). For advanced configuration of the DPI to CSV output, see super_mediator.conf(1). For DNS, the super_mediator can perform de-duplication on the incoming DNS resource records. It will cache a key containing the resource record name (rrname), resource record type (rrtype), and the resource record value (rrval). When a resource record is seen matching this key, the super_mediator will increment the hit count and the last_seen timestamp associated with the record. If it is a new record, the record will be exported. Each record will be exported to the appropriate exporter. The text format is: first_seen | rrtype | rrname | rrval (see below for IPFIX template) Records will be periodically flushed. The default is to flush a record from the buffer once it has reached the desired hit count of 500 or a new record has not been seen in 5 minutes. These default behaviors can be modified in the configuration file. Similarly, a file can be written upon flush time. If this is the case, the text format would be: first_seen | last_seen | rrtype | rrname | hitcount | rrval There is also the option to BASE 64 Encode all DNS domain names in a text file. This option can be specified in the configuration file. OPTIONSConfiguration File OptionWhen possible, the configuration file should be used when running the super_mediator. However, some command line options were given as a convenience for quick analysis.
Input OptionsThese options control where super_mediator will take its input from. super_mediator can read packets from a file, directory, live on a TCP or UDP port, or by subscribing to Spread group(s) through the Spread daemon. By default, if no input options are given, super_mediator reads an IPFIX file on standard input.
Output OptionsThese options control where super_mediator will send its output. super_mediator can write flows to an IPFIX file, text file, or to an IPFIX collector over TCP, UDP, or Spread. By default, if no options are given, yaf(1) writes IPFIX to standard out.
Logging and Daemon Configuration
Privilege OptionsThese options are used to cause super_mediator to drop privileges when running as root for live capture purposes.
DNS Deduplication
IPFIX Export TemplatesThe following IPFIX fields are exported by the super_mediator. DPI information will be exported in the same format as received by yaf(1), with the exception of the de-duplicated DNS records. Any statistics option messages will also be formatted in the same format as they are received.FLOW_ONLY Record Some fields are only exported if they are non-zero and were enabled in yaf. super_mediator exports many variations of the following template. The following list contains all of the possible elements that could exist in the FLOW_ONLY record. Reverse elements are only exported if reversePacketTotalCount or reversePacketDeltaCount is nonzero. flowStartMilliseconds, IE 152, 8 octets, unsigned flowEndMilliseconds, IE 153, 8 octets, unsigned octetTotalCount, IE 85, 8 octets, unsigned reverseOctetTotalCount Reverse IE 85 (PEN 29305), 8 octets, unsigned packetTotalcount, IE 86, 8 octets, unsigned reversePacketTotalcount, Reverse IE 86 (PEN 29305), 8 octets, unsigned octetDeltaCount, IE 1, 8 octets, unsigned reverseOctetDeltaCount, reverse IE 1 (PEN 29305), 8 octets, unsigned packetDeltaCount, IE 2, 8 octets, unsigned reversePacketDeltaCount, reverse IE 2 (PEN 29305), 8 octets, unsigned sourceIPv6Address, IE 27, 16 octets, unsigned destinationIPv6Address, IE 28, 16 octets, unsigned sourceIPv4Address, IE 8, 4 octets, unsigned destinationIPv4Address, IE 12, 4 octets, unsigned sourceTransportPort, IE 7, 2 octets, unsigned destinationTransportPort, IE 11, 2 octets, unsigned flowAttributes, CERT (PEN 6871) IE 40, 2 octets, unsigned reverseFlowAttributes, CERT (PEN 6871) IE 16424, 2 octets, unsigned protocolIdentifier, IE 4, 1 octet, unsigned flowEndReason, IE 136, 1 octet, unsigned silkAppLabel, CERT (PEN 6871) IE 33, 2 octets, unsigned reverseFlowDeltaMilliseconds, CERT (PEN 6871) IE 21, 4 octets, unsigned tcpSequenceNumber, IE 184, 4 octets, unsigned reverseTcpSequenceNumber, Reverse IE 184 (PEN 29305), 4 octets, unsigned initialTCPFlags, CERT (PEN 6871) IE 14, 1 octet, unsigned unionTCPFlags, CERT (PEN 6871) IE 15, 1 octet, unsigned reverseInitialTCPFlags, CERT (PEN 6871) IE 16398, 1 octet, unsigned reverseUnionTCPFlags, CERT (PEN 6871) IE 16399, 1 octet, unsigned vlanId, IE 58, 2 octets, unsigned reverseVlanId, Reverse IE 58 (PEN 29305), 2 octets, unsigned ipClassOfService, IE 5, 1 octet, unsigned reverseIpClassOfService, Reverse IE 15 (PEN 29305), 1 octet, unsigned mplsTopLabelStackSection, IE 70, 3 octets, unsigned mplsLabelStackSection2, IE 71, 3 octets, unsigned mplsLabelStackSection3, IE 72, 3 octets, unsigned observationDomainId, IE 149, 4 octets, unsigned The observation domain ID of the yaf(1) process that generated the flow. subTemplateMultiList, IE 293, Variable Length DNS De-duplicated Record flowStartMilliseconds, IE 152, 8 octets, unsigned The time in milliseconds of when the DNS resource record was first seen. flowEndMilliseconds, IE 153, 8 octets, unsigned The time in milliseconds of the last record seen by the B<super_mediator>. This is only exported if the B<super_mediator> is configured to LAST_SEEN. sourceIPv4Address, IE 8, 4 octets, unsigned The IPv4 Address found in a DNS A Record. dnsTTL, CERT (PEN 6871) IE 199, 4 octets, unsigned The maximum TTL seen for the aggregated DNS records. This is only exported if the B<super_mediator> is configured to LAST_SEEN. dnsQRType, CERT (PEN 6871) IE 175, 2 octets, unsigned The type of Resource Record. This corresponds with the QTYPE filed in the DNS Question Section or the TYP field in the DNS Resource Record Section. dnsHitCount, CERT (PEN 6871) IE 228, 2 octets, unsigned The number of times the B<super_mediator> saw this record in the FLUSH TIMEOUT period. This is only exported if the B<super_mediator> is configured to LAST_SEEN. dnsQName, CERT (PEN 6871) IE 179, variable length A DNS Response Name. This field corresponds with the NAME field in the DNS Resource Record Section. dnsRName, CERT (PEN 6871) IE 927, variable length A DNS Resource Record Data Element. This field corresponds with the RDATA in the DNS Resource Record Section. For CNAME records, this will be the canonical name. For NS Records, this will be the name server name. For AAAA records, this will be an IPv6 Address, etc. observationDomainName IE 300, variable length This field is populated if the DEDUP_CONFIG block was configured with B<ADD_EXPORTER_NAME> or DNS_DEDUP was configured with a B<VLAN_MAP> or B<OBID_MAP>. See super_mediator.conf(1) for more information on MAPS. Tombstone Options Template Super_mediator will forward and can optionally generate tombstone records using IPFIX Options Template Records. These records are intended to allow the analysis of the time it takes for records to be processed by each tool (eg. YAF, Super Mediator, SiLK) in your environment. Each tombstone record generated by super_mediator consists of four information elements: a user-settable ID, an ID that is randomly generated for each run of super_mediator, a sequentially increasing ID for each record, and a subTemplateList of the time each program interacted with the tombstone record. With ideal randomness, the 3 IDs taken together should uniquely specify a record. Tombstone record generation is not on by default and can be turned on using the TOMBSTONE_CONFIG section of the config file. Tombstone Records are only sent/forwarded to exporters configured to receive stats records. The following Information Elements will be exported: tombstoneId, CERT (PEN 6871) IE 550, 4 octets, unsigned A sequentially increasing identification number unique to each tombstone record in a run of a given program. exporterConfiguredId, CERT (PEN 6871) IE 551, 2 octets, unsigned An identification number for the record that is user specifiable at runtime and shared across all records in a run of the given program. exporterUniqueId, CERT (PEN 6871) IE 552, 2 octets, unsigned An identification number for the record that is randomly generated at runtime and shared across all records in a run of the given program. subTemplateList, IE 292, variable length A subTemplateList consisting of Tombstone Access Templates (see below) that specify when each program that supports tombstone timestamping interacted with the tombstone record. Tombstone Access Template The following two Information Elements will be exported as a template within the subTemplateList of a Tombstone Options Template: exportingProcessId, IE 161, 4 octets, unsigned The identification number of the program that interacted with the record. B<super_mediator> has and ID of 2. observationTimeSeconds, IE 322, 4 octets, dateTimeSeconds The UNIX timestamp of when the program interacted with the record. EXAMPLESTo run super_mediator with the configuration file:"super_mediator -c /usr/local/etc/super_mediator.conf" To read a yaf(1) file and write delimited text to stdout: "super_mediator -i yaffile.yaf -o - -m text" To listen for connections from yaf(1) via TCP and write to rotating text files: "super_mediator -i localhost --ipfix-port 18000 --ipfix-input TCP --out /tmp/mediator --rotate 120 --log /tmp/mediator.log -v" To listen for connections from yaf(1) via UDP and send output to a rwflowpack process running on TCP port 18001: "super_mediator -p 18000 --ipfix-input UDP -o localhost -m TCP --export-port 18001" To only print the time and 5-tuple for each flow to stdout: "super_mediator -i /myyaffile.yaf -o - -m TEXT --fields=18,19,0,1,4,5,6" KNOWN ISSUESsuper_mediator requires libfixbuf 1.7.0 or later.super_mediator will not create new file directories. All output directories must exist before you start super_mediator. KNOWN ISSUESyaf presently encodes the ICMP type and code information into the destinationTransportPort information element for ICMP and ICMP6 flows. super_mediator running in TEXT output mode writes the type in the sourceTransportPort field and the ICMP code in the destinationTransportPort field.AUTHORSEmily Sarneso and the CERT Network Situational Awareness Group Engineering Team <http://www.cert.org/netsa>. Bug reports and feature requests may be sent via email to <netsa-help@cert.org>.SEE ALSOyaf(1), Spread Documentation at www.spread.org, and the following IETF Internet RFCs: Specification of the IPFIX Protocol for Exchange of IP Traffic Flow Information RFC 5101, Information Model for IP Flow Information Export RFC 5102, Export of Structured Data in RFC 6313.
Visit the GSP FreeBSD Man Page Interface. |