![]() |
![]()
| ![]() |
![]()
NAMEyaf application labeling DESCRIPTIONyaf can examine packet payloads and determine the application protocol in use within a flow, and export a 16-bit application label with each flow if yaf is built with application labeler support (using the --enable-applabel option to ./configure when yaf is built). The exported application label uses the common port number for the protocol. For example, HTTP Traffic, independent of what port the traffic is detected on, will be labeled with a value of 80, the default HTTP port. Labels and rules are taken from a configuration file read by yaf at startup time. This rule file can be given on the command line with the --applabel-rules option or will try to be read from the default location of /usr/local/etc/yafApplabelRules.conf. If yaf was installed in a nonstandard location, it may be necessary to set the LTDL_LIBRARY_PATH environment variable to the location of the application label plugins. By default, yaf installs the application labeling plugins in /usr/local/lib/yaf. Application labeling requires payload capture to be enabled with the --max-payload option. A minimum payload capture length of 384 bytes is recommended for best results. Application labeling is presently experimental, and not guaranteed to be 100% accurate. However, application labels are supported in yafscii and SiLK via rwflowpack, flowcap, and rwipfix2silk. CONFIG FILE FORMATThe yafApplabelRules.conf file is the main source of information by which yaf determines application labels, and is required for application labeling support. By default, this file is located in /usr/local/etc/yafApplabelRules.conf. The file is a list of label statements. A label statement begins with the keyword 'label', and has the following form: label <N> <label-rule> where <N> is the application label to apply (an unsigned 16-bit decimal integer in the range 0 to 65535), and <label-rule> specifies how to recognize the given application protocol. There are three types of label rules supported: regex, plugin, and signature. A '#' symbol starts a comment in the rule file, and the rest of the line is a comment. Rule Types
MISCELLANEOUSRegardless of rule type, each rule should have a unique application label. Note that once a match is found, application labeling will not continue to find a "better" match. Therefore, the order of the rules in the configuration file can make a difference. More common protocols should be listed at the beginning of the configuration file to increase efficiency. Regular expressions specifically crafted for reverse payloads are not recommended; unless there is no chance that they will match another protocol in the list. This issue may be addressed in a later release. Be aware that poorly crafted regular expressions can be detrimental to the efficiency of the software. Since signature rule labels are usually not a well-known port, they will be compared against the payload in the same order as they appear in the configuration file. If yaf is seeing traffic behind a web proxy, it may incorrectly label https (443) traffic as http (80) due to the HTTP Connect method that occurs before the Certificate exchange. To accurately label https traffic, uncomment the following line in the yafApplabelRules.conf file: label <N> plugin proxyplugin proxyplugin_LTX_ycProxyScanScan and set <N> to the port on which the proxy is listening for connections. This will not label https flows as <N>. It will set the application label to 443 and will allow the DPI plugin to capture and export X.509 Certificates. LABELS*NETBIOS is not included in the configuration file. It is contained in the DNS decoder due to its similarites with the DNS Protocol. **RTCP is not included in the configuration file. It is contained in the RTP decoder due to similarities in the protocols. AUTHORSCERT Network Situational Awareness Group Engineering Team, http://www.cert.org/netsa SEE ALSOyaf(1), yafscii(1)
|