-
- Copyright {{ copyright }}.
- Last updated on {{ last_updated }}.
- Created using Sphinx {{ sphinx_version }}.
-
-
-
-
-
-
-
-{% endblock %}
-
-{% block footer %}
-
-{% endblock %}
+{% if READTHEDOCS and current_version %}
+ {% if current_version == "latest" or current_version == "stable" %}
+ {% set current_version = current_version ~ " (" ~ version ~ ")" %}
+ {% endif %}
+{% endif %}
diff --git a/doc/broids/index.rst b/doc/broids/index.rst
index 96f50f8fa5..6a1850a312 100644
--- a/doc/broids/index.rst
+++ b/doc/broids/index.rst
@@ -1,9 +1,9 @@
.. _bro-ids:
-=======
-Bro IDS
-=======
+===
+IDS
+===
An Intrusion Detection System (IDS) allows you to detect suspicious
activities happening on your network as a result of a past or active
@@ -24,8 +24,26 @@ rejected usernames and passwords occurring from a single address. We
start by defining a threshold for the number of attempts, a monitoring
interval (in minutes), and a new notice type.
-.. btest-include:: ${BRO_SRC_ROOT}/scripts/policy/protocols/ftp/detect-bruteforcing.bro
- :lines: 9-25
+.. sourcecode:: bro
+ :caption: detect-bruteforcing.bro
+
+ module FTP;
+
+ export {
+ redef enum Notice::Type += {
+ ## Indicates a host bruteforcing FTP logins by watching for too
+ ## many rejected usernames or failed passwords.
+ Bruteforcing
+ };
+
+ ## How many rejected usernames or passwords are required before being
+ ## considered to be bruteforcing.
+ const bruteforce_threshold: double = 20 &redef;
+
+ ## The time period in which the threshold needs to be crossed before
+ ## being reset.
+ const bruteforce_measurement_interval = 15mins &redef;
+ }
Using the ftp_reply event, we check for error codes from the `500
series `_
@@ -35,24 +53,130 @@ function to break down the reply code and check if the first digit is a
"5" or not. If true, we then use the :ref:`Summary Statistics Framework
` to keep track of the number of failed attempts.
-.. btest-include:: ${BRO_SRC_ROOT}/scripts/policy/protocols/ftp/detect-bruteforcing.bro
- :lines: 52-60
+.. sourcecode:: bro
+ :caption: detect-bruteforcing.bro
+
+ event ftp_reply(c: connection, code: count, msg: string, cont_resp: bool)
+ {
+ local cmd = c$ftp$cmdarg$cmd;
+ if ( cmd == "USER" || cmd == "PASS" )
+ {
+ if ( FTP::parse_ftp_reply_code(code)$x == 5 )
+ SumStats::observe("ftp.failed_auth", [$host=c$id$orig_h], [$str=cat(c$id$resp_h)]);
+ }
+ }
Next, we use the SumStats framework to raise a notice of the attack when
the number of failed attempts exceeds the specified threshold during the
measuring interval.
-.. btest-include:: ${BRO_SRC_ROOT}/scripts/policy/protocols/ftp/detect-bruteforcing.bro
- :lines: 28-50
+.. sourcecode:: bro
+ :caption: detect-bruteforcing.bro
+
+ event bro_init()
+ {
+ local r1: SumStats::Reducer = [$stream="ftp.failed_auth", $apply=set(SumStats::UNIQUE), $unique_max=double_to_count(bruteforce_threshold+2)];
+ SumStats::create([$name="ftp-detect-bruteforcing",
+ $epoch=bruteforce_measurement_interval,
+ $reducers=set(r1),
+ $threshold_val(key: SumStats::Key, result: SumStats::Result) =
+ {
+ return result["ftp.failed_auth"]$num+0.0;
+ },
+ $threshold=bruteforce_threshold,
+ $threshold_crossed(key: SumStats::Key, result: SumStats::Result) =
+ {
+ local r = result["ftp.failed_auth"];
+ local dur = duration_to_mins_secs(r$end-r$begin);
+ local plural = r$unique>1 ? "s" : "";
+ local message = fmt("%s had %d failed logins on %d FTP server%s in %s", key$host, r$num, r$unique, plural, dur);
+ NOTICE([$note=FTP::Bruteforcing,
+ $src=key$host,
+ $msg=message,
+ $identifier=cat(key$host)]);
+ }]);
+ }
Below is the final code for our script.
-.. btest-include:: ${BRO_SRC_ROOT}/scripts/policy/protocols/ftp/detect-bruteforcing.bro
+.. sourcecode:: bro
+ :caption: detect-bruteforcing.bro
-.. btest:: ftp-bruteforce
+ ##! FTP brute-forcing detector, triggering when too many rejected usernames or
+ ##! failed passwords have occurred from a single address.
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/ftp/bruteforce.pcap protocols/ftp/detect-bruteforcing.bro
- @TEST-EXEC: btest-rst-include notice.log
+ @load base/protocols/ftp
+ @load base/frameworks/sumstats
+
+ @load base/utils/time
+
+ module FTP;
+
+ export {
+ redef enum Notice::Type += {
+ ## Indicates a host bruteforcing FTP logins by watching for too
+ ## many rejected usernames or failed passwords.
+ Bruteforcing
+ };
+
+ ## How many rejected usernames or passwords are required before being
+ ## considered to be bruteforcing.
+ const bruteforce_threshold: double = 20 &redef;
+
+ ## The time period in which the threshold needs to be crossed before
+ ## being reset.
+ const bruteforce_measurement_interval = 15mins &redef;
+ }
+
+
+ event bro_init()
+ {
+ local r1: SumStats::Reducer = [$stream="ftp.failed_auth", $apply=set(SumStats::UNIQUE), $unique_max=double_to_count(bruteforce_threshold+2)];
+ SumStats::create([$name="ftp-detect-bruteforcing",
+ $epoch=bruteforce_measurement_interval,
+ $reducers=set(r1),
+ $threshold_val(key: SumStats::Key, result: SumStats::Result) =
+ {
+ return result["ftp.failed_auth"]$num+0.0;
+ },
+ $threshold=bruteforce_threshold,
+ $threshold_crossed(key: SumStats::Key, result: SumStats::Result) =
+ {
+ local r = result["ftp.failed_auth"];
+ local dur = duration_to_mins_secs(r$end-r$begin);
+ local plural = r$unique>1 ? "s" : "";
+ local message = fmt("%s had %d failed logins on %d FTP server%s in %s", key$host, r$num, r$unique, plural, dur);
+ NOTICE([$note=FTP::Bruteforcing,
+ $src=key$host,
+ $msg=message,
+ $identifier=cat(key$host)]);
+ }]);
+ }
+
+ event ftp_reply(c: connection, code: count, msg: string, cont_resp: bool)
+ {
+ local cmd = c$ftp$cmdarg$cmd;
+ if ( cmd == "USER" || cmd == "PASS" )
+ {
+ if ( FTP::parse_ftp_reply_code(code)$x == 5 )
+ SumStats::observe("ftp.failed_auth", [$host=c$id$orig_h], [$str=cat(c$id$resp_h)]);
+ }
+ }
+
+.. sourcecode:: console
+
+ $ bro -r ftp/bruteforce.pcap protocols/ftp/detect-bruteforcing.bro
+ $ cat notice.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path notice
+ #open 2018-12-13-22-56-21
+ #fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc proto note msg sub src dst p n peer_descr actions suppress_for dropped remote_location.country_code remote_location.region remote_location.city remote_location.latitude remote_location.longitude
+ #types time string addr port addr port string string string enum enum string string addr addr port count string set[enum] interval bool string string string double double
+ 1389721084.522861 - - - - - - - - - FTP::Bruteforcing 192.168.56.1 had 20 failed logins on 1 FTP server in 0m37s - 192.168.56.1 - - - - Notice::ACTION_LOG 3600.000000 F - - - - -
+ #close 2018-12-13-22-56-21
As a final note, the :doc:`detect-bruteforcing.bro
` script above is
diff --git a/doc/broxygen.conf.in b/doc/broxygen.conf.in
deleted file mode 100644
index 1e70445f58..0000000000
--- a/doc/broxygen.conf.in
+++ /dev/null
@@ -1 +0,0 @@
-script * @BROXYGEN_SCRIPT_OUTPUT@/
diff --git a/doc/cluster/index.rst b/doc/cluster/index.rst
index 93dd03d6d3..2a45435831 100644
--- a/doc/cluster/index.rst
+++ b/doc/cluster/index.rst
@@ -1,7 +1,7 @@
-========================
-Bro Cluster Architecture
-========================
+====================
+Cluster Architecture
+====================
Bro is not multithreaded, so once the limitations of a single processor core
diff --git a/doc/conf.py.in b/doc/conf.py
similarity index 80%
rename from doc/conf.py.in
rename to doc/conf.py
index f7243b4527..adff691f71 100644
--- a/doc/conf.py.in
+++ b/doc/conf.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# Bro documentation build configuration file, created by sphinx-quickstart
+# Zeek documentation build configuration file, created by sphinx-quickstart
#
# This file is execfile()d with the current directory set to its containing dir.
#
@@ -17,28 +17,7 @@ extensions = []
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath('sphinx_input/ext'))
-
-# ----- Begin of BTest configuration. -----
-btest = os.path.abspath("@CMAKE_SOURCE_DIR@/aux/btest")
-brocut = os.path.abspath("@CMAKE_SOURCE_DIR@/build/aux/bro-aux/bro-cut")
-bro = os.path.abspath("@CMAKE_SOURCE_DIR@/build/src")
-
-os.environ["PATH"] += (":%s:%s/sphinx:%s:%s" % (btest, btest, bro, brocut))
-sys.path.append(os.path.join(btest, "sphinx"))
-
-extensions += ["btest-sphinx"]
-
-btest_base="@CMAKE_SOURCE_DIR@/testing/btest"
-btest_tests="doc/sphinx"
-# ----- End of BTest configuration. -----
-
-# ----- Begin of Broxygen configuration. -----
-extensions += ["broxygen"]
-bro_binary = os.path.abspath("@CMAKE_SOURCE_DIR@/build/src/bro")
-broxygen_cache="@BROXYGEN_CACHE_DIR@"
-os.environ["BROPATH"] = "@BROPATH@"
-# ----- End of Broxygen configuration. -----
+sys.path.insert(0, os.path.abspath('ext'))
# -- General configuration -----------------------------------------------------
@@ -47,13 +26,10 @@ os.environ["BROPATH"] = "@BROPATH@"
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions += ['bro', 'rst_directive', 'sphinx.ext.todo', 'adapt-toc']
-
-os.environ["BRO_SRC_ROOT"] = "@CMAKE_SOURCE_DIR@"
-os.environ["DOC_ROOT"] = "@CMAKE_SOURCE_DIR@/doc"
+extensions += ['bro', 'sphinx.ext.todo']
# Add any paths that contain templates here, relative to this directory.
-templates_path = ['sphinx_input/_templates', 'sphinx_input/_static']
+templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
@@ -65,17 +41,19 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-project = u'Bro'
-copyright = u'2016, The Bro Project'
+project = u'Zeek'
+copyright = u'2018, The Zeek Project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '@VERSION_MAJ_MIN@'
+with open('../VERSION', 'r') as f:
+ version = f.readline().strip()
+
# The full version, including alpha/beta/rc tags.
-release = '@VERSION@'
+release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -108,6 +86,8 @@ show_authors = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
+highlight_language = 'none'
+
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
@@ -116,21 +96,30 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'basic'
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+if not on_rtd:
+ # only import and set the theme if we're building docs locally
+ import sphinx_rtd_theme
+ html_theme = 'sphinx_rtd_theme'
+ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_last_updated_fmt = '%B %d, %Y'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
-html_theme_options = { }
+html_theme_options = {
+ 'collapse_navigation': False,
+ 'display_version': True,
+}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# " v Documentation".
-#html_title = None
+html_title = u'Zeek User Manual v' + release
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
@@ -147,7 +136,7 @@ html_theme_options = { }
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['sphinx_input/_static']
+#html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
@@ -158,9 +147,9 @@ html_static_path = ['sphinx_input/_static']
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
-html_sidebars = {
-'**': ['localtoc.html', 'sourcelink.html', 'searchbox.html'],
-}
+#html_sidebars = {
+#'**': ['localtoc.html', 'sourcelink.html', 'searchbox.html'],
+#}
# Additional templates that should be rendered to pages, maps page names to
# template names.
@@ -193,7 +182,7 @@ html_sidebars = {
#html_file_suffix = None
# Output file base name for HTML help builder.
-htmlhelp_basename = 'Broxygen'
+htmlhelp_basename = 'zeek-docs'
# -- Options for LaTeX output --------------------------------------------------
@@ -206,8 +195,8 @@ htmlhelp_basename = 'Broxygen'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'Bro.tex', u'Bro Documentation',
- u'The Bro Project', 'manual'),
+ ('index', 'Zeek.tex', u'Zeek Documentation',
+ u'The Zeek Project', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -238,8 +227,8 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
- ('index', 'bro', u'Bro Documentation',
- [u'The Bro Project'], 1)
+ ('index', 'bro', u'Zeek Documentation',
+ [u'The Zeek Project'], 1)
]
# -- Options for todo plugin --------------------------------------------
diff --git a/doc/configuration/index.rst b/doc/configuration/index.rst
index 508b3c1449..c418ec636c 100644
--- a/doc/configuration/index.rst
+++ b/doc/configuration/index.rst
@@ -5,8 +5,6 @@
Cluster Configuration
=====================
-.. contents::
-
A *Bro Cluster* is a set of systems jointly analyzing the traffic of
a network link in a coordinated fashion. You can operate such a setup from
a central manager system easily using BroControl because BroControl
diff --git a/doc/devel/plugins.rst b/doc/devel/plugins.rst
index bdc9305924..3cdb59cd65 100644
--- a/doc/devel/plugins.rst
+++ b/doc/devel/plugins.rst
@@ -1,7 +1,7 @@
-===================
-Writing Bro Plugins
-===================
+===============
+Writing Plugins
+===============
Bro internally provides a plugin API that enables extending
the system dynamically, without modifying the core code base. That way
diff --git a/doc/ext/adapt-toc.py b/doc/ext/adapt-toc.py
deleted file mode 100644
index 12ee006977..0000000000
--- a/doc/ext/adapt-toc.py
+++ /dev/null
@@ -1,29 +0,0 @@
-
-import sys
-import re
-
-# Removes the first TOC level, which is just the page title.
-def process_html_toc(app, pagename, templatename, context, doctree):
-
- if not "toc" in context:
- return
-
- toc = context["toc"]
-
- lines = toc.strip().split("\n")
- lines = lines[2:-2]
-
- toc = "\n".join(lines)
- toc = "
" + toc
-
- context["toc"] = toc
-
- # print >>sys.stderr, pagename
- # print >>sys.stderr, context["toc"]
- # print >>sys.stderr, "-----"
- # print >>sys.stderr, toc
- # print >>sys.stderr, "===="
-
-def setup(app):
- app.connect('html-page-context', process_html_toc)
-
diff --git a/doc/ext/bro_lexer/__init__.py b/doc/ext/bro_lexer/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/doc/ext/bro_lexer/bro.py b/doc/ext/bro_lexer/bro.py
deleted file mode 100644
index ae2566a8de..0000000000
--- a/doc/ext/bro_lexer/bro.py
+++ /dev/null
@@ -1,76 +0,0 @@
-from pygments.lexer import RegexLexer, bygroups, include
-from pygments.token import *
-
-__all__ = ["BroLexer"]
-
-class BroLexer(RegexLexer):
- name = 'Bro'
- aliases = ['bro']
- filenames = ['*.bro']
-
- _hex = r'[0-9a-fA-F_]+'
- _float = r'((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?'
- _h = r'[A-Za-z0-9][-A-Za-z0-9]*'
-
- tokens = {
- 'root': [
- # Whitespace
- ('^@.*?\n', Comment.Preproc),
- (r'#.*?\n', Comment.Single),
- (r'\n', Text),
- (r'\s+', Text),
- (r'\\\n', Text),
- # Keywords
- (r'(add|alarm|break|case|const|continue|delete|do|else|enum|event'
- r'|export|for|function|if|global|local|module|next'
- r'|of|print|redef|return|schedule|when|while)\b', Keyword),
- (r'(addr|any|bool|count|counter|double|file|int|interval|net'
- r'|pattern|port|record|set|string|subnet|table|time|timer'
- r'|vector)\b', Keyword.Type),
- (r'(T|F)\b', Keyword.Constant),
- (r'(&)((?:add|delete|expire)_func|attr|(create|read|write)_expire'
- r'|default|raw_output|encrypt|group|log'
- r'|mergeable|optional|persistent|priority|redef'
- r'|rotate_(?:interval|size)|synchronized)\b', bygroups(Punctuation,
- Keyword)),
- (r'\s+module\b', Keyword.Namespace),
- # Addresses, ports and networks
- (r'\d+/(tcp|udp|icmp|unknown)\b', Number),
- (r'(\d+\.){3}\d+', Number),
- (r'(' + _hex + r'){7}' + _hex, Number),
- (r'0x' + _hex + r'(' + _hex + r'|:)*::(' + _hex + r'|:)*', Number),
- (r'((\d+|:)(' + _hex + r'|:)*)?::(' + _hex + r'|:)*', Number),
- (r'(\d+\.\d+\.|(\d+\.){2}\d+)', Number),
- # Hostnames
- (_h + r'(\.' + _h + r')+', String),
- # Numeric
- (_float + r'\s+(day|hr|min|sec|msec|usec)s?\b', Literal.Date),
- (r'0[xX]' + _hex, Number.Hex),
- (_float, Number.Float),
- (r'\d+', Number.Integer),
- (r'/', String.Regex, 'regex'),
- (r'"', String, 'string'),
- # Operators
- (r'[!%*/+-:<=>?~|]', Operator),
- (r'([-+=&|]{2}|[+-=!><]=)', Operator),
- (r'(in|match)\b', Operator.Word),
- (r'[{}()\[\]$.,;]', Punctuation),
- # Identfier
- (r'([_a-zA-Z]\w*)(::)', bygroups(Name, Name.Namespace)),
- (r'[a-zA-Z_][a-zA-Z_0-9]*', Name)
- ],
- 'string': [
- (r'"', String, '#pop'),
- (r'\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})', String.Escape),
- (r'[^\\"\n]+', String),
- (r'\\\n', String),
- (r'\\', String)
- ],
- 'regex': [
- (r'/', String.Regex, '#pop'),
- (r'\\[\\nt/]', String.Regex), # String.Escape is too intense.
- (r'[^\\/\n]+', String.Regex),
- (r'\\\n', String.Regex),
- (r'\\', String.Regex)
- ]
- }
diff --git a/doc/ext/broxygen.py b/doc/ext/broxygen.py
deleted file mode 100644
index b6b47bb82b..0000000000
--- a/doc/ext/broxygen.py
+++ /dev/null
@@ -1,317 +0,0 @@
-"""
-Broxygen domain for Sphinx.
-
-Adds directives that allow Sphinx to invoke Bro in order to generate script
-reference documentation on the fly. The directives are:
-
-broxygen:package
- - Shows links to all scripts contained within matching package(s).
-broxygen:package_index
- - An index with links to matching package document(s).
-broxygen:script
- - Reference for matching script(s) (i.e. everything declared by the script).
-broxygen:script_summary
- - Shows link to matching script(s) with it's summary-section comments.
-broxygen:script_index
- - An index with links to all matching scrips.
-broxygen:proto_analyzer
- - All protocol analyzers and their components (events/bifs, etc.)
-broxygen:file_analyzer
- - All file analyzers and their components (events/bifs, etc.)
-"""
-
-
-from sphinx.domains import Domain, ObjType
-from sphinx.locale import l_
-from docutils.parsers.rst.directives.misc import Include
-
-
-App = None
-
-
-def info(msg):
- """Use Sphinx builder to output a console message."""
- global App
- from sphinx.util.console import blue
- App.builder.info(blue(msg))
-
-
-def pattern_to_filename_component(pattern):
- """Replace certain characters in Broxygen config file target pattern.
-
- Such that it can be used as part of a (sane) filename.
-
- """
- return pattern.replace("/", ".").replace("*", "star")
-
-
-def ensure_dir(path):
- """Should act like ``mkdir -p``."""
- import os
- import errno
-
- try:
- os.makedirs(path)
- except OSError as e:
- if e.errno != errno.EEXIST:
- raise
-
-
-def generate_config(env, type, pattern):
- """Create a Broxygen config file for a particular target.
-
- It can be used by Bro to generate reST docs for that target.
-
- """
- import os
- import tempfile
- from sphinx.errors import SphinxError
-
- work_dir = env.config.broxygen_cache
-
- if not work_dir:
- raise SphinxError("broxygen_cache not set in sphinx config file")
-
- ensure_dir(work_dir)
- prefix = "{0}-{1}-".format(type, pattern_to_filename_component(pattern))
- (fd, cfg) = tempfile.mkstemp(suffix=".cfg", prefix=prefix, dir=work_dir)
- generated_file = "{0}.rst".format(cfg)
- config = "{0}\t{1}\t{2}".format(type, pattern, generated_file)
- f = os.fdopen(fd, "w")
- f.write(config)
- f.close()
- return (cfg, generated_file)
-
-
-def generate_target(env, type, pattern):
- """Create a Broxygen target and build it.
-
- For a target which hasn't been referenced by any other script, this function
- creates an associated config file then uses Bro w/ it to build the target
- and stores the target information in the build environment.
-
- If a script references a target that's already found in the build
- environment the results of the previous built are re-used.
-
- """
- app_data = env.domaindata["broxygen"]
-
- if (type, pattern) in app_data["targets"]:
- info("Broxygen has cached doc for target '{0} {1}'".format(
- type, pattern))
- return app_data["targets"]
-
- (cfg, gend_file) = generate_config(env, type, pattern)
- target = BroxygenTarget(type, pattern, cfg, gend_file)
- app_data["targets"][(type, pattern)] = target
- build_target(env, target)
- info("Broxygen built target '{0} {1}'".format(type, pattern))
- return target
-
-
-def build_target(env, target):
- """Invoke a Bro process to build a Broxygen target."""
- import os
- import subprocess
-
- path_to_bro = env.config.bro_binary
-
- if not path_to_bro:
- raise SphinxError("'bro' not set in sphinx config file (path to bro)")
-
- bro_cmd = "{0} -X {1} broxygen".format(path_to_bro, target.config_file)
- cwd = os.getcwd()
- os.chdir(os.path.dirname(target.config_file))
-
- try:
- subprocess.check_output(bro_cmd, stderr=subprocess.STDOUT, shell=True)
- except subprocess.CalledProcessError as e:
- from sphinx.errors import SphinxError
- raise SphinxError(
- "Command '{0}' returned non-zero exit status {1}: {2}".format(
- e.cmd, e.returncode, e.output))
- finally:
- os.chdir(cwd)
-
-
-class BroxygenTarget(object):
-
- """Some portion of reST documentation that Bro knows how to generate.
-
- A target is identified by its type and pattern. E.g. type "script" and
- pattern "broxygen/example.bro".
-
- """
-
- def __init__(self, type, pattern, config_file, generated_file):
- self.type = type
- self.pattern = pattern
- self.config_file = config_file
- self.generated_file = generated_file
- self.used_in_docs = set()
-
-
-class BroxygenDirective(Include):
-
- """Base class for Broxygen directives.
-
- It can use Bro to generate reST documentation on the fly and embed it in
- the document at the location of the directive just like the ``.. include::``
- directive. The only argument is a pattern to identify to Bro which
- pieces of documentation it needs to create.
- """
-
- required_arguments = 1
- has_content = False
-
- target_type = None
-
- def run(self):
- env = self.state.document.settings.env
- info("Broxygen running .. {0}:: {1} in {2}".format(
- self.name, self.arguments[0], env.docname))
- target = generate_target(env, self.target_type, self.arguments[0])
- target.used_in_docs.add(env.docname)
- self.arguments = [target.generated_file]
- return super(BroxygenDirective, self).run()
-
-
-class PackageDirective(BroxygenDirective):
-
- target_type = "package"
-
-
-class PackageIndexDirective(BroxygenDirective):
-
- target_type = "package_index"
-
-
-class ScriptDirective(BroxygenDirective):
-
- target_type = "script"
-
-
-class ScriptSummaryDirective(BroxygenDirective):
-
- target_type = "script_summary"
-
-
-class ScriptIndexDirective(BroxygenDirective):
-
- target_type = "script_index"
-
-
-class ProtoAnalyzerDirective(BroxygenDirective):
-
- target_type = "proto_analyzer"
-
-
-class FileAnalyzerDirective(BroxygenDirective):
-
- target_type = "file_analyzer"
-
-
-class IdentifierDirective(BroxygenDirective):
-
- target_type = "identifier"
-
-
-class BroxygenDomain(Domain):
-
- name = "broxygen"
- label = "Broxygen"
-
- object_types = {
- "package": ObjType(l_("package")),
- "package_index": ObjType(l_("package_index")),
- "script": ObjType(l_("script")),
- "script_summary": ObjType(l_("script_summary")),
- "script_index": ObjType(l_("script_index")),
- "proto_analyzer": ObjType(l_("proto_analyzer")),
- "file_analyzer": ObjType(l_("file_analyzer")),
- "identifier": ObjType(l_("identifier")),
- }
-
- directives = {
- "package": PackageDirective,
- "package_index": PackageIndexDirective,
- "script": ScriptDirective,
- "script_summary": ScriptSummaryDirective,
- "script_index": ScriptIndexDirective,
- "proto_analyzer": ProtoAnalyzerDirective,
- "file_analyzer": FileAnalyzerDirective,
- "identifier": IdentifierDirective,
- }
-
- roles = {}
-
- initial_data = {
- "targets": {}
- }
-
- def clear_doc(self, docname):
- """Update Broxygen targets referenced in docname.
-
- If it's the last place the target was referenced, remove it from
- the build environment and delete any generated config/reST files
- associated with it from the cache.
-
- """
- import os
-
- stale_targets = []
-
- for (type, pattern), target in self.data["targets"].items():
- if docname in target.used_in_docs:
- target.used_in_docs.remove(docname)
-
- if not target.used_in_docs:
- stale_targets.append(target)
-
- for target in stale_targets:
- del self.data["targets"][(target.type, target.pattern)]
- os.remove(target.config_file)
- os.remove(target.generated_file)
-
- def get_objects(self):
- """No Broxygen-generated content is itself linkable/searchable."""
- return []
-
-
-def env_get_outdated_hook(app, env, added, changed, removed):
- """Check whether to re-read any documents referencing Broxygen targets.
-
- To do that we have to ask Bro to rebuild each target and compare the
- before and after modification times of the generated reST output file.
- If Bro changed it, then the document containing the Broxygen directive
- needs to be re-read.
-
- """
- import os
-
- reread = set()
-
- for target in app.env.domaindata["broxygen"]["targets"].values():
- before_mtime = os.stat(target.generated_file)
- build_target(env, target)
- after_mtime = os.stat(target.generated_file)
-
- if after_mtime > before_mtime:
- info("Broxygen target '{0} {1}' outdated".format(
- target.type, target.pattern))
-
- for docname in target.used_in_docs:
- if docname not in removed:
- info(" in document: {0}".format(docname))
- reread.add(docname)
-
- return list(reread)
-
-
-def setup(app):
- global App
- App = app
- app.add_domain(BroxygenDomain)
- app.add_config_value("bro_binary", None, "env")
- app.add_config_value("broxygen_cache", None, "env")
- app.connect("env-get-outdated", env_get_outdated_hook)
diff --git a/doc/ext/rst_directive.py b/doc/ext/rst_directive.py
deleted file mode 100644
index 43c95abc52..0000000000
--- a/doc/ext/rst_directive.py
+++ /dev/null
@@ -1,183 +0,0 @@
-def setup(app):
- pass
-
-# -*- coding: utf-8 -*-
-"""
-
-Modified version of the the Pygments reStructuredText directive. -Robin
-
-This provides two new directives:
-
- - .. code:: []
-
- Highlights the following code block according to if
- given (e.g., "c", "python", etc.).
-
- - .. console::
-
- Highlits the following code block as a shell session.
-
- For compatibility with the original version, "sourcecode" is
- equivalent to "code".
-
-Original comment:
-
- The Pygments reStructuredText directive
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- This fragment is a Docutils_ 0.5 directive that renders source code
- (to HTML only, currently) via Pygments.
-
- To use it, adjust the options below and copy the code into a module
- that you import on initialization. The code then automatically
- registers a ``sourcecode`` directive that you can use instead of
- normal code blocks like this::
-
- .. sourcecode:: python
-
- My code goes here.
-
- If you want to have different code styles, e.g. one with line numbers
- and one without, add formatters with their names in the VARIANTS dict
- below. You can invoke them instead of the DEFAULT one by using a
- directive option::
-
- .. sourcecode:: python
- :linenos:
-
- My code goes here.
-
- Look at the `directive documentation`_ to get all the gory details.
-
- .. _Docutils: http://docutils.sf.net/
- .. _directive documentation:
- http://docutils.sourceforge.net/docs/howto/rst-directives.html
-
- :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-
-# Options
-# ~~~~~~~
-
-# Set to True if you want inline CSS styles instead of classes
-INLINESTYLES = False
-
-from pygments.formatters import HtmlFormatter
-
-class MyHtmlFormatter(HtmlFormatter):
- def format_unencoded(self, tokensource, outfile):
-
- # A NOP currently.
- new_tokens = []
- for (i, piece) in tokensource:
- new_tokens += [(i, piece)]
-
- return super(MyHtmlFormatter, self).format_unencoded(new_tokens, outfile)
-
-# The default formatter
-DEFAULT = MyHtmlFormatter(noclasses=INLINESTYLES, cssclass="pygments")
-
-# Add name -> formatter pairs for every variant you want to use
-VARIANTS = {
- # 'linenos': HtmlFormatter(noclasses=INLINESTYLES, linenos=True),
-}
-
-
-import textwrap
-
-from docutils import nodes
-from docutils.parsers.rst import directives, Directive
-
-from pygments import highlight
-from pygments.lexers import get_lexer_by_name, guess_lexer, TextLexer
-from pygments.token import Text, Keyword, Error, Operator, Name
-from pygments.filter import Filter
-
-# Ugly hack to register the Bro lexer. I'm sure there's a better way to do it,
-# but it's not obvious ...
-from bro_lexer.bro import BroLexer
-from pygments.lexers._mapping import LEXERS
-LEXERS['BroLexer'] = ('bro_lexer.bro', BroLexer.name, BroLexer.aliases, BroLexer.filenames, ())
-
-class Pygments(Directive):
- """ Source code syntax hightlighting.
- """
- #max_line_length = 68
- max_line_length = 0
-
- required_arguments = 0
- optional_arguments = 1
- final_argument_whitespace = True
- option_spec = dict([(key, directives.flag) for key in VARIANTS])
- has_content = True
-
- def wrapped_content(self):
- content = []
-
- if Console.max_line_length:
- for line in self.content:
- content += textwrap.wrap(line, Console.max_line_length, subsequent_indent=" ")
- else:
- content = self.content
-
- return u'\n'.join(content)
-
- def run(self):
- self.assert_has_content()
-
- content = self.wrapped_content()
-
- if len(self.arguments) > 0:
- try:
- lexer = get_lexer_by_name(self.arguments[0])
- except (ValueError, IndexError):
- # lexer not found, use default.
- lexer = TextLexer()
- else:
- try:
- lexer = guess_lexer(content)
- except:
- lexer = TextLexer()
-
- # import sys
- # print >>sys.stderr, self.arguments, lexer.__class__
-
- # take an arbitrary option if more than one is given
- formatter = self.options and VARIANTS[self.options.keys()[0]] or DEFAULT
- parsed = highlight(content, lexer, formatter)
- return [nodes.raw('', parsed, format='html')]
-
-class MyFilter(Filter):
- def filter(self, lexer, stream):
-
- bol = True
-
- for (ttype, value) in stream:
- # Color the '>' prompt sign.
- if bol and ttype is Text and value == ">":
- ttype = Name.Variable.Class # This gives us a nice red.
-
- # Discolor builtin, that can look funny.
- if ttype is Name.Builtin:
- ttype = Text
-
- bol = value.endswith("\n")
-
- yield (ttype, value)
-
-class Console(Pygments):
- required_arguments = 0
- optional_arguments = 0
-
- def run(self):
- self.assert_has_content()
- content = self.wrapped_content()
- lexer = get_lexer_by_name("sh")
- lexer.add_filter(MyFilter())
- parsed = highlight(content, lexer, DEFAULT)
- return [nodes.raw('', parsed, format='html')]
-
-directives.register_directive('sourcecode', Pygments)
-directives.register_directive('code', Pygments)
-directives.register_directive('console', Console)
diff --git a/doc/frameworks/broker.rst b/doc/frameworks/broker.rst
index 191b8178cc..386766537c 100644
--- a/doc/frameworks/broker.rst
+++ b/doc/frameworks/broker.rst
@@ -29,8 +29,6 @@ Broker-Enabled Communication/Cluster Framework
also gives examples of Broker and the new cluster framework that
show off all the new features and capabilities.
-.. contents::
-
Porting Guide
=============
@@ -296,11 +294,17 @@ Connecting to Peers
Bro can accept incoming connections by calling :bro:see:`Broker::listen`.
-.. btest-include:: ${DOC_ROOT}/frameworks/broker/connecting-listener.bro
+.. literalinclude:: broker/connecting-listener.bro
+ :caption: connecting-listener.bro
+ :language: bro
+ :linenos:
Bro can initiate outgoing connections by calling :bro:see:`Broker::peer`.
-.. btest-include:: ${DOC_ROOT}/frameworks/broker/connecting-connector.bro
+.. literalinclude:: broker/connecting-connector.bro
+ :caption: connecting-connector.bro
+ :language: bro
+ :linenos:
In either case, connection status updates are monitored via the
:bro:see:`Broker::peer_added` and :bro:see:`Broker::peer_lost` events.
@@ -317,7 +321,10 @@ more on how topics work and are chosen.
Use the :bro:see:`Broker::subscribe` function to subscribe to topics and
define any event handlers for events that peers will send.
-.. btest-include:: ${DOC_ROOT}/frameworks/broker/events-listener.bro
+.. literalinclude:: broker/events-listener.bro
+ :caption: events-listener.bro
+ :language: bro
+ :linenos:
There are two different ways to send events.
@@ -333,7 +340,10 @@ whenever the event is called locally via the normal event invocation syntax.
When auto-publishing events, local event handlers for the event are called
in addition to sending the event to any subscribed peers.
-.. btest-include:: ${DOC_ROOT}/frameworks/broker/events-connector.bro
+.. literalinclude:: broker/events-connector.bro
+ :caption: events-connector.bro
+ :language: bro
+ :linenos:
Note that the subscription model is prefix-based, meaning that if you subscribe
to the "bro/events" topic prefix you would receive events that are published
@@ -342,16 +352,25 @@ to topic names "bro/events/foo" and "bro/events/bar" but not "bro/misc".
Remote Logging
--------------
-.. btest-include:: ${DOC_ROOT}/frameworks/broker/testlog.bro
+.. literalinclude:: broker/testlog.bro
+ :caption: testlog.bro
+ :language: bro
+ :linenos:
To toggle remote logs, redef :bro:see:`Log::enable_remote_logging`.
Use the :bro:see:`Broker::subscribe` function to advertise interest
in logs written by peers. The topic names that Bro uses are determined by
:bro:see:`Broker::log_topic`.
-.. btest-include:: ${DOC_ROOT}/frameworks/broker/logs-listener.bro
+.. literalinclude:: broker/logs-listener.bro
+ :caption: logs-listener.bro
+ :language: bro
+ :linenos:
-.. btest-include:: ${DOC_ROOT}/frameworks/broker/logs-connector.bro
+.. literalinclude:: broker/logs-connector.bro
+ :caption: logs-connector.bro
+ :language: bro
+ :linenos:
Note that logging events are only raised locally on the node that performs
the :bro:see:`Log::write` and not automatically published to peers.
@@ -379,9 +398,15 @@ use. E.g. In-memory versus SQLite for persistence.
Data stores also support expiration on a per-key basis using an amount of
time relative to the entry's last modification time.
-.. btest-include:: ${DOC_ROOT}/frameworks/broker/stores-listener.bro
+.. literalinclude:: broker/stores-listener.bro
+ :caption: stores-listener.bro
+ :language: bro
+ :linenos:
-.. btest-include:: ${DOC_ROOT}/frameworks/broker/stores-connector.bro
+.. literalinclude:: broker/stores-connector.bro
+ :caption: stores-connector.bro
+ :language: bro
+ :linenos:
Note that all data store queries must be made within Bro's asynchronous
``when`` statements and must specify a timeout block.
@@ -403,7 +428,7 @@ should always use the fully-qualified event name.
For example, this will likely not work as expected:
-.. code:: bro
+.. sourcecode:: bro
module MyModule;
@@ -427,7 +452,7 @@ will never be called and also not any remote handlers either, even if
:bro:see:`Broker::auto_publish` was used elsewhere for it. Instead, at
minimum you would need change the ``bro_init()`` handler:
-.. code:: bro
+.. sourcecode:: bro
event bro_init()
{
@@ -438,7 +463,7 @@ minimum you would need change the ``bro_init()`` handler:
Though, an easy rule of thumb to remember would be to always use the
explicit module namespace scoping and you can't go wrong:
-.. code:: bro
+.. sourcecode:: bro
module MyModule;
@@ -467,7 +492,7 @@ Manager Sending Events To Workers
This is fairly straightforward, we just need a topic name which we know
all workers are subscribed combined with the event we want to send them.
-.. code:: bro
+.. sourcecode:: bro
event manager_to_workers(s: string)
{
@@ -497,10 +522,10 @@ all workers are subscribed combined with the event we want to send them.
# eliminated by using the following conditional directives.
# It's evaluated once per node at parse-time and, if false,
# any code within is just ignored / treated as not existing at all.
- @if ( Cluster::local_node_type() == Cluster::MANAGER )
+ @if ( Cluster::local_node_type() == Cluster::MANAGER )
Broker::publish(Cluster::worker_topic, manager_to_workers,
"hello v3");
- @endif
+ @endif
}
Worker Sending Events To Manager
@@ -510,7 +535,7 @@ This should look almost identical to the previous case of sending an event
from the manager to workers, except it simply changes the topic name to
one which the manager is subscribed.
-.. code:: bro
+.. sourcecode:: bro
event worker_to_manager(worker_name: string)
{
@@ -531,17 +556,17 @@ topology, this type of communication is a bit different than what we
did before since we have to manually relay the event via some node that *is*
connected to all workers. The manager or a proxy satisfies that requirement:
-.. code:: bro
+.. sourcecode:: bro
event worker_to_workers(worker_name: string)
{
- @if ( Cluster::local_node_type() == Cluster::MANAGER ||
+ @if ( Cluster::local_node_type() == Cluster::MANAGER ||
Cluster::local_node_type() == Cluster::PROXY )
Broker::publish(Cluster::worker_topic, worker_to_workers,
worker_name)
- @else
+ @else
print "got event from worker", worker_name;
- @endif
+ @endif
}
event some_event_handled_on_worker()
@@ -570,7 +595,7 @@ we can make use of a `Highest Random Weight (HRW) hashing
`_ distribution strategy
to uniformly map an arbitrary key space across all available proxies.
-.. code:: bro
+.. sourcecode:: bro
event worker_to_proxies(worker_name: string)
{
diff --git a/doc/frameworks/configuration.rst b/doc/frameworks/configuration.rst
index 23a384a280..26a1ebe13a 100644
--- a/doc/frameworks/configuration.rst
+++ b/doc/frameworks/configuration.rst
@@ -14,10 +14,6 @@ ability to specify input files to enable changing the value of options at
runtime, a couple of functions, and a log file "config.log"
which contains information about every change to option values.
-
-.. contents::
-
-
Introduction
------------
@@ -42,7 +38,7 @@ Declaring options
The "option" keyword allows variables to be declared as configuration options.
-.. code:: bro
+.. sourcecode:: bro
module TestModule;
@@ -67,7 +63,7 @@ being that there is no need to specify the :bro:attr:`&redef` attribute in
the declaration of an option. For example, given the above option
declarations, here are some possible redefs:
-.. code:: bro
+.. sourcecode:: bro
redef TestModule::enable_feature = T;
redef TestModule::my_networks += { 10.1.0.0/16, 10.2.0.0/16 };
@@ -90,7 +86,7 @@ only the manager node attempts to read the specified configuration files.
For example, simply add something like this to local.bro:
-.. code:: bro
+.. sourcecode:: bro
redef Config::config_files += { "/path/to/config.dat" };
@@ -131,7 +127,7 @@ supported by the config input reader. In that case you would need to use
the Config::set_value function to change the value of such an option as
shown in the following example.
-.. code:: bro
+.. sourcecode:: bro
module TestModule;
@@ -158,7 +154,7 @@ change handler for an option that has a data type of "addr" (for other
data types, the return type and 2nd parameter data type must be adjusted
accordingly):
-.. code:: bro
+.. sourcecode:: bro
module TestModule;
diff --git a/doc/frameworks/file-analysis.rst b/doc/frameworks/file-analysis.rst
index e70b124af7..cc5a76ddec 100644
--- a/doc/frameworks/file-analysis.rst
+++ b/doc/frameworks/file-analysis.rst
@@ -21,8 +21,6 @@ File Analysis
provide analysis specifically for files that is analogous to the
analysis Bro provides for network connections.
-.. contents::
-
File Lifecycle Events
=====================
@@ -36,11 +34,23 @@ bytes have been transferred so far, and its MIME type.
Here's a simple example:
-.. btest-include:: ${DOC_ROOT}/frameworks/file_analysis_01.bro
+.. literalinclude:: file_analysis_01.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: file-analysis-01
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/http/get.trace ${DOC_ROOT}/frameworks/file_analysis_01.bro
+ $ bro -r http/get.trace file_analysis_01.bro
+ file_state_remove
+ FakNcS1Jfe01uljb3
+ CHhAvVGS1DHFjwGM9
+ [orig_h=141.142.228.5, orig_p=59856/tcp, resp_h=192.150.187.43, resp_p=80/tcp]
+ HTTP
+ connection_state_remove
+ CHhAvVGS1DHFjwGM9
+ [orig_h=141.142.228.5, orig_p=59856/tcp, resp_h=192.150.187.43, resp_p=80/tcp]
+ HTTP
This doesn't perform any interesting analysis yet, but does highlight
the similarity between analysis of connections and files. Connections
@@ -71,16 +81,21 @@ explicit attachment decision.
Here's a simple example of how to use the MD5 file analyzer to
calculate the MD5 of plain text files:
-.. btest-include:: ${DOC_ROOT}/frameworks/file_analysis_02.bro
+.. literalinclude:: file_analysis_02.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: file-analysis-02
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/http/get.trace ${DOC_ROOT}/frameworks/file_analysis_02.bro
+ $ bro -r http/get.trace file_analysis_02.bro
+ new file, FakNcS1Jfe01uljb3
+ file_hash, FakNcS1Jfe01uljb3, md5, 397168fd09991a0e712254df7bc639ac
Some file analyzers might have tunable parameters that need to be
specified in the call to :bro:see:`Files::add_analyzer`:
-.. code:: bro
+.. sourcecode:: bro
event file_new(f: fa_file)
{
@@ -109,19 +124,24 @@ in the same way it analyzes files that it sees coming over traffic from
a network interface it's monitoring. It only requires a call to
:bro:see:`Input::add_analysis`:
-.. btest-include:: ${DOC_ROOT}/frameworks/file_analysis_03.bro
+.. literalinclude:: file_analysis_03.bro
+ :caption:
+ :language: bro
+ :linenos:
Note that the "source" field of :bro:see:`fa_file` corresponds to the
"name" field of :bro:see:`Input::AnalysisDescription` since that is what
the input framework uses to uniquely identify an input stream.
-The output of the above script may be (assuming a file called "myfile"
-exists):
+Example output of the above script may be:
-.. btest:: file-analysis-03
+.. sourcecode:: console
- @TEST-EXEC: echo "Hello world" > myfile
- @TEST-EXEC: btest-rst-cmd bro ${DOC_ROOT}/frameworks/file_analysis_03.bro
+ $ echo "Hello world" > myfile
+ $ bro file_analysis_03.bro
+ new file, FZedLu4Ajcvge02jA8
+ file_hash, FZedLu4Ajcvge02jA8, md5, f0ef7081e1539ac00ef5b761b4fb01b3
+ file_state_remove
Nothing that special, but it at least verifies the MD5 file analyzer
saw all the bytes of the input file and calculated the checksum
diff --git a/doc/frameworks/geoip.rst b/doc/frameworks/geoip.rst
index 06829bfcd5..141ecd4045 100644
--- a/doc/frameworks/geoip.rst
+++ b/doc/frameworks/geoip.rst
@@ -17,8 +17,6 @@ GeoLocation
software, and then install the GeoLite2 city database before building
Bro.
-.. contents::
-
Install libmaxminddb
--------------------
@@ -26,19 +24,19 @@ Before building Bro, you need to install libmaxminddb.
* RPM/RedHat-based Linux:
- .. console::
+ .. sourcecode:: console
sudo yum install libmaxminddb-devel
* DEB/Debian-based Linux:
- .. console::
+ .. sourcecode:: console
sudo apt-get install libmaxminddb-dev
* FreeBSD:
- .. console::
+ .. sourcecode:: console
sudo pkg install libmaxminddb
@@ -58,7 +56,7 @@ and regions in addition to countries.
`Download `__
the GeoLite2 city binary database:
-.. console::
+.. sourcecode:: console
wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
tar zxf GeoLite2-City.tar.gz
@@ -69,7 +67,7 @@ and will vary depending on which platform and package you are using. For
FreeBSD, use ``/usr/local/share/GeoIP``. For Linux, use ``/usr/share/GeoIP``
or ``/var/lib/GeoIP`` (choose whichever one already exists).
-.. console::
+.. sourcecode:: console
mv /GeoLite2-City.mmdb /GeoLite2-City.mmdb
@@ -81,7 +79,7 @@ everything is setup correctly. After installing libmaxminddb and the GeoIP
city database, and building Bro, you can quickly check if the GeoIP
functionality works by running a command like this:
-.. console::
+.. sourcecode:: console
bro -e "print lookup_location(8.8.8.8);"
@@ -113,7 +111,7 @@ Usage
There is a built-in function that provides the GeoIP functionality:
-.. code:: bro
+.. sourcecode:: bro
function lookup_location(a:addr): geo_location
@@ -130,7 +128,7 @@ Example
To show every ftp connection from hosts in Ohio, this is now very easy:
-.. code:: bro
+.. sourcecode:: bro
event ftp_reply(c: connection, code: count, msg: string, cont_resp: bool)
{
diff --git a/doc/frameworks/input.rst b/doc/frameworks/input.rst
index 01c1658d34..93b2bb97f3 100644
--- a/doc/frameworks/input.rst
+++ b/doc/frameworks/input.rst
@@ -15,8 +15,6 @@ Input Framework
worthwhile to take a look at the unit tests in
``testing/btest/scripts/base/frameworks/input/``.
-.. contents::
-
Reading Data into Tables
========================
@@ -53,7 +51,7 @@ the table content.
The two records are defined as:
-.. code:: bro
+.. sourcecode:: bro
type Idx: record {
ip: addr;
@@ -72,7 +70,7 @@ columns does not matter, because each column is identified by name.
The log file is read into the table with a simple call of the
:bro:id:`Input::add_table` function:
-.. code:: bro
+.. sourcecode:: bro
global blacklist: table[addr] of Val = table();
@@ -109,7 +107,7 @@ Once the input framework finishes reading from a data source, it fires
the :bro:id:`Input::end_of_data` event. Once this event has been received all
data from the input file is available in the table.
-.. code:: bro
+.. sourcecode:: bro
event Input::end_of_data(name: string, source: string) {
# now all data is in the table
@@ -121,7 +119,7 @@ just might not contain all lines from the input file before the event has
fired. After the table has been populated it can be used like any other Bro
table and blacklist entries can easily be tested:
-.. code:: bro
+.. sourcecode:: bro
if ( 192.168.18.12 in blacklist )
# take action
@@ -143,7 +141,7 @@ elements from the file will be updated. After the update is finished the
In our example the call would look like:
-.. code:: bro
+.. sourcecode:: bro
Input::force_update("blacklist");
@@ -155,7 +153,7 @@ of the :bro:id:`Input::add_table` call. Valid values are ``Input::MANUAL``
setting the value of the ``mode`` option in the previous example
would look like this:
-.. code:: bro
+.. sourcecode:: bro
Input::add_table([$source="blacklist.file", $name="blacklist",
$idx=Idx, $val=Val, $destination=blacklist,
@@ -189,7 +187,7 @@ item is added to, removed from, or changed in a table.
The event definition looks like this (note that you can change the name of
this event in your own Bro script):
-.. code:: bro
+.. sourcecode:: bro
event entry(description: Input::TableDescription, tpe: Input::Event,
left: Idx, right: Val) {
@@ -199,7 +197,7 @@ this event in your own Bro script):
The event must be specified in ``$ev`` in the ``add_table`` call:
-.. code:: bro
+.. sourcecode:: bro
Input::add_table([$source="blacklist.file", $name="blacklist",
$idx=Idx, $val=Val, $destination=blacklist,
@@ -244,7 +242,7 @@ The following example filter will reject adding entries to the table when
they were generated over a month ago. It will accept all changes and all
removals of values that are already present in the table.
-.. code:: bro
+.. sourcecode:: bro
Input::add_table([$source="blacklist.file", $name="blacklist",
$idx=Idx, $val=Val, $destination=blacklist,
@@ -307,7 +305,7 @@ discussed in much detail. To read the blacklist of the previous example
into an event stream, the :bro:id:`Input::add_event` function is used.
For example:
-.. code:: bro
+.. sourcecode:: bro
type Val: record {
ip: addr;
diff --git a/doc/frameworks/logging-input-sqlite.rst b/doc/frameworks/logging-input-sqlite.rst
index e0f10308ae..31dbe11379 100644
--- a/doc/frameworks/logging-input-sqlite.rst
+++ b/doc/frameworks/logging-input-sqlite.rst
@@ -14,8 +14,6 @@ Logging To and Reading From SQLite Databases
they can, for example, be used to make data that changes regularly available
to Bro on a continuing basis.
-.. contents::
-
Warning
=======
@@ -38,12 +36,10 @@ You have to define a filter which specifies SQLite as the writer.
The following example code adds SQLite as a filter for the connection log:
-.. btest-include:: ${DOC_ROOT}/frameworks/sqlite-conn-filter.bro
-
-.. btest:: sqlite-conn-filter-check
-
- # Make sure this parses correctly at least.
- @TEST-EXEC: bro ${DOC_ROOT}/frameworks/sqlite-conn-filter.bro
+.. literalinclude:: sqlite-conn-filter.bro
+ :caption:
+ :language: bro
+ :linenos:
Bro will create the database file ``/var/db/conn.sqlite``, if it does not
already exist. It will also create a table with the name ``conn`` (if it
@@ -71,7 +67,7 @@ same fields that are present in the ASCII log files::
Note that the ASCII ``conn.log`` will still be created. To prevent this file
from being created, you can remove the default filter:
-.. code:: bro
+.. sourcecode:: bro
Log::remove_filter(Conn::LOG, "default");
@@ -115,12 +111,10 @@ The SQLite commands to create the schema are as follows::
After creating a file called ``hosts.sqlite`` with this content, we can
read the resulting table into Bro:
-.. btest-include:: ${DOC_ROOT}/frameworks/sqlite-read-table.bro
-
-.. btest:: sqlite-read-table-check
-
- # Make sure this parses correctly at least.
- @TEST-EXEC: bro ${DOC_ROOT}/frameworks/sqlite-read-table.bro
+.. literalinclude:: sqlite-read-table.bro
+ :caption:
+ :language: bro
+ :linenos:
Afterwards, that table can be used to check logins into hosts against
the available userlist.
@@ -164,12 +158,10 @@ of files that are transmitted over the network. For each hash, a SQL-query
is run against SQLite. If the query returns with a result, we had a hit
against our malware-database and output the matching hash.
-.. btest-include:: ${DOC_ROOT}/frameworks/sqlite-read-events.bro
-
-.. btest:: sqlite-read-events-check
-
- # Make sure this parses correctly at least.
- @TEST-EXEC: bro ${DOC_ROOT}/frameworks/sqlite-read-events.bro
+.. literalinclude:: sqlite-read-events.bro
+ :caption:
+ :language: bro
+ :linenos:
If you run this script against the trace in
``testing/btest/Traces/ftp/ipv4.trace``, you will get one hit.
diff --git a/doc/frameworks/logging.rst b/doc/frameworks/logging.rst
index 10e0b8fc16..813c2bfbc9 100644
--- a/doc/frameworks/logging.rst
+++ b/doc/frameworks/logging.rst
@@ -12,8 +12,6 @@ Logging Framework
logged. This document describes how logging can be customized and
extended.
-.. contents::
-
Terminology
===========
@@ -65,7 +63,7 @@ done:
In the following example, we create a new module "Foo" which creates
a new log stream.
-.. code:: bro
+.. sourcecode:: bro
module Foo;
@@ -115,7 +113,7 @@ In this example, the :bro:id:`connection_established` event provides our data,
and we also store a copy of the data being logged into the
:bro:type:`connection` record:
-.. code:: bro
+.. sourcecode:: bro
event connection_established(c: connection)
{
@@ -158,7 +156,7 @@ Let's say we want to add a boolean field ``is_private`` to
:bro:type:`Conn::Info` that indicates whether the originator IP address
is part of the :rfc:`1918` space:
-.. code:: bro
+.. sourcecode:: bro
# Add a field to the connection log record.
redef record Conn::Info += {
@@ -184,7 +182,7 @@ In this example, since a connection's summary is generated at
the time its state is removed from memory, we can add another handler
at that time that sets our field correctly:
-.. code:: bro
+.. sourcecode:: bro
event connection_state_remove(c: connection)
{
@@ -217,7 +215,7 @@ being logged. For these cases, a stream can specify an event that will
be generated every time a log record is written to it. To do this, we
need to modify the example module shown above to look something like this:
-.. code:: bro
+.. sourcecode:: bro
module Foo;
@@ -248,7 +246,7 @@ connection log stream raises the event :bro:id:`Conn::log_conn`. You
could use that for example for flagging when a connection to a
specific destination exceeds a certain duration:
-.. code:: bro
+.. sourcecode:: bro
redef enum Notice::Type += {
## Indicates that a connection remained established longer
@@ -275,7 +273,7 @@ Disable a Stream
One way to "turn off" a log is to completely disable the stream. For
example, the following example will prevent the conn.log from being written:
-.. code:: bro
+.. sourcecode:: bro
event bro_init()
{
@@ -310,7 +308,7 @@ The easiest way to change a log filename is to simply replace the
default log filter with a new filter that specifies a value for the "path"
field. In this example, "conn.log" will be changed to "myconn.log":
-.. code:: bro
+.. sourcecode:: bro
event bro_init()
{
@@ -335,7 +333,7 @@ if you want to restrict the set of fields being logged to the new file.
In this example, a new filter is added to the Conn::LOG stream that writes
two fields to a new log file:
-.. code:: bro
+.. sourcecode:: bro
event bro_init()
{
@@ -366,7 +364,7 @@ corresponding ``exclude`` filter attribute that you can use instead of
If you want to make this the only log file for the stream, you can
remove the default filter:
-.. code:: bro
+.. sourcecode:: bro
event bro_init()
{
@@ -383,7 +381,7 @@ allows, e.g., to record local and remote connections into separate
files. To do this, you define a function that returns the desired path,
and use the "path_func" filter attribute:
-.. code:: bro
+.. sourcecode:: bro
# Note: if using BroControl then you don't need to redef local_nets.
redef Site::local_nets = { 192.168.0.0/16 };
@@ -415,7 +413,7 @@ only with the :bro:enum:`Conn::LOG` stream as the record type is hardcoded
into its argument list. However, Bro allows to do a more generic
variant:
-.. code:: bro
+.. sourcecode:: bro
function myfunc(id: Log::ID, path: string,
rec: record { id: conn_id; } ) : string
@@ -434,7 +432,7 @@ We have seen how to customize the columns being logged, but
you can also control which records are written out by providing a
predicate that will be called for each log record:
-.. code:: bro
+.. sourcecode:: bro
function http_only(rec: Conn::Info) : bool
{
@@ -464,7 +462,7 @@ Or specifically for certain :bro:type:`Log::Filter` instances by setting
their ``interv`` field. Here's an example of changing just the
:bro:enum:`Conn::LOG` stream's default filter rotation.
-.. code:: bro
+.. sourcecode:: bro
event bro_init()
{
@@ -503,7 +501,7 @@ Some writer options are global (i.e., they affect all log filters using
that log writer). For example, to change the output format of all ASCII
logs to JSON format:
-.. code:: bro
+.. sourcecode:: bro
redef LogAscii::use_json = T;
@@ -511,7 +509,7 @@ Some writer options are filter-specific (i.e., they affect only the filters
that explicitly specify the option). For example, to change the output
format of the ``conn.log`` only:
-.. code:: bro
+.. sourcecode:: bro
event bro_init()
{
diff --git a/doc/frameworks/netcontrol.rst b/doc/frameworks/netcontrol.rst
index ccb659c223..52cb5b110e 100644
--- a/doc/frameworks/netcontrol.rst
+++ b/doc/frameworks/netcontrol.rst
@@ -17,8 +17,6 @@ NetControl Framework
it can be used in practice, it might be worthwhile to take a look at
the unit tests.
-.. contents::
-
NetControl Architecture
=======================
@@ -65,7 +63,7 @@ Backends should be initialized in the :bro:see:`NetControl::init` event, calling
the :bro:see:`NetControl::activate` function after the plugin instance has been
initialized. The debug plugin can be initialized as follows:
-.. code:: bro
+.. sourcecode:: bro
event NetControl::init()
{
@@ -133,17 +131,37 @@ start sending the rules to the added backend(s). To give a very simple example,
the following script will simply block the traffic of all connections that it
sees being established:
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-1-drop-with-debug.bro
+.. literalinclude:: netcontrol-1-drop-with-debug.bro
+ :caption:
+ :language: bro
+ :linenos:
Running this script on a file containing one connection will cause the debug
plugin to print one line to the standard output, which contains information
about the rule that was added. It will also cause creation of `netcontrol.log`,
which contains information about all actions that are taken by NetControl:
-.. btest:: netcontrol-1-drop-with-debug.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -C -r ${TRACES}/tls/ecdhe.pcap ${DOC_ROOT}/frameworks/netcontrol-1-drop-with-debug.bro
- @TEST-EXEC: btest-rst-cmd cat netcontrol.log
+ $ bro -C -r tls/ecdhe.pcap netcontrol-1-drop-with-debug.bro
+ netcontrol debug (Debug-All): init
+ netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::CONNECTION, conn=[orig_h=192.168.18.50, orig_p=56981/tcp, resp_h=74.125.239.97, resp_p=443/tcp], flow=, ip=, mac=], expire=20.0 secs, priority=0, location=, out_port=, mod=, id=2, cid=2, _plugin_ids={\x0a\x0a}, _active_plugin_ids={\x0a\x0a}, _no_expire_plugins={\x0a\x0a}, _added=F]
+
+ $ cat netcontrol.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path netcontrol
+ #open 2018-12-14-18-50-53
+ #fields ts rule_id category cmd state action target entity_type entity mod msg priority expire location plugin
+ #types time string enum string enum string enum string string string string int interval string string
+ 0.000000 - NetControl::MESSAGE - - - - - - - activating plugin with priority 0 - - - Debug-All
+ 0.000000 - NetControl::MESSAGE - - - - - - - activation finished - - - Debug-All
+ 0.000000 - NetControl::MESSAGE - - - - - - - plugin initialization done - - - -
+ 1398529018.678276 2 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::CONNECTION 192.168.18.50/56981<->74.125.239.97/443 - - 0 20.000000 - Debug-All
+ 1398529018.678276 2 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::CONNECTION 192.168.18.50/56981<->74.125.239.97/443 - - 0 20.000000 - Debug-All
+ #close 2018-12-14-18-50-53
In our case, `netcontrol.log` contains several :bro:see:`NetControl::MESSAGE`
entries, which show that the debug plugin has been initialized and added.
@@ -159,39 +177,99 @@ additional log called `netcontrol_drop.log`. This log file is much more succinct
only contains information that is specific to drops that are enacted by
NetControl:
-.. btest:: netcontrol-1-drop-with-debug.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd cat netcontrol_drop.log
+ $ cat netcontrol_drop.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path netcontrol_drop
+ #open 2018-12-14-18-50-53
+ #fields ts rule_id orig_h orig_p resp_h resp_p expire location
+ #types time string addr port addr port interval string
+ 1398529018.678276 2 192.168.18.50 56981 74.125.239.97 443 20.000000 -
+ #close 2018-12-14-18-50-53
While this example of blocking all connections is usually not very useful, the
high-level API gives an easy way to take action, for example when a host is
identified doing some harmful activity. To give a more realistic example, the
following code automatically blocks a recognized SSH guesser:
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-2-ssh-guesser.bro
+.. literalinclude:: netcontrol-2-ssh-guesser.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: netcontrol-2-ssh-guesser.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -C -r ${TRACES}/ssh/sshguess.pcap ${DOC_ROOT}/frameworks/netcontrol-2-ssh-guesser.bro
- @TEST-EXEC: btest-rst-cmd cat netcontrol.log
+ $ bro -C -r ssh/sshguess.pcap netcontrol-2-ssh-guesser.bro
+ netcontrol debug (Debug-All): init
+ netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=192.168.56.1/32, mac=], expire=1.0 hr, priority=0, location=, out_port=, mod=, id=2, cid=2, _plugin_ids={\x0a\x0a}, _active_plugin_ids={\x0a\x0a}, _no_expire_plugins={\x0a\x0a}, _added=F]
+
+ $ cat netcontrol.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path netcontrol
+ #open 2018-12-14-18-50-54
+ #fields ts rule_id category cmd state action target entity_type entity mod msg priority expire location plugin
+ #types time string enum string enum string enum string string string string int interval string string
+ 0.000000 - NetControl::MESSAGE - - - - - - - activating plugin with priority 0 - - - Debug-All
+ 0.000000 - NetControl::MESSAGE - - - - - - - activation finished - - - Debug-All
+ 0.000000 - NetControl::MESSAGE - - - - - - - plugin initialization done - - - -
+ 1427726759.303199 2 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 192.168.56.1/32 - - 0 3600.000000 - Debug-All
+ 1427726759.303199 2 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 192.168.56.1/32 - - 0 3600.000000 - Debug-All
+ #close 2018-12-14-18-50-54
Note that in this case, instead of calling NetControl directly, we also can use
the :bro:see:`Notice::ACTION_DROP` action of the notice framework:
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-3-ssh-guesser.bro
+.. literalinclude:: netcontrol-3-ssh-guesser.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: netcontrol-3-ssh-guesser.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -C -r ${TRACES}/ssh/sshguess.pcap ${DOC_ROOT}/frameworks/netcontrol-3-ssh-guesser.bro
- @TEST-EXEC: btest-rst-cmd cat netcontrol.log
+ $ bro -C -r ssh/sshguess.pcap netcontrol-3-ssh-guesser.bro
+ netcontrol debug (Debug-All): init
+ netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=192.168.56.1/32, mac=], expire=10.0 mins, priority=0, location=ACTION_DROP: T, out_port=, mod=, id=2, cid=2, _plugin_ids={\x0a\x0a}, _active_plugin_ids={\x0a\x0a}, _no_expire_plugins={\x0a\x0a}, _added=F]
+
+ $ cat netcontrol.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path netcontrol
+ #open 2018-12-14-18-50-55
+ #fields ts rule_id category cmd state action target entity_type entity mod msg priority expire location plugin
+ #types time string enum string enum string enum string string string string int interval string string
+ 0.000000 - NetControl::MESSAGE - - - - - - - activating plugin with priority 0 - - - Debug-All
+ 0.000000 - NetControl::MESSAGE - - - - - - - activation finished - - - Debug-All
+ 0.000000 - NetControl::MESSAGE - - - - - - - plugin initialization done - - - -
+ 1427726759.303199 2 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 192.168.56.1/32 - - 0 600.000000 ACTION_DROP: T Debug-All
+ 1427726759.303199 2 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 192.168.56.1/32 - - 0 600.000000 ACTION_DROP: T Debug-All
+ #close 2018-12-14-18-50-55
Using the :bro:see:`Notice::ACTION_DROP` action of the notice framework also
will cause the `dropped` column in `notice.log` to be set to true each time that
the NetControl framework enacts a block:
-.. btest:: netcontrol-3-ssh-guesser.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd cat notice.log
+ $ cat notice.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path notice
+ #open 2018-12-14-18-50-55
+ #fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc proto note msg sub src dst p n peer_descr actions suppress_for dropped remote_location.country_code remote_location.region remote_location.city remote_location.latitude remote_location.longitude
+ #types time string addr port addr port string string string enum enum string string addr addr port count string set[enum] interval bool string string string double double
+ 1427726759.303199 - - - - - - - - - SSH::Password_Guessing 192.168.56.1 appears to be guessing SSH passwords (seen in 10 connections). Sampled servers: 192.168.56.103, 192.168.56.103, 192.168.56.103, 192.168.56.103, 192.168.56.103 192.168.56.1 - - - - Notice::ACTION_DROP,Notice::ACTION_LOG 3600.000000 F - - - - -
+ #close 2018-12-14-18-50-55
Rule API
--------
@@ -241,12 +319,32 @@ that the NetControl function has additional functionality, e.g. for logging.
Once again, we are going to test our function with a simple example that simply
drops all connections on the network:
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-4-drop.bro
+.. literalinclude:: netcontrol-4-drop.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: netcontrol-4-drop.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -C -r ${TRACES}/tls/ecdhe.pcap ${DOC_ROOT}/frameworks/netcontrol-4-drop.bro
- @TEST-EXEC: btest-rst-cmd cat netcontrol.log
+ $ bro -C -r tls/ecdhe.pcap netcontrol-4-drop.bro
+ netcontrol debug (Debug-All): init
+ netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::CONNECTION, conn=[orig_h=192.168.18.50, orig_p=56981/tcp, resp_h=74.125.239.97, resp_p=443/tcp], flow=, ip=, mac=], expire=20.0 secs, priority=0, location=, out_port=, mod=, id=2, cid=2, _plugin_ids={\x0a\x0a}, _active_plugin_ids={\x0a\x0a}, _no_expire_plugins={\x0a\x0a}, _added=F]
+
+ $ cat netcontrol.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path netcontrol
+ #open 2018-12-14-18-50-55
+ #fields ts rule_id category cmd state action target entity_type entity mod msg priority expire location plugin
+ #types time string enum string enum string enum string string string string int interval string string
+ 0.000000 - NetControl::MESSAGE - - - - - - - activating plugin with priority 0 - - - Debug-All
+ 0.000000 - NetControl::MESSAGE - - - - - - - activation finished - - - Debug-All
+ 0.000000 - NetControl::MESSAGE - - - - - - - plugin initialization done - - - -
+ 1398529018.678276 2 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::CONNECTION 192.168.18.50/56981<->74.125.239.97/443 - - 0 20.000000 - Debug-All
+ 1398529018.678276 2 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::CONNECTION 192.168.18.50/56981<->74.125.239.97/443 - - 0 20.000000 - Debug-All
+ #close 2018-12-14-18-50-55
The last example shows that :bro:see:`NetControl::add_rule` returns a string
identifier that is unique for each rule (uniqueness is not preserved across
@@ -281,11 +379,16 @@ discarded before further processing.
Here is a simple example which tells Bro to discard all rules for connections
originating from the 192.168.* network:
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-5-hook.bro
+.. literalinclude:: netcontrol-5-hook.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: netcontrol-5-hook.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -C -r ${TRACES}/tls/ecdhe.pcap ${DOC_ROOT}/frameworks/netcontrol-5-hook.bro
+ $ bro -C -r tls/ecdhe.pcap netcontrol-5-hook.bro
+ netcontrol debug (Debug-All): init
+ Ignored connection from, 192.168.18.50
NetControl Events
*****************
@@ -355,11 +458,18 @@ Here is a simple example, which uses a trace that contains two connections from
the same IP address. After the first connection, the script recognizes that the
address is already blocked in the second connection.
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-6-find.bro
+.. literalinclude:: netcontrol-6-find.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: netcontrol-6-find.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -C -r ${TRACES}/tls/google-duplicate.trace ${DOC_ROOT}/frameworks/netcontrol-6-find.bro
+ $ bro -C -r tls/google-duplicate.trace netcontrol-6-find.bro
+ netcontrol debug (Debug-All): init
+ netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::CONNECTION, conn=[orig_h=192.168.4.149, orig_p=60623/tcp, resp_h=74.125.239.129, resp_p=443/tcp], flow=, ip=, mac=], expire=20.0 secs, priority=0, location=, out_port=, mod=, id=2, cid=2, _plugin_ids={\x0a\x0a}, _active_plugin_ids={\x0a\x0a}, _no_expire_plugins={\x0a\x0a}, _added=F]
+ Rule added
+ Rule already exists
Notice that the functions return vectors because it is possible that several
rules exist simultaneously that affect one IP; either there could be
@@ -402,11 +512,16 @@ release is contained in the file
Using catch and release in your scripts is easy; just use
:bro:see:`NetControl::drop_address_catch_release` like in this example:
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-7-catch-release.bro
+.. literalinclude:: netcontrol-7-catch-release.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: netcontrol-7-catch-release.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -C -r ${TRACES}/tls/ecdhe.pcap ${DOC_ROOT}/frameworks/netcontrol-7-catch-release.bro
+ $ bro -C -r tls/ecdhe.pcap netcontrol-7-catch-release.bro
+ netcontrol debug (Debug-All): init
+ netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=192.168.18.50/32, mac=], expire=10.0 mins, priority=0, location=, out_port=, mod=, id=2, cid=2, _plugin_ids={\x0a\x0a}, _active_plugin_ids={\x0a\x0a}, _no_expire_plugins={\x0a\x0a}, _added=F]
Note that you do not have to provide the block time for catch and release;
instead, catch and release uses the time intervals specified in
@@ -418,9 +533,20 @@ first 10 minutes, it is blocked for 1 hour and then monitored for 24 hours, etc.
Catch and release adds its own new logfile in addition to the already existing
ones (netcontrol_catch_release.log):
-.. btest:: netcontrol-7-catch-release.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd cat netcontrol_catch_release.log
+ $ cat netcontrol_catch_release.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path netcontrol_catch_release
+ #open 2018-12-14-18-50-58
+ #fields ts rule_id ip action block_interval watch_interval blocked_until watched_until num_blocked location message
+ #types time string addr enum interval interval time time count string string
+ 1398529018.678276 2 192.168.18.50 NetControl::DROP 600.000000 3600.000000 1398529618.678276 1398532618.678276 1 - -
+ 1398529018.678276 2 192.168.18.50 NetControl::DROPPED 600.000000 3600.000000 1398529618.678276 1398532618.678276 1 - -
+ #close 2018-12-14-18-50-58
In addition to the blocking function, catch and release comes with the
:bro:see:`NetControl::get_catch_release_info` function to
@@ -531,27 +657,65 @@ the 192.168.17.0/24 network; all other rules will be passed on to the debug
plugin. We manually block a few addresses in the
:bro:see:`NetControl::init_done` event to verify the correct functionality.
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-8-multiple.bro
+.. literalinclude:: netcontrol-8-multiple.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: netcontrol-8-multiple.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro ${DOC_ROOT}/frameworks/netcontrol-8-multiple.bro
+ $ bro netcontrol-8-multiple.bro
+ netcontrol debug (Debug-All): init
+ netcontrol debug (Debug-All): add_rule: [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::ADDRESS, conn=, flow=, ip=192.168.17.2/32, mac=], expire=1.0 min, priority=0, location=, out_port=, mod=, id=3, cid=3, _plugin_ids={\x0a\x0a}, _active_plugin_ids={\x0a\x0a}, _no_expire_plugins={\x0a\x0a}, _added=F]
As you can see, only the single block affecting the 192.168.17.0/24 network is
output to the command line. The other two lines are handled by the OpenFlow
plugin. We can verify this by looking at netcontrol.log. The plugin column shows
which plugin handled a rule and reveals that two rules were handled by OpenFlow:
-.. btest:: netcontrol-8-multiple.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd cat netcontrol.log
+ $ cat netcontrol.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path netcontrol
+ #open 2018-12-14-18-50-58
+ #fields ts rule_id category cmd state action target entity_type entity mod msg priority expire location plugin
+ #types time string enum string enum string enum string string string string int interval string string
+ 1544813458.913148 - NetControl::MESSAGE - - - - - - - activating plugin with priority 0 - - - Debug-All
+ 1544813458.913148 - NetControl::MESSAGE - - - - - - - activation finished - - - Debug-All
+ 1544813458.913148 - NetControl::MESSAGE - - - - - - - activating plugin with priority 10 - - - Openflow-Log-42
+ 1544813458.913148 - NetControl::MESSAGE - - - - - - - activation finished - - - Openflow-Log-42
+ 1544813458.913148 - NetControl::MESSAGE - - - - - - - plugin initialization done - - - -
+ 1544813458.913148 2 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.0.0.1/32 - - 0 60.000000 - Openflow-Log-42
+ 1544813458.913148 3 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 192.168.17.2/32 - - 0 60.000000 - Debug-All
+ 1544813458.913148 4 NetControl::RULE ADD NetControl::REQUESTED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 192.168.18.2/32 - - 0 60.000000 - Openflow-Log-42
+ 1544813458.913148 3 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 192.168.17.2/32 - - 0 60.000000 - Debug-All
+ 1544813458.913148 2 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 10.0.0.1/32 - - 0 60.000000 - Openflow-Log-42
+ 1544813458.913148 4 NetControl::RULE ADD NetControl::SUCCEEDED NetControl::DROP NetControl::FORWARD NetControl::ADDRESS 192.168.18.2/32 - - 0 60.000000 - Openflow-Log-42
+ #close 2018-12-14-18-50-58
Furthermore, openflow.log also shows the two added rules, converted to OpenFlow
flow mods:
-.. btest:: netcontrol-8-multiple.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd cat openflow.log
+ $ cat openflow.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path openflow
+ #open 2018-12-14-18-50-58
+ #fields ts dpid match.in_port match.dl_src match.dl_dst match.dl_vlan match.dl_vlan_pcp match.dl_type match.nw_tos match.nw_proto match.nw_src match.nw_dst match.tp_src match.tp_dst flow_mod.cookie flow_mod.table_id flow_mod.command flow_mod.idle_timeout flow_mod.hard_timeout flow_mod.priority flow_mod.out_port flow_mod.out_group flow_mod.flags flow_mod.actions.out_ports flow_mod.actions.vlan_vid flow_mod.actions.vlan_pcp flow_mod.actions.vlan_strip flow_mod.actions.dl_src flow_mod.actions.dl_dst flow_mod.actions.nw_tos flow_mod.actions.nw_src flow_mod.actions.nw_dst flow_mod.actions.tp_src flow_mod.actions.tp_dst
+ #types time count count string string count count count count count subnet subnet count count count count enum count count count count count count vector[count] count count bool string string count addr addr count count
+ 1544813458.913148 42 - - - - - 2048 - - 10.0.0.1/32 - - - 4398046511108 - OpenFlow::OFPFC_ADD 0 60 0 - - 1 (empty) - - F - - - - - - -
+ 1544813458.913148 42 - - - - - 2048 - - - 10.0.0.1/32 - - 4398046511109 - OpenFlow::OFPFC_ADD 0 60 0 - - 1 (empty) - - F - - - - - - -
+ 1544813458.913148 42 - - - - - 2048 - - 192.168.18.2/32 - - - 4398046511112 - OpenFlow::OFPFC_ADD 0 60 0 - - 1 (empty) - - F - - - - - - -
+ 1544813458.913148 42 - - - - - 2048 - - - 192.168.18.2/32 - - 4398046511113 - OpenFlow::OFPFC_ADD 0 60 0 - - 1 (empty) - - F - - - - - - -
+ #close 2018-12-14-18-50-58
.. note::
@@ -613,16 +777,29 @@ raise the :bro:see:`NetControl::rule_added` and
:bro:see:`NetControl::rule_removed` events in your plugin to let NetControl know
when a rule was added and removed successfully.
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-9-skeleton.bro
+.. literalinclude:: netcontrol-9-skeleton.bro
+ :caption:
+ :language: bro
+ :linenos:
This example is already fully functional and we can use it with a script similar
to our very first example:
-.. btest-include:: ${DOC_ROOT}/frameworks/netcontrol-10-use-skeleton.bro
+.. literalinclude:: netcontrol-10-use-skeleton.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: netcontrol-9-skeleton.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -C -r ${TRACES}/tls/ecdhe.pcap ${DOC_ROOT}/frameworks/netcontrol-9-skeleton.bro ${DOC_ROOT}/frameworks/netcontrol-10-use-skeleton.bro
+ $ bro -C -r tls/ecdhe.pcap netcontrol-10-use-skeleton.bro
+ add, [ty=NetControl::DROP, target=NetControl::FORWARD, entity=[ty=NetControl::CONNECTION, conn=[orig_h=192.168.18.50, orig_p=56981/tcp, resp_h=74.125.239.97, resp_p=443/tcp], flow=, ip=, mac=], expire=20.0 secs, priority=0, location=, out_port=, mod=, id=2, cid=2, _plugin_ids={
+
+ }, _active_plugin_ids={
+
+ }, _no_expire_plugins={
+
+ }, _added=F]
If you want to write your own plugins, it will be worthwhile to look at the
plugins that ship with the NetControl framework to see how they define the
diff --git a/doc/frameworks/notice.rst b/doc/frameworks/notice.rst
index e37740dee1..c3c484cf4a 100644
--- a/doc/frameworks/notice.rst
+++ b/doc/frameworks/notice.rst
@@ -14,8 +14,6 @@ Notice Framework
alarm emails. This page gives an introduction into writing such a notice
policy.
-.. contents::
-
Overview
--------
@@ -91,12 +89,25 @@ Here's a simple example which tells Bro to send an email for all notices of
type :bro:see:`SSH::Password_Guessing` if the guesser attempted to log in to
the server at 192.168.56.103:
-.. btest-include:: ${DOC_ROOT}/frameworks/notice_ssh_guesser.bro
+.. literalinclude:: notice_ssh_guesser.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: notice_ssh_guesser.bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -C -r ${TRACES}/ssh/sshguess.pcap ${DOC_ROOT}/frameworks/notice_ssh_guesser.bro
- @TEST-EXEC: btest-rst-cmd cat notice.log
+ $ bro -C -r ssh/sshguess.pcap notice_ssh_guesser.bro
+ $ cat notice.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path notice
+ #open 2018-12-13-22-56-35
+ #fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc proto note msg sub src dst p n peer_descr actions suppress_for dropped remote_location.country_code remote_location.region remote_location.city remote_location.latitude remote_location.longitude
+ #types time string addr port addr port string string string enum enum string string addr addr port count string set[enum] interval bool string string string double double
+ 1427726759.303199 - - - - - - - - - SSH::Password_Guessing 192.168.56.1 appears to be guessing SSH passwords (seen in 10 connections). Sampled servers: 192.168.56.103, 192.168.56.103, 192.168.56.103, 192.168.56.103, 192.168.56.103 192.168.56.1 - - - - Notice::ACTION_EMAIL,Notice::ACTION_LOG 3600.000000 F - - - - -
+ #close 2018-12-13-22-56-35
.. note::
@@ -108,7 +119,7 @@ Hooks can also have priorities applied to order their execution like events
with a default priority of 0. Greater values are executed first. Setting
a hook body to run before default hook bodies might look like this:
-.. code:: bro
+.. sourcecode:: bro
hook Notice::policy(n: Notice::Info) &priority=5
{
@@ -178,7 +189,7 @@ SSH analysis scripts sees enough failed logins to a given host, it
raises a notice of the type :bro:see:`SSH::Password_Guessing`. The code
in the base SSH analysis script which raises the notice looks like this:
-.. code:: bro
+.. sourcecode:: bro
NOTICE([$note=Password_Guessing,
$msg=fmt("%s appears to be guessing SSH passwords (seen in %d connections).", key$host, r$num),
@@ -289,7 +300,7 @@ for session negotiations where the certificate or certificate chain did
not validate successfully against the available certificate authority
certificates.
-.. code:: bro
+.. sourcecode:: bro
NOTICE([$note=SSL::Invalid_Server_Cert,
$msg=fmt("SSL certificate validation failed with (%s)", c$ssl$validation_status),
@@ -335,7 +346,7 @@ There is a field in the :bro:see:`Notice::Info` record named
sent. An example of including some information from an HTTP request is
included below.
-.. code:: bro
+.. sourcecode:: bro
hook Notice::policy(n: Notice::Info)
{
diff --git a/doc/frameworks/signatures.rst b/doc/frameworks/signatures.rst
index 1443f76ba1..c39c5d050e 100644
--- a/doc/frameworks/signatures.rst
+++ b/doc/frameworks/signatures.rst
@@ -14,15 +14,10 @@ Signature Framework
other NIDS. This page gives a brief overview on Bro's signatures
and covers some of their technical subtleties.
-.. contents::
- :depth: 2
-
Basics
======
-Let's look at an example signature first:
-
-.. code:: bro-sig
+Let's look at an example signature first::
signature my-first-sig {
ip-proto == tcp
@@ -36,7 +31,7 @@ This signature asks Bro to match the regular expression ``.*root`` on
all TCP connections going to port 80. When the signature triggers, Bro
will raise an event :bro:id:`signature_match` of the form:
-.. code:: bro
+.. sourcecode:: bro
event signature_match(state: signature_state, msg: string, data: string)
@@ -117,9 +112,7 @@ evaluates to true, the whole header condition matches (exception: with
``!=``, the header condition only matches if all values differ).
In addition to these pre-defined header keywords, a general header
-condition can be defined either as
-
-.. code:: bro-sig
+condition can be defined either as::
header [:] [& ]
@@ -141,9 +134,7 @@ are not allowed in the value-list, though you can still inspect any 1,
2, or 4 byte section of an IPv6 header using this keyword.
Putting it all together, this is an example condition that is
-equivalent to ``dst-ip == 1.2.3.4/16, 5.6.7.8/24``:
-
-.. code:: bro-sig
+equivalent to ``dst-ip == 1.2.3.4/16, 5.6.7.8/24``::
header ip[16:4] == 1.2.3.4/16, 5.6.7.8/24
@@ -162,9 +153,7 @@ Second, it may be prefixed with an analyzer-specific label, in which
case the expression is matched against the data as extracted by the
corresponding analyzer.
-A ``payload`` condition has the form:
-
-.. code:: bro-sig
+A ``payload`` condition has the form::
payload //
@@ -272,7 +261,7 @@ two actions defined:
Raises a :bro:id:`signature_match` event. The event handler has the
following type:
- .. code:: bro
+ .. sourcecode:: bro
event signature_match(state: signature_state, msg: string, data: string)
diff --git a/doc/frameworks/sumstats.rst b/doc/frameworks/sumstats.rst
index aaed35be29..d017d87dcf 100644
--- a/doc/frameworks/sumstats.rst
+++ b/doc/frameworks/sumstats.rst
@@ -17,8 +17,6 @@ Summary Statistics
data sets and making them measurable in practice on large clustered and
non-clustered Bro deployments.
-.. contents::
-
Overview
========
@@ -73,15 +71,18 @@ Sumstats provides a simple way of approaching the problem of trying to count
the number of connections over a given time interval. Here is a script with
inline documentation that does this with the Sumstats framework:
-.. btest-include:: ${DOC_ROOT}/frameworks/sumstats-countconns.bro
+.. literalinclude:: sumstats-countconns.bro
+ :caption:
+ :language: bro
+ :linenos:
When run on a sample PCAP file from the Bro test suite, the following output
is created:
-.. btest:: sumstats-countconns
-
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/workshop_2011_browse.trace ${DOC_ROOT}/frameworks/sumstats-countconns.bro
+.. sourcecode:: console
+ $ bro -r workshop_2011_browse.trace sumstats-countconns.bro
+ Number of connections established: 6
Toy scan detection
------------------
@@ -92,14 +93,18 @@ demonstrate how thresholding works in Sumstats and is not meant to be a
real-world functional example, that is left to the
:doc:`/scripts/policy/misc/scan.bro` script that is included with Bro.
-.. btest-include:: ${DOC_ROOT}/frameworks/sumstats-toy-scan.bro
+.. literalinclude:: sumstats-toy-scan.bro
+ :caption:
+ :language: bro
+ :linenos:
Let's see if there are any hosts that crossed the threshold in a PCAP file
containing a host running nmap:
-.. btest:: sumstats-toy-scan
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/nmap-vsn.trace ${DOC_ROOT}/frameworks/sumstats-toy-scan.bro
+ $ bro -r nmap-vsn.trace sumstats-toy-scan.bro
+ 192.168.1.71 attempted 5 or more connections
It seems the host running nmap was detected!
diff --git a/doc/httpmonitor/index.rst b/doc/httpmonitor/index.rst
index 5a4f28ebfe..caf51f507f 100644
--- a/doc/httpmonitor/index.rst
+++ b/doc/httpmonitor/index.rst
@@ -1,9 +1,9 @@
.. _http-monitor:
-================================
-Monitoring HTTP Traffic with Bro
-================================
+=======================
+Monitoring HTTP Traffic
+=======================
Bro can be used to log the entire HTTP traffic from your network to the
http.log file. This file can then be used for analysis and auditing
@@ -84,31 +84,43 @@ use this to identify a proxy server.
We can write a basic script in Bro to handle the http_reply event and
detect a reply for a ``GET http://`` request.
-.. btest-include:: ${DOC_ROOT}/httpmonitor/http_proxy_01.bro
+.. literalinclude:: http_proxy_01.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: http_proxy_01
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/http/proxy.pcap ${DOC_ROOT}/httpmonitor/http_proxy_01.bro
+ $ bro -r http/proxy.pcap http_proxy_01.bro
+ A local server is acting as an open proxy: 192.168.56.101
Basically, the script is checking for a "200 OK" status code on a reply
for a request that includes "http:" (case insensitive). In reality, the
HTTP protocol defines several success status codes other than 200, so we
will extend our basic script to also consider the additional codes.
-.. btest-include:: ${DOC_ROOT}/httpmonitor/http_proxy_02.bro
+.. literalinclude:: http_proxy_02.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: http_proxy_02
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/http/proxy.pcap ${DOC_ROOT}/httpmonitor/http_proxy_02.bro
+ $ bro -r http/proxy.pcap http_proxy_02.bro
+ A local server is acting as an open proxy: 192.168.56.101
Next, we will make sure that the responding proxy is part of our local
network.
-.. btest-include:: ${DOC_ROOT}/httpmonitor/http_proxy_03.bro
+.. literalinclude:: http_proxy_03.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: http_proxy_03
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/http/proxy.pcap ${DOC_ROOT}/httpmonitor/http_proxy_03.bro
+ $ bro -r http/proxy.pcap http_proxy_03.bro
+ A local server is acting as an open proxy: 192.168.56.101
.. note::
@@ -123,12 +135,25 @@ we will tag the traffic accordingly and define a new ``Open_Proxy``
notification has been fired, we will further suppress it for one day.
Below is the complete script.
-.. btest-include:: ${DOC_ROOT}/httpmonitor/http_proxy_04.bro
+.. literalinclude:: http_proxy_04.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: http_proxy_04
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/http/proxy.pcap ${DOC_ROOT}/httpmonitor/http_proxy_04.bro
- @TEST-EXEC: btest-rst-include notice.log
+ $ bro -r http/proxy.pcap http_proxy_04.bro
+ $ cat notice.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path notice
+ #open 2018-12-13-22-56-39
+ #fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc proto note msg sub src dst p n peer_descr actions suppress_for dropped remote_location.country_code remote_location.region remote_location.city remote_location.latitude remote_location.longitude
+ #types time string addr port addr port string string string enum enum string string addr addr port count string set[enum] interval bool string string string double double
+ 1389654450.449603 CHhAvVGS1DHFjwGM9 192.168.56.1 52679 192.168.56.101 80 - - - tcp HTTP::Open_Proxy A local server is acting as an open proxy: 192.168.56.101 - 192.168.56.1 192.168.56.101 80 - - Notice::ACTION_LOG 86400.000000 F - - - - -
+ #close 2018-12-13-22-56-40
Note that this script only logs the presence of the proxy to
``notice.log``, but if an additional email is desired (and email
@@ -148,11 +173,20 @@ instruct Bro to create a copy of all files of certain types that it sees
using the :ref:`File Analysis Framework `
(introduced with Bro 2.2):
-.. btest-include:: ${DOC_ROOT}/httpmonitor/file_extraction.bro
+.. literalinclude:: file_extraction.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: file_extraction
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd -n 5 bro -r ${TRACES}/http/bro.org.pcap ${DOC_ROOT}/httpmonitor/file_extraction.bro
+ $ bro -r bro.org.pcap file_extraction.bro
+ Extracting file HTTP-FiIpIB2hRQSDBOSJRg.html
+ Extracting file HTTP-FMG4bMmVV64eOsCb.txt
+ Extracting file HTTP-FnaT2a3UDd093opCB9.txt
+ Extracting file HTTP-FfQGqj4Fhh3pH7nVQj.txt
+ Extracting file HTTP-FsvATF146kf1Emc21j.txt
+ [...]
Here, the ``mime_to_ext`` table serves two purposes. It defines which
mime types to extract and also the file suffix of the extracted files.
diff --git a/doc/index.rst b/doc/index.rst
index 22fb8cbe1a..d13a8e51bd 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,9 +1,7 @@
-.. Bro documentation master file
-
-==========
-Bro Manual
-==========
+===========
+Zeek Manual
+===========
Introduction Section
====================
@@ -21,8 +19,8 @@ Introduction Section
.. _using-bro:
-Using Bro Section
-=================
+Using Zeek/Bro Section
+======================
.. toctree::
:maxdepth: 2
diff --git a/doc/install/changes.rst b/doc/install/changes.rst
index ad26cfde1a..b20831d977 100644
--- a/doc/install/changes.rst
+++ b/doc/install/changes.rst
@@ -3,8 +3,6 @@
Detailed Version History
========================
-.. contents::
-
---
Bro
---
diff --git a/doc/install/cross-compiling.rst b/doc/install/cross-compiling.rst
index d47bd83fc0..3fe9814f1a 100644
--- a/doc/install/cross-compiling.rst
+++ b/doc/install/cross-compiling.rst
@@ -1,11 +1,9 @@
.. _crosstool-NG: https://crosstool-ng.github.io/
.. _CMake toolchain: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
-===================
-Cross Compiling Bro
-===================
-
-.. contents::
+===============
+Cross Compiling
+===============
Prerequisites
=============
@@ -25,14 +23,14 @@ You first need to compile a few build tools native to the host system
for use during the later cross-compile build. In the root of your
Bro source tree:
-.. console::
+.. sourcecode:: console
./configure --builddir=../bro-buildtools
( cd ../bro-buildtools && make binpac bifcl )
Next configure Bro to use your cross-compilation toolchain:
-.. console::
+.. sourcecode:: console
./configure --toolchain=/home/jon/x-tools/RaspberryPi-toolchain.cmake --with-binpac=$(pwd)/../bro-buildtools/aux/binpac/src/binpac --with-bifcl=$(pwd)/../bro-buildtools/src/bifcl
@@ -71,13 +69,13 @@ something the following (using a Raspberry Pi as target system)::
If that configuration succeeds you are ready to build:
-.. console::
+.. sourcecode:: console
make
And if that works, install on your host system:
-.. console::
+.. sourcecode:: console
make install
diff --git a/doc/install/install.rst b/doc/install/install.rst
index 5901a4c605..76faf0d653 100644
--- a/doc/install/install.rst
+++ b/doc/install/install.rst
@@ -8,11 +8,9 @@
.. _installing-bro:
-==============
-Installing Bro
-==============
-
-.. contents::
+==========
+Installing
+==========
Prerequisites
=============
@@ -50,13 +48,13 @@ To install the required dependencies, you can use:
* RPM/RedHat-based Linux:
- .. console::
+ .. sourcecode:: console
sudo yum install cmake make gcc gcc-c++ flex bison libpcap-devel openssl-devel python-devel swig zlib-devel
* DEB/Debian-based Linux:
- .. console::
+ .. sourcecode:: console
sudo apt-get install cmake make gcc g++ flex bison libpcap-dev libssl-dev python-dev swig zlib1g-dev
@@ -68,7 +66,7 @@ To install the required dependencies, you can use:
Most required dependencies should come with a minimal FreeBSD install
except for the following.
- .. console::
+ .. sourcecode:: console
sudo pkg install bash cmake swig30 bison python py27-sqlite3 py27-ipaddress
@@ -152,7 +150,7 @@ hosted at https://github.com/zeek. See our `git development documentation
information on Bro's use of git revision control, but the short story
for downloading the full source code experience for Bro via git is:
-.. console::
+.. sourcecode:: console
git clone --recursive https://github.com/zeek/zeek
@@ -163,7 +161,7 @@ for downloading the full source code experience for Bro via git is:
The typical way to build and install from source is (for more options,
run ``./configure --help``):
-.. console::
+.. sourcecode:: console
./configure
make
@@ -214,13 +212,13 @@ according to the platform/shell/package you're using. For example:
Bourne-Shell Syntax:
-.. console::
+.. sourcecode:: console
export PATH=/usr/local/bro/bin:$PATH
C-Shell Syntax:
-.. console::
+.. sourcecode:: console
setenv PATH /usr/local/bro/bin:$PATH
diff --git a/doc/install/release-notes.rst b/doc/install/release-notes.rst
index e4aeec6db1..4870e0e5eb 100644
--- a/doc/install/release-notes.rst
+++ b/doc/install/release-notes.rst
@@ -5,8 +5,6 @@
Release Notes
=============
-.. contents::
-
.. include:: NEWS.rst
diff --git a/doc/install/upgrade.rst b/doc/install/upgrade.rst
index 29b64bdeca..94e40d6167 100644
--- a/doc/install/upgrade.rst
+++ b/doc/install/upgrade.rst
@@ -1,7 +1,7 @@
-=============
-Upgrading Bro
-=============
+=========
+Upgrading
+=========
.. toctree::
diff --git a/doc/intro/index.rst b/doc/intro/index.rst
index b58a4dbb5b..c3618aa241 100644
--- a/doc/intro/index.rst
+++ b/doc/intro/index.rst
@@ -3,8 +3,6 @@
Introduction
============
-.. contents::
-
Overview
--------
diff --git a/doc/logs/index.rst b/doc/logs/index.rst
index 6532b0f844..2a89246560 100644
--- a/doc/logs/index.rst
+++ b/doc/logs/index.rst
@@ -1,11 +1,9 @@
.. _bro-logging:
-===========
-Bro Logging
-===========
-
-.. contents::
+=======
+Logging
+=======
Once Bro has been deployed in an environment and monitoring live
traffic, it will, in its default configuration, begin to produce
@@ -39,13 +37,23 @@ to the appropriate log file.
As the fields of the log entries can be further customized by the
user, the Logging Framework makes use of a header block to ensure that
-it remains self-describing. This header entry can be see by running
-the Unix utility ``head`` and outputting the first lines of the file:
+it remains self-describing. Here's the first few lines of a ``conn.log``.
-.. btest:: using_bro
-
- @TEST-EXEC: btest-rst-cmd bro -r $TRACES/wikipedia.trace
- @TEST-EXEC: btest-rst-include -n 15 conn.log
+.. sourcecode:: console
+
+ $ cat conn.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path conn
+ #open 2018-12-10-22-18-00
+ #fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p proto service duration orig_bytes resp_bytes conn_state local_orig local_resp missed_bytes history orig_pkts orig_ip_bytes resp_pkts resp_ip_bytes tunnel_parents
+ #types time string addr port addr port enum string interval count count string bool bool count string count count count count set[string]
+ 1300475167.096535 CHhAvVGS1DHFjwGM9 141.142.220.202 5353 224.0.0.251 5353 udp dns - - - S0 - - 0 D 1 73 0 0 -
+ 1300475167.097012 ClEkJM2Vm5giqnMf4h fe80::217:f2ff:fed7:cf65 5353 ff02::fb 5353 udp dns - - - S0 - - 0 D 1 199 0 0 -
+ 1300475167.099816 C4J4Th3PJpwUYZZ6gc 141.142.220.50 5353 224.0.0.251 5353 udp dns - - - S0 - - 0 D 1 179 0 0 -
+ [...]
As you can see, the header consists of lines prefixed by ``#`` and
includes information such as what separators are being used for
@@ -129,15 +137,37 @@ require the user to refer to fields referenced by their position).
For example, the following command extracts just the given columns
from a ``conn.log``:
-.. btest:: using_bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd -n 10 "cat conn.log | bro-cut id.orig_h id.orig_p id.resp_h duration"
+ $ cat conn.log | bro-cut id.orig_h id.orig_p id.resp_h duration
+ 141.142.220.202 5353 224.0.0.251 -
+ fe80::217:f2ff:fed7:cf65 5353 ff02::fb -
+ 141.142.220.50 5353 224.0.0.251 -
+ 141.142.220.118 43927 141.142.2.2 0.000435
+ 141.142.220.118 37676 141.142.2.2 0.000420
+ 141.142.220.118 40526 141.142.2.2 0.000392
+ 141.142.220.118 32902 141.142.2.2 0.000317
+ 141.142.220.118 59816 141.142.2.2 0.000343
+ 141.142.220.118 59714 141.142.2.2 0.000375
+ 141.142.220.118 58206 141.142.2.2 0.000339
+ [...]
The corresponding ``awk`` command will look like this:
-.. btest:: using_bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd -n 10 awk \'/^[^#]/ {print \$3, \$4, \$5, \$6, \$9}\' conn.log
+ $ awk '/^[^#]/ {print $3, $4, $5, $6, $9}' conn.log
+ 141.142.220.202 5353 224.0.0.251 5353 -
+ fe80::217:f2ff:fed7:cf65 5353 ff02::fb 5353 -
+ 141.142.220.50 5353 224.0.0.251 5353 -
+ 141.142.220.118 43927 141.142.2.2 53 0.000435
+ 141.142.220.118 37676 141.142.2.2 53 0.000420
+ 141.142.220.118 40526 141.142.2.2 53 0.000392
+ 141.142.220.118 32902 141.142.2.2 53 0.000317
+ 141.142.220.118 59816 141.142.2.2 53 0.000343
+ 141.142.220.118 59714 141.142.2.2 53 0.000375
+ 141.142.220.118 58206 141.142.2.2 53 0.000339
+ [...]
While the output is similar, the advantages to using bro-cut over
``awk`` lay in that, while ``awk`` is flexible and powerful, ``bro-cut``
@@ -191,17 +221,29 @@ includes the human readable time stamp, the unique identifier, the
HTTP ``Host``, and HTTP ``URI`` as extracted from the ``http.log``
file:
-.. btest:: using_bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd -n 5 "bro-cut -d ts uid host uri < http.log"
+ $ bro-cut -d ts uid host uri < http.log
+ 2011-03-18T19:06:08+0000 CUM0KZ3MLUfNB0cl11 bits.wikimedia.org /skins-1.5/monobook/main.css
+ 2011-03-18T19:06:08+0000 CwjjYJ2WqgTbAqiHl6 upload.wikimedia.org /wikipedia/commons/6/63/Wikipedia-logo.png
+ 2011-03-18T19:06:08+0000 C3eiCBGOLw3VtHfOj upload.wikimedia.org /wikipedia/commons/thumb/b/bb/Wikipedia_wordmark.svg/174px-Wikipedia_wordmark.svg.png
+ 2011-03-18T19:06:08+0000 Ck51lg1bScffFj34Ri upload.wikimedia.org /wikipedia/commons/b/bd/Bookshelf-40x201_6.png
+ 2011-03-18T19:06:08+0000 CtxTCR2Yer0FR1tIBg upload.wikimedia.org /wikipedia/commons/thumb/8/8a/Wikinews-logo.png/35px-Wikinews-logo.png
+ [...]
Often times log files from multiple sources are stored in UTC time to
allow easy correlation. Converting the timestamp from a log file to
UTC can be accomplished with the ``-u`` option:
-.. btest:: using_bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd -n 5 "bro-cut -u ts uid host uri < http.log"
+ $ bro-cut -u ts uid host uri < http.log
+ 2011-03-18T19:06:08+0000 CUM0KZ3MLUfNB0cl11 bits.wikimedia.org /skins-1.5/monobook/main.css
+ 2011-03-18T19:06:08+0000 CwjjYJ2WqgTbAqiHl6 upload.wikimedia.org /wikipedia/commons/6/63/Wikipedia-logo.png
+ 2011-03-18T19:06:08+0000 C3eiCBGOLw3VtHfOj upload.wikimedia.org /wikipedia/commons/thumb/b/bb/Wikipedia_wordmark.svg/174px-Wikipedia_wordmark.svg.png
+ 2011-03-18T19:06:08+0000 Ck51lg1bScffFj34Ri upload.wikimedia.org /wikipedia/commons/b/bd/Bookshelf-40x201_6.png
+ 2011-03-18T19:06:08+0000 CtxTCR2Yer0FR1tIBg upload.wikimedia.org /wikipedia/commons/thumb/8/8a/Wikinews-logo.png/35px-Wikinews-logo.png
+ [...]
The default time format when using the ``-d`` or ``-u`` is the
``strftime`` format string ``%Y-%m-%dT%H:%M:%S%z`` which results in a
@@ -211,9 +253,15 @@ using the ``-D`` and ``-U`` flags, using the standard ``strftime``
syntax. For example, to format the timestamp in the US-typical "Middle
Endian" you could use a format string of: ``%d-%m-%YT%H:%M:%S%z``
-.. btest:: using_bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd -n 5 "bro-cut -D %d-%m-%YT%H:%M:%S%z ts uid host uri < http.log"
+ $ bro-cut -D %d-%m-%YT%H:%M:%S%z ts uid host uri < http.log
+ 18-03-2011T19:06:08+0000 CUM0KZ3MLUfNB0cl11 bits.wikimedia.org /skins-1.5/monobook/main.css
+ 18-03-2011T19:06:08+0000 CwjjYJ2WqgTbAqiHl6 upload.wikimedia.org /wikipedia/commons/6/63/Wikipedia-logo.png
+ 18-03-2011T19:06:08+0000 C3eiCBGOLw3VtHfOj upload.wikimedia.org /wikipedia/commons/thumb/b/bb/Wikipedia_wordmark.svg/174px-Wikipedia_wordmark.svg.png
+ 18-03-2011T19:06:08+0000 Ck51lg1bScffFj34Ri upload.wikimedia.org /wikipedia/commons/b/bd/Bookshelf-40x201_6.png
+ 18-03-2011T19:06:08+0000 CtxTCR2Yer0FR1tIBg upload.wikimedia.org /wikipedia/commons/thumb/8/8a/Wikinews-logo.png/35px-Wikinews-logo.png
+ [...]
See ``man strfime`` for more options for the format string.
@@ -235,16 +283,22 @@ largest number of bytes from the responder by redirecting the output
for ``cat conn.log`` into bro-cut to extract the UID and the
resp_bytes, then sorting that output by the resp_bytes field.
-.. btest:: using_bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd "cat conn.log | bro-cut uid resp_bytes | sort -nrk2 | head -5"
+ $ cat conn.log | bro-cut uid resp_bytes | sort -nrk2 | head -5
+ CwjjYJ2WqgTbAqiHl6 734
+ CtxTCR2Yer0FR1tIBg 734
+ Ck51lg1bScffFj34Ri 734
+ CLNN1k2QMum1aexUK7 734
+ CykQaM33ztNt0csB9a 733
Taking the UID of the first of the top responses, we can now
crossreference that with the UIDs in the ``http.log`` file.
-.. btest:: using_bro
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd "cat http.log | bro-cut uid id.resp_h method status_code host uri | grep UM0KZ3MLUfNB0cl11"
+ $ cat http.log | bro-cut uid id.resp_h method status_code host uri | grep UM0KZ3MLUfNB0cl11
+ CUM0KZ3MLUfNB0cl11 208.80.152.118 GET 304 bits.wikimedia.org /skins-1.5/monobook/main.css
As you can see there are two HTTP ``GET`` requests within the
session that Bro identified and logged. Given that HTTP is a stream
diff --git a/doc/mimestats/index.rst b/doc/mimestats/index.rst
index dd2e039e8a..4aba47dc9a 100644
--- a/doc/mimestats/index.rst
+++ b/doc/mimestats/index.rst
@@ -37,32 +37,69 @@ in the MIME type, size of the file ("response_body_len"), and the
originator host ("orig_h"). We use the MIME type as our key and create
observers for the other two values.
-.. btest-include:: ${DOC_ROOT}/mimestats/mimestats.bro
- :lines: 6-29, 54-64
+.. literalinclude:: mimestats.bro
+ :caption:
+ :language: bro
+ :linenos:
+ :lines: 6-29
+ :lineno-start: 6
+
+.. literalinclude:: mimestats.bro
+ :caption:
+ :language: bro
+ :linenos:
+ :lines: 54-64
+ :lineno-start: 54
Next, we create the reducers. The first will accumulate file sizes
and the second will make sure we only store a host ID once. Below is
the partial code from a :bro:see:`bro_init` handler.
-.. btest-include:: ${DOC_ROOT}/mimestats/mimestats.bro
- :lines: 34-37
+.. literalinclude:: mimestats.bro
+ :caption:
+ :language: bro
+ :linenos:
+ :lines: 34-37
+ :lineno-start: 34
In our final step, we create the SumStats where we check for the
observation interval. Once it expires, we populate the record
(defined above) with all the relevant data and write it to a log.
-.. btest-include:: ${DOC_ROOT}/mimestats/mimestats.bro
- :lines: 38-51
+.. literalinclude:: mimestats.bro
+ :caption:
+ :language: bro
+ :linenos:
+ :lines: 38-51
+ :lineno-start: 38
-After putting the three pieces together we end up with the following final code for
-our script.
+After putting the three pieces together we end up with the following
+final code for our script.
-.. btest-include:: ${DOC_ROOT}/mimestats/mimestats.bro
+.. literalinclude:: mimestats.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: mimestats
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/http/bro.org.pcap ${DOC_ROOT}/mimestats/mimestats.bro
- @TEST-EXEC: btest-rst-include mime_metrics.log
+ $ bro -r http/bro.org.pcap mimestats.bro
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path mime_metrics
+ #open 2018-12-14-16-25-06
+ #fields ts ts_delta mtype uniq_hosts hits bytes
+ #types time interval string count count count
+ 1389719059.311698 300.000000 image/png 1 9 82176
+ 1389719059.311698 300.000000 image/gif 1 1 172
+ 1389719059.311698 300.000000 image/x-icon 1 2 2300
+ 1389719059.311698 300.000000 text/html 1 2 42231
+ 1389719059.311698 300.000000 text/plain 1 15 128001
+ 1389719059.311698 300.000000 image/jpeg 1 1 186859
+ 1389719059.311698 300.000000 application/pgp-signature 1 1 836
+ #close 2018-12-14-16-25-06
.. note::
diff --git a/doc/quickstart/index.rst b/doc/quickstart/index.rst
index bfad960726..33222f5a75 100644
--- a/doc/quickstart/index.rst
+++ b/doc/quickstart/index.rst
@@ -7,8 +7,6 @@
Quick Start Guide
=================
-.. contents::
-
Bro works on most modern, Unix-based systems and requires no custom
hardware. It can be downloaded in either pre-built binary package or
source code forms. See :ref:`installing-bro` for instructions on how to
@@ -44,20 +42,20 @@ installation that will manage a single Bro instance on the ``localhost``:
Now start the BroControl shell like:
-.. console::
+.. sourcecode:: console
broctl
Since this is the first-time use of the shell, perform an initial installation
of the BroControl configuration:
-.. console::
+.. sourcecode:: console
[BroControl] > install
Then start up a Bro instance:
-.. console::
+.. sourcecode:: console
[BroControl] > start
@@ -74,7 +72,7 @@ policy and output the results in ``$PREFIX/logs``.
You can leave it running for now, but to stop this Bro instance you would do:
-.. console::
+.. sourcecode:: console
[BroControl] > stop
@@ -200,7 +198,7 @@ Let's continue on our path to modify the behavior for the two SSL
notices. Looking at :doc:`/scripts/base/frameworks/notice/main.bro`,
we see that it advertises:
-.. code:: bro
+.. sourcecode:: bro
module Notice;
@@ -212,7 +210,7 @@ we see that it advertises:
That's exactly what we want to do for the first notice. Add to ``local.bro``:
-.. code:: bro
+.. sourcecode:: bro
redef Notice::ignored_types += { SSL::Invalid_Server_Cert };
@@ -226,7 +224,7 @@ Then go into the BroControl shell to check whether the configuration change
is valid before installing it and then restarting the Bro instance. The
"deploy" command does all of this automatically:
-.. console::
+.. sourcecode:: console
[BroControl] > deploy
checking configurations ...
@@ -255,12 +253,25 @@ action taken on notices can be user-defined.
In ``local.bro``, let's define a new ``policy`` hook handler body:
-.. btest-include:: ${DOC_ROOT}/quickstart/conditional-notice.bro
+.. literalinclude:: conditional-notice.bro
+ :caption:
+ :language: bro
+ :linenos:
-.. btest:: conditional-notice
+.. sourcecode:: console
- @TEST-EXEC: btest-rst-cmd bro -r ${TRACES}/tls/tls-expired-cert.trace ${DOC_ROOT}/quickstart/conditional-notice.bro
- @TEST-EXEC: btest-rst-cmd cat notice.log
+ $ bro -r tls/tls-expired-cert.trace conditional-notice.bro
+ $ cat notice.log
+ #separator \x09
+ #set_separator ,
+ #empty_field (empty)
+ #unset_field -
+ #path notice
+ #open 2018-12-14-17-36-05
+ #fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc proto note msg sub src dst p n peer_descr actions suppress_for dropped remote_location.country_code remote_location.region remote_location.city remote_location.latitude remote_location.longitude
+ #types time string addr port addr port string string string enum enum string string addr addr port count string set[enum] interval bool string string string double double
+ 1394745603.293028 CHhAvVGS1DHFjwGM9 192.168.4.149 60539 87.98.220.10 443 F1fX1R2cDOzbvg17ye - - tcp SSL::Certificate_Expired Certificate CN=www.spidh.org,OU=COMODO SSL,OU=Domain Control Validated expired at 2014-03-04-23:59:59.000000000 - 192.168.4.149 87.98.220.10 443 - - Notice::ACTION_EMAIL,Notice::ACTION_LOG 86400.000000 F - - - - -
+ #close 2018-12-14-17-36-05
You'll just have to trust the syntax for now, but what we've done is
first declare our own variable to hold a set of watched addresses,
@@ -312,7 +323,7 @@ Monitoring Live Traffic
Analyzing live traffic from an interface is simple:
-.. console::
+.. sourcecode:: console
bro -i en0
@@ -332,7 +343,7 @@ Reading Packet Capture (pcap) Files
Capturing packets from an interface and writing them to a file can be done
like this:
-.. console::
+.. sourcecode:: console
sudo tcpdump -i en0 -s 0 -w mypackets.trace
@@ -343,7 +354,7 @@ whole packets; in cases where it's not supported use ``-s 65535`` instead).
After a while of capturing traffic, kill the ``tcpdump`` (with ctrl-c),
and tell Bro to perform all the default analysis on the capture which primarily includes :
-.. console::
+.. sourcecode:: console
bro -r mypackets.trace
@@ -352,7 +363,7 @@ Bro will output log files into the working directory.
If you are interested in more detection, you can again load the ``local``
script that we include as a suggested configuration:
-.. console::
+.. sourcecode:: console
bro -r mypackets.trace local
@@ -361,7 +372,7 @@ Telling Bro Which Scripts to Load
A command-line invocation of Bro typically looks like:
-.. console::
+.. sourcecode:: console
bro
@@ -378,7 +389,7 @@ directories are included in the default search path for Bro scripts::
These prefix paths can be used to load scripts like this:
-.. console::
+.. sourcecode:: console
bro -r mypackets.trace frameworks/files/extract-all
@@ -407,7 +418,7 @@ customization" and is not overwritten when upgrades take place. To use
the site-specific ``local.bro`` script, just add it to the command-line (can
also be loaded through scripts with @load):
-.. console::
+.. sourcecode:: console
bro -i en0 local
@@ -416,7 +427,7 @@ This causes Bro to load a script that prints a warning about lacking the
information at the command line like this (supply your "local" subnets
in place of the example subnets):
-.. console::
+.. sourcecode:: console
bro -r mypackets.trace local "Site::local_nets += { 1.2.3.0/24, 5.6.7.0/24 }"
diff --git a/doc/script-reference/autogenerated-file-analyzer-index.rst b/doc/script-reference/autogenerated-file-analyzer-index.rst
new file mode 100644
index 0000000000..3f30afe165
--- /dev/null
+++ b/doc/script-reference/autogenerated-file-analyzer-index.rst
@@ -0,0 +1,946 @@
+File Analyzers
+==============
+
+.. bro:type:: Files::Tag
+
+ :Type: :bro:type:`enum`
+
+ .. bro:enum:: Files::ANALYZER_DATA_EVENT Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_ENTROPY Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_EXTRACT Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_MD5 Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_SHA1 Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_SHA256 Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_PE Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_UNIFIED2 Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_OCSP_REPLY Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_OCSP_REQUEST Files::Tag
+
+ .. bro:enum:: Files::ANALYZER_X509 Files::Tag
+
+Bro::FileDataEvent
+------------------
+
+Delivers file content
+
+Components
+++++++++++
+
+:bro:enum:`Files::ANALYZER_DATA_EVENT`
+
+Bro::FileEntropy
+----------------
+
+Entropy test file content
+
+Components
+++++++++++
+
+:bro:enum:`Files::ANALYZER_ENTROPY`
+
+Events
+++++++
+
+.. bro:id:: file_entropy
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, ent: :bro:type:`entropy_test_result`)
+
+ This event is generated each time file analysis performs
+ entropy testing on a file.
+
+
+ :f: The file.
+
+
+ :ent: The results of the entropy testing.
+
+
+Bro::FileExtract
+----------------
+
+Extract file content
+
+Components
+++++++++++
+
+:bro:enum:`Files::ANALYZER_EXTRACT`
+
+Events
+++++++
+
+.. bro:id:: file_extraction_limit
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, args: :bro:type:`Files::AnalyzerArgs`, limit: :bro:type:`count`, len: :bro:type:`count`)
+
+ This event is generated when a file extraction analyzer is about
+ to exceed the maximum permitted file size allowed by the
+ *extract_limit* field of :bro:see:`Files::AnalyzerArgs`.
+ The analyzer is automatically removed from file *f*.
+
+
+ :f: The file.
+
+
+ :args: Arguments that identify a particular file extraction analyzer.
+ This is only provided to be able to pass along to
+ :bro:see:`FileExtract::set_limit`.
+
+
+ :limit: The limit, in bytes, the extracted file is about to breach.
+
+
+ :len: The length of the file chunk about to be written.
+
+ .. bro:see:: Files::add_analyzer Files::ANALYZER_EXTRACT
+
+Functions
++++++++++
+
+.. bro:id:: FileExtract::__set_limit
+
+ :Type: :bro:type:`function` (file_id: :bro:type:`string`, args: :bro:type:`any`, n: :bro:type:`count`) : :bro:type:`bool`
+
+ :bro:see:`FileExtract::set_limit`.
+
+Bro::FileHash
+-------------
+
+Hash file content
+
+Components
+++++++++++
+
+:bro:enum:`Files::ANALYZER_MD5`
+
+:bro:enum:`Files::ANALYZER_SHA1`
+
+:bro:enum:`Files::ANALYZER_SHA256`
+
+Events
+++++++
+
+.. bro:id:: file_hash
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, kind: :bro:type:`string`, hash: :bro:type:`string`)
+
+ This event is generated each time file analysis generates a digest of the
+ file contents.
+
+
+ :f: The file.
+
+
+ :kind: The type of digest algorithm.
+
+
+ :hash: The result of the hashing.
+
+ .. bro:see:: Files::add_analyzer Files::ANALYZER_MD5
+ Files::ANALYZER_SHA1 Files::ANALYZER_SHA256
+
+Bro::PE
+-------
+
+Portable Executable analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Files::ANALYZER_PE`
+
+Events
+++++++
+
+.. bro:id:: pe_dos_header
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, h: :bro:type:`PE::DOSHeader`)
+
+ A :abbr:`PE (Portable Executable)` file DOS header was parsed.
+ This is the top-level header and contains information like the
+ size of the file, initial value of registers, etc.
+
+
+ :f: The file.
+
+
+ :h: The parsed DOS header information.
+
+ .. bro:see:: pe_dos_code pe_file_header pe_optional_header pe_section_header
+
+.. bro:id:: pe_dos_code
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, code: :bro:type:`string`)
+
+ A :abbr:`PE (Portable Executable)` file DOS stub was parsed.
+ The stub is a valid application that runs under MS-DOS, by default
+ to inform the user that the program can't be run in DOS mode.
+
+
+ :f: The file.
+
+
+ :code: The DOS stub
+
+ .. bro:see:: pe_dos_header pe_file_header pe_optional_header pe_section_header
+
+.. bro:id:: pe_file_header
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, h: :bro:type:`PE::FileHeader`)
+
+ A :abbr:`PE (Portable Executable)` file file header was parsed.
+ This header contains information like the target machine,
+ the timestamp when the file was created, the number of sections, and
+ pointers to other parts of the file.
+
+
+ :f: The file.
+
+
+ :h: The parsed file header information.
+
+ .. bro:see:: pe_dos_header pe_dos_code pe_optional_header pe_section_header
+
+.. bro:id:: pe_optional_header
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, h: :bro:type:`PE::OptionalHeader`)
+
+ A :abbr:`PE (Portable Executable)` file optional header was parsed.
+ This header is required for executable files, but not for object files.
+ It contains information like OS requirements to execute the file, the
+ original entry point address, and information needed to load the file
+ into memory.
+
+
+ :f: The file.
+
+
+ :h: The parsed optional header information.
+
+ .. bro:see:: pe_dos_header pe_dos_code pe_file_header pe_section_header
+
+.. bro:id:: pe_section_header
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, h: :bro:type:`PE::SectionHeader`)
+
+ A :abbr:`PE (Portable Executable)` file section header was parsed.
+ This header contains information like the section name, size, address,
+ and characteristics.
+
+
+ :f: The file.
+
+
+ :h: The parsed section header information.
+
+ .. bro:see:: pe_dos_header pe_dos_code pe_file_header pe_optional_header
+
+Bro::Unified2
+-------------
+
+Analyze Unified2 alert files.
+
+Components
+++++++++++
+
+:bro:enum:`Files::ANALYZER_UNIFIED2`
+
+Types
++++++
+
+.. bro:type:: Unified2::IDSEvent
+
+ :Type: :bro:type:`record`
+
+ sensor_id: :bro:type:`count`
+
+ event_id: :bro:type:`count`
+
+ ts: :bro:type:`time`
+
+ signature_id: :bro:type:`count`
+
+ generator_id: :bro:type:`count`
+
+ signature_revision: :bro:type:`count`
+
+ classification_id: :bro:type:`count`
+
+ priority_id: :bro:type:`count`
+
+ src_ip: :bro:type:`addr`
+
+ dst_ip: :bro:type:`addr`
+
+ src_p: :bro:type:`port`
+
+ dst_p: :bro:type:`port`
+
+ impact_flag: :bro:type:`count`
+
+ impact: :bro:type:`count`
+
+ blocked: :bro:type:`count`
+
+ mpls_label: :bro:type:`count` :bro:attr:`&optional`
+ Not available in "legacy" IDS events.
+
+ vlan_id: :bro:type:`count` :bro:attr:`&optional`
+ Not available in "legacy" IDS events.
+
+ packet_action: :bro:type:`count` :bro:attr:`&optional`
+ Only available in "legacy" IDS events.
+
+
+.. bro:type:: Unified2::Packet
+
+ :Type: :bro:type:`record`
+
+ sensor_id: :bro:type:`count`
+
+ event_id: :bro:type:`count`
+
+ event_second: :bro:type:`count`
+
+ packet_ts: :bro:type:`time`
+
+ link_type: :bro:type:`count`
+
+ data: :bro:type:`string`
+
+
+Events
+++++++
+
+.. bro:id:: unified2_event
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, ev: :bro:type:`Unified2::IDSEvent`)
+
+ Abstract all of the various Unified2 event formats into
+ a single event.
+
+
+ :f: The file.
+
+
+ :ev: TODO.
+
+
+.. bro:id:: unified2_packet
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, pkt: :bro:type:`Unified2::Packet`)
+
+ The Unified2 packet format event.
+
+
+ :f: The file.
+
+
+ :pkt: TODO.
+
+
+Bro::X509
+---------
+
+X509 and OCSP analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Files::ANALYZER_OCSP_REPLY`
+
+:bro:enum:`Files::ANALYZER_OCSP_REQUEST`
+
+:bro:enum:`Files::ANALYZER_X509`
+
+Types
++++++
+
+.. bro:type:: X509::Certificate
+
+ :Type: :bro:type:`record`
+
+ version: :bro:type:`count` :bro:attr:`&log`
+ Version number.
+
+ serial: :bro:type:`string` :bro:attr:`&log`
+ Serial number.
+
+ subject: :bro:type:`string` :bro:attr:`&log`
+ Subject.
+
+ issuer: :bro:type:`string` :bro:attr:`&log`
+ Issuer.
+
+ cn: :bro:type:`string` :bro:attr:`&optional`
+ Last (most specific) common name.
+
+ not_valid_before: :bro:type:`time` :bro:attr:`&log`
+ Timestamp before when certificate is not valid.
+
+ not_valid_after: :bro:type:`time` :bro:attr:`&log`
+ Timestamp after when certificate is not valid.
+
+ key_alg: :bro:type:`string` :bro:attr:`&log`
+ Name of the key algorithm
+
+ sig_alg: :bro:type:`string` :bro:attr:`&log`
+ Name of the signature algorithm
+
+ key_type: :bro:type:`string` :bro:attr:`&optional` :bro:attr:`&log`
+ Key type, if key parseable by openssl (either rsa, dsa or ec)
+
+ key_length: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
+ Key length in bits
+
+ exponent: :bro:type:`string` :bro:attr:`&optional` :bro:attr:`&log`
+ Exponent, if RSA-certificate
+
+ curve: :bro:type:`string` :bro:attr:`&optional` :bro:attr:`&log`
+ Curve, if EC-certificate
+
+
+.. bro:type:: X509::Extension
+
+ :Type: :bro:type:`record`
+
+ name: :bro:type:`string`
+ Long name of extension. oid if name not known
+
+ short_name: :bro:type:`string` :bro:attr:`&optional`
+ Short name of extension if known
+
+ oid: :bro:type:`string`
+ Oid of extension
+
+ critical: :bro:type:`bool`
+ True if extension is critical
+
+ value: :bro:type:`string`
+ Extension content parsed to string for known extensions. Raw data otherwise.
+
+
+.. bro:type:: X509::BasicConstraints
+
+ :Type: :bro:type:`record`
+
+ ca: :bro:type:`bool` :bro:attr:`&log`
+ CA flag set?
+
+ path_len: :bro:type:`count` :bro:attr:`&optional` :bro:attr:`&log`
+ Maximum path length
+ :Attributes: :bro:attr:`&log`
+
+
+.. bro:type:: X509::SubjectAlternativeName
+
+ :Type: :bro:type:`record`
+
+ dns: :bro:type:`string_vec` :bro:attr:`&optional` :bro:attr:`&log`
+ List of DNS entries in SAN
+
+ uri: :bro:type:`string_vec` :bro:attr:`&optional` :bro:attr:`&log`
+ List of URI entries in SAN
+
+ email: :bro:type:`string_vec` :bro:attr:`&optional` :bro:attr:`&log`
+ List of email entries in SAN
+
+ ip: :bro:type:`addr_vec` :bro:attr:`&optional` :bro:attr:`&log`
+ List of IP entries in SAN
+
+ other_fields: :bro:type:`bool`
+ True if the certificate contained other, not recognized or parsed name fields
+
+
+.. bro:type:: X509::Result
+
+ :Type: :bro:type:`record`
+
+ result: :bro:type:`int`
+ OpenSSL result code
+
+ result_string: :bro:type:`string`
+ Result as string
+
+ chain_certs: :bro:type:`vector` of :bro:type:`opaque` of x509 :bro:attr:`&optional`
+ References to the final certificate chain, if verification successful. End-host certificate is first.
+
+ Result of an X509 certificate chain verification
+
+Events
+++++++
+
+.. bro:id:: x509_certificate
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, cert_ref: :bro:type:`opaque` of x509, cert: :bro:type:`X509::Certificate`)
+
+ Generated for encountered X509 certificates, e.g., in the clear SSL/TLS
+ connection handshake.
+
+ See `Wikipedia `__ for more information
+ about the X.509 format.
+
+
+ :f: The file.
+
+
+ :cert_ref: An opaque pointer to the underlying OpenSSL data structure of the
+ certificate.
+
+
+ :cert: The parsed certificate information.
+
+ .. bro:see:: x509_extension x509_ext_basic_constraints
+ x509_ext_subject_alternative_name x509_parse x509_verify
+ x509_get_certificate_string x509_ocsp_ext_signed_certificate_timestamp
+
+.. bro:id:: x509_extension
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, ext: :bro:type:`X509::Extension`)
+
+ Generated for X509 extensions seen in a certificate.
+
+ See `Wikipedia `__ for more information
+ about the X.509 format.
+
+
+ :f: The file.
+
+
+ :ext: The parsed extension.
+
+ .. bro:see:: x509_certificate x509_ext_basic_constraints
+ x509_ext_subject_alternative_name x509_parse x509_verify
+ x509_get_certificate_string x509_ocsp_ext_signed_certificate_timestamp
+
+.. bro:id:: x509_ext_basic_constraints
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, ext: :bro:type:`X509::BasicConstraints`)
+
+ Generated for the X509 basic constraints extension seen in a certificate.
+ This extension can be used to identify the subject of a certificate as a CA.
+
+
+ :f: The file.
+
+
+ :ext: The parsed basic constraints extension.
+
+ .. bro:see:: x509_certificate x509_extension
+ x509_ext_subject_alternative_name x509_parse x509_verify
+ x509_get_certificate_string x509_ocsp_ext_signed_certificate_timestamp
+
+.. bro:id:: x509_ext_subject_alternative_name
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, ext: :bro:type:`X509::SubjectAlternativeName`)
+
+ Generated for the X509 subject alternative name extension seen in a certificate.
+ This extension can be used to allow additional entities to be bound to the
+ subject of the certificate. Usually it is used to specify one or multiple DNS
+ names for which a certificate is valid.
+
+
+ :f: The file.
+
+
+ :ext: The parsed subject alternative name extension.
+
+ .. bro:see:: x509_certificate x509_extension x509_ext_basic_constraints
+ x509_parse x509_verify x509_ocsp_ext_signed_certificate_timestamp
+ x509_get_certificate_string
+
+.. bro:id:: x509_ocsp_ext_signed_certificate_timestamp
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, version: :bro:type:`count`, logid: :bro:type:`string`, timestamp: :bro:type:`count`, hash_algorithm: :bro:type:`count`, signature_algorithm: :bro:type:`count`, signature: :bro:type:`string`)
+
+ Generated for the signed_certificate_timestamp X509 extension as defined in
+ :rfc:`6962`. The extension is used to transmit signed proofs that are
+ used for Certificate Transparency. Raised when the extension is encountered
+ in an X.509 certificate or in an OCSP reply.
+
+
+ :f: The file.
+
+
+ :version: the version of the protocol to which the SCT conforms. Always
+ should be 0 (representing version 1)
+
+
+ :logid: 32 bit key id
+
+
+ :timestamp: the NTP Time when the entry was logged measured since
+ the epoch, ignoring leap seconds, in milliseconds.
+
+
+ :signature_and_hashalgorithm: signature and hash algorithm used for the
+ digitally_signed struct
+
+
+ :signature: signature part of the digitally_signed struct
+
+ .. bro:see:: ssl_extension_signed_certificate_timestamp x509_extension x509_ext_basic_constraints
+ x509_parse x509_verify x509_ext_subject_alternative_name
+ x509_get_certificate_string ssl_extension_signed_certificate_timestamp
+ sct_verify ocsp_request ocsp_request_certificate ocsp_response_status
+ ocsp_response_bytes ocsp_response_certificate
+ x509_ocsp_ext_signed_certificate_timestamp
+
+.. bro:id:: ocsp_request
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, version: :bro:type:`count`)
+
+ Event that is raised when encountering an OCSP request, e.g. in an HTTP
+ connection. See :rfc:`6960` for more details.
+
+ This event is raised exactly once for each OCSP Request.
+
+
+ :f: The file.
+
+
+ :req: version: the version of the OCSP request. Typically 0 (Version 1).
+
+ .. bro:see:: ocsp_request_certificate ocsp_response_status
+ ocsp_response_bytes ocsp_response_certificate ocsp_extension
+ x509_ocsp_ext_signed_certificate_timestamp
+
+.. bro:id:: ocsp_request_certificate
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, hashAlgorithm: :bro:type:`string`, issuerNameHash: :bro:type:`string`, issuerKeyHash: :bro:type:`string`, serialNumber: :bro:type:`string`)
+
+ Event that is raised when encountering an OCSP request for a certificate,
+ e.g. in an HTTP connection. See :rfc:`6960` for more details.
+
+ Note that a single OCSP request can contain requests for several certificates.
+ Thus this event can fire several times for one OCSP request, each time
+ requesting information for a different (or in theory even the same) certificate.
+
+
+ :f: The file.
+
+
+ :hashAlgorithm: The hash algorithm used for the issuerKeyHash.
+
+
+ :issuerKeyHash: Hash of the issuers public key.
+
+
+ :serialNumber: Serial number of the certificate for which the status is requested.
+
+ .. bro:see:: ocsp_request ocsp_response_status
+ ocsp_response_bytes ocsp_response_certificate ocsp_extension
+ x509_ocsp_ext_signed_certificate_timestamp
+
+.. bro:id:: ocsp_response_status
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, status: :bro:type:`string`)
+
+ This event is raised when encountering an OCSP reply, e.g. in an HTTP
+ connection or a TLS extension. See :rfc:`6960` for more details.
+
+ This event is raised exactly once for each OCSP reply.
+
+
+ :f: The file.
+
+
+ :status: The status of the OCSP response (e.g. succesful, malformedRequest, tryLater).
+
+ .. bro:see:: ocsp_request ocsp_request_certificate
+ ocsp_response_bytes ocsp_response_certificate ocsp_extension
+ x509_ocsp_ext_signed_certificate_timestamp
+
+.. bro:id:: ocsp_response_bytes
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, resp_ref: :bro:type:`opaque` of ocsp_resp, status: :bro:type:`string`, version: :bro:type:`count`, responderId: :bro:type:`string`, producedAt: :bro:type:`time`, signatureAlgorithm: :bro:type:`string`, certs: :bro:type:`x509_opaque_vector`)
+
+ This event is raised when encountering an OCSP response that contains response information.
+ An OCSP reply can be encountered, for example, in an HTTP connection or
+ a TLS extension. See :rfc:`6960` for more details on OCSP.
+
+
+ :f: The file.
+
+
+ :req_ref: An opaque pointer to the underlying OpenSSL data structure of the
+ OCSP response.
+
+
+ :status: The status of the OCSP response (e.g. succesful, malformedRequest, tryLater).
+
+
+ :version: Version of the OCSP response (typically - for version 1).
+
+
+ :responderId: The id of the OCSP responder; either a public key hash or a distinguished name.
+
+
+ :producedAt: Time at which the reply was produced.
+
+
+ :signatureAlgorithm: Algorithm used for the OCSP signature.
+
+
+ :certs: Optional list of certificates that are sent with the OCSP response; these typically
+ are needed to perform validation of the reply.
+
+ .. bro:see:: ocsp_request ocsp_request_certificate ocsp_response_status
+ ocsp_response_certificate ocsp_extension
+ x509_ocsp_ext_signed_certificate_timestamp
+
+.. bro:id:: ocsp_response_certificate
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, hashAlgorithm: :bro:type:`string`, issuerNameHash: :bro:type:`string`, issuerKeyHash: :bro:type:`string`, serialNumber: :bro:type:`string`, certStatus: :bro:type:`string`, revokeTime: :bro:type:`time`, revokeReason: :bro:type:`string`, thisUpdate: :bro:type:`time`, nextUpdate: :bro:type:`time`)
+
+ This event is raised for each SingleResponse contained in an OCSP response.
+ See :rfc:`6960` for more details on OCSP.
+
+
+ :f: The file.
+
+
+ :hashAlgorithm: The hash algorithm used for issuerNameHash and issuerKeyHash.
+
+
+ :issuerNameHash: Hash of the issuer's distinguished name.
+
+
+ :issuerKeyHash: Hash of the issuer's public key.
+
+
+ :serialNumber: Serial number of the affected certificate.
+
+
+ :certStatus: Status of the certificate.
+
+
+ :revokeTime: Time the certificate was revoked, 0 if not revoked.
+
+
+ :revokeTeason: Reason certificate was revoked; empty string if not revoked or not specified.
+
+
+ :thisUpdate: Time this response was generated.
+
+
+ :nextUpdate: Time next response will be ready; 0 if not supploed.
+
+ .. bro:see:: ocsp_request ocsp_request_certificate ocsp_response_status
+ ocsp_response_bytes ocsp_extension
+ x509_ocsp_ext_signed_certificate_timestamp
+
+.. bro:id:: ocsp_extension
+
+ :Type: :bro:type:`event` (f: :bro:type:`fa_file`, ext: :bro:type:`X509::Extension`, global_resp: :bro:type:`bool`)
+
+ This event is raised when an OCSP extension is encountered in an OCSP response.
+ See :rfc:`6960` for more details on OCSP.
+
+
+ :f: The file.
+
+
+ :ext: The parsed extension (same format as X.509 extensions).
+
+
+ :global_resp: T if extension encountered in the global response (in ResponseData),
+ F when encountered in a SingleResponse.
+
+ .. bro:see:: ocsp_request ocsp_request_certificate ocsp_response_status
+ ocsp_response_bytes ocsp_response_certificate
+ x509_ocsp_ext_signed_certificate_timestamp
+
+Functions
++++++++++
+
+.. bro:id:: x509_parse
+
+ :Type: :bro:type:`function` (cert: :bro:type:`opaque` of x509) : :bro:type:`X509::Certificate`
+
+ Parses a certificate into an X509::Certificate structure.
+
+
+ :cert: The X509 certificate opaque handle.
+
+
+ :returns: A X509::Certificate structure.
+
+ .. bro:see:: x509_certificate x509_extension x509_ext_basic_constraints
+ x509_ext_subject_alternative_name x509_verify
+ x509_get_certificate_string
+
+.. bro:id:: x509_get_certificate_string
+
+ :Type: :bro:type:`function` (cert: :bro:type:`opaque` of x509, pem: :bro:type:`bool` :bro:attr:`&default` = ``F`` :bro:attr:`&optional`) : :bro:type:`string`
+
+ Returns the string form of a certificate.
+
+
+ :cert: The X509 certificate opaque handle.
+
+
+ :pem: A boolean that specifies if the certificate is returned
+ in pem-form (true), or as the raw ASN1 encoded binary
+ (false).
+
+
+ :returns: X509 certificate as a string.
+
+ .. bro:see:: x509_certificate x509_extension x509_ext_basic_constraints
+ x509_ext_subject_alternative_name x509_parse x509_verify
+
+.. bro:id:: x509_ocsp_verify
+
+ :Type: :bro:type:`function` (certs: :bro:type:`x509_opaque_vector`, ocsp_reply: :bro:type:`string`, root_certs: :bro:type:`table_string_of_string`, verify_time: :bro:type:`time` :bro:attr:`&default` = ``0.0`` :bro:attr:`&optional`) : :bro:type:`X509::Result`
+
+ Verifies an OCSP reply.
+
+
+ :certs: Specifies the certificate chain to use. Server certificate first.
+
+
+ :ocsp_reply: the ocsp reply to validate.
+
+
+ :root_certs: A list of root certificates to validate the certificate chain.
+
+
+ :verify_time: Time for the validity check of the certificates.
+
+
+ :returns: A record of type X509::Result containing the result code of the
+ verify operation.
+
+ .. bro:see:: x509_certificate x509_extension x509_ext_basic_constraints
+ x509_ext_subject_alternative_name x509_parse
+ x509_get_certificate_string x509_verify
+
+.. bro:id:: x509_verify
+
+ :Type: :bro:type:`function` (certs: :bro:type:`x509_opaque_vector`, root_certs: :bro:type:`table_string_of_string`, verify_time: :bro:type:`time` :bro:attr:`&default` = ``0.0`` :bro:attr:`&optional`) : :bro:type:`X509::Result`
+
+ Verifies a certificate.
+
+
+ :certs: Specifies a certificate chain that is being used to validate
+ the given certificate against the root store given in *root_certs*.
+ The host certificate has to be at index 0.
+
+
+ :root_certs: A list of root certificates to validate the certificate chain.
+
+
+ :verify_time: Time for the validity check of the certificates.
+
+
+ :returns: A record of type X509::Result containing the result code of the
+ verify operation. In case of success also returns the full
+ certificate chain.
+
+ .. bro:see:: x509_certificate x509_extension x509_ext_basic_constraints
+ x509_ext_subject_alternative_name x509_parse
+ x509_get_certificate_string x509_ocsp_verify sct_verify
+
+.. bro:id:: sct_verify
+
+ :Type: :bro:type:`function` (cert: :bro:type:`opaque` of x509, logid: :bro:type:`string`, log_key: :bro:type:`string`, signature: :bro:type:`string`, timestamp: :bro:type:`count`, hash_algorithm: :bro:type:`count`, issuer_key_hash: :bro:type:`string` :bro:attr:`&default` = ``""`` :bro:attr:`&optional`) : :bro:type:`bool`
+
+ Verifies a Signed Certificate Timestamp as used for Certificate Transparency.
+ See RFC6962 for more details.
+
+
+ :cert: Certificate against which the SCT should be validated.
+
+
+ :logid: Log id of the SCT.
+
+
+ :log_key: Public key of the Log that issued the SCT proof.
+
+
+ :timestamp: Timestamp at which the proof was generated.
+
+
+ :hash_algorithm: Hash algorithm that was used for the SCT proof.
+
+
+ :issuer_key_hash: The SHA-256 hash of the certificate issuer's public key.
+ This only has to be provided if the SCT was encountered in an X.509
+ certificate extension; in that case, it is necessary for validation.
+
+
+ :returns: T if the validation could be performed succesfully, F otherwhise.
+
+ .. bro:see:: ssl_extension_signed_certificate_timestamp
+ x509_ocsp_ext_signed_certificate_timestamp
+ x509_verify
+
+.. bro:id:: x509_subject_name_hash
+
+ :Type: :bro:type:`function` (cert: :bro:type:`opaque` of x509, hash_alg: :bro:type:`count`) : :bro:type:`string`
+
+ Get the hash of the subject's distinguished name.
+
+
+ :cert: The X509 certificate opaque handle.
+
+
+ :hash_alg: the hash algorithm to use, according to the IANA mapping at
+
+ :https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
+
+
+ :returns: The hash as a string.
+
+ .. bro:see:: x509_issuer_name_hash x509_spki_hash
+ x509_verify sct_verify
+
+.. bro:id:: x509_issuer_name_hash
+
+ :Type: :bro:type:`function` (cert: :bro:type:`opaque` of x509, hash_alg: :bro:type:`count`) : :bro:type:`string`
+
+ Get the hash of the issuer's distinguished name.
+
+
+ :cert: The X509 certificate opaque handle.
+
+
+ :hash_alg: the hash algorithm to use, according to the IANA mapping at
+
+ :https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
+
+
+ :returns: The hash as a string.
+
+ .. bro:see:: x509_subject_name_hash x509_spki_hash
+ x509_verify sct_verify
+
+.. bro:id:: x509_spki_hash
+
+ :Type: :bro:type:`function` (cert: :bro:type:`opaque` of x509, hash_alg: :bro:type:`count`) : :bro:type:`string`
+
+ Get the hash of the Subject Public Key Information of the certificate.
+
+
+ :cert: The X509 certificate opaque handle.
+
+
+ :hash_alg: the hash algorithm to use, according to the IANA mapping at
+
+ :https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
+
+
+ :returns: The hash as a string.
+
+ .. bro:see:: x509_subject_name_hash x509_issuer_name_hash
+ x509_verify sct_verify
+
diff --git a/doc/script-reference/autogenerated-package-index.rst b/doc/script-reference/autogenerated-package-index.rst
new file mode 100644
index 0000000000..11ff0db44a
--- /dev/null
+++ b/doc/script-reference/autogenerated-package-index.rst
@@ -0,0 +1,309 @@
+:doc:`base/frameworks/logging `
+
+ The logging framework provides a flexible key-value based logging interface.
+
+:doc:`base/frameworks/logging/postprocessors `
+
+ Support for postprocessors in the logging framework.
+
+:doc:`base/frameworks/broker `
+
+ The Broker communication framework facilitates connecting to remote Bro
+ instances to share state and transfer events.
+
+:doc:`base/frameworks/input `
+
+ The input framework provides a way to read previously stored data either as
+ an event stream or into a Bro table.
+
+:doc:`base/frameworks/analyzer `
+
+ The analyzer framework allows to dynamically enable or disable Bro's
+ protocol analyzers, as well as to manage the well-known ports which
+ automatically activate a particular analyzer for new connections.
+
+:doc:`base/frameworks/files `
+
+ The file analysis framework provides an interface for driving the analysis
+ of files, possibly independent of any network protocol over which they're
+ transported.
+
+:doc:`base/frameworks/files/magic `
+
+
+:doc:`base/bif `
+
+
+:doc:`base/bif/plugins `
+
+
+:doc:`base/frameworks/reporter `
+
+ This framework is intended to create an output and filtering path for
+ internally generated messages/warnings/errors.
+
+:doc:`base/frameworks/notice `
+
+ The notice framework enables Bro to "notice" things which are odd or
+ potentially bad, leaving it to the local configuration to define which
+ of them are actionable. This decoupling of detection and reporting allows
+ Bro to be customized to the different needs that sites have.
+
+:doc:`base/frameworks/cluster `
+
+ The cluster framework provides for establishing and controlling a cluster
+ of Bro instances.
+
+:doc:`base/frameworks/control `
+
+ The control framework provides the foundation for providing "commands"
+ that can be taken remotely at runtime to modify a running Bro instance
+ or collect information from the running instance.
+
+:doc:`base/frameworks/netcontrol `
+
+ The NetControl framework provides a way for Bro to interact with networking
+ hard- and software, e.g. for dropping and shunting IP addresses/connections,
+ etc.
+
+:doc:`base/frameworks/netcontrol/plugins `
+
+ Plugins for the NetControl framework.
+
+:doc:`base/frameworks/openflow `
+
+ The OpenFlow framework exposes the data structures and functions
+ necessary to interface to OpenFlow capable hardware.
+
+:doc:`base/frameworks/openflow/plugins `
+
+ Plugins for the OpenFlow framework.
+
+:doc:`base/frameworks/dpd `
+
+ The DPD (dynamic protocol detection) activates port-independent protocol
+ detection and selectively disables analyzers if protocol violations occur.
+
+:doc:`base/frameworks/signatures `
+
+ The signature framework provides for doing low-level pattern matching. While
+ signatures are not Bro's preferred detection tool, they sometimes come in
+ handy and are closer to what many people are familiar with from using
+ other NIDS.
+
+:doc:`base/frameworks/packet-filter `
+
+ The packet filter framework supports how Bro sets its BPF capture filter.
+
+:doc:`base/frameworks/software `
+
+ The software framework provides infrastructure for maintaining a table
+ of software versions seen on the network. The version parsing itself
+ is carried out by external protocol-specific scripts that feed into
+ this framework.
+
+:doc:`base/frameworks/intel `
+
+ The intelligence framework provides a way to store and query intelligence
+ data (such as IP addresses or strings). Metadata can also be associated
+ with the intelligence.
+
+:doc:`base/frameworks/config `
+
+ The configuration framework provides a way to change the Bro configuration
+ in "option" values at run-time.
+
+:doc:`base/frameworks/sumstats `
+
+ The summary statistics framework provides a way to summarize large streams
+ of data into simple reduced measurements.
+
+:doc:`base/frameworks/sumstats/plugins `
+
+ Plugins for the summary statistics framework.
+
+:doc:`base/frameworks/tunnels `
+
+ The tunnels framework handles the tracking/logging of tunnels (e.g. Teredo,
+ AYIYA, or IP-in-IP such as 6to4 where "IP" is either IPv4 or IPv6).
+
+:doc:`base/protocols/conn `
+
+ Support for connection (TCP, UDP, or ICMP) analysis.
+
+:doc:`base/protocols/dce-rpc `
+
+ Support for DCE/RPC (Distributed Computing Environment/Remote Procedure
+ Calls) protocol analysis.
+
+:doc:`base/protocols/dhcp `
+
+ Support for Dynamic Host Configuration Protocol (DHCP) analysis.
+
+:doc:`base/protocols/dnp3 `
+
+ Support for Distributed Network Protocol (DNP3) analysis.
+
+:doc:`base/protocols/dns `
+
+ Support for Domain Name System (DNS) protocol analysis.
+
+:doc:`base/protocols/ftp `
+
+ Support for File Transfer Protocol (FTP) analysis.
+
+:doc:`base/protocols/ssl `
+
+ Support for Secure Sockets Layer (SSL)/Transport Layer Security(TLS) protocol analysis.
+
+:doc:`base/files/x509 `
+
+ Support for X509 certificates with the file analysis framework.
+ Also supports parsing OCSP requests and responses.
+
+:doc:`base/files/hash `
+
+ Support for file hashes with the file analysis framework.
+
+:doc:`base/protocols/http `
+
+ Support for Hypertext Transfer Protocol (HTTP) analysis.
+
+:doc:`base/protocols/imap `
+
+ Support for the Internet Message Access Protocol (IMAP).
+
+ Note that currently the IMAP analyzer only supports analyzing IMAP sessions
+ until they do or do not switch to TLS using StartTLS. Hence, we do not get
+ mails from IMAP sessions, only X509 certificates.
+
+:doc:`base/protocols/irc `
+
+ Support for Internet Relay Chat (IRC) protocol analysis.
+
+:doc:`base/protocols/krb `
+
+ Support for Kerberos protocol analysis.
+
+:doc:`base/protocols/modbus `
+
+ Support for Modbus protocol analysis.
+
+:doc:`base/protocols/mysql `
+
+ Support for MySQL protocol analysis.
+
+:doc:`base/protocols/ntlm `
+
+ Support for NT LAN Manager (NTLM) protocol analysis.
+
+:doc:`base/protocols/pop3 `
+
+ Support for POP3 (Post Office Protocol) protocol analysis.
+
+:doc:`base/protocols/radius `
+
+ Support for RADIUS protocol analysis.
+
+:doc:`base/protocols/rdp `
+
+ Support for Remote Desktop Protocol (RDP) analysis.
+
+:doc:`base/protocols/rfb `
+
+ Support for Remote FrameBuffer analysis. This includes all VNC servers.
+
+:doc:`base/protocols/sip `
+
+ Support for Session Initiation Protocol (SIP) analysis.
+
+:doc:`base/protocols/snmp `
+
+ Support for Simple Network Management Protocol (SNMP) analysis.
+
+:doc:`base/protocols/smb `
+
+ Support for SMB protocol analysis.
+
+:doc:`base/protocols/smtp `
+
+ Support for Simple Mail Transfer Protocol (SMTP) analysis.
+
+:doc:`base/protocols/socks `
+
+ Support for Socket Secure (SOCKS) protocol analysis.
+
+:doc:`base/protocols/ssh `
+
+ Support for SSH protocol analysis.
+
+:doc:`base/protocols/syslog `
+
+ Support for Syslog protocol analysis.
+
+:doc:`base/protocols/tunnels `
+
+ Provides DPD signatures for tunneling protocols that otherwise
+ wouldn't be detected at all.
+
+:doc:`base/protocols/xmpp `
+
+ Support for the Extensible Messaging and Presence Protocol (XMPP).
+
+ Note that currently the XMPP analyzer only supports analyzing XMPP sessions
+ until they do or do not switch to TLS using StartTLS. Hence, we do not get
+ actual chat information from XMPP sessions, only X509 certificates.
+
+:doc:`base/files/pe `
+
+ Support for Portable Executable (PE) file analysis.
+
+:doc:`base/files/extract `
+
+ Support for extracting files with the file analysis framework.
+
+:doc:`base/files/unified2 `
+
+ Support for Unified2 files in the file analysis framework.
+
+:doc:`broxygen `
+
+ This package is loaded during the process which automatically generates
+ reference documentation for all Bro scripts (i.e. "Broxygen"). Its only
+ purpose is to provide an easy way to load all known Bro scripts plus any
+ extra scripts needed or used by the documentation process.
+
+:doc:`policy/frameworks/intel/seen `
+
+ Scripts that send data to the intelligence framework.
+
+:doc:`policy/frameworks/notice `
+
+
+:doc:`policy/integration/barnyard2 `
+
+ Integration with Barnyard2.
+
+:doc:`policy/integration/collective-intel `
+
+ The scripts in this module are for deeper integration with the
+ Collective Intelligence Framework (CIF) since Bro's Intel framework
+ doesn't natively behave the same as CIF nor does it store and maintain
+ the same data in all cases.
+
+:doc:`policy/misc/detect-traceroute `
+
+ Detect hosts that are running traceroute.
+
+:doc:`policy/tuning `
+
+ Miscellaneous tuning parameters.
+
+:doc:`policy/tuning/defaults `
+
+ Sets various defaults, and prints warning messages to stdout under
+ certain conditions.
+
+:doc:`policy/protocols/smb `
+
+
diff --git a/doc/script-reference/autogenerated-protocol-analyzer-index.rst b/doc/script-reference/autogenerated-protocol-analyzer-index.rst
new file mode 100644
index 0000000000..0758142e1e
--- /dev/null
+++ b/doc/script-reference/autogenerated-protocol-analyzer-index.rst
@@ -0,0 +1,14385 @@
+Protocol Analyzers
+==================
+
+.. bro:type:: Analyzer::Tag
+
+ :Type: :bro:type:`enum`
+
+ .. bro:enum:: Analyzer::ANALYZER_AYIYA Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_BACKDOOR Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_BITTORRENT Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_BITTORRENTTRACKER Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONNSIZE Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_DCE_RPC Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_DHCP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_DNP3_TCP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_DNP3_UDP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTS_DNS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_DNS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_FTP_DATA Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_IRC_DATA Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_FINGER Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_FTP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_FTP_ADAT Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_GNUTELLA Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_GSSAPI Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_GTPV1 Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_HTTP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_ICMP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_IDENT Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_IMAP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_INTERCONN Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_IRC Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_KRB Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_KRB_TCP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTS_RLOGIN Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTS_RSH Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_LOGIN Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_NVT Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_RLOGIN Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_RSH Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_TELNET Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_MODBUS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_MYSQL Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTS_NCP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_NCP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTS_NETBIOSSSN Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_NETBIOSSSN Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_NTLM Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_NTP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_PIA_TCP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_PIA_UDP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_POP3 Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_RADIUS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_RDP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_RFB Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTS_NFS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTS_RPC Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_MOUNT Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_NFS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_PORTMAPPER Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_SIP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTS_SMB Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_SMB Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_SMTP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_SNMP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_SOCKS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_SSH Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_DTLS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_SSL Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_STEPPINGSTONE Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_SYSLOG Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTLINE Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_CONTENTS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_TCP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_TCPSTATS Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_TEREDO Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_UDP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_XMPP Analyzer::Tag
+
+ .. bro:enum:: Analyzer::ANALYZER_ZIP Analyzer::Tag
+
+Bro::ARP
+--------
+
+ARP Parsing
+
+Components
+++++++++++
+
+Events
+++++++
+
+.. bro:id:: arp_request
+
+ :Type: :bro:type:`event` (mac_src: :bro:type:`string`, mac_dst: :bro:type:`string`, SPA: :bro:type:`addr`, SHA: :bro:type:`string`, TPA: :bro:type:`addr`, THA: :bro:type:`string`)
+
+ Generated for ARP requests.
+
+ See `Wikipedia `__
+ for more information about the ARP protocol.
+
+
+ :mac_src: The request's source MAC address.
+
+
+ :mac_dst: The request's destination MAC address.
+
+
+ :SPA: The sender protocol address.
+
+
+ :SHA: The sender hardware address.
+
+
+ :TPA: The target protocol address.
+
+
+ :THA: The target hardware address.
+
+ .. bro:see:: arp_reply bad_arp
+
+.. bro:id:: arp_reply
+
+ :Type: :bro:type:`event` (mac_src: :bro:type:`string`, mac_dst: :bro:type:`string`, SPA: :bro:type:`addr`, SHA: :bro:type:`string`, TPA: :bro:type:`addr`, THA: :bro:type:`string`)
+
+ Generated for ARP replies.
+
+ See `Wikipedia `__
+ for more information about the ARP protocol.
+
+
+ :mac_src: The reply's source MAC address.
+
+
+ :mac_dst: The reply's destination MAC address.
+
+
+ :SPA: The sender protocol address.
+
+
+ :SHA: The sender hardware address.
+
+
+ :TPA: The target protocol address.
+
+
+ :THA: The target hardware address.
+
+ .. bro:see:: arp_request bad_arp
+
+.. bro:id:: bad_arp
+
+ :Type: :bro:type:`event` (SPA: :bro:type:`addr`, SHA: :bro:type:`string`, TPA: :bro:type:`addr`, THA: :bro:type:`string`, explanation: :bro:type:`string`)
+
+ Generated for ARP packets that Bro cannot interpret. Examples are packets
+ with non-standard hardware address formats or hardware addresses that do not
+ match the originator of the packet.
+
+
+ :SPA: The sender protocol address.
+
+
+ :SHA: The sender hardware address.
+
+
+ :TPA: The target protocol address.
+
+
+ :THA: The target hardware address.
+
+
+ :explanation: A short description of why the ARP packet is considered "bad".
+
+ .. bro:see:: arp_reply arp_request
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+Bro::AYIYA
+----------
+
+AYIYA Analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_AYIYA`
+
+Bro::BackDoor
+-------------
+
+Backdoor Analyzer deprecated
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_BACKDOOR`
+
+Events
+++++++
+
+.. bro:id:: backdoor_stats
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, os: :bro:type:`backdoor_endp_stats`, rs: :bro:type:`backdoor_endp_stats`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: backdoor_remove_conn
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: ftp_signature_found
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: gnutella_signature_found
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: http_signature_found
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: irc_signature_found
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: telnet_signature_found
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, len: :bro:type:`count`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: ssh_signature_found
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: rlogin_signature_found
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, num_null: :bro:type:`count`, len: :bro:type:`count`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: smtp_signature_found
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: http_proxy_signature_found
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Deprecated. Will be removed.
+
+Bro::BitTorrent
+---------------
+
+BitTorrent Analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_BITTORRENT`
+
+:bro:enum:`Analyzer::ANALYZER_BITTORRENTTRACKER`
+
+Events
+++++++
+
+.. bro:id:: bittorrent_peer_handshake
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, reserved: :bro:type:`string`, info_hash: :bro:type:`string`, peer_id: :bro:type:`string`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_have bittorrent_peer_interested bittorrent_peer_keep_alive
+ bittorrent_peer_not_interested bittorrent_peer_piece bittorrent_peer_port
+ bittorrent_peer_request bittorrent_peer_unchoke bittorrent_peer_unknown
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_keep_alive
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_not_interested bittorrent_peer_piece bittorrent_peer_port
+ bittorrent_peer_request bittorrent_peer_unchoke bittorrent_peer_unknown
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_choke
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_request bittorrent_peer_unchoke
+ bittorrent_peer_unknown bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_unchoke
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_request
+ bittorrent_peer_unknown bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_interested
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_keep_alive
+ bittorrent_peer_not_interested bittorrent_peer_piece bittorrent_peer_port
+ bittorrent_peer_request bittorrent_peer_unchoke bittorrent_peer_unknown
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_not_interested
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_piece bittorrent_peer_port
+ bittorrent_peer_request bittorrent_peer_unchoke bittorrent_peer_unknown
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_have
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, piece_index: :bro:type:`count`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_interested bittorrent_peer_keep_alive
+ bittorrent_peer_not_interested bittorrent_peer_piece bittorrent_peer_port
+ bittorrent_peer_request bittorrent_peer_unchoke bittorrent_peer_unknown
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_bitfield
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, bitfield: :bro:type:`string`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_cancel bittorrent_peer_choke bittorrent_peer_handshake
+ bittorrent_peer_have bittorrent_peer_interested bittorrent_peer_keep_alive
+ bittorrent_peer_not_interested bittorrent_peer_piece bittorrent_peer_port
+ bittorrent_peer_request bittorrent_peer_unchoke bittorrent_peer_unknown
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, index: :bro:type:`count`, begin: :bro:type:`count`, length: :bro:type:`count`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_unchoke bittorrent_peer_unknown
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_piece
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, index: :bro:type:`count`, begin: :bro:type:`count`, piece_length: :bro:type:`count`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_port
+ bittorrent_peer_request bittorrent_peer_unchoke bittorrent_peer_unknown
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_cancel
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, index: :bro:type:`count`, begin: :bro:type:`count`, length: :bro:type:`count`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_request bittorrent_peer_unchoke
+ bittorrent_peer_unknown bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_port
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, listen_port: :bro:type:`port`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_request bittorrent_peer_unchoke bittorrent_peer_unknown
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_unknown
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, message_id: :bro:type:`count`, data: :bro:type:`string`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_request bittorrent_peer_unchoke
+ bittorrent_peer_weird
+
+.. bro:id:: bittorrent_peer_weird
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, msg: :bro:type:`string`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_request bittorrent_peer_unchoke
+ bittorrent_peer_unknown
+
+.. bro:id:: bt_tracker_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, uri: :bro:type:`string`, headers: :bro:type:`bt_tracker_headers`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_request bittorrent_peer_unchoke
+ bittorrent_peer_unknown bittorrent_peer_weird
+
+.. bro:id:: bt_tracker_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, status: :bro:type:`count`, headers: :bro:type:`bt_tracker_headers`, peers: :bro:type:`bittorrent_peer_set`, benc: :bro:type:`bittorrent_benc_dir`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_request bittorrent_peer_unchoke
+ bittorrent_peer_unknown bittorrent_peer_weird
+
+.. bro:id:: bt_tracker_response_not_ok
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, status: :bro:type:`count`, headers: :bro:type:`bt_tracker_headers`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_request bittorrent_peer_unchoke
+ bittorrent_peer_unknown bittorrent_peer_weird
+
+.. bro:id:: bt_tracker_weird
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, msg: :bro:type:`string`)
+
+ TODO.
+
+ See `Wikipedia `__ for
+ more information about the BitTorrent protocol.
+
+ .. bro:see:: bittorrent_peer_bitfield bittorrent_peer_cancel bittorrent_peer_choke
+ bittorrent_peer_handshake bittorrent_peer_have bittorrent_peer_interested
+ bittorrent_peer_keep_alive bittorrent_peer_not_interested bittorrent_peer_piece
+ bittorrent_peer_port bittorrent_peer_request bittorrent_peer_unchoke
+ bittorrent_peer_unknown bittorrent_peer_weird
+
+Bro::ConnSize
+-------------
+
+Connection size analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_CONNSIZE`
+
+Events
+++++++
+
+.. bro:id:: conn_bytes_threshold_crossed
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, threshold: :bro:type:`count`, is_orig: :bro:type:`bool`)
+
+ Generated for a connection that crossed a set byte threshold. Note that this
+ is a low level event that should usually be avoided for user code. Use
+ ConnThreshold::bytes_threshold_crossed instead.
+
+
+ :c: the connection
+
+
+ :threshold: the threshold that was set
+
+
+ :is_orig: true if the threshold was crossed by the originator of the connection
+
+ .. bro:see:: set_current_conn_packets_threshold set_current_conn_bytes_threshold conn_packets_threshold_crossed
+ get_current_conn_bytes_threshold get_current_conn_packets_threshold
+
+.. bro:id:: conn_packets_threshold_crossed
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, threshold: :bro:type:`count`, is_orig: :bro:type:`bool`)
+
+ Generated for a connection that crossed a set packet threshold. Note that this
+ is a low level event that should usually be avoided for user code. Use
+ ConnThreshold::bytes_threshold_crossed instead.
+
+
+ :c: the connection
+
+
+ :threshold: the threshold that was set
+
+
+ :is_orig: true if the threshold was crossed by the originator of the connection
+
+ .. bro:see:: set_current_conn_packets_threshold set_current_conn_bytes_threshold conn_bytes_threshold_crossed
+ get_current_conn_bytes_threshold get_current_conn_packets_threshold
+
+Functions
++++++++++
+
+.. bro:id:: set_current_conn_bytes_threshold
+
+ :Type: :bro:type:`function` (cid: :bro:type:`conn_id`, threshold: :bro:type:`count`, is_orig: :bro:type:`bool`) : :bro:type:`bool`
+
+ Sets the current byte threshold for connection sizes, overwriting any potential old
+ threshold. Be aware that in nearly any case you will want to use the high level API
+ instead (ConnThreshold::set_bytes_threshold).
+
+
+ :cid: The connection id.
+
+
+ :threshold: Threshold in bytes.
+
+
+ :is_orig: If true, threshold is set for bytes from originator, otherwhise for bytes from responder.
+
+ .. bro:see:: set_current_conn_packets_threshold conn_bytes_threshold_crossed conn_packets_threshold_crossed
+ get_current_conn_bytes_threshold get_current_conn_packets_threshold
+
+.. bro:id:: set_current_conn_packets_threshold
+
+ :Type: :bro:type:`function` (cid: :bro:type:`conn_id`, threshold: :bro:type:`count`, is_orig: :bro:type:`bool`) : :bro:type:`bool`
+
+ Sets a threshold for connection packets, overwtiting any potential old thresholds.
+ Be aware that in nearly any case you will want to use the high level API
+ instead (ConnThreshold::set_packets_threshold).
+
+
+ :cid: The connection id.
+
+
+ :threshold: Threshold in packets.
+
+
+ :is_orig: If true, threshold is set for packets from originator, otherwhise for packets from responder.
+
+ .. bro:see:: set_current_conn_bytes_threshold conn_bytes_threshold_crossed conn_packets_threshold_crossed
+ get_current_conn_bytes_threshold get_current_conn_packets_threshold
+
+.. bro:id:: get_current_conn_bytes_threshold
+
+ :Type: :bro:type:`function` (cid: :bro:type:`conn_id`, is_orig: :bro:type:`bool`) : :bro:type:`count`
+
+ Gets the current byte threshold size for a connection.
+
+
+ :cid: The connection id.
+
+
+ :is_orig: If true, threshold of originator, otherwhise threshold of responder.
+
+
+ :returns: 0 if no threshold is set or the threshold in bytes
+
+ .. bro:see:: set_current_conn_packets_threshold conn_bytes_threshold_crossed conn_packets_threshold_crossed
+ get_current_conn_packets_threshold
+
+.. bro:id:: get_current_conn_packets_threshold
+
+ :Type: :bro:type:`function` (cid: :bro:type:`conn_id`, is_orig: :bro:type:`bool`) : :bro:type:`count`
+
+ Gets the current packet threshold size for a connection.
+
+
+ :cid: The connection id.
+
+
+ :is_orig: If true, threshold of originator, otherwhise threshold of responder.
+
+
+ :returns: 0 if no threshold is set or the threshold in packets
+
+ .. bro:see:: set_current_conn_packets_threshold conn_bytes_threshold_crossed conn_packets_threshold_crossed
+ get_current_conn_bytes_threshold
+
+Bro::DCE_RPC
+------------
+
+DCE-RPC analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_DCE_RPC`
+
+Options/Constants
++++++++++++++++++
+
+.. bro:id:: DCE_RPC::max_cmd_reassembly
+
+ :Type: :bro:type:`count`
+ :Attributes: :bro:attr:`&redef`
+ :Default: ``20``
+
+ The maximum number of simultaneous fragmented commands that
+ the DCE_RPC analyzer will tolerate before the it will generate
+ a weird and skip further input.
+
+.. bro:id:: DCE_RPC::max_frag_data
+
+ :Type: :bro:type:`count`
+ :Attributes: :bro:attr:`&redef`
+ :Default: ``30000``
+
+ The maximum number of fragmented bytes that the DCE_RPC analyzer
+ will tolerate on a command before the analyzer will generate a weird
+ and skip further input.
+
+Types
++++++
+
+.. bro:type:: DCE_RPC::PType
+
+ :Type: :bro:type:`enum`
+
+ .. bro:enum:: DCE_RPC::REQUEST DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::PING DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::RESPONSE DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::FAULT DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::WORKING DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::NOCALL DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::REJECT DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::ACK DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::CL_CANCEL DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::FACK DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::CANCEL_ACK DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::BIND DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::BIND_ACK DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::BIND_NAK DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::ALTER_CONTEXT DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::ALTER_CONTEXT_RESP DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::AUTH3 DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::SHUTDOWN DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::CO_CANCEL DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::ORPHANED DCE_RPC::PType
+
+ .. bro:enum:: DCE_RPC::RTS DCE_RPC::PType
+
+
+.. bro:type:: DCE_RPC::IfID
+
+ :Type: :bro:type:`enum`
+
+ .. bro:enum:: DCE_RPC::unknown_if DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::epmapper DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::lsarpc DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::lsa_ds DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::mgmt DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::netlogon DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::samr DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::srvsvc DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::spoolss DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::drs DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::winspipe DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::wkssvc DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::oxid DCE_RPC::IfID
+
+ .. bro:enum:: DCE_RPC::ISCMActivator DCE_RPC::IfID
+
+
+Events
+++++++
+
+.. bro:id:: dce_rpc_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, fid: :bro:type:`count`, ptype_id: :bro:type:`count`, ptype: :bro:type:`DCE_RPC::PType`)
+
+ Generated for every :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` message.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the message was sent by the originator of the TCP connection.
+
+
+ :fid: File ID of the PIPE that carried the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)`
+ message. Zero will be used if the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` was
+ not transported over a pipe.
+
+
+ :ptype_id: Numeric representation of the procedure type of the message.
+
+
+ :ptype: Enum representation of the prodecure type of the message.
+
+ .. bro:see:: dce_rpc_bind dce_rpc_bind_ack dce_rpc_request dce_rpc_response
+
+.. bro:id:: dce_rpc_bind
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, fid: :bro:type:`count`, ctx_id: :bro:type:`count`, uuid: :bro:type:`string`, ver_major: :bro:type:`count`, ver_minor: :bro:type:`count`)
+
+ Generated for every :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` bind request message.
+ Since RPC offers the ability for a client to request connections to multiple endpoints, this event can occur
+ multiple times for a single RPC message.
+
+
+ :c: The connection.
+
+
+ :fid: File ID of the PIPE that carried the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)`
+ message. Zero will be used if the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` was
+ not transported over a pipe.
+
+
+ :ctx_id: The context identifier of the data representation.
+
+
+ :uuid: The string interpretted uuid of the endpoint being requested.
+
+
+ :ver_major: The major version of the endpoint being requested.
+
+
+ :ver_minor: The minor version of the endpoint being requested.
+
+ .. bro:see:: dce_rpc_message dce_rpc_bind_ack dce_rpc_request dce_rpc_response
+
+.. bro:id:: dce_rpc_alter_context
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, fid: :bro:type:`count`, ctx_id: :bro:type:`count`, uuid: :bro:type:`string`, ver_major: :bro:type:`count`, ver_minor: :bro:type:`count`)
+
+ Generated for every :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` alter context request message.
+ Since RPC offers the ability for a client to request connections to multiple endpoints, this event can occur
+ multiple times for a single RPC message.
+
+
+ :c: The connection.
+
+
+ :fid: File ID of the PIPE that carried the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)`
+ message. Zero will be used if the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` was
+ not transported over a pipe.
+
+
+ :ctx_id: The context identifier of the data representation.
+
+
+ :uuid: The string interpretted uuid of the endpoint being requested.
+
+
+ :ver_major: The major version of the endpoint being requested.
+
+
+ :ver_minor: The minor version of the endpoint being requested.
+
+ .. bro:see:: dce_rpc_message dce_rpc_bind dce_rpc_bind_ack dce_rpc_request dce_rpc_response dce_rpc_alter_context_resp
+
+.. bro:id:: dce_rpc_bind_ack
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, fid: :bro:type:`count`, sec_addr: :bro:type:`string`)
+
+ Generated for every :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` bind request ack message.
+
+
+ :c: The connection.
+
+
+ :fid: File ID of the PIPE that carried the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)`
+ message. Zero will be used if the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` was
+ not transported over a pipe.
+
+
+ :sec_addr: Secondary address for the ack.
+
+ .. bro:see:: dce_rpc_message dce_rpc_bind dce_rpc_request dce_rpc_response
+
+.. bro:id:: dce_rpc_alter_context_resp
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, fid: :bro:type:`count`)
+
+ Generated for every :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` alter context response message.
+
+
+ :c: The connection.
+
+
+ :fid: File ID of the PIPE that carried the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)`
+ message. Zero will be used if the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` was
+ not transported over a pipe.
+
+ .. bro:see:: dce_rpc_message dce_rpc_bind dce_rpc_bind_ack dce_rpc_request dce_rpc_response dce_rpc_alter_context
+
+.. bro:id:: dce_rpc_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, fid: :bro:type:`count`, ctx_id: :bro:type:`count`, opnum: :bro:type:`count`, stub_len: :bro:type:`count`)
+
+ Generated for every :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` request message.
+
+
+ :c: The connection.
+
+
+ :fid: File ID of the PIPE that carried the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)`
+ message. Zero will be used if the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` was
+ not transported over a pipe.
+
+
+ :ctx_id: The context identifier of the data representation.
+
+
+ :opnum: Number of the RPC operation.
+
+
+ :stub_len: Length of the data for the request.
+
+ .. bro:see:: dce_rpc_message dce_rpc_bind dce_rpc_bind_ack dce_rpc_response
+
+.. bro:id:: dce_rpc_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, fid: :bro:type:`count`, ctx_id: :bro:type:`count`, opnum: :bro:type:`count`, stub_len: :bro:type:`count`)
+
+ Generated for every :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` response message.
+
+
+ :c: The connection.
+
+
+ :fid: File ID of the PIPE that carried the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)`
+ message. Zero will be used if the :abbr:`DCE-RPC (Distributed Computing Environment/Remote Procedure Calls)` was
+ not transported over a pipe.
+
+
+ :ctx_id: The context identifier of the data representation.
+
+ :opnum: Number of the RPC operation.
+
+
+ :stub_len: Length of the data for the response.
+
+ .. bro:see:: dce_rpc_message dce_rpc_bind dce_rpc_bind_ack dce_rpc_request
+
+Bro::DHCP
+---------
+
+DHCP analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_DHCP`
+
+Types
++++++
+
+.. bro:type:: DHCP::Msg
+
+ :Type: :bro:type:`record`
+
+ op: :bro:type:`count`
+ Message OP code. 1 = BOOTREQUEST, 2 = BOOTREPLY
+
+ m_type: :bro:type:`count`
+ The type of DHCP message.
+
+ xid: :bro:type:`count`
+ Transaction ID of a DHCP session.
+
+ secs: :bro:type:`interval`
+ Number of seconds since client began address acquisition
+ or renewal process
+
+ flags: :bro:type:`count`
+
+ ciaddr: :bro:type:`addr`
+ Original IP address of the client.
+
+ yiaddr: :bro:type:`addr`
+ IP address assigned to the client.
+
+ siaddr: :bro:type:`addr`
+ IP address of the server.
+
+ giaddr: :bro:type:`addr`
+ IP address of the relaying gateway.
+
+ chaddr: :bro:type:`string`
+ Client hardware address.
+
+ sname: :bro:type:`string` :bro:attr:`&default` = ``""`` :bro:attr:`&optional`
+ Server host name.
+
+ file_n: :bro:type:`string` :bro:attr:`&default` = ``""`` :bro:attr:`&optional`
+ Boot file name.
+
+ A DHCP message.
+ .. bro:see:: dhcp_message
+
+.. bro:type:: DHCP::Addrs
+
+ :Type: :bro:type:`vector` of :bro:type:`addr`
+
+ A list of addresses offered by a DHCP server. Could be routers,
+ DNS servers, or other.
+
+ .. bro:see:: dhcp_message
+
+.. bro:type:: DHCP::SubOpt
+
+ :Type: :bro:type:`record`
+
+ code: :bro:type:`count`
+
+ value: :bro:type:`string`
+
+ DHCP Relay Agent Information Option (Option 82)
+ .. bro:see:: dhcp_message
+
+.. bro:type:: DHCP::SubOpts
+
+ :Type: :bro:type:`vector` of :bro:type:`DHCP::SubOpt`
+
+
+.. bro:type:: DHCP::ClientFQDN
+
+ :Type: :bro:type:`record`
+
+ flags: :bro:type:`count`
+ An unparsed bitfield of flags (refer to RFC 4702).
+
+ rcode1: :bro:type:`count`
+ This field is deprecated in the standard.
+
+ rcode2: :bro:type:`count`
+ This field is deprecated in the standard.
+
+ domain_name: :bro:type:`string`
+ The Domain Name part of the option carries all or part of the FQDN
+ of a DHCP client.
+
+ DHCP Client FQDN Option information (Option 81)
+
+.. bro:type:: DHCP::ClientID
+
+ :Type: :bro:type:`record`
+
+ hwtype: :bro:type:`count`
+
+ hwaddr: :bro:type:`string`
+
+ DHCP Client Identifier (Option 61)
+ .. bro:see:: dhcp_message
+
+.. bro:type:: DHCP::Options
+
+ :Type: :bro:type:`record`
+
+ options: :bro:type:`index_vec` :bro:attr:`&optional`
+ The ordered list of all DHCP option numbers.
+
+ subnet_mask: :bro:type:`addr` :bro:attr:`&optional`
+ Subnet Mask Value (option 1)
+
+ routers: :bro:type:`DHCP::Addrs` :bro:attr:`&optional`
+ Router addresses (option 3)
+
+ dns_servers: :bro:type:`DHCP::Addrs` :bro:attr:`&optional`
+ DNS Server addresses (option 6)
+
+ host_name: :bro:type:`string` :bro:attr:`&optional`
+ The Hostname of the client (option 12)
+
+ domain_name: :bro:type:`string` :bro:attr:`&optional`
+ The DNS domain name of the client (option 15)
+
+ forwarding: :bro:type:`bool` :bro:attr:`&optional`
+ Enable/Disable IP Forwarding (option 19)
+
+ broadcast: :bro:type:`addr` :bro:attr:`&optional`
+ Broadcast Address (option 28)
+
+ vendor: :bro:type:`string` :bro:attr:`&optional`
+ Vendor specific data. This can frequently
+ be unparsed binary data. (option 43)
+
+ nbns: :bro:type:`DHCP::Addrs` :bro:attr:`&optional`
+ NETBIOS name server list (option 44)
+
+ addr_request: :bro:type:`addr` :bro:attr:`&optional`
+ Address requested by the client (option 50)
+
+ lease: :bro:type:`interval` :bro:attr:`&optional`
+ Lease time offered by the server. (option 51)
+
+ serv_addr: :bro:type:`addr` :bro:attr:`&optional`
+ Server address to allow clients to distinguish
+ between lease offers. (option 54)
+
+ param_list: :bro:type:`index_vec` :bro:attr:`&optional`
+ DHCP Parameter Request list (option 55)
+
+ message: :bro:type:`string` :bro:attr:`&optional`
+ Textual error message (option 56)
+
+ max_msg_size: :bro:type:`count` :bro:attr:`&optional`
+ Maximum Message Size (option 57)
+
+ renewal_time: :bro:type:`interval` :bro:attr:`&optional`
+ This option specifies the time interval from address
+ assignment until the client transitions to the
+ RENEWING state. (option 58)
+
+ rebinding_time: :bro:type:`interval` :bro:attr:`&optional`
+ This option specifies the time interval from address
+ assignment until the client transitions to the
+ REBINDING state. (option 59)
+
+ vendor_class: :bro:type:`string` :bro:attr:`&optional`
+ This option is used by DHCP clients to optionally
+ identify the vendor type and configuration of a DHCP
+ client. (option 60)
+
+ client_id: :bro:type:`DHCP::ClientID` :bro:attr:`&optional`
+ DHCP Client Identifier (Option 61)
+
+ user_class: :bro:type:`string` :bro:attr:`&optional`
+ User Class opaque value (Option 77)
+
+ client_fqdn: :bro:type:`DHCP::ClientFQDN` :bro:attr:`&optional`
+ DHCP Client FQDN (Option 81)
+
+ sub_opt: :bro:type:`DHCP::SubOpts` :bro:attr:`&optional`
+ DHCP Relay Agent Information Option (Option 82)
+
+ auto_config: :bro:type:`bool` :bro:attr:`&optional`
+ Auto Config option to let host know if it's allowed to
+ auto assign an IP address. (Option 116)
+
+ auto_proxy_config: :bro:type:`string` :bro:attr:`&optional`
+ URL to find a proxy.pac for auto proxy config (Option 252)
+
+
+Events
+++++++
+
+.. bro:id:: dhcp_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, msg: :bro:type:`DHCP::Msg`, options: :bro:type:`DHCP::Options`)
+
+ Generated for all DHCP messages.
+
+
+ :c: The connection record describing the underlying UDP flow.
+
+
+ :is_orig: Indicate if the message came in a packet from the
+ originator/client of the udp flow or the responder/server.
+
+
+ :msg: The parsed type-independent part of the DHCP message. The message
+ type is indicated in this record.
+
+
+ :options: The full set of supported and parsed DHCP options.
+
+Bro::DNP3
+---------
+
+DNP3 UDP/TCP analyzers
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_DNP3_TCP`
+
+:bro:enum:`Analyzer::ANALYZER_DNP3_UDP`
+
+Events
+++++++
+
+.. bro:id:: dnp3_application_request_header
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, application: :bro:type:`count`, fc: :bro:type:`count`)
+
+ Generated for a DNP3 request header.
+
+
+ :c: The connection the DNP3 communication is part of.
+
+
+ :is_orig: True if this reflects originator-side activity.
+
+
+ :fc: function code.
+
+
+.. bro:id:: dnp3_application_response_header
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, application: :bro:type:`count`, fc: :bro:type:`count`, iin: :bro:type:`count`)
+
+ Generated for a DNP3 response header.
+
+
+ :c: The connection the DNP3 communication is part of.
+
+
+ :is_orig: True if this reflects originator-side activity.
+
+
+ :fc: function code.
+
+
+ :iin: internal indication number.
+
+
+.. bro:id:: dnp3_object_header
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, obj_type: :bro:type:`count`, qua_field: :bro:type:`count`, number: :bro:type:`count`, rf_low: :bro:type:`count`, rf_high: :bro:type:`count`)
+
+ Generated for the object header found in both DNP3 requests and responses.
+
+
+ :c: The connection the DNP3 communication is part of.
+
+
+ :is_orig: True if this reflects originator-side activity.
+
+
+ :obj_type: type of object, which is classified based on an 8-bit group number
+ and an 8-bit variation number.
+
+
+ :qua_field: qualifier field.
+
+
+ :number: TODO.
+
+
+ :rf_low: the structure of the range field depends on the qualified field.
+ In some cases, the range field contains only one logic part, e.g.,
+ number of objects, so only *rf_low* contains useful values.
+
+
+ :rf_high: in some cases, the range field contains two logic parts, e.g., start
+ index and stop index, so *rf_low* contains the start index
+ while *rf_high* contains the stop index.
+
+
+.. bro:id:: dnp3_object_prefix
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix_value: :bro:type:`count`)
+
+ Generated for the prefix before a DNP3 object. The structure and the meaning
+ of the prefix are defined by the qualifier field.
+
+
+ :c: The connection the DNP3 communication is part of.
+
+
+ :is_orig: True if this reflects originator-side activity.
+
+
+ :prefix_value: The prefix.
+
+
+.. bro:id:: dnp3_header_block
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, len: :bro:type:`count`, ctrl: :bro:type:`count`, dest_addr: :bro:type:`count`, src_addr: :bro:type:`count`)
+
+ Generated for an additional header that the DNP3 analyzer passes to the
+ script-level. This header mimics the DNP3 transport-layer yet is only passed
+ once for each sequence of DNP3 records (which are otherwise reassembled and
+ treated as a single entity).
+
+
+ :c: The connection the DNP3 communication is part of.
+
+
+ :is_orig: True if this reflects originator-side activity.
+
+
+ :len: the "length" field in the DNP3 Pseudo Link Layer.
+
+
+ :ctrl: the "control" field in the DNP3 Pseudo Link Layer.
+
+
+ :dest_addr: the "destination" field in the DNP3 Pseudo Link Layer.
+
+
+ :src_addr: the "source" field in the DNP3 Pseudo Link Layer.
+
+
+.. bro:id:: dnp3_response_data_object
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, data_value: :bro:type:`count`)
+
+ Generated for a DNP3 "Response_Data_Object".
+ The "Response_Data_Object" contains two parts: object prefix and object
+ data. In most cases, object data are defined by new record types. But
+ in a few cases, object data are directly basic types, such as int16, or
+ int8; thus we use an additional *data_value* to record the values of those
+ object data.
+
+
+ :c: The connection the DNP3 communication is part of.
+
+
+ :is_orig: True if this reflects originator-side activity.
+
+
+ :data_value: The value for those objects that carry their information here
+ directly.
+
+
+.. bro:id:: dnp3_attribute_common
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, data_type_code: :bro:type:`count`, leng: :bro:type:`count`, attribute_obj: :bro:type:`string`)
+
+ Generated for DNP3 attributes.
+
+.. bro:id:: dnp3_crob
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, control_code: :bro:type:`count`, count8: :bro:type:`count`, on_time: :bro:type:`count`, off_time: :bro:type:`count`, status_code: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 12 and variation number 1
+
+ :CROB: control relay output block
+
+.. bro:id:: dnp3_pcb
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, control_code: :bro:type:`count`, count8: :bro:type:`count`, on_time: :bro:type:`count`, off_time: :bro:type:`count`, status_code: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 12 and variation number 2
+
+ :PCB: Pattern Control Block
+
+.. bro:id:: dnp3_counter_32wFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, count_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 20 and variation number 1
+ counter 32 bit with flag
+
+.. bro:id:: dnp3_counter_16wFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, count_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 20 and variation number 2
+ counter 16 bit with flag
+
+.. bro:id:: dnp3_counter_32woFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, count_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 20 and variation number 5
+ counter 32 bit without flag
+
+.. bro:id:: dnp3_counter_16woFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, count_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 20 and variation number 6
+ counter 16 bit without flag
+
+.. bro:id:: dnp3_frozen_counter_32wFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, count_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 21 and variation number 1
+ frozen counter 32 bit with flag
+
+.. bro:id:: dnp3_frozen_counter_16wFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, count_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 21 and variation number 2
+ frozen counter 16 bit with flag
+
+.. bro:id:: dnp3_frozen_counter_32wFlagTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, count_value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 21 and variation number 5
+ frozen counter 32 bit with flag and time
+
+.. bro:id:: dnp3_frozen_counter_16wFlagTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, count_value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 21 and variation number 6
+ frozen counter 16 bit with flag and time
+
+.. bro:id:: dnp3_frozen_counter_32woFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, count_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 21 and variation number 9
+ frozen counter 32 bit without flag
+
+.. bro:id:: dnp3_frozen_counter_16woFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, count_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 21 and variation number 10
+ frozen counter 16 bit without flag
+
+.. bro:id:: dnp3_analog_input_32wFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 30 and variation number 1
+ analog input 32 bit with flag
+
+.. bro:id:: dnp3_analog_input_16wFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 30 and variation number 2
+ analog input 16 bit with flag
+
+.. bro:id:: dnp3_analog_input_32woFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 30 and variation number 3
+ analog input 32 bit without flag
+
+.. bro:id:: dnp3_analog_input_16woFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 30 and variation number 4
+ analog input 16 bit without flag
+
+.. bro:id:: dnp3_analog_input_SPwFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 30 and variation number 5
+ analog input single precision, float point with flag
+
+.. bro:id:: dnp3_analog_input_DPwFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value_low: :bro:type:`count`, value_high: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 30 and variation number 6
+ analog input double precision, float point with flag
+
+.. bro:id:: dnp3_frozen_analog_input_32wFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 31 and variation number 1
+ frozen analog input 32 bit with flag
+
+.. bro:id:: dnp3_frozen_analog_input_16wFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 31 and variation number 2
+ frozen analog input 16 bit with flag
+
+.. bro:id:: dnp3_frozen_analog_input_32wTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 31 and variation number 3
+ frozen analog input 32 bit with time-of-freeze
+
+.. bro:id:: dnp3_frozen_analog_input_16wTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 31 and variation number 4
+ frozen analog input 16 bit with time-of-freeze
+
+.. bro:id:: dnp3_frozen_analog_input_32woFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, frozen_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 31 and variation number 5
+ frozen analog input 32 bit without flag
+
+.. bro:id:: dnp3_frozen_analog_input_16woFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, frozen_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 31 and variation number 6
+ frozen analog input 16 bit without flag
+
+.. bro:id:: dnp3_frozen_analog_input_SPwFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 31 and variation number 7
+ frozen analog input single-precision, float point with flag
+
+.. bro:id:: dnp3_frozen_analog_input_DPwFlag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value_low: :bro:type:`count`, frozen_value_high: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 31 and variation number 8
+ frozen analog input double-precision, float point with flag
+
+.. bro:id:: dnp3_analog_input_event_32woTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 32 and variation number 1
+ analog input event 32 bit without time
+
+.. bro:id:: dnp3_analog_input_event_16woTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 32 and variation number 2
+ analog input event 16 bit without time
+
+.. bro:id:: dnp3_analog_input_event_32wTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 32 and variation number 3
+ analog input event 32 bit with time
+
+.. bro:id:: dnp3_analog_input_event_16wTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 32 and variation number 4
+ analog input event 16 bit with time
+
+.. bro:id:: dnp3_analog_input_event_SPwoTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 32 and variation number 5
+ analog input event single-precision float point without time
+
+.. bro:id:: dnp3_analog_input_event_DPwoTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value_low: :bro:type:`count`, value_high: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 32 and variation number 6
+ analog input event double-precision float point without time
+
+.. bro:id:: dnp3_analog_input_event_SPwTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 32 and variation number 7
+ analog input event single-precision float point with time
+
+.. bro:id:: dnp3_analog_input_event_DPwTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, value_low: :bro:type:`count`, value_high: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 32 and variation number 8
+ analog input event double-precisiion float point with time
+
+.. bro:id:: dnp3_frozen_analog_input_event_32woTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 33 and variation number 1
+ frozen analog input event 32 bit without time
+
+.. bro:id:: dnp3_frozen_analog_input_event_16woTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 33 and variation number 2
+ frozen analog input event 16 bit without time
+
+.. bro:id:: dnp3_frozen_analog_input_event_32wTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 33 and variation number 3
+ frozen analog input event 32 bit with time
+
+.. bro:id:: dnp3_frozen_analog_input_event_16wTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 33 and variation number 4
+ frozen analog input event 16 bit with time
+
+.. bro:id:: dnp3_frozen_analog_input_event_SPwoTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 33 and variation number 5
+ frozen analog input event single-precision float point without time
+
+.. bro:id:: dnp3_frozen_analog_input_event_DPwoTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value_low: :bro:type:`count`, frozen_value_high: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 33 and variation number 6
+ frozen analog input event double-precision float point without time
+
+.. bro:id:: dnp3_frozen_analog_input_event_SPwTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 33 and variation number 7
+ frozen analog input event single-precision float point with time
+
+.. bro:id:: dnp3_frozen_analog_input_event_DPwTime
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, flag: :bro:type:`count`, frozen_value_low: :bro:type:`count`, frozen_value_high: :bro:type:`count`, time48: :bro:type:`count`)
+
+ Generated for DNP3 objects with the group number 34 and variation number 8
+ frozen analog input event double-precision float point with time
+
+.. bro:id:: dnp3_file_transport
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, file_handle: :bro:type:`count`, block_num: :bro:type:`count`, file_data: :bro:type:`string`)
+
+ g70
+
+.. bro:id:: dnp3_debug_byte
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, debug: :bro:type:`string`)
+
+ Debugging event generated by the DNP3 analyzer. The "Debug_Byte" binpac unit
+ generates this for unknown "cases". The user can use it to debug the byte
+ string to check what caused the malformed network packets.
+
+Bro::DNS
+--------
+
+DNS analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_CONTENTS_DNS`
+
+:bro:enum:`Analyzer::ANALYZER_DNS`
+
+Events
+++++++
+
+.. bro:id:: dns_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, msg: :bro:type:`dns_msg`, len: :bro:type:`count`)
+
+ Generated for all DNS messages.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :is_orig: True if the message was sent by the originator of the connection.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :len: The length of the message's raw representation (i.e., the DNS payload).
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_SRV_reply dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end
+ dns_full_request dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_query_reply dns_rejected
+ dns_request non_dns_request dns_max_queries dns_session_timeout dns_skip_addl
+ dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, query: :bro:type:`string`, qtype: :bro:type:`count`, qclass: :bro:type:`count`)
+
+ Generated for DNS requests. For requests with multiple queries, this event
+ is raised once for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :query: The queried name.
+
+
+ :qtype: The queried resource record type.
+
+
+ :qclass: The queried resource record class.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_SRV_reply dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end
+ dns_full_request dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected non_dns_request dns_max_queries dns_session_timeout dns_skip_addl
+ dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_rejected
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, query: :bro:type:`string`, qtype: :bro:type:`count`, qclass: :bro:type:`count`)
+
+ Generated for DNS replies that reject a query. This event is raised if a DNS
+ reply indicates failure because it does not pass on any
+ answers to a query. Note that all of the event's parameters are parsed out of
+ the reply; there's no stateful correlation with the query.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :query: The queried name.
+
+
+ :qtype: The queried resource record type.
+
+
+ :qclass: The queried resource record class.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_SRV_reply dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end
+ dns_full_request dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_request non_dns_request dns_max_queries dns_session_timeout dns_skip_addl
+ dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_query_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, query: :bro:type:`string`, qtype: :bro:type:`count`, qclass: :bro:type:`count`)
+
+ Generated for each entry in the Question section of a DNS reply.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :query: The queried name.
+
+
+ :qtype: The queried resource record type.
+
+
+ :qclass: The queried resource record class.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_SRV_reply dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end
+ dns_full_request dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_rejected
+ dns_request non_dns_request dns_max_queries dns_session_timeout dns_skip_addl
+ dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_A_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, a: :bro:type:`addr`)
+
+ Generated for DNS replies of type *A*. For replies with multiple answers, an
+ individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :a: The address returned by the reply.
+
+ .. bro:see:: dns_AAAA_reply dns_A6_reply dns_CNAME_reply dns_EDNS_addl dns_HINFO_reply
+ dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply dns_SRV_reply
+ dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_AAAA_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, a: :bro:type:`addr`)
+
+ Generated for DNS replies of type *AAAA*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :a: The address returned by the reply.
+
+ .. bro:see:: dns_A_reply dns_A6_reply dns_CNAME_reply dns_EDNS_addl dns_HINFO_reply dns_MX_reply
+ dns_NS_reply dns_PTR_reply dns_SOA_reply dns_SRV_reply dns_TSIG_addl
+ dns_TXT_reply dns_WKS_reply dns_end dns_full_request dns_mapping_altered
+ dns_mapping_lost_name dns_mapping_new_name dns_mapping_unverified
+ dns_mapping_valid dns_message dns_query_reply dns_rejected dns_request
+ non_dns_request dns_max_queries dns_session_timeout dns_skip_addl
+ dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_A6_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, a: :bro:type:`addr`)
+
+ Generated for DNS replies of type *A6*. For replies with multiple answers, an
+ individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :a: The address returned by the reply.
+
+ .. bro:see:: dns_A_reply dns_AAAA_reply dns_CNAME_reply dns_EDNS_addl dns_HINFO_reply dns_MX_reply
+ dns_NS_reply dns_PTR_reply dns_SOA_reply dns_SRV_reply dns_TSIG_addl
+ dns_TXT_reply dns_WKS_reply dns_end dns_full_request dns_mapping_altered
+ dns_mapping_lost_name dns_mapping_new_name dns_mapping_unverified
+ dns_mapping_valid dns_message dns_query_reply dns_rejected dns_request
+ non_dns_request dns_max_queries dns_session_timeout dns_skip_addl
+ dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_NS_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, name: :bro:type:`string`)
+
+ Generated for DNS replies of type *NS*. For replies with multiple answers, an
+ individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :name: The name returned by the reply.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_PTR_reply dns_SOA_reply dns_SRV_reply
+ dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_CNAME_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, name: :bro:type:`string`)
+
+ Generated for DNS replies of type *CNAME*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :name: The name returned by the reply.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_EDNS_addl dns_HINFO_reply dns_MX_reply
+ dns_NS_reply dns_PTR_reply dns_SOA_reply dns_SRV_reply dns_TSIG_addl
+ dns_TXT_reply dns_WKS_reply dns_end dns_full_request dns_mapping_altered
+ dns_mapping_lost_name dns_mapping_new_name dns_mapping_unverified
+ dns_mapping_valid dns_message dns_query_reply dns_rejected dns_request
+ non_dns_request dns_max_queries dns_session_timeout dns_skip_addl
+ dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_PTR_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, name: :bro:type:`string`)
+
+ Generated for DNS replies of type *PTR*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :name: The name returned by the reply.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_SOA_reply dns_SRV_reply
+ dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_SOA_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, soa: :bro:type:`dns_soa`)
+
+ Generated for DNS replies of type *CNAME*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :soa: The parsed SOA value.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SRV_reply
+ dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_WKS_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`)
+
+ Generated for DNS replies of type *WKS*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_SRV_reply dns_TSIG_addl dns_TXT_reply dns_end dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_HINFO_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`)
+
+ Generated for DNS replies of type *HINFO*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl dns_MX_reply
+ dns_NS_reply dns_PTR_reply dns_SOA_reply dns_SRV_reply dns_TSIG_addl
+ dns_TXT_reply dns_WKS_reply dns_end dns_full_request dns_mapping_altered
+ dns_mapping_lost_name dns_mapping_new_name dns_mapping_unverified
+ dns_mapping_valid dns_message dns_query_reply dns_rejected dns_request
+ non_dns_request dns_max_queries dns_session_timeout dns_skip_addl
+ dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_MX_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, name: :bro:type:`string`, preference: :bro:type:`count`)
+
+ Generated for DNS replies of type *MX*. For replies with multiple answers, an
+ individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :name: The name returned by the reply.
+
+
+ :preference: The preference for *name* specified by the reply.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_NS_reply dns_PTR_reply dns_SOA_reply dns_SRV_reply
+ dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_TXT_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, strs: :bro:type:`string_vec`)
+
+ Generated for DNS replies of type *TXT*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :strs: The textual information returned by the reply.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_SRV_reply dns_TSIG_addl dns_WKS_reply dns_end dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_CAA_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, flags: :bro:type:`count`, tag: :bro:type:`string`, value: :bro:type:`string`)
+
+ Generated for DNS replies of type *CAA* (Certification Authority Authorization).
+ For replies with multiple answers, an individual event of the corresponding type
+ is raised for each.
+ See `RFC 6844 `__ for more details.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :flags: The flags byte of the CAA reply.
+
+
+ :tag: The property identifier of the CAA reply.
+
+
+ :value: The property value of the CAA reply.
+
+.. bro:id:: dns_SRV_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, target: :bro:type:`string`, priority: :bro:type:`count`, weight: :bro:type:`count`, p: :bro:type:`count`)
+
+ Generated for DNS replies of type *SRV*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :target: Target of the SRV response -- the canonical hostname of the
+ machine providing the service, ending in a dot.
+
+
+ :priority: Priority of the SRV response -- the priority of the target
+ host, lower value means more preferred.
+
+
+ :weight: Weight of the SRV response -- a relative weight for records
+ with the same priority, higher value means more preferred.
+
+
+ :p: Port of the SRV response -- the TCP or UDP port on which the
+ service is to be found.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_end dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_unknown_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`)
+
+ Generated on DNS reply resource records when the type of record is not one
+ that Bro knows how to parse and generate another more specific event.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_SRV_reply dns_end
+
+.. bro:id:: dns_EDNS_addl
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_edns_additional`)
+
+ Generated for DNS replies of type *EDNS*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The parsed EDNS reply.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_HINFO_reply dns_MX_reply
+ dns_NS_reply dns_PTR_reply dns_SOA_reply dns_SRV_reply dns_TSIG_addl
+ dns_TXT_reply dns_WKS_reply dns_end dns_full_request dns_mapping_altered
+ dns_mapping_lost_name dns_mapping_new_name dns_mapping_unverified
+ dns_mapping_valid dns_message dns_query_reply dns_rejected dns_request
+ non_dns_request dns_max_queries dns_session_timeout dns_skip_addl
+ dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_TSIG_addl
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_tsig_additional`)
+
+ Generated for DNS replies of type *TSIG*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The parsed TSIG reply.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_SRV_reply dns_TXT_reply dns_WKS_reply dns_end dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_RRSIG
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, rrsig: :bro:type:`dns_rrsig_rr`)
+
+ Generated for DNS replies of type *RRSIG*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :rrsig: The parsed RRSIG record.
+
+.. bro:id:: dns_DNSKEY
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, dnskey: :bro:type:`dns_dnskey_rr`)
+
+ Generated for DNS replies of type *DNSKEY*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :dnskey: The parsed DNSKEY record.
+
+.. bro:id:: dns_NSEC
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, next_name: :bro:type:`string`, bitmaps: :bro:type:`string_vec`)
+
+ Generated for DNS replies of type *NSEC*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :next_name: The parsed next secure domain name.
+
+
+ :bitmaps: vector of strings in hex for the bit maps present.
+
+.. bro:id:: dns_NSEC3
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, nsec3: :bro:type:`dns_nsec3_rr`)
+
+ Generated for DNS replies of type *NSEC3*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :nsec3: The parsed RDATA of Nsec3 record.
+
+.. bro:id:: dns_DS
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`, ans: :bro:type:`dns_answer`, ds: :bro:type:`dns_ds_rr`)
+
+ Generated for DNS replies of type *DS*. For replies with multiple answers,
+ an individual event of the corresponding type is raised for each.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+
+ :ans: The type-independent part of the parsed answer record.
+
+
+ :ds: The parsed RDATA of DS record.
+
+.. bro:id:: dns_end
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`dns_msg`)
+
+ Generated at the end of processing a DNS packet. This event is the last
+ ``dns_*`` event that will be raised for a DNS query/reply and signals that
+ all resource records have been passed on.
+
+ See `Wikipedia `__ for more
+ information about the DNS protocol. Bro analyzes both UDP and TCP DNS
+ sessions.
+
+
+ :c: The connection, which may be UDP or TCP depending on the type of the
+ transport-layer session being analyzed.
+
+
+ :msg: The parsed DNS message header.
+
+ .. bro:see:: dns_AAAA_reply dns_A_reply dns_CNAME_reply dns_EDNS_addl
+ dns_HINFO_reply dns_MX_reply dns_NS_reply dns_PTR_reply dns_SOA_reply
+ dns_SRV_reply dns_TSIG_addl dns_TXT_reply dns_WKS_reply dns_full_request
+ dns_mapping_altered dns_mapping_lost_name dns_mapping_new_name
+ dns_mapping_unverified dns_mapping_valid dns_message dns_query_reply
+ dns_rejected dns_request non_dns_request dns_max_queries dns_session_timeout
+ dns_skip_addl dns_skip_all_addl dns_skip_all_auth dns_skip_auth
+
+.. bro:id:: dns_full_request
+
+ :Type: :bro:type:`event` ()
+
+ Deprecated. Will be removed.
+
+ .. todo:: Unclear what this event is for; it's never raised. We should just
+ remove it.
+
+.. bro:id:: non_dns_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`string`)
+
+
+ :msg: The raw DNS payload.
+
+ .. note:: This event is deprecated and superseded by Bro's dynamic protocol
+ detection framework.
+
+Bro::File
+---------
+
+Generic file analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_FTP_DATA`
+
+:bro:enum:`Analyzer::ANALYZER_IRC_DATA`
+
+Events
+++++++
+
+.. bro:id:: file_transferred
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, prefix: :bro:type:`string`, descr: :bro:type:`string`, mime_type: :bro:type:`string`)
+
+ Generated when a TCP connection associated w/ file data transfer is seen
+ (e.g. as happens w/ FTP or IRC).
+
+
+ :c: The connection over which file data is transferred.
+
+
+ :prefix: Up to 1024 bytes of the file data.
+
+
+ :descr: Deprecated/unused argument.
+
+
+ :mime_type: MIME type of the file or "" if no file magic signatures
+ matched.
+
+Bro::Finger
+-----------
+
+Finger analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_FINGER`
+
+Events
+++++++
+
+.. bro:id:: finger_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, full: :bro:type:`bool`, username: :bro:type:`string`, hostname: :bro:type:`string`)
+
+ Generated for Finger requests.
+
+ See `Wikipedia `__ for more
+ information about the Finger protocol.
+
+
+ :c: The connection.
+
+
+ :full: True if verbose information is requested (``/W`` switch).
+
+
+ :username: The request's user name.
+
+
+ :hostname: The request's host name.
+
+ .. bro:see:: finger_reply
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: finger_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, reply_line: :bro:type:`string`)
+
+ Generated for Finger replies.
+
+ See `Wikipedia `__ for more
+ information about the Finger protocol.
+
+
+ :c: The connection.
+
+
+ :reply_line: The reply as returned by the server
+
+ .. bro:see:: finger_request
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+Bro::FTP
+--------
+
+FTP analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_FTP`
+
+:bro:enum:`Analyzer::ANALYZER_FTP_ADAT`
+
+Types
++++++
+
+.. bro:type:: ftp_port
+
+ :Type: :bro:type:`record`
+
+ h: :bro:type:`addr`
+ The host's address.
+
+ p: :bro:type:`port`
+ The host's port.
+
+ valid: :bro:type:`bool`
+ True if format was right. Only then are *h* and *p* valid.
+
+ A parsed host/port combination describing server endpoint for an upcoming
+ data transfer.
+
+ .. bro:see:: fmt_ftp_port parse_eftp_port parse_ftp_epsv parse_ftp_pasv
+ parse_ftp_port
+
+Events
+++++++
+
+.. bro:id:: ftp_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, command: :bro:type:`string`, arg: :bro:type:`string`)
+
+ Generated for client-side FTP commands.
+
+ See `Wikipedia `__ for
+ more information about the FTP protocol.
+
+
+ :c: The connection.
+
+
+ :command: The FTP command issued by the client (without any arguments).
+
+
+ :arg: The arguments going with the command.
+
+ .. bro:see:: ftp_reply fmt_ftp_port parse_eftp_port
+ parse_ftp_epsv parse_ftp_pasv parse_ftp_port
+
+.. bro:id:: ftp_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, code: :bro:type:`count`, msg: :bro:type:`string`, cont_resp: :bro:type:`bool`)
+
+ Generated for server-side FTP replies.
+
+ See `Wikipedia `__ for
+ more information about the FTP protocol.
+
+
+ :c: The connection.
+
+
+ :code: The numerical response code the server responded with.
+
+
+ :msg: The textual message of the response.
+
+
+ :cont_resp: True if the reply line is tagged as being continued to the next
+ line. If so, further events will be raised and a handler may want
+ to reassemble the pieces before processing the response any
+ further.
+
+ .. bro:see:: ftp_request fmt_ftp_port parse_eftp_port
+ parse_ftp_epsv parse_ftp_pasv parse_ftp_port
+
+Functions
++++++++++
+
+.. bro:id:: parse_ftp_port
+
+ :Type: :bro:type:`function` (s: :bro:type:`string`) : :bro:type:`ftp_port`
+
+ Converts a string representation of the FTP PORT command to an
+ :bro:type:`ftp_port`.
+
+
+ :s: The string of the FTP PORT command, e.g., ``"10,0,0,1,4,31"``.
+
+
+ :returns: The FTP PORT, e.g., ``[h=10.0.0.1, p=1055/tcp, valid=T]``.
+
+ .. bro:see:: parse_eftp_port parse_ftp_pasv parse_ftp_epsv fmt_ftp_port
+
+.. bro:id:: parse_eftp_port
+
+ :Type: :bro:type:`function` (s: :bro:type:`string`) : :bro:type:`ftp_port`
+
+ Converts a string representation of the FTP EPRT command (see :rfc:`2428`)
+ to an :bro:type:`ftp_port`. The format is
+ ``"EPRT"``,
+ where ```` is a delimiter in the ASCII range 33-126 (usually ``|``).
+
+
+ :s: The string of the FTP EPRT command, e.g., ``"|1|10.0.0.1|1055|"``.
+
+
+ :returns: The FTP PORT, e.g., ``[h=10.0.0.1, p=1055/tcp, valid=T]``.
+
+ .. bro:see:: parse_ftp_port parse_ftp_pasv parse_ftp_epsv fmt_ftp_port
+
+.. bro:id:: parse_ftp_pasv
+
+ :Type: :bro:type:`function` (str: :bro:type:`string`) : :bro:type:`ftp_port`
+
+ Converts the result of the FTP PASV command to an :bro:type:`ftp_port`.
+
+
+ :str: The string containing the result of the FTP PASV command.
+
+
+ :returns: The FTP PORT, e.g., ``[h=10.0.0.1, p=1055/tcp, valid=T]``.
+
+ .. bro:see:: parse_ftp_port parse_eftp_port parse_ftp_epsv fmt_ftp_port
+
+.. bro:id:: parse_ftp_epsv
+
+ :Type: :bro:type:`function` (str: :bro:type:`string`) : :bro:type:`ftp_port`
+
+ Converts the result of the FTP EPSV command (see :rfc:`2428`) to an
+ :bro:type:`ftp_port`. The format is ``" ()"``,
+ where ```` is a delimiter in the ASCII range 33-126 (usually ``|``).
+
+
+ :str: The string containing the result of the FTP EPSV command.
+
+
+ :returns: The FTP PORT, e.g., ``[h=10.0.0.1, p=1055/tcp, valid=T]``.
+
+ .. bro:see:: parse_ftp_port parse_eftp_port parse_ftp_pasv fmt_ftp_port
+
+.. bro:id:: fmt_ftp_port
+
+ :Type: :bro:type:`function` (a: :bro:type:`addr`, p: :bro:type:`port`) : :bro:type:`string`
+
+ Formats an IP address and TCP port as an FTP PORT command. For example,
+ ``10.0.0.1`` and ``1055/tcp`` yields ``"10,0,0,1,4,31"``.
+
+
+ :a: The IP address.
+
+
+ :p: The TCP port.
+
+
+ :returns: The FTP PORT string.
+
+ .. bro:see:: parse_ftp_port parse_eftp_port parse_ftp_pasv parse_ftp_epsv
+
+Bro::Gnutella
+-------------
+
+Gnutella analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_GNUTELLA`
+
+Events
+++++++
+
+.. bro:id:: gnutella_text_msg
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, orig: :bro:type:`bool`, headers: :bro:type:`string`)
+
+ TODO.
+
+ See `Wikipedia `__ for more
+ information about the Gnutella protocol.
+
+ .. bro:see:: gnutella_binary_msg gnutella_establish gnutella_http_notify
+ gnutella_not_establish gnutella_partial_binary_msg gnutella_signature_found
+
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: gnutella_binary_msg
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, orig: :bro:type:`bool`, msg_type: :bro:type:`count`, ttl: :bro:type:`count`, hops: :bro:type:`count`, msg_len: :bro:type:`count`, payload: :bro:type:`string`, payload_len: :bro:type:`count`, trunc: :bro:type:`bool`, complete: :bro:type:`bool`)
+
+ TODO.
+
+ See `Wikipedia `__ for more
+ information about the Gnutella protocol.
+
+ .. bro:see:: gnutella_establish gnutella_http_notify gnutella_not_establish
+ gnutella_partial_binary_msg gnutella_signature_found gnutella_text_msg
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: gnutella_partial_binary_msg
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, orig: :bro:type:`bool`, msg: :bro:type:`string`, len: :bro:type:`count`)
+
+ TODO.
+
+ See `Wikipedia `__ for more
+ information about the Gnutella protocol.
+
+ .. bro:see:: gnutella_binary_msg gnutella_establish gnutella_http_notify
+ gnutella_not_establish gnutella_signature_found gnutella_text_msg
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: gnutella_establish
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ TODO.
+
+ See `Wikipedia `__ for more
+ information about the Gnutella protocol.
+
+ .. bro:see:: gnutella_binary_msg gnutella_http_notify gnutella_not_establish
+ gnutella_partial_binary_msg gnutella_signature_found gnutella_text_msg
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: gnutella_not_establish
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ TODO.
+
+ See `Wikipedia `__ for more
+ information about the Gnutella protocol.
+
+ .. bro:see:: gnutella_binary_msg gnutella_establish gnutella_http_notify
+ gnutella_partial_binary_msg gnutella_signature_found gnutella_text_msg
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: gnutella_http_notify
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ TODO.
+
+ See `Wikipedia `__ for more
+ information about the Gnutella protocol.
+
+ .. bro:see:: gnutella_binary_msg gnutella_establish gnutella_not_establish
+ gnutella_partial_binary_msg gnutella_signature_found gnutella_text_msg
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+Bro::GSSAPI
+-----------
+
+GSSAPI analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_GSSAPI`
+
+Events
+++++++
+
+.. bro:id:: gssapi_neg_result
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, state: :bro:type:`count`)
+
+ Generated for GSSAPI negotiation results.
+
+
+ :c: The connection.
+
+
+ :state: The resulting state of the negotiation.
+
+
+Bro::GTPv1
+----------
+
+GTPv1 analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_GTPV1`
+
+Events
+++++++
+
+.. bro:id:: gtpv1_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, hdr: :bro:type:`gtpv1_hdr`)
+
+ Generated for any GTP message with a GTPv1 header.
+
+
+ :c: The connection over which the message is sent.
+
+
+ :hdr: The GTPv1 header.
+
+.. bro:id:: gtpv1_g_pdu_packet
+
+ :Type: :bro:type:`event` (outer: :bro:type:`connection`, inner_gtp: :bro:type:`gtpv1_hdr`, inner_ip: :bro:type:`pkt_hdr`)
+
+ Generated for GTPv1 G-PDU packets. That is, packets with a UDP payload
+ that includes a GTP header followed by an IPv4 or IPv6 packet.
+
+
+ :outer: The GTP outer tunnel connection.
+
+
+ :inner_gtp: The GTP header.
+
+
+ :inner_ip: The inner IP and transport layer packet headers.
+
+ .. note:: Since this event may be raised on a per-packet basis, handling
+ it may become particularly expensive for real-time analysis.
+
+.. bro:id:: gtpv1_create_pdp_ctx_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, hdr: :bro:type:`gtpv1_hdr`, elements: :bro:type:`gtp_create_pdp_ctx_request_elements`)
+
+ Generated for GTPv1-C Create PDP Context Request messages.
+
+
+ :c: The connection over which the message is sent.
+
+
+ :hdr: The GTPv1 header.
+
+
+ :elements: The set of Information Elements comprising the message.
+
+.. bro:id:: gtpv1_create_pdp_ctx_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, hdr: :bro:type:`gtpv1_hdr`, elements: :bro:type:`gtp_create_pdp_ctx_response_elements`)
+
+ Generated for GTPv1-C Create PDP Context Response messages.
+
+
+ :c: The connection over which the message is sent.
+
+
+ :hdr: The GTPv1 header.
+
+
+ :elements: The set of Information Elements comprising the message.
+
+.. bro:id:: gtpv1_update_pdp_ctx_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, hdr: :bro:type:`gtpv1_hdr`, elements: :bro:type:`gtp_update_pdp_ctx_request_elements`)
+
+ Generated for GTPv1-C Update PDP Context Request messages.
+
+
+ :c: The connection over which the message is sent.
+
+
+ :hdr: The GTPv1 header.
+
+
+ :elements: The set of Information Elements comprising the message.
+
+.. bro:id:: gtpv1_update_pdp_ctx_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, hdr: :bro:type:`gtpv1_hdr`, elements: :bro:type:`gtp_update_pdp_ctx_response_elements`)
+
+ Generated for GTPv1-C Update PDP Context Response messages.
+
+
+ :c: The connection over which the message is sent.
+
+
+ :hdr: The GTPv1 header.
+
+
+ :elements: The set of Information Elements comprising the message.
+
+.. bro:id:: gtpv1_delete_pdp_ctx_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, hdr: :bro:type:`gtpv1_hdr`, elements: :bro:type:`gtp_delete_pdp_ctx_request_elements`)
+
+ Generated for GTPv1-C Delete PDP Context Request messages.
+
+
+ :c: The connection over which the message is sent.
+
+
+ :hdr: The GTPv1 header.
+
+
+ :elements: The set of Information Elements comprising the message.
+
+.. bro:id:: gtpv1_delete_pdp_ctx_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, hdr: :bro:type:`gtpv1_hdr`, elements: :bro:type:`gtp_delete_pdp_ctx_response_elements`)
+
+ Generated for GTPv1-C Delete PDP Context Response messages.
+
+
+ :c: The connection over which the message is sent.
+
+
+ :hdr: The GTPv1 header.
+
+
+ :elements: The set of Information Elements comprising the message.
+
+Bro::HTTP
+---------
+
+HTTP analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_HTTP`
+
+Events
+++++++
+
+.. bro:id:: http_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, method: :bro:type:`string`, original_URI: :bro:type:`string`, unescaped_URI: :bro:type:`string`, version: :bro:type:`string`)
+
+ Generated for HTTP requests. Bro supports persistent and pipelined HTTP
+ sessions and raises corresponding events as it parses client/server
+ dialogues. This event is generated as soon as a request's initial line has
+ been parsed, and before any :bro:id:`http_header` events are raised.
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :method: The HTTP method extracted from the request (e.g., ``GET``, ``POST``).
+
+
+ :original_URI: The unprocessed URI as specified in the request.
+
+
+ :unescaped_URI: The URI with all percent-encodings decoded.
+
+
+ :version: The version number specified in the request (e.g., ``1.1``).
+
+ .. bro:see:: http_all_headers http_begin_entity http_content_type http_end_entity
+ http_entity_data http_event http_header http_message_done http_reply http_stats
+ truncate_http_URI http_connection_upgrade
+
+.. bro:id:: http_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, version: :bro:type:`string`, code: :bro:type:`count`, reason: :bro:type:`string`)
+
+ Generated for HTTP replies. Bro supports persistent and pipelined HTTP
+ sessions and raises corresponding events as it parses client/server
+ dialogues. This event is generated as soon as a reply's initial line has
+ been parsed, and before any :bro:id:`http_header` events are raised.
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :version: The version number specified in the reply (e.g., ``1.1``).
+
+
+ :code: The numerical response code returned by the server.
+
+
+ :reason: The textual description returned by the server along with *code*.
+
+ .. bro:see:: http_all_headers http_begin_entity http_content_type http_end_entity
+ http_entity_data http_event http_header http_message_done http_request
+ http_stats http_connection_upgrade
+
+.. bro:id:: http_header
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, name: :bro:type:`string`, value: :bro:type:`string`)
+
+ Generated for HTTP headers. Bro supports persistent and pipelined HTTP
+ sessions and raises corresponding events as it parses client/server
+ dialogues.
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the header was sent by the originator of the TCP connection.
+
+
+ :name: The name of the header.
+
+
+ :value: The value of the header.
+
+ .. bro:see:: http_all_headers http_begin_entity http_content_type http_end_entity
+ http_entity_data http_event http_message_done http_reply http_request
+ http_stats http_connection_upgrade
+
+ .. note:: This event is also raised for headers found in nested body
+ entities.
+
+.. bro:id:: http_all_headers
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, hlist: :bro:type:`mime_header_list`)
+
+ Generated for HTTP headers, passing on all headers of an HTTP message at
+ once. Bro supports persistent and pipelined HTTP sessions and raises
+ corresponding events as it parses client/server dialogues.
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the header was sent by the originator of the TCP connection.
+
+
+ :hlist: A *table* containing all headers extracted from the current entity.
+ The table is indexed by the position of the header (1 for the first,
+ 2 for the second, etc.).
+
+ .. bro:see:: http_begin_entity http_content_type http_end_entity http_entity_data
+ http_event http_header http_message_done http_reply http_request http_stats
+ http_connection_upgrade
+
+ .. note:: This event is also raised for headers found in nested body
+ entities.
+
+.. bro:id:: http_begin_entity
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ Generated when starting to parse an HTTP body entity. This event is generated
+ at least once for each non-empty (client or server) HTTP body; and
+ potentially more than once if the body contains further nested MIME
+ entities. Bro raises this event just before it starts parsing each entity's
+ content.
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the entity was sent by the originator of the TCP
+ connection.
+
+ .. bro:see:: http_all_headers http_content_type http_end_entity http_entity_data
+ http_event http_header http_message_done http_reply http_request http_stats
+ mime_begin_entity http_connection_upgrade
+
+.. bro:id:: http_end_entity
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ Generated when finishing parsing an HTTP body entity. This event is generated
+ at least once for each non-empty (client or server) HTTP body; and
+ potentially more than once if the body contains further nested MIME
+ entities. Bro raises this event at the point when it has finished parsing an
+ entity's content.
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the entity was sent by the originator of the TCP
+ connection.
+
+ .. bro:see:: http_all_headers http_begin_entity http_content_type http_entity_data
+ http_event http_header http_message_done http_reply http_request
+ http_stats mime_end_entity http_connection_upgrade
+
+.. bro:id:: http_entity_data
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, length: :bro:type:`count`, data: :bro:type:`string`)
+
+ Generated when parsing an HTTP body entity, passing on the data. This event
+ can potentially be raised many times for each entity, each time passing a
+ chunk of the data of not further defined size.
+
+ A common idiom for using this event is to first *reassemble* the data
+ at the scripting layer by concatenating it to a successively growing
+ string; and only perform further content analysis once the corresponding
+ :bro:id:`http_end_entity` event has been raised. Note, however, that doing so
+ can be quite expensive for HTTP tranders. At the very least, one should
+ impose an upper size limit on how much data is being buffered.
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the entity was sent by the originator of the TCP
+ connection.
+
+
+ :length: The length of *data*.
+
+
+ :data: One chunk of raw entity data.
+
+ .. bro:see:: http_all_headers http_begin_entity http_content_type http_end_entity
+ http_event http_header http_message_done http_reply http_request http_stats
+ mime_entity_data http_entity_data_delivery_size skip_http_data
+ http_connection_upgrade
+
+.. bro:id:: http_content_type
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, ty: :bro:type:`string`, subty: :bro:type:`string`)
+
+ Generated for reporting an HTTP body's content type. This event is
+ generated at the end of parsing an HTTP header, passing on the MIME
+ type as specified by the ``Content-Type`` header. If that header is
+ missing, this event is still raised with a default value of ``text/plain``.
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the entity was sent by the originator of the TCP
+ connection.
+
+
+ :ty: The main type.
+
+
+ :subty: The subtype.
+
+ .. bro:see:: http_all_headers http_begin_entity http_end_entity http_entity_data
+ http_event http_header http_message_done http_reply http_request http_stats
+ http_connection_upgrade
+
+ .. note:: This event is also raised for headers found in nested body
+ entities.
+
+.. bro:id:: http_message_done
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, stat: :bro:type:`http_message_stat`)
+
+ Generated once at the end of parsing an HTTP message. Bro supports persistent
+ and pipelined HTTP sessions and raises corresponding events as it parses
+ client/server dialogues. A "message" is one top-level HTTP entity, such as a
+ complete request or reply. Each message can have further nested sub-entities
+ inside. This event is raised once all sub-entities belonging to a top-level
+ message have been processed (and their corresponding ``http_entity_*`` events
+ generated).
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the entity was sent by the originator of the TCP
+ connection.
+
+
+ :stat: Further meta information about the message.
+
+ .. bro:see:: http_all_headers http_begin_entity http_content_type http_end_entity
+ http_entity_data http_event http_header http_reply http_request http_stats
+ http_connection_upgrade
+
+.. bro:id:: http_event
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, event_type: :bro:type:`string`, detail: :bro:type:`string`)
+
+ Generated for errors found when decoding HTTP requests or replies.
+
+ See `Wikipedia `__
+ for more information about the HTTP protocol.
+
+
+ :c: The connection.
+
+
+ :event_type: A string describing the general category of the problem found
+ (e.g., ``illegal format``).
+
+
+ :detail: Further more detailed description of the error.
+
+ .. bro:see:: http_all_headers http_begin_entity http_content_type http_end_entity
+ http_entity_data http_header http_message_done http_reply http_request
+ http_stats mime_event http_connection_upgrade
+
+.. bro:id:: http_stats
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, stats: :bro:type:`http_stats_rec`)
+
+ Generated at the end of an HTTP session to report statistics about it. This
+ event is raised after all of an HTTP session's requests and replies have been
+ fully processed.
+
+
+ :c: The connection.
+
+
+ :stats: Statistics summarizing HTTP-level properties of the finished
+ connection.
+
+ .. bro:see:: http_all_headers http_begin_entity http_content_type http_end_entity
+ http_entity_data http_event http_header http_message_done http_reply
+ http_request http_connection_upgrade
+
+.. bro:id:: http_connection_upgrade
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, protocol: :bro:type:`string`)
+
+ Generated when a HTTP session is upgraded to a different protocol (e.g. websocket).
+ This event is raised when a server replies with a HTTP 101 reply. No more HTTP events
+ will be raised after this event.
+
+
+ :c: The connection.
+
+
+ :protocol: The protocol to which the connection is switching.
+
+ .. bro:see:: http_all_headers http_begin_entity http_content_type http_end_entity
+ http_entity_data http_event http_header http_message_done http_reply
+ http_request
+
+Functions
++++++++++
+
+.. bro:id:: skip_http_entity_data
+
+ :Type: :bro:type:`function` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`) : :bro:type:`any`
+
+ Skips the data of the HTTP entity.
+
+
+ :c: The HTTP connection.
+
+
+ :is_orig: If true, the client data is skipped, and the server data otherwise.
+
+ .. bro:see:: skip_smtp_data
+
+.. bro:id:: unescape_URI
+
+ :Type: :bro:type:`function` (URI: :bro:type:`string`) : :bro:type:`string`
+
+ Unescapes all characters in a URI (decode every ``%xx`` group).
+
+
+ :URI: The URI to unescape.
+
+
+ :returns: The unescaped URI with all ``%xx`` groups decoded.
+
+ .. note::
+
+ Unescaping reserved characters may cause loss of information.
+ :rfc:`2396`: A URI is always in an "escaped" form, since escaping or
+ unescaping a completed URI might change its semantics. Normally, the
+ only time escape encodings can safely be made is when the URI is
+ being created from its component parts.
+
+Bro::ICMP
+---------
+
+ICMP analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_ICMP`
+
+Events
+++++++
+
+.. bro:id:: icmp_sent
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`)
+
+ Generated for all ICMP messages that are not handled separately with
+ dedicated ICMP events. Bro's ICMP analyzer handles a number of ICMP messages
+ directly with dedicated events. This event acts as a fallback for those it
+ doesn't.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard
+ connection record *c*.
+
+ .. bro:see:: icmp_error_message icmp_sent_payload
+
+.. bro:id:: icmp_sent_payload
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, payload: :bro:type:`string`)
+
+ The same as :bro:see:`icmp_sent` except containing the ICMP payload.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard
+ connection record *c*.
+
+
+ :payload: The payload of the ICMP message.
+
+ .. bro:see:: icmp_error_message icmp_sent_payload
+
+.. bro:id:: icmp_echo_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, id: :bro:type:`count`, seq: :bro:type:`count`, payload: :bro:type:`string`)
+
+ Generated for ICMP *echo request* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard
+ connection record *c*.
+
+
+ :id: The *echo request* identifier.
+
+
+ :seq: The *echo request* sequence number.
+
+
+ :payload: The message-specific data of the packet payload, i.e., everything
+ after the first 8 bytes of the ICMP header.
+
+ .. bro:see:: icmp_echo_reply
+
+.. bro:id:: icmp_echo_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, id: :bro:type:`count`, seq: :bro:type:`count`, payload: :bro:type:`string`)
+
+ Generated for ICMP *echo reply* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :id: The *echo reply* identifier.
+
+
+ :seq: The *echo reply* sequence number.
+
+
+ :payload: The message-specific data of the packet payload, i.e., everything
+ after the first 8 bytes of the ICMP header.
+
+ .. bro:see:: icmp_echo_request
+
+.. bro:id:: icmp_error_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, code: :bro:type:`count`, context: :bro:type:`icmp_context`)
+
+ Generated for all ICMPv6 error messages that are not handled
+ separately with dedicated events. Bro's ICMP analyzer handles a number
+ of ICMP error messages directly with dedicated events. This event acts
+ as a fallback for those it doesn't.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMPv6 protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard
+ connection record *c*.
+
+
+ :code: The ICMP code of the error message.
+
+
+ :context: A record with specifics of the original packet that the message
+ refers to.
+
+ .. bro:see:: icmp_unreachable icmp_packet_too_big
+ icmp_time_exceeded icmp_parameter_problem
+
+.. bro:id:: icmp_unreachable
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, code: :bro:type:`count`, context: :bro:type:`icmp_context`)
+
+ Generated for ICMP *destination unreachable* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :code: The ICMP code of the *unreachable* message.
+
+
+ :context: A record with specifics of the original packet that the message
+ refers to. *Unreachable* messages should include the original IP
+ header from the packet that triggered them, and Bro parses that
+ into the *context* structure. Note that if the *unreachable*
+ includes only a partial IP header for some reason, no
+ fields of *context* will be filled out.
+
+ .. bro:see:: icmp_error_message icmp_packet_too_big
+ icmp_time_exceeded icmp_parameter_problem
+
+.. bro:id:: icmp_packet_too_big
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, code: :bro:type:`count`, context: :bro:type:`icmp_context`)
+
+ Generated for ICMPv6 *packet too big* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMPv6 protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :code: The ICMP code of the *too big* message.
+
+
+ :context: A record with specifics of the original packet that the message
+ refers to. *Too big* messages should include the original IP header
+ from the packet that triggered them, and Bro parses that into
+ the *context* structure. Note that if the *too big* includes only
+ a partial IP header for some reason, no fields of *context* will
+ be filled out.
+
+ .. bro:see:: icmp_error_message icmp_unreachable
+ icmp_time_exceeded icmp_parameter_problem
+
+.. bro:id:: icmp_time_exceeded
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, code: :bro:type:`count`, context: :bro:type:`icmp_context`)
+
+ Generated for ICMP *time exceeded* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :code: The ICMP code of the *exceeded* message.
+
+
+ :context: A record with specifics of the original packet that the message
+ refers to. *Unreachable* messages should include the original IP
+ header from the packet that triggered them, and Bro parses that
+ into the *context* structure. Note that if the *exceeded* includes
+ only a partial IP header for some reason, no fields of *context*
+ will be filled out.
+
+ .. bro:see:: icmp_error_message icmp_unreachable icmp_packet_too_big
+ icmp_parameter_problem
+
+.. bro:id:: icmp_parameter_problem
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, code: :bro:type:`count`, context: :bro:type:`icmp_context`)
+
+ Generated for ICMPv6 *parameter problem* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMPv6 protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :code: The ICMP code of the *parameter problem* message.
+
+
+ :context: A record with specifics of the original packet that the message
+ refers to. *Parameter problem* messages should include the original
+ IP header from the packet that triggered them, and Bro parses that
+ into the *context* structure. Note that if the *parameter problem*
+ includes only a partial IP header for some reason, no fields
+ of *context* will be filled out.
+
+ .. bro:see:: icmp_error_message icmp_unreachable icmp_packet_too_big
+ icmp_time_exceeded
+
+.. bro:id:: icmp_router_solicitation
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, options: :bro:type:`icmp6_nd_options`)
+
+ Generated for ICMP *router solicitation* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :options: Any Neighbor Discovery options included with message (:rfc:`4861`).
+
+ .. bro:see:: icmp_router_advertisement
+ icmp_neighbor_solicitation icmp_neighbor_advertisement icmp_redirect
+
+.. bro:id:: icmp_router_advertisement
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, cur_hop_limit: :bro:type:`count`, managed: :bro:type:`bool`, other: :bro:type:`bool`, home_agent: :bro:type:`bool`, pref: :bro:type:`count`, proxy: :bro:type:`bool`, rsv: :bro:type:`count`, router_lifetime: :bro:type:`interval`, reachable_time: :bro:type:`interval`, retrans_timer: :bro:type:`interval`, options: :bro:type:`icmp6_nd_options`)
+
+ Generated for ICMP *router advertisement* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :cur_hop_limit: The default value that should be placed in Hop Count field
+ for outgoing IP packets.
+
+
+ :managed: Managed address configuration flag, :rfc:`4861`.
+
+
+ :other: Other stateful configuration flag, :rfc:`4861`.
+
+
+ :home_agent: Mobile IPv6 home agent flag, :rfc:`3775`.
+
+
+ :pref: Router selection preferences, :rfc:`4191`.
+
+
+ :proxy: Neighbor discovery proxy flag, :rfc:`4389`.
+
+
+ :rsv: Remaining two reserved bits of router advertisement flags.
+
+
+ :router_lifetime: How long this router should be used as a default router.
+
+
+ :reachable_time: How long a neighbor should be considered reachable.
+
+
+ :retrans_timer: How long a host should wait before retransmitting.
+
+
+ :options: Any Neighbor Discovery options included with message (:rfc:`4861`).
+
+ .. bro:see:: icmp_router_solicitation
+ icmp_neighbor_solicitation icmp_neighbor_advertisement icmp_redirect
+
+.. bro:id:: icmp_neighbor_solicitation
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, tgt: :bro:type:`addr`, options: :bro:type:`icmp6_nd_options`)
+
+ Generated for ICMP *neighbor solicitation* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :tgt: The IP address of the target of the solicitation.
+
+
+ :options: Any Neighbor Discovery options included with message (:rfc:`4861`).
+
+ .. bro:see:: icmp_router_solicitation icmp_router_advertisement
+ icmp_neighbor_advertisement icmp_redirect
+
+.. bro:id:: icmp_neighbor_advertisement
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, router: :bro:type:`bool`, solicited: :bro:type:`bool`, override: :bro:type:`bool`, tgt: :bro:type:`addr`, options: :bro:type:`icmp6_nd_options`)
+
+ Generated for ICMP *neighbor advertisement* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :router: Flag indicating the sender is a router.
+
+
+ :solicited: Flag indicating advertisement is in response to a solicitation.
+
+
+ :override: Flag indicating advertisement should override existing caches.
+
+
+ :tgt: the Target Address in the soliciting message or the address whose
+ link-layer address has changed for unsolicited adverts.
+
+
+ :options: Any Neighbor Discovery options included with message (:rfc:`4861`).
+
+ .. bro:see:: icmp_router_solicitation icmp_router_advertisement
+ icmp_neighbor_solicitation icmp_redirect
+
+.. bro:id:: icmp_redirect
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, icmp: :bro:type:`icmp_conn`, tgt: :bro:type:`addr`, dest: :bro:type:`addr`, options: :bro:type:`icmp6_nd_options`)
+
+ Generated for ICMP *redirect* messages.
+
+ See `Wikipedia
+ `__ for more
+ information about the ICMP protocol.
+
+
+ :c: The connection record for the corresponding ICMP flow.
+
+
+ :icmp: Additional ICMP-specific information augmenting the standard connection
+ record *c*.
+
+
+ :tgt: The address that is supposed to be a better first hop to use for
+ ICMP Destination Address.
+
+
+ :dest: The address of the destination which is redirected to the target.
+
+
+ :options: Any Neighbor Discovery options included with message (:rfc:`4861`).
+
+ .. bro:see:: icmp_router_solicitation icmp_router_advertisement
+ icmp_neighbor_solicitation icmp_neighbor_advertisement
+
+Bro::Ident
+----------
+
+Ident analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_IDENT`
+
+Events
+++++++
+
+.. bro:id:: ident_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, lport: :bro:type:`port`, rport: :bro:type:`port`)
+
+ Generated for Ident requests.
+
+ See `Wikipedia `__ for more
+ information about the Ident protocol.
+
+
+ :c: The connection.
+
+
+ :lport: The request's local port.
+
+
+ :rport: The request's remote port.
+
+ .. bro:see:: ident_error ident_reply
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: ident_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, lport: :bro:type:`port`, rport: :bro:type:`port`, user_id: :bro:type:`string`, system: :bro:type:`string`)
+
+ Generated for Ident replies.
+
+ See `Wikipedia `__ for more
+ information about the Ident protocol.
+
+
+ :c: The connection.
+
+
+ :lport: The corresponding request's local port.
+
+
+ :rport: The corresponding request's remote port.
+
+
+ :user_id: The user id returned by the reply.
+
+
+ :system: The operating system returned by the reply.
+
+ .. bro:see:: ident_error ident_request
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: ident_error
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, lport: :bro:type:`port`, rport: :bro:type:`port`, line: :bro:type:`string`)
+
+ Generated for Ident error replies.
+
+ See `Wikipedia `__ for more
+ information about the Ident protocol.
+
+
+ :c: The connection.
+
+
+ :lport: The corresponding request's local port.
+
+
+ :rport: The corresponding request's remote port.
+
+
+ :line: The error description returned by the reply.
+
+ .. bro:see:: ident_reply ident_request
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+Bro::IMAP
+---------
+
+IMAP analyzer (StartTLS only)
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_IMAP`
+
+Events
+++++++
+
+.. bro:id:: imap_capabilities
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, capabilities: :bro:type:`string_vec`)
+
+ Generated when a server sends a capability list to the client,
+ after being queried using the CAPABILITY command.
+
+
+ :c: The connection.
+
+
+ :capabilities: The list of IMAP capabilities as sent by the server.
+
+.. bro:id:: imap_starttls
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated when a IMAP connection goes encrypted after a successful
+ StartTLS exchange between the client and the server.
+
+
+ :c: The connection.
+
+Bro::InterConn
+--------------
+
+InterConn analyzer deprecated
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_INTERCONN`
+
+Events
+++++++
+
+.. bro:id:: interconn_stats
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, os: :bro:type:`interconn_endp_stats`, rs: :bro:type:`interconn_endp_stats`)
+
+ Deprecated. Will be removed.
+
+.. bro:id:: interconn_remove_conn
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Deprecated. Will be removed.
+
+Bro::IRC
+--------
+
+IRC analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_IRC`
+
+Events
+++++++
+
+.. bro:id:: irc_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, command: :bro:type:`string`, arguments: :bro:type:`string`)
+
+ Generated for all client-side IRC commands.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: Always true.
+
+
+ :prefix: The optional prefix coming with the command. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :command: The command.
+
+
+ :arguments: The arguments for the command.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+ .. note:: This event is generated only for messages that originate
+ at the client-side. Commands coming in from remote trigger
+ the :bro:id:`irc_message` event instead.
+
+.. bro:id:: irc_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, code: :bro:type:`count`, params: :bro:type:`string`)
+
+ Generated for all IRC replies. IRC replies are sent in response to a
+ request and come with a reply code.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :prefix: The optional prefix coming with the reply. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :code: The reply code, as specified by the protocol.
+
+
+ :params: The reply's parameters.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, command: :bro:type:`string`, message: :bro:type:`string`)
+
+ Generated for IRC commands forwarded from the server to the client.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: Always false.
+
+
+ :prefix: The optional prefix coming with the command. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :command: The command.
+
+
+ :message: TODO.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+ .. note::
+
+ This event is generated only for messages that are forwarded by the server
+ to the client. Commands coming from client trigger the
+ :bro:id:`irc_request` event instead.
+
+.. bro:id:: irc_quit_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, nick: :bro:type:`string`, message: :bro:type:`string`)
+
+ Generated for IRC messages of type *quit*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :nick: The nickname coming with the message.
+
+
+ :message: The text included with the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_privmsg_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, source: :bro:type:`string`, target: :bro:type:`string`, message: :bro:type:`string`)
+
+ Generated for IRC messages of type *privmsg*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :source: The source of the private communication.
+
+
+ :target: The target of the private communication.
+
+
+ :message: The text of communication.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_notice_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, source: :bro:type:`string`, target: :bro:type:`string`, message: :bro:type:`string`)
+
+ Generated for IRC messages of type *notice*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :source: The source of the private communication.
+
+
+ :target: The target of the private communication.
+
+
+ :message: The text of communication.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_squery_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, source: :bro:type:`string`, target: :bro:type:`string`, message: :bro:type:`string`)
+
+ Generated for IRC messages of type *squery*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :source: The source of the private communication.
+
+
+ :target: The target of the private communication.
+
+
+ :message: The text of communication.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_join_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, info_list: :bro:type:`irc_join_list`)
+
+ Generated for IRC messages of type *join*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :info_list: The user information coming with the command.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_kick_message
+ irc_message irc_mode_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_part_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, nick: :bro:type:`string`, chans: :bro:type:`string_set`, message: :bro:type:`string`)
+
+ Generated for IRC messages of type *part*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :nick: The nickname coming with the message.
+
+
+ :chans: The set of channels affected.
+
+
+ :message: The text coming with the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_password_message
+
+.. bro:id:: irc_nick_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, who: :bro:type:`string`, newnick: :bro:type:`string`)
+
+ Generated for IRC messages of type *nick*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :who: The user changing its nickname.
+
+
+ :newnick: The new nickname.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_invalid_nick
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ Generated when a server rejects an IRC nickname.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invite_message irc_join_message irc_kick_message
+ irc_message irc_mode_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_network_info
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, users: :bro:type:`count`, services: :bro:type:`count`, servers: :bro:type:`count`)
+
+ Generated for an IRC reply of type *luserclient*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :users: The number of users as returned in the reply.
+
+
+ :services: The number of services as returned in the reply.
+
+
+ :servers: The number of servers as returned in the reply.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_server_info
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, users: :bro:type:`count`, services: :bro:type:`count`, servers: :bro:type:`count`)
+
+ Generated for an IRC reply of type *luserme*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :users: The number of users as returned in the reply.
+
+
+ :services: The number of services as returned in the reply.
+
+
+ :servers: The number of servers as returned in the reply.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_channel_info
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, chans: :bro:type:`count`)
+
+ Generated for an IRC reply of type *luserchannels*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :chans: The number of channels as returned in the reply.
+
+ .. bro:see:: irc_channel_topic irc_dcc_message irc_error_message irc_global_users
+ irc_invalid_nick irc_invite_message irc_join_message irc_kick_message
+ irc_message irc_mode_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_who_line
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, target_nick: :bro:type:`string`, channel: :bro:type:`string`, user: :bro:type:`string`, host: :bro:type:`string`, server: :bro:type:`string`, nick: :bro:type:`string`, params: :bro:type:`string`, hops: :bro:type:`count`, real_name: :bro:type:`string`)
+
+ Generated for an IRC reply of type *whoreply*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :target_nick: The target nickname.
+
+
+ :channel: The channel.
+
+
+ :user: The user.
+
+
+ :host: The host.
+
+
+ :server: The server.
+
+
+ :nick: The nickname.
+
+
+ :params: The parameters.
+
+
+ :hops: The hop count.
+
+
+ :real_name: The real name.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_names_info
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, c_type: :bro:type:`string`, channel: :bro:type:`string`, users: :bro:type:`string_set`)
+
+ Generated for an IRC reply of type *namereply*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :c_type: The channel type.
+
+
+ :channel: The channel.
+
+
+ :users: The set of users.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_whois_operator_line
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, nick: :bro:type:`string`)
+
+ Generated for an IRC reply of type *whoisoperator*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :nick: The nickname specified in the reply.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_whois_channel_line
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, nick: :bro:type:`string`, chans: :bro:type:`string_set`)
+
+ Generated for an IRC reply of type *whoischannels*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :nick: The nickname specified in the reply.
+
+
+ :chans: The set of channels returned.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_whois_user_line
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, nick: :bro:type:`string`, user: :bro:type:`string`, host: :bro:type:`string`, real_name: :bro:type:`string`)
+
+ Generated for an IRC reply of type *whoisuser*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :nick: The nickname specified in the reply.
+
+
+ :user: The user name specified in the reply.
+
+
+ :host: The host name specified in the reply.
+
+
+ :real_name: The real name specified in the reply.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_oper_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, got_oper: :bro:type:`bool`)
+
+ Generated for IRC replies of type *youreoper* and *nooperhost*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :got_oper: True if the *oper* command was executed successfully
+ (*youreport*) and false otherwise (*nooperhost*).
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_global_users
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, msg: :bro:type:`string`)
+
+ Generated for an IRC reply of type *globalusers*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :prefix: The optional prefix coming with the command. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :msg: The message coming with the reply.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_invalid_nick irc_invite_message irc_join_message irc_kick_message
+ irc_message irc_mode_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_channel_topic
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, channel: :bro:type:`string`, topic: :bro:type:`string`)
+
+ Generated for an IRC reply of type *topic*.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :channel: The channel name specified in the reply.
+
+
+ :topic: The topic specified in the reply.
+
+ .. bro:see:: irc_channel_info irc_dcc_message irc_error_message irc_global_users
+ irc_invalid_nick irc_invite_message irc_join_message irc_kick_message
+ irc_message irc_mode_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_who_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, mask: :bro:type:`string`, oper: :bro:type:`bool`)
+
+ Generated for IRC messages of type *who*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :mask: The mask specified in the message.
+
+
+ :oper: True if the operator flag was set.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_whois_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, server: :bro:type:`string`, users: :bro:type:`string`)
+
+ Generated for IRC messages of type *whois*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :server: TODO.
+
+
+ :users: TODO.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_oper_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, user: :bro:type:`string`, password: :bro:type:`string`)
+
+ Generated for IRC messages of type *oper*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :user: The user specified in the message.
+
+
+ :password: The password specified in the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_kick_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, chans: :bro:type:`string`, users: :bro:type:`string`, comment: :bro:type:`string`)
+
+ Generated for IRC messages of type *kick*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :prefix: The optional prefix coming with the command. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :chans: The channels specified in the message.
+
+
+ :users: The users specified in the message.
+
+
+ :comment: The comment specified in the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_message irc_mode_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_error_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, message: :bro:type:`string`)
+
+ Generated for IRC messages of type *error*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :prefix: The optional prefix coming with the command. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :message: The textual description specified in the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_global_users
+ irc_invalid_nick irc_invite_message irc_join_message irc_kick_message
+ irc_message irc_mode_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_invite_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, nickname: :bro:type:`string`, channel: :bro:type:`string`)
+
+ Generated for IRC messages of type *invite*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :prefix: The optional prefix coming with the command. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :nickname: The nickname specified in the message.
+
+
+ :channel: The channel specified in the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_join_message irc_kick_message
+ irc_message irc_mode_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_mode_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, params: :bro:type:`string`)
+
+ Generated for IRC messages of type *mode*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :prefix: The optional prefix coming with the command. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :params: The parameters coming with the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_squit_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, server: :bro:type:`string`, message: :bro:type:`string`)
+
+ Generated for IRC messages of type *squit*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :prefix: The optional prefix coming with the command. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :server: The server specified in the message.
+
+
+ :message: The textual description specified in the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_dcc_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, prefix: :bro:type:`string`, target: :bro:type:`string`, dcc_type: :bro:type:`string`, argument: :bro:type:`string`, address: :bro:type:`addr`, dest_port: :bro:type:`count`, size: :bro:type:`count`)
+
+ Generated for IRC messages of type *dcc*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :prefix: The optional prefix coming with the command. IRC uses the prefix to
+ indicate the true origin of a message.
+
+
+ :target: The target specified in the message.
+
+
+ :dcc_type: The DCC type specified in the message.
+
+
+ :argument: The argument specified in the message.
+
+
+ :address: The address specified in the message.
+
+
+ :dest_port: The destination port specified in the message.
+
+
+ :size: The size specified in the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_error_message irc_global_users
+ irc_invalid_nick irc_invite_message irc_join_message irc_kick_message
+ irc_message irc_mode_message irc_names_info irc_network_info irc_nick_message
+ irc_notice_message irc_oper_message irc_oper_response irc_part_message
+ irc_password_message
+
+.. bro:id:: irc_user_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, user: :bro:type:`string`, host: :bro:type:`string`, server: :bro:type:`string`, real_name: :bro:type:`string`)
+
+ Generated for IRC messages of type *user*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :user: The user specified in the message.
+
+
+ :host: The host name specified in the message.
+
+
+ :server: The server name specified in the message.
+
+
+ :real_name: The real name specified in the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message irc_password_message
+
+.. bro:id:: irc_password_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, password: :bro:type:`string`)
+
+ Generated for IRC messages of type *password*. This event is generated for
+ messages coming from both the client and the server.
+
+ See `Wikipedia `__ for more
+ information about the IRC protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :password: The password specified in the message.
+
+ .. bro:see:: irc_channel_info irc_channel_topic irc_dcc_message irc_error_message
+ irc_global_users irc_invalid_nick irc_invite_message irc_join_message
+ irc_kick_message irc_message irc_mode_message irc_names_info irc_network_info
+ irc_nick_message irc_notice_message irc_oper_message irc_oper_response
+ irc_part_message
+
+.. bro:id:: irc_starttls
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated if an IRC connection switched to TLS using STARTTLS. After this
+ event no more IRC events will be raised for the connection. See the SSL
+ analyzer for related SSL events, which will now be generated.
+
+
+ :c: The connection.
+
+Bro::KRB
+--------
+
+Kerberos analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_KRB`
+
+:bro:enum:`Analyzer::ANALYZER_KRB_TCP`
+
+Options/Constants
++++++++++++++++++
+
+.. bro:id:: KRB::keytab
+
+ :Type: :bro:type:`string`
+ :Attributes: :bro:attr:`&redef`
+ :Default: ``""``
+
+ Kerberos keytab file name. Used to decrypt tickets encountered on the wire.
+
+Types
++++++
+
+.. bro:type:: KRB::Error_Msg
+
+ :Type: :bro:type:`record`
+
+ pvno: :bro:type:`count`
+ Protocol version number (5 for KRB5)
+
+ msg_type: :bro:type:`count`
+ The message type (30 for ERROR_MSG)
+
+ client_time: :bro:type:`time` :bro:attr:`&optional`
+ Current time on the client
+
+ server_time: :bro:type:`time`
+ Current time on the server
+
+ error_code: :bro:type:`count`
+ The specific error code
+
+ client_realm: :bro:type:`string` :bro:attr:`&optional`
+ Realm of the ticket
+
+ client_name: :bro:type:`string` :bro:attr:`&optional`
+ Name on the ticket
+
+ service_realm: :bro:type:`string`
+ Realm of the service
+
+ service_name: :bro:type:`string`
+ Name of the service
+
+ error_text: :bro:type:`string` :bro:attr:`&optional`
+ Additional text to explain the error
+
+ pa_data: :bro:type:`vector` of :bro:type:`KRB::Type_Value` :bro:attr:`&optional`
+ Optional pre-authentication data
+
+ The data from the ERROR_MSG message. See :rfc:`4120`.
+
+.. bro:type:: KRB::SAFE_Msg
+
+ :Type: :bro:type:`record`
+
+ pvno: :bro:type:`count`
+ Protocol version number (5 for KRB5)
+
+ msg_type: :bro:type:`count`
+ The message type (20 for SAFE_MSG)
+
+ data: :bro:type:`string`
+ The application-specific data that is being passed
+ from the sender to the reciever
+
+ timestamp: :bro:type:`time` :bro:attr:`&optional`
+ Current time from the sender of the message
+
+ seq: :bro:type:`count` :bro:attr:`&optional`
+ Sequence number used to detect replays
+
+ sender: :bro:type:`KRB::Host_Address` :bro:attr:`&optional`
+ Sender address
+
+ recipient: :bro:type:`KRB::Host_Address` :bro:attr:`&optional`
+ Recipient address
+
+ The data from the SAFE message. See :rfc:`4120`.
+
+.. bro:type:: KRB::KDC_Options
+
+ :Type: :bro:type:`record`
+
+ forwardable: :bro:type:`bool`
+ The ticket to be issued should have its forwardable flag set.
+
+ forwarded: :bro:type:`bool`
+ A (TGT) request for forwarding.
+
+ proxiable: :bro:type:`bool`
+ The ticket to be issued should have its proxiable flag set.
+
+ proxy: :bro:type:`bool`
+ A request for a proxy.
+
+ allow_postdate: :bro:type:`bool`
+ The ticket to be issued should have its may-postdate flag set.
+
+ postdated: :bro:type:`bool`
+ A request for a postdated ticket.
+
+ renewable: :bro:type:`bool`
+ The ticket to be issued should have its renewable flag set.
+
+ opt_hardware_auth: :bro:type:`bool`
+ Reserved for opt_hardware_auth
+
+ disable_transited_check: :bro:type:`bool`
+ Request that the KDC not check the transited field of a TGT against
+ the policy of the local realm before it will issue derivative tickets
+ based on the TGT.
+
+ renewable_ok: :bro:type:`bool`
+ If a ticket with the requested lifetime cannot be issued, a renewable
+ ticket is acceptable
+
+ enc_tkt_in_skey: :bro:type:`bool`
+ The ticket for the end server is to be encrypted in the session key
+ from the additional TGT provided
+
+ renew: :bro:type:`bool`
+ The request is for a renewal
+
+ validate: :bro:type:`bool`
+ The request is to validate a postdated ticket.
+
+ KDC Options. See :rfc:`4120`
+
+.. bro:type:: KRB::AP_Options
+
+ :Type: :bro:type:`record`
+
+ use_session_key: :bro:type:`bool`
+ Indicates that user-to-user-authentication is in use
+
+ mutual_required: :bro:type:`bool`
+ Mutual authentication is required
+
+ AP Options. See :rfc:`4120`
+
+.. bro:type:: KRB::Type_Value
+
+ :Type: :bro:type:`record`
+
+ data_type: :bro:type:`count`
+ The data type
+
+ val: :bro:type:`string`
+ The data value
+
+ Used in a few places in the Kerberos analyzer for elements
+ that have a type and a string value.
+
+.. bro:type:: KRB::Ticket
+
+ :Type: :bro:type:`record`
+
+ pvno: :bro:type:`count`
+ Protocol version number (5 for KRB5)
+
+ realm: :bro:type:`string`
+ Realm
+
+ service_name: :bro:type:`string`
+ Name of the service
+
+ cipher: :bro:type:`count`
+ Cipher the ticket was encrypted with
+
+ ciphertext: :bro:type:`string` :bro:attr:`&optional`
+ Cipher text of the ticket
+
+ authenticationinfo: :bro:type:`string` :bro:attr:`&optional`
+ Authentication info
+
+ A Kerberos ticket. See :rfc:`4120`.
+
+.. bro:type:: KRB::Ticket_Vector
+
+ :Type: :bro:type:`vector` of :bro:type:`KRB::Ticket`
+
+
+.. bro:type:: KRB::Host_Address
+
+ :Type: :bro:type:`record`
+
+ ip: :bro:type:`addr` :bro:attr:`&log` :bro:attr:`&optional`
+ IPv4 or IPv6 address
+
+ netbios: :bro:type:`string` :bro:attr:`&log` :bro:attr:`&optional`
+ NetBIOS address
+
+ unknown: :bro:type:`KRB::Type_Value` :bro:attr:`&optional`
+ Some other type that we don't support yet
+
+ A Kerberos host address See :rfc:`4120`.
+
+.. bro:type:: KRB::KDC_Request
+
+ :Type: :bro:type:`record`
+
+ pvno: :bro:type:`count`
+ Protocol version number (5 for KRB5)
+
+ msg_type: :bro:type:`count`
+ The message type (10 for AS_REQ, 12 for TGS_REQ)
+
+ pa_data: :bro:type:`vector` of :bro:type:`KRB::Type_Value` :bro:attr:`&optional`
+ Optional pre-authentication data
+
+ kdc_options: :bro:type:`KRB::KDC_Options`
+ Options specified in the request
+
+ client_name: :bro:type:`string` :bro:attr:`&optional`
+ Name on the ticket
+
+ service_realm: :bro:type:`string`
+ Realm of the service
+
+ service_name: :bro:type:`string` :bro:attr:`&optional`
+ Name of the service
+
+ from: :bro:type:`time` :bro:attr:`&optional`
+ Time the ticket is good from
+
+ till: :bro:type:`time`
+ Time the ticket is good till
+
+ rtime: :bro:type:`time` :bro:attr:`&optional`
+ The requested renew-till time
+
+ nonce: :bro:type:`count`
+ A random nonce generated by the client
+
+ encryption_types: :bro:type:`vector` of :bro:type:`count`
+ The desired encryption algorithms, in order of preference
+
+ host_addrs: :bro:type:`vector` of :bro:type:`KRB::Host_Address` :bro:attr:`&optional`
+ Any additional addresses the ticket should be valid for
+
+ additional_tickets: :bro:type:`vector` of :bro:type:`KRB::Ticket` :bro:attr:`&optional`
+ Additional tickets may be included for certain transactions
+
+ The data from the AS_REQ and TGS_REQ messages. See :rfc:`4120`.
+
+.. bro:type:: KRB::KDC_Response
+
+ :Type: :bro:type:`record`
+
+ pvno: :bro:type:`count`
+ Protocol version number (5 for KRB5)
+
+ msg_type: :bro:type:`count`
+ The message type (11 for AS_REP, 13 for TGS_REP)
+
+ pa_data: :bro:type:`vector` of :bro:type:`KRB::Type_Value` :bro:attr:`&optional`
+ Optional pre-authentication data
+
+ client_realm: :bro:type:`string` :bro:attr:`&optional`
+ Realm on the ticket
+
+ client_name: :bro:type:`string`
+ Name on the service
+
+ ticket: :bro:type:`KRB::Ticket`
+ The ticket that was issued
+
+ The data from the AS_REQ and TGS_REQ messages. See :rfc:`4120`.
+
+Events
+++++++
+
+.. bro:id:: krb_as_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`KRB::KDC_Request`)
+
+ A Kerberos 5 ``Authentication Server (AS) Request`` as defined
+ in :rfc:`4120`. The AS request contains a username of the client
+ requesting authentication, and returns an AS reply with an
+ encrypted Ticket Granting Ticket (TGT) for that user. The TGT
+ can then be used to request further tickets for other services.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+
+ :msg: A Kerberos KDC request message data structure.
+
+ .. bro:see:: krb_as_response krb_tgs_request krb_tgs_response krb_ap_request
+ krb_ap_response krb_priv krb_safe krb_cred krb_error
+
+.. bro:id:: krb_as_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`KRB::KDC_Response`)
+
+ A Kerberos 5 ``Authentication Server (AS) Response`` as defined
+ in :rfc:`4120`. Following the AS request for a user, an AS reply
+ contains an encrypted Ticket Granting Ticket (TGT) for that user.
+ The TGT can then be used to request further tickets for other services.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+
+ :msg: A Kerberos KDC reply message data structure.
+
+ .. bro:see:: krb_as_request krb_tgs_request krb_tgs_response krb_ap_request
+ krb_ap_response krb_priv krb_safe krb_cred krb_error
+
+.. bro:id:: krb_tgs_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`KRB::KDC_Request`)
+
+ A Kerberos 5 ``Ticket Granting Service (TGS) Request`` as defined
+ in :rfc:`4120`. Following the Authentication Server exchange, if
+ successful, the client now has a Ticket Granting Ticket (TGT). To
+ authenticate to a Kerberized service, the client requests a Service
+ Ticket, which will be returned in the TGS reply.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+
+ :msg: A Kerberos KDC request message data structure.
+
+ .. bro:see:: krb_as_request krb_as_response krb_tgs_response krb_ap_request
+ krb_ap_response krb_priv krb_safe krb_cred krb_error
+
+.. bro:id:: krb_tgs_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`KRB::KDC_Response`)
+
+ A Kerberos 5 ``Ticket Granting Service (TGS) Response`` as defined
+ in :rfc:`4120`. This message returns a Service Ticket to the client,
+ which is encrypted with the service's long-term key, and which the
+ client can use to authenticate to that service.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+
+ :msg: A Kerberos KDC reply message data structure.
+
+ .. bro:see:: krb_as_request krb_as_response krb_tgs_request krb_ap_request
+ krb_ap_response krb_priv krb_safe krb_cred krb_error
+
+.. bro:id:: krb_ap_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, ticket: :bro:type:`KRB::Ticket`, opts: :bro:type:`KRB::AP_Options`)
+
+ A Kerberos 5 ``Authentication Header (AP) Request`` as defined
+ in :rfc:`4120`. This message contains authentication information
+ that should be part of the first message in an authenticated
+ transaction.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+
+ :ticket: The Kerberos ticket being used for authentication.
+
+
+ :opts: A Kerberos AP options data structure.
+
+ .. bro:see:: krb_as_request krb_as_response krb_tgs_request krb_tgs_response
+ krb_ap_response krb_priv krb_safe krb_cred krb_error
+
+.. bro:id:: krb_ap_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ A Kerberos 5 ``Authentication Header (AP) Response`` as defined
+ in :rfc:`4120`. This is used if mutual authentication is desired.
+ All of the interesting information in here is encrypted, so the event
+ doesn't have much useful data, but it's provided in case it's important
+ to know that this message was sent.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+ .. bro:see:: krb_as_request krb_as_response krb_tgs_request krb_tgs_response
+ krb_ap_request krb_priv krb_safe krb_cred krb_error
+
+.. bro:id:: krb_priv
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`)
+
+ A Kerberos 5 ``Private Message`` as defined in :rfc:`4120`. This
+ is a private (encrypted) application message, so the event doesn't
+ have much useful data, but it's provided in case it's important to
+ know that this message was sent.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+
+ :is_orig: Whether the originator of the connection sent this message.
+
+ .. bro:see:: krb_as_request krb_as_response krb_tgs_request krb_tgs_response
+ krb_ap_request krb_ap_response krb_safe krb_cred krb_error
+
+.. bro:id:: krb_safe
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, msg: :bro:type:`KRB::SAFE_Msg`)
+
+ A Kerberos 5 ``Safe Message`` as defined in :rfc:`4120`. This is a
+ safe (checksummed) application message.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+
+ :is_orig: Whether the originator of the connection sent this message.
+
+
+ :msg: A Kerberos SAFE message data structure.
+
+ .. bro:see:: krb_as_request krb_as_response krb_tgs_request krb_tgs_response
+ krb_ap_request krb_ap_response krb_priv krb_cred krb_error
+
+.. bro:id:: krb_cred
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, tickets: :bro:type:`KRB::Ticket_Vector`)
+
+ A Kerberos 5 ``Credential Message`` as defined in :rfc:`4120`. This is
+ a private (encrypted) message to forward credentials.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+
+ :is_orig: Whether the originator of the connection sent this message.
+
+
+ :tickets: Tickets obtained from the KDC that are being forwarded.
+
+ .. bro:see:: krb_as_request krb_as_response krb_tgs_request krb_tgs_response
+ krb_ap_request krb_ap_response krb_priv krb_safe krb_error
+
+.. bro:id:: krb_error
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`KRB::Error_Msg`)
+
+ A Kerberos 5 ``Error Message`` as defined in :rfc:`4120`.
+
+ See `Wikipedia `__ for
+ more information about the Kerberos protocol.
+
+
+ :c: The connection over which this Kerberos message was sent.
+
+
+ :msg: A Kerberos error message data structure.
+
+ .. bro:see:: krb_as_request krb_as_response krb_tgs_request krb_tgs_response
+ krb_ap_request krb_ap_response krb_priv krb_safe krb_cred
+
+Bro::Login
+----------
+
+Telnet/Rsh/Rlogin analyzers
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_CONTENTS_RLOGIN`
+
+:bro:enum:`Analyzer::ANALYZER_CONTENTS_RSH`
+
+:bro:enum:`Analyzer::ANALYZER_LOGIN`
+
+:bro:enum:`Analyzer::ANALYZER_NVT`
+
+:bro:enum:`Analyzer::ANALYZER_RLOGIN`
+
+:bro:enum:`Analyzer::ANALYZER_RSH`
+
+:bro:enum:`Analyzer::ANALYZER_TELNET`
+
+Events
+++++++
+
+.. bro:id:: rsh_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, client_user: :bro:type:`string`, server_user: :bro:type:`string`, line: :bro:type:`string`, new_session: :bro:type:`bool`)
+
+ Generated for client side commands on an RSH connection.
+
+ See :rfc:`1258` for more information about the Rlogin/Rsh protocol.
+
+
+ :c: The connection.
+
+
+ :client_user: The client-side user name as sent in the initial protocol
+ handshake.
+
+
+ :server_user: The server-side user name as sent in the initial protocol
+ handshake.
+
+
+ :line: The command line sent in the request.
+
+
+ :new_session: True if this is the first command of the Rsh session.
+
+ .. bro:see:: rsh_reply login_confused login_confused_text login_display
+ login_failure login_input_line login_output_line login_prompt login_success
+ login_terminal
+
+ .. note:: For historical reasons, these events are separate from the
+ ``login_`` events. Ideally, they would all be handled uniquely.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: rsh_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, client_user: :bro:type:`string`, server_user: :bro:type:`string`, line: :bro:type:`string`)
+
+ Generated for client side commands on an RSH connection.
+
+ See :rfc:`1258` for more information about the Rlogin/Rsh protocol.
+
+
+ :c: The connection.
+
+
+ :client_user: The client-side user name as sent in the initial protocol
+ handshake.
+
+
+ :server_user: The server-side user name as sent in the initial protocol
+ handshake.
+
+
+ :line: The command line sent in the request.
+
+ .. bro:see:: rsh_request login_confused login_confused_text login_display
+ login_failure login_input_line login_output_line login_prompt login_success
+ login_terminal
+
+ .. note:: For historical reasons, these events are separate from the
+ ``login_`` events. Ideally, they would all be handled uniquely.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: login_failure
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, user: :bro:type:`string`, client_user: :bro:type:`string`, password: :bro:type:`string`, line: :bro:type:`string`)
+
+ Generated for Telnet/Rlogin login failures. The *login* analyzer inspects
+ Telnet/Rlogin sessions to heuristically extract username and password
+ information as well as the text returned by the login server. This event is
+ raised if a login attempt appears to have been unsuccessful.
+
+
+ :c: The connection.
+
+
+ :user: The user name tried.
+
+
+ :client_user: For Telnet connections, this is an empty string, but for Rlogin
+ connections, it is the client name passed in the initial authentication
+ information (to check against .rhosts).
+
+
+ :password: The password tried.
+
+
+ :line: The line of text that led the analyzer to conclude that the
+ authentication had failed.
+
+ .. bro:see:: login_confused login_confused_text login_display login_input_line
+ login_output_line login_prompt login_success login_terminal direct_login_prompts
+ get_login_state login_failure_msgs login_non_failure_msgs login_prompts login_success_msgs
+ login_timeouts set_login_state
+
+ .. note:: The login analyzer depends on a set of script-level variables that
+ need to be configured with patterns identifying login attempts. This
+ configuration has not yet been ported over from Bro 1.5 to Bro 2.x, and
+ the analyzer is therefore not directly usable at the moment.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: login_success
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, user: :bro:type:`string`, client_user: :bro:type:`string`, password: :bro:type:`string`, line: :bro:type:`string`)
+
+ Generated for successful Telnet/Rlogin logins. The *login* analyzer inspects
+ Telnet/Rlogin sessions to heuristically extract username and password
+ information as well as the text returned by the login server. This event is
+ raised if a login attempt appears to have been successful.
+
+
+ :c: The connection.
+
+
+ :user: The user name used.
+
+
+ :client_user: For Telnet connections, this is an empty string, but for Rlogin
+ connections, it is the client name passed in the initial authentication
+ information (to check against .rhosts).
+
+
+ :password: The password used.
+
+
+ :line: The line of text that led the analyzer to conclude that the
+ authentication had succeeded.
+
+ .. bro:see:: login_confused login_confused_text login_display login_failure
+ login_input_line login_output_line login_prompt login_terminal
+ direct_login_prompts get_login_state login_failure_msgs login_non_failure_msgs
+ login_prompts login_success_msgs login_timeouts set_login_state
+
+ .. note:: The login analyzer depends on a set of script-level variables that
+ need to be configured with patterns identifying login attempts. This
+ configuration has not yet been ported over from Bro 1.5 to Bro 2.x, and
+ the analyzer is therefore not directly usable at the moment.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: login_input_line
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, line: :bro:type:`string`)
+
+ Generated for lines of input on Telnet/Rlogin sessions. The line will have
+ control characters (such as in-band Telnet options) removed.
+
+
+ :c: The connection.
+
+
+ :line: The input line.
+
+ .. bro:see:: login_confused login_confused_text login_display login_failure
+ login_output_line login_prompt login_success login_terminal rsh_request
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: login_output_line
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, line: :bro:type:`string`)
+
+ Generated for lines of output on Telnet/Rlogin sessions. The line will have
+ control characters (such as in-band Telnet options) removed.
+
+
+ :c: The connection.
+
+
+ :line: The ouput line.
+
+ .. bro:see:: login_confused login_confused_text login_display login_failure
+ login_input_line login_prompt login_success login_terminal rsh_reply
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: login_confused
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`string`, line: :bro:type:`string`)
+
+ Generated when tracking of Telnet/Rlogin authentication failed. As Bro's
+ *login* analyzer uses a number of heuristics to extract authentication
+ information, it may become confused. If it can no longer correctly track
+ the authentication dialog, it raises this event.
+
+
+ :c: The connection.
+
+
+ :msg: Gives the particular problem the heuristics detected (for example,
+ ``multiple_login_prompts`` means that the engine saw several login
+ prompts in a row, without the type-ahead from the client side presumed
+ necessary to cause them)
+
+
+ :line: The line of text that caused the heuristics to conclude they were
+ confused.
+
+ .. bro:see:: login_confused_text login_display login_failure login_input_line login_output_line
+ login_prompt login_success login_terminal direct_login_prompts get_login_state
+ login_failure_msgs login_non_failure_msgs login_prompts login_success_msgs
+ login_timeouts set_login_state
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: login_confused_text
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, line: :bro:type:`string`)
+
+ Generated after getting confused while tracking a Telnet/Rlogin
+ authentication dialog. The *login* analyzer generates this even for every
+ line of user input after it has reported :bro:id:`login_confused` for a
+ connection.
+
+
+ :c: The connection.
+
+
+ :line: The line the user typed.
+
+ .. bro:see:: login_confused login_display login_failure login_input_line
+ login_output_line login_prompt login_success login_terminal direct_login_prompts
+ get_login_state login_failure_msgs login_non_failure_msgs login_prompts
+ login_success_msgs login_timeouts set_login_state
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: login_terminal
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, terminal: :bro:type:`string`)
+
+ Generated for clients transmitting a terminal type in a Telnet session. This
+ information is extracted out of environment variables sent as Telnet options.
+
+
+ :c: The connection.
+
+
+ :terminal: The TERM value transmitted.
+
+ .. bro:see:: login_confused login_confused_text login_display login_failure
+ login_input_line login_output_line login_prompt login_success
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: login_display
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, display: :bro:type:`string`)
+
+ Generated for clients transmitting an X11 DISPLAY in a Telnet session. This
+ information is extracted out of environment variables sent as Telnet options.
+
+
+ :c: The connection.
+
+
+ :display: The DISPLAY transmitted.
+
+ .. bro:see:: login_confused login_confused_text login_failure login_input_line
+ login_output_line login_prompt login_success login_terminal
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: authentication_accepted
+
+ :Type: :bro:type:`event` (name: :bro:type:`string`, c: :bro:type:`connection`)
+
+ Generated when a Telnet authentication has been successful. The Telnet
+ protocol includes options for negotiating authentication. When such an
+ option is sent from client to server and the server replies that it accepts
+ the authentication, then the event engine generates this event.
+
+ See `Wikipedia `__ for more information
+ about the Telnet protocol.
+
+
+ :name: The authenticated name.
+
+
+ :c: The connection.
+
+ .. bro:see:: authentication_rejected authentication_skipped login_success
+
+ .. note:: This event inspects the corresponding Telnet option
+ while :bro:id:`login_success` heuristically determines success by watching
+ session data.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: authentication_rejected
+
+ :Type: :bro:type:`event` (name: :bro:type:`string`, c: :bro:type:`connection`)
+
+ Generated when a Telnet authentication has been unsuccessful. The Telnet
+ protocol includes options for negotiating authentication. When such an option
+ is sent from client to server and the server replies that it did not accept
+ the authentication, then the event engine generates this event.
+
+ See `Wikipedia `__ for more information
+ about the Telnet protocol.
+
+
+ :name: The attempted authentication name.
+
+
+ :c: The connection.
+
+ .. bro:see:: authentication_accepted authentication_skipped login_failure
+
+ .. note:: This event inspects the corresponding Telnet option
+ while :bro:id:`login_success` heuristically determines failure by watching
+ session data.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: authentication_skipped
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated for Telnet/Rlogin sessions when a pattern match indicates
+ that no authentication is performed.
+
+ See `Wikipedia `__ for more information
+ about the Telnet protocol.
+
+
+ :c: The connection.
+
+ .. bro:see:: authentication_accepted authentication_rejected direct_login_prompts
+ get_login_state login_failure_msgs login_non_failure_msgs login_prompts
+ login_success_msgs login_timeouts set_login_state
+
+ .. note:: The login analyzer depends on a set of script-level variables that
+ need to be configured with patterns identifying activity. This
+ configuration has not yet been ported over from Bro 1.5 to Bro 2.x, and
+ the analyzer is therefore not directly usable at the moment.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: login_prompt
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, prompt: :bro:type:`string`)
+
+ Generated for clients transmitting a terminal prompt in a Telnet session.
+ This information is extracted out of environment variables sent as Telnet
+ options.
+
+ See `Wikipedia `__ for more information
+ about the Telnet protocol.
+
+
+ :c: The connection.
+
+
+ :prompt: The TTYPROMPT transmitted.
+
+ .. bro:see:: login_confused login_confused_text login_display login_failure
+ login_input_line login_output_line login_success login_terminal
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: activating_encryption
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated for Telnet sessions when encryption is activated. The Telnet
+ protocol includes options for negotiating encryption. When such a series of
+ options is successfully negotiated, the event engine generates this event.
+
+ See `Wikipedia `__ for more information
+ about the Telnet protocol.
+
+
+ :c: The connection.
+
+ .. bro:see:: authentication_accepted authentication_rejected authentication_skipped
+ login_confused login_confused_text login_display login_failure login_input_line
+ login_output_line login_prompt login_success login_terminal
+
+.. bro:id:: inconsistent_option
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated for an inconsistent Telnet option. Telnet options are specified
+ by the client and server stating which options they are willing to
+ support vs. which they are not, and then instructing one another which in
+ fact they should or should not use for the current connection. If the event
+ engine sees a peer violate either what the other peer has instructed it to
+ do, or what it itself offered in terms of options in the past, then the
+ engine generates this event.
+
+ See `Wikipedia `__ for more information
+ about the Telnet protocol.
+
+
+ :c: The connection.
+
+ .. bro:see:: bad_option bad_option_termination authentication_accepted
+ authentication_rejected authentication_skipped login_confused
+ login_confused_text login_display login_failure login_input_line
+ login_output_line login_prompt login_success login_terminal
+
+.. bro:id:: bad_option
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated for an ill-formed or unrecognized Telnet option.
+
+ See `Wikipedia `__ for more information
+ about the Telnet protocol.
+
+
+ :c: The connection.
+
+ .. bro:see:: inconsistent_option bad_option_termination authentication_accepted
+ authentication_rejected authentication_skipped login_confused
+ login_confused_text login_display login_failure login_input_line
+ login_output_line login_prompt login_success login_terminal
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+.. bro:id:: bad_option_termination
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated for a Telnet option that's incorrectly terminated.
+
+ See `Wikipedia `__ for more information
+ about the Telnet protocol.
+
+
+ :c: The connection.
+
+ .. bro:see:: inconsistent_option bad_option authentication_accepted
+ authentication_rejected authentication_skipped login_confused
+ login_confused_text login_display login_failure login_input_line
+ login_output_line login_prompt login_success login_terminal
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to add a
+ call to :bro:see:`Analyzer::register_for_ports` or a DPD payload
+ signature.
+
+Functions
++++++++++
+
+.. bro:id:: get_login_state
+
+ :Type: :bro:type:`function` (cid: :bro:type:`conn_id`) : :bro:type:`count`
+
+ Returns the state of the given login (Telnet or Rlogin) connection.
+
+
+ :cid: The connection ID.
+
+
+ :returns: False if the connection is not active or is not tagged as a
+ login analyzer. Otherwise the function returns the state, which can
+ be one of:
+
+ - ``LOGIN_STATE_AUTHENTICATE``: The connection is in its
+ initial authentication dialog.
+ - ``LOGIN_STATE_LOGGED_IN``: The analyzer believes the user has
+ successfully authenticated.
+ - ``LOGIN_STATE_SKIP``: The analyzer has skipped any further
+ processing of the connection.
+ - ``LOGIN_STATE_CONFUSED``: The analyzer has concluded that it
+ does not correctly know the state of the connection, and/or
+ the username associated with it.
+
+ .. bro:see:: set_login_state
+
+.. bro:id:: set_login_state
+
+ :Type: :bro:type:`function` (cid: :bro:type:`conn_id`, new_state: :bro:type:`count`) : :bro:type:`bool`
+
+ Sets the login state of a connection with a login analyzer.
+
+
+ :cid: The connection ID.
+
+
+ :new_state: The new state of the login analyzer. See
+ :bro:id:`get_login_state` for possible values.
+
+
+ :returns: Returns false if *cid* is not an active connection
+ or is not tagged as a login analyzer, and true otherwise.
+
+ .. bro:see:: get_login_state
+
+Bro::MIME
+---------
+
+MIME parsing
+
+Components
+++++++++++
+
+Events
+++++++
+
+.. bro:id:: mime_begin_entity
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated when starting to parse an email MIME entity. MIME is a
+ protocol-independent data format for encoding text and files, along with
+ corresponding metadata, for transmission. Bro raises this event when it
+ begins parsing a MIME entity extracted from an email protocol.
+
+ Bro's MIME analyzer for emails currently supports SMTP and POP3. See
+ `Wikipedia `__ for more information
+ about MIME.
+
+
+ :c: The connection.
+
+ .. bro:see:: mime_all_data mime_all_headers mime_content_hash mime_end_entity
+ mime_entity_data mime_event mime_one_header mime_segment_data smtp_data
+ http_begin_entity
+
+ .. note:: Bro also extracts MIME entities from HTTP sessions. For those,
+ however, it raises :bro:id:`http_begin_entity` instead.
+
+.. bro:id:: mime_end_entity
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated when finishing parsing an email MIME entity. MIME is a
+ protocol-independent data format for encoding text and files, along with
+ corresponding metadata, for transmission. Bro raises this event when it
+ finished parsing a MIME entity extracted from an email protocol.
+
+ Bro's MIME analyzer for emails currently supports SMTP and POP3. See
+ `Wikipedia `__ for more information
+ about MIME.
+
+
+ :c: The connection.
+
+ .. bro:see:: mime_all_data mime_all_headers mime_begin_entity mime_content_hash
+ mime_entity_data mime_event mime_one_header mime_segment_data smtp_data
+ http_end_entity
+
+ .. note:: Bro also extracts MIME entities from HTTP sessions. For those,
+ however, it raises :bro:id:`http_end_entity` instead.
+
+.. bro:id:: mime_one_header
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, h: :bro:type:`mime_header_rec`)
+
+ Generated for individual MIME headers extracted from email MIME
+ entities. MIME is a protocol-independent data format for encoding text and
+ files, along with corresponding metadata, for transmission.
+
+ Bro's MIME analyzer for emails currently supports SMTP and POP3. See
+ `Wikipedia `__ for more information
+ about MIME.
+
+
+ :c: The connection.
+
+
+ :h: The parsed MIME header.
+
+ .. bro:see:: mime_all_data mime_all_headers mime_begin_entity mime_content_hash
+ mime_end_entity mime_entity_data mime_event mime_segment_data
+ http_header http_all_headers
+
+ .. note:: Bro also extracts MIME headers from HTTP sessions. For those,
+ however, it raises :bro:id:`http_header` instead.
+
+.. bro:id:: mime_all_headers
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, hlist: :bro:type:`mime_header_list`)
+
+ Generated for MIME headers extracted from email MIME entities, passing all
+ headers at once. MIME is a protocol-independent data format for encoding
+ text and files, along with corresponding metadata, for transmission.
+
+ Bro's MIME analyzer for emails currently supports SMTP and POP3. See
+ `Wikipedia `__ for more information
+ about MIME.
+
+
+ :c: The connection.
+
+
+ :hlist: A *table* containing all headers extracted from the current entity.
+ The table is indexed by the position of the header (1 for the first,
+ 2 for the second, etc.).
+
+ .. bro:see:: mime_all_data mime_begin_entity mime_content_hash mime_end_entity
+ mime_entity_data mime_event mime_one_header mime_segment_data
+ http_header http_all_headers
+
+ .. note:: Bro also extracts MIME headers from HTTP sessions. For those,
+ however, it raises :bro:id:`http_header` instead.
+
+.. bro:id:: mime_segment_data
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, length: :bro:type:`count`, data: :bro:type:`string`)
+
+ Generated for chunks of decoded MIME data from email MIME entities. MIME
+ is a protocol-independent data format for encoding text and files, along with
+ corresponding metadata, for transmission. As Bro parses the data of an
+ entity, it raises a sequence of these events, each coming as soon as a new
+ chunk of data is available. In contrast, there is also
+ :bro:id:`mime_entity_data`, which passes all of an entities data at once
+ in a single block. While the latter is more convenient to handle,
+ ``mime_segment_data`` is more efficient as Bro does not need to buffer
+ the data. Thus, if possible, this event should be preferred.
+
+ Bro's MIME analyzer for emails currently supports SMTP and POP3. See
+ `Wikipedia `__ for more information
+ about MIME.
+
+
+ :c: The connection.
+
+
+ :length: The length of *data*.
+
+
+ :data: The raw data of one segment of the current entity.
+
+ .. bro:see:: mime_all_data mime_all_headers mime_begin_entity mime_content_hash
+ mime_end_entity mime_entity_data mime_event mime_one_header http_entity_data
+ mime_segment_length mime_segment_overlap_length
+
+ .. note:: Bro also extracts MIME data from HTTP sessions. For those,
+ however, it raises :bro:id:`http_entity_data` (sic!) instead.
+
+.. bro:id:: mime_entity_data
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, length: :bro:type:`count`, data: :bro:type:`string`)
+
+ Generated for data decoded from an email MIME entity. This event delivers
+ the complete content of a single MIME entity with the quoted-printable and
+ and base64 data decoded. In contrast, there is also :bro:id:`mime_segment_data`,
+ which passes on a sequence of data chunks as they come in. While
+ ``mime_entity_data`` is more convenient to handle, ``mime_segment_data`` is
+ more efficient as Bro does not need to buffer the data. Thus, if possible,
+ the latter should be preferred.
+
+ Bro's MIME analyzer for emails currently supports SMTP and POP3. See
+ `Wikipedia `__ for more information
+ about MIME.
+
+
+ :c: The connection.
+
+
+ :length: The length of *data*.
+
+
+ :data: The raw data of the complete entity.
+
+ .. bro:see:: mime_all_data mime_all_headers mime_begin_entity mime_content_hash
+ mime_end_entity mime_event mime_one_header mime_segment_data
+
+ .. note:: While Bro also decodes MIME entities extracted from HTTP
+ sessions, there's no corresponding event for that currently.
+
+.. bro:id:: mime_all_data
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, length: :bro:type:`count`, data: :bro:type:`string`)
+
+ Generated for passing on all data decoded from a single email MIME
+ message. If an email message has more than one MIME entity, this event
+ combines all their data into a single value for analysis. Note that because
+ of the potentially significant buffering necessary, using this event can be
+ expensive.
+
+ Bro's MIME analyzer for emails currently supports SMTP and POP3. See
+ `Wikipedia `__ for more information
+ about MIME.
+
+
+ :c: The connection.
+
+
+ :length: The length of *data*.
+
+
+ :data: The raw data of all MIME entities concatenated.
+
+ .. bro:see:: mime_all_headers mime_begin_entity mime_content_hash mime_end_entity
+ mime_entity_data mime_event mime_one_header mime_segment_data
+
+ .. note:: While Bro also decodes MIME entities extracted from HTTP
+ sessions, there's no corresponding event for that currently.
+
+.. bro:id:: mime_event
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, event_type: :bro:type:`string`, detail: :bro:type:`string`)
+
+ Generated for errors found when decoding email MIME entities.
+
+ Bro's MIME analyzer for emails currently supports SMTP and POP3. See
+ `Wikipedia `__ for more information
+ about MIME.
+
+
+ :c: The connection.
+
+
+ :event_type: A string describing the general category of the problem found
+ (e.g., ``illegal format``).
+
+
+ :detail: Further more detailed description of the error.
+
+ .. bro:see:: mime_all_data mime_all_headers mime_begin_entity mime_content_hash
+ mime_end_entity mime_entity_data mime_one_header mime_segment_data http_event
+
+ .. note:: Bro also extracts MIME headers from HTTP sessions. For those,
+ however, it raises :bro:id:`http_event` instead.
+
+.. bro:id:: mime_content_hash
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, content_len: :bro:type:`count`, hash_value: :bro:type:`string`)
+
+ Generated for decoded MIME entities extracted from email messages, passing on
+ their MD5 checksums. Bro computes the MD5 over the complete decoded data of
+ each MIME entity.
+
+ Bro's MIME analyzer for emails currently supports SMTP and POP3. See
+ `Wikipedia `__ for more information
+ about MIME.
+
+
+ :c: The connection.
+
+
+ :content_len: The length of the entity being hashed.
+
+
+ :hash_value: The MD5 hash.
+
+ .. bro:see:: mime_all_data mime_all_headers mime_begin_entity mime_end_entity
+ mime_entity_data mime_event mime_one_header mime_segment_data
+
+ .. note:: While Bro also decodes MIME entities extracted from HTTP
+ sessions, there's no corresponding event for that currently.
+
+Bro::Modbus
+-----------
+
+Modbus analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_MODBUS`
+
+Events
+++++++
+
+.. bro:id:: modbus_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, is_orig: :bro:type:`bool`)
+
+ Generated for any Modbus message regardless if the particular function
+ is further supported or not.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :is_orig: True if the event is raised for the originator side.
+
+.. bro:id:: modbus_exception
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, code: :bro:type:`count`)
+
+ Generated for any Modbus exception message.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :code: The exception code.
+
+.. bro:id:: modbus_read_coils_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, start_address: :bro:type:`count`, quantity: :bro:type:`count`)
+
+ Generated for a Modbus read coils request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :start_address: The memory address of the first coil to be read.
+
+
+ :quantity: The number of coils to be read.
+
+.. bro:id:: modbus_read_coils_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, coils: :bro:type:`ModbusCoils`)
+
+ Generated for a Modbus read coils response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :coils: The coil values returned from the device.
+
+.. bro:id:: modbus_read_discrete_inputs_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, start_address: :bro:type:`count`, quantity: :bro:type:`count`)
+
+ Generated for a Modbus read discrete inputs request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :start_address: The memory address of the first coil to be read.
+
+
+ :quantity: The number of coils to be read.
+
+.. bro:id:: modbus_read_discrete_inputs_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, coils: :bro:type:`ModbusCoils`)
+
+ Generated for a Modbus read discrete inputs response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :coils: The coil values returned from the device.
+
+.. bro:id:: modbus_read_holding_registers_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, start_address: :bro:type:`count`, quantity: :bro:type:`count`)
+
+ Generated for a Modbus read holding registers request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :start_address: The memory address of the first register to be read.
+
+
+ :quantity: The number of registers to be read.
+
+.. bro:id:: modbus_read_holding_registers_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, registers: :bro:type:`ModbusRegisters`)
+
+ Generated for a Modbus read holding registers response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :registers: The register values returned from the device.
+
+.. bro:id:: modbus_read_input_registers_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, start_address: :bro:type:`count`, quantity: :bro:type:`count`)
+
+ Generated for a Modbus read input registers request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :start_address: The memory address of the first register to be read.
+
+
+ :quantity: The number of registers to be read.
+
+.. bro:id:: modbus_read_input_registers_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, registers: :bro:type:`ModbusRegisters`)
+
+ Generated for a Modbus read input registers response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :registers: The register values returned from the device.
+
+.. bro:id:: modbus_write_single_coil_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, address: :bro:type:`count`, value: :bro:type:`bool`)
+
+ Generated for a Modbus write single coil request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :address: The memory address of the coil to be written.
+
+
+ :value: The value to be written to the coil.
+
+.. bro:id:: modbus_write_single_coil_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, address: :bro:type:`count`, value: :bro:type:`bool`)
+
+ Generated for a Modbus write single coil response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :address: The memory address of the coil that was written.
+
+
+ :value: The value that was written to the coil.
+
+.. bro:id:: modbus_write_single_register_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, address: :bro:type:`count`, value: :bro:type:`count`)
+
+ Generated for a Modbus write single register request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :address: The memory address of the register to be written.
+
+
+ :value: The value to be written to the register.
+
+.. bro:id:: modbus_write_single_register_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, address: :bro:type:`count`, value: :bro:type:`count`)
+
+ Generated for a Modbus write single register response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :address: The memory address of the register that was written.
+
+
+ :value: The value that was written to the register.
+
+.. bro:id:: modbus_write_multiple_coils_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, start_address: :bro:type:`count`, coils: :bro:type:`ModbusCoils`)
+
+ Generated for a Modbus write multiple coils request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :start_address: The memory address of the first coil to be written.
+
+
+ :coils: The values to be written to the coils.
+
+.. bro:id:: modbus_write_multiple_coils_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, start_address: :bro:type:`count`, quantity: :bro:type:`count`)
+
+ Generated for a Modbus write multiple coils response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :start_address: The memory address of the first coil that was written.
+
+
+ :quantity: The quantity of coils that were written.
+
+.. bro:id:: modbus_write_multiple_registers_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, start_address: :bro:type:`count`, registers: :bro:type:`ModbusRegisters`)
+
+ Generated for a Modbus write multiple registers request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :start_address: The memory address of the first register to be written.
+
+
+ :registers: The values to be written to the registers.
+
+.. bro:id:: modbus_write_multiple_registers_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, start_address: :bro:type:`count`, quantity: :bro:type:`count`)
+
+ Generated for a Modbus write multiple registers response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :start_address: The memory address of the first register that was written.
+
+
+ :quantity: The quantity of registers that were written.
+
+.. bro:id:: modbus_read_file_record_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`)
+
+ Generated for a Modbus read file record request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+ .. note: This event is incomplete. The information from the data structure
+ is not yet passed through to the event.
+
+.. bro:id:: modbus_read_file_record_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`)
+
+ Generated for a Modbus read file record response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+ .. note: This event is incomplete. The information from the data structure
+ is not yet passed through to the event.
+
+.. bro:id:: modbus_write_file_record_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`)
+
+ Generated for a Modbus write file record request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+ .. note: This event is incomplete. The information from the data structure
+ is not yet passed through to the event.
+
+.. bro:id:: modbus_write_file_record_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`)
+
+ Generated for a Modbus write file record response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+ .. note: This event is incomplete. The information from the data structure
+ is not yet passed through to the event.
+
+.. bro:id:: modbus_mask_write_register_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, address: :bro:type:`count`, and_mask: :bro:type:`count`, or_mask: :bro:type:`count`)
+
+ Generated for a Modbus mask write register request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :address: The memory address of the register where the masks should be applied.
+
+
+ :and_mask: The value of the logical AND mask to apply to the register.
+
+
+ :or_mask: The value of the logical OR mask to apply to the register.
+
+.. bro:id:: modbus_mask_write_register_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, address: :bro:type:`count`, and_mask: :bro:type:`count`, or_mask: :bro:type:`count`)
+
+ Generated for a Modbus mask write register request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :address: The memory address of the register where the masks were applied.
+
+
+ :and_mask: The value of the logical AND mask applied register.
+
+
+ :or_mask: The value of the logical OR mask applied to the register.
+
+.. bro:id:: modbus_read_write_multiple_registers_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, read_start_address: :bro:type:`count`, read_quantity: :bro:type:`count`, write_start_address: :bro:type:`count`, write_registers: :bro:type:`ModbusRegisters`)
+
+ Generated for a Modbus read/write multiple registers request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :read_start_address: The memory address of the first register to be read.
+
+
+ :read_quantity: The number of registers to read.
+
+
+ :write_start_address: The memory address of the first register to be written.
+
+
+ :write_registers: The values to be written to the registers.
+
+.. bro:id:: modbus_read_write_multiple_registers_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, written_registers: :bro:type:`ModbusRegisters`)
+
+ Generated for a Modbus read/write multiple registers response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :written_registers: The register values read from the registers specified in
+ the request.
+
+.. bro:id:: modbus_read_fifo_queue_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, start_address: :bro:type:`count`)
+
+ Generated for a Modbus read FIFO queue request.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :start_address: The address of the FIFO queue to read.
+
+.. bro:id:: modbus_read_fifo_queue_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, headers: :bro:type:`ModbusHeaders`, fifos: :bro:type:`ModbusRegisters`)
+
+ Generated for a Modbus read FIFO queue response.
+
+
+ :c: The connection.
+
+
+ :headers: The headers for the modbus function.
+
+
+ :fifos: The register values read from the FIFO queue on the device.
+
+Bro::MySQL
+----------
+
+MySQL analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_MYSQL`
+
+Events
+++++++
+
+.. bro:id:: mysql_command_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, command: :bro:type:`count`, arg: :bro:type:`string`)
+
+ Generated for a command request from a MySQL client.
+
+ See the MySQL `documentation `__
+ for more information about the MySQL protocol.
+
+
+ :c: The connection.
+
+
+ :command: The numerical code of the command issued.
+
+
+ :arg: The argument for the command (empty string if not provided).
+
+ .. bro:see:: mysql_error mysql_ok mysql_server_version mysql_handshake
+
+.. bro:id:: mysql_error
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, code: :bro:type:`count`, msg: :bro:type:`string`)
+
+ Generated for an unsuccessful MySQL response.
+
+ See the MySQL `documentation `__
+ for more information about the MySQL protocol.
+
+
+ :c: The connection.
+
+
+ :code: The error code.
+
+
+ :msg: Any extra details about the error (empty string if not provided).
+
+ .. bro:see:: mysql_command_request mysql_ok mysql_server_version mysql_handshake
+
+.. bro:id:: mysql_ok
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, affected_rows: :bro:type:`count`)
+
+ Generated for a successful MySQL response.
+
+ See the MySQL `documentation `__
+ for more information about the MySQL protocol.
+
+
+ :c: The connection.
+
+
+ :affected_rows: The number of rows that were affected.
+
+ .. bro:see:: mysql_command_request mysql_error mysql_server_version mysql_handshake
+
+.. bro:id:: mysql_result_row
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, row: :bro:type:`string_vec`)
+
+ Generated for each MySQL ResultsetRow response packet.
+
+ See the MySQL `documentation `__
+ for more information about the MySQL protocol.
+
+
+ :c: The connection.
+
+
+ :row: The result row data.
+
+ .. bro:see:: mysql_command_request mysql_error mysql_server_version mysql_handshake mysql_ok
+
+.. bro:id:: mysql_server_version
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, ver: :bro:type:`string`)
+
+ Generated for the initial server handshake packet, which includes the MySQL server version.
+
+ See the MySQL `documentation `__
+ for more information about the MySQL protocol.
+
+
+ :c: The connection.
+
+
+ :ver: The server version string.
+
+ .. bro:see:: mysql_command_request mysql_error mysql_ok mysql_handshake
+
+.. bro:id:: mysql_handshake
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, username: :bro:type:`string`)
+
+ Generated for a client handshake response packet, which includes the username the client is attempting
+ to connect as.
+
+ See the MySQL `documentation `__
+ for more information about the MySQL protocol.
+
+
+ :c: The connection.
+
+
+ :username: The username supplied by the client
+
+ .. bro:see:: mysql_command_request mysql_error mysql_ok mysql_server_version
+
+Bro::NCP
+--------
+
+NCP analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_CONTENTS_NCP`
+
+:bro:enum:`Analyzer::ANALYZER_NCP`
+
+Options/Constants
++++++++++++++++++
+
+.. bro:id:: NCP::max_frame_size
+
+ :Type: :bro:type:`count`
+ :Attributes: :bro:attr:`&redef`
+ :Default: ``65536``
+
+ The maximum number of bytes to allocate when parsing NCP frames.
+
+Events
+++++++
+
+.. bro:id:: ncp_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, frame_type: :bro:type:`count`, length: :bro:type:`count`, func: :bro:type:`count`)
+
+ Generated for NCP requests (Netware Core Protocol).
+
+ See `Wikipedia `__ for
+ more information about the NCP protocol.
+
+
+ :c: The connection.
+
+
+ :frame_type: The frame type, as specified by the protocol.
+
+
+ :length: The length of the request body, excluding the frame header.
+
+
+ :func: The requested function, as specified by the protocol.
+
+ .. bro:see:: ncp_reply
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: ncp_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, frame_type: :bro:type:`count`, length: :bro:type:`count`, req_frame: :bro:type:`count`, req_func: :bro:type:`count`, completion_code: :bro:type:`count`)
+
+ Generated for NCP replies (Netware Core Protocol).
+
+ See `Wikipedia `__ for
+ more information about the NCP protocol.
+
+
+ :c: The connection.
+
+
+ :frame_type: The frame type, as specified by the protocol.
+
+
+ :length: The length of the request body, excluding the frame header.
+
+
+ :req_frame: The frame type from the corresponding request.
+
+
+ :req_func: The function code from the corresponding request.
+
+
+ :completion_code: The reply's completion code, as specified by the protocol.
+
+ .. bro:see:: ncp_request
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+Bro::NetBIOS
+------------
+
+NetBIOS analyzer support
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_CONTENTS_NETBIOSSSN`
+
+:bro:enum:`Analyzer::ANALYZER_NETBIOSSSN`
+
+Events
+++++++
+
+.. bro:id:: netbios_session_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, msg_type: :bro:type:`count`, data_len: :bro:type:`count`)
+
+ Generated for all NetBIOS SSN and DGM messages. Bro's NetBIOS analyzer
+ processes the NetBIOS session service running on TCP port 139, and (despite
+ its name!) the NetBIOS datagram service on UDP port 138.
+
+ See `Wikipedia `__ for more information
+ about NetBIOS. :rfc:`1002` describes
+ the packet format for NetBIOS over TCP/IP, which Bro parses.
+
+
+ :c: The connection, which may be TCP or UDP, depending on the type of the
+ NetBIOS session.
+
+
+ :is_orig: True if the message was sent by the originator of the connection.
+
+
+ :msg_type: The general type of message, as defined in Section 4.3.1 of
+ :rfc:`1002`.
+
+
+ :data_len: The length of the message's payload.
+
+ .. bro:see:: netbios_session_accepted netbios_session_keepalive
+ netbios_session_raw_message netbios_session_rejected netbios_session_request
+ netbios_session_ret_arg_resp decode_netbios_name decode_netbios_name_type
+
+ .. note:: These days, NetBIOS is primarily used as a transport mechanism for
+ `SMB/CIFS `__. Bro's
+ SMB analyzer parses both SMB-over-NetBIOS and SMB-over-TCP on port 445.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: netbios_session_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`string`)
+
+ Generated for NetBIOS messages of type *session request*. Bro's NetBIOS
+ analyzer processes the NetBIOS session service running on TCP port 139, and
+ (despite its name!) the NetBIOS datagram service on UDP port 138.
+
+ See `Wikipedia `__ for more information
+ about NetBIOS. :rfc:`1002` describes
+ the packet format for NetBIOS over TCP/IP, which Bro parses.
+
+
+ :c: The connection, which may be TCP or UDP, depending on the type of the
+ NetBIOS session.
+
+
+ :msg: The raw payload of the message sent, excluding the common NetBIOS
+ header.
+
+ .. bro:see:: netbios_session_accepted netbios_session_keepalive
+ netbios_session_message netbios_session_raw_message netbios_session_rejected
+ netbios_session_ret_arg_resp decode_netbios_name decode_netbios_name_type
+
+ .. note:: These days, NetBIOS is primarily used as a transport mechanism for
+ `SMB/CIFS `__. Bro's
+ SMB analyzer parses both SMB-over-NetBIOS and SMB-over-TCP on port 445.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: netbios_session_accepted
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`string`)
+
+ Generated for NetBIOS messages of type *positive session response*. Bro's
+ NetBIOS analyzer processes the NetBIOS session service running on TCP port
+ 139, and (despite its name!) the NetBIOS datagram service on UDP port 138.
+
+ See `Wikipedia `__ for more information
+ about NetBIOS. :rfc:`1002` describes
+ the packet format for NetBIOS over TCP/IP, which Bro parses.
+
+
+ :c: The connection, which may be TCP or UDP, depending on the type of the
+ NetBIOS session.
+
+
+ :msg: The raw payload of the message sent, excluding the common NetBIOS
+ header.
+
+ .. bro:see:: netbios_session_keepalive netbios_session_message
+ netbios_session_raw_message netbios_session_rejected netbios_session_request
+ netbios_session_ret_arg_resp decode_netbios_name decode_netbios_name_type
+
+ .. note:: These days, NetBIOS is primarily used as a transport mechanism for
+ `SMB/CIFS `__. Bro's
+ SMB analyzer parses both SMB-over-NetBIOS and SMB-over-TCP on port 445.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: netbios_session_rejected
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`string`)
+
+ Generated for NetBIOS messages of type *negative session response*. Bro's
+ NetBIOS analyzer processes the NetBIOS session service running on TCP port
+ 139, and (despite its name!) the NetBIOS datagram service on UDP port 138.
+
+ See `Wikipedia `__ for more information
+ about NetBIOS. :rfc:`1002` describes
+ the packet format for NetBIOS over TCP/IP, which Bro parses.
+
+
+ :c: The connection, which may be TCP or UDP, depending on the type of the
+ NetBIOS session.
+
+
+ :msg: The raw payload of the message sent, excluding the common NetBIOS
+ header.
+
+ .. bro:see:: netbios_session_accepted netbios_session_keepalive
+ netbios_session_message netbios_session_raw_message netbios_session_request
+ netbios_session_ret_arg_resp decode_netbios_name decode_netbios_name_type
+
+ .. note:: These days, NetBIOS is primarily used as a transport mechanism for
+ `SMB/CIFS `__. Bro's
+ SMB analyzer parses both SMB-over-NetBIOS and SMB-over-TCP on port 445.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: netbios_session_raw_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, msg: :bro:type:`string`)
+
+ Generated for NetBIOS messages of type *session message* that are not
+ carrying an SMB payload.
+
+ NetBIOS analyzer processes the NetBIOS session service running on TCP port
+ 139, and (despite its name!) the NetBIOS datagram service on UDP port 138.
+
+ See `Wikipedia `__ for more information
+ about NetBIOS. :rfc:`1002` describes
+ the packet format for NetBIOS over TCP/IP, which Bro parses.
+
+
+ :c: The connection, which may be TCP or UDP, depending on the type of the
+ NetBIOS session.
+
+
+ :is_orig: True if the message was sent by the originator of the connection.
+
+
+ :msg: The raw payload of the message sent, excluding the common NetBIOS
+ header (i.e., the ``user_data``).
+
+ .. bro:see:: netbios_session_accepted netbios_session_keepalive
+ netbios_session_message netbios_session_rejected netbios_session_request
+ netbios_session_ret_arg_resp decode_netbios_name decode_netbios_name_type
+
+ .. note:: These days, NetBIOS is primarily used as a transport mechanism for
+ `SMB/CIFS `__. Bro's
+ SMB analyzer parses both SMB-over-NetBIOS and SMB-over-TCP on port 445.
+
+ .. todo:: This is an oddly named event. In fact, it's probably an odd event
+ to have to begin with.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: netbios_session_ret_arg_resp
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`string`)
+
+ Generated for NetBIOS messages of type *retarget response*. Bro's NetBIOS
+ analyzer processes the NetBIOS session service running on TCP port 139, and
+ (despite its name!) the NetBIOS datagram service on UDP port 138.
+
+ See `Wikipedia `__ for more information
+ about NetBIOS. :rfc:`1002` describes
+ the packet format for NetBIOS over TCP/IP, which Bro parses.
+
+
+ :c: The connection, which may be TCP or UDP, depending on the type of the
+ NetBIOS session.
+
+
+ :msg: The raw payload of the message sent, excluding the common NetBIOS
+ header.
+
+ .. bro:see:: netbios_session_accepted netbios_session_keepalive
+ netbios_session_message netbios_session_raw_message netbios_session_rejected
+ netbios_session_request decode_netbios_name decode_netbios_name_type
+
+ .. note:: These days, NetBIOS is primarily used as a transport mechanism for
+ `SMB/CIFS `__. Bro's
+ SMB analyzer parses both SMB-over-NetBIOS and SMB-over-TCP on port 445.
+
+ .. todo:: This is an oddly named event.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: netbios_session_keepalive
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, msg: :bro:type:`string`)
+
+ Generated for NetBIOS messages of type *keep-alive*. Bro's NetBIOS analyzer
+ processes the NetBIOS session service running on TCP port 139, and (despite
+ its name!) the NetBIOS datagram service on UDP port 138.
+
+ See `Wikipedia `__ for more information
+ about NetBIOS. :rfc:`1002` describes
+ the packet format for NetBIOS over TCP/IP, which Bro parses.
+
+
+ :c: The connection, which may be TCP or UDP, depending on the type of the
+ NetBIOS session.
+
+
+ :msg: The raw payload of the message sent, excluding the common NetBIOS
+ header.
+
+ .. bro:see:: netbios_session_accepted netbios_session_message
+ netbios_session_raw_message netbios_session_rejected netbios_session_request
+ netbios_session_ret_arg_resp decode_netbios_name decode_netbios_name_type
+
+ .. note:: These days, NetBIOS is primarily used as a transport mechanism for
+ `SMB/CIFS `__. Bro's
+ SMB analyzer parses both SMB-over-NetBIOS and SMB-over-TCP on port 445.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+Functions
++++++++++
+
+.. bro:id:: decode_netbios_name
+
+ :Type: :bro:type:`function` (name: :bro:type:`string`) : :bro:type:`string`
+
+ Decode a NetBIOS name. See http://support.microsoft.com/kb/194203.
+
+
+ :name: The encoded NetBIOS name, e.g., ``"FEEIEFCAEOEFFEECEJEPFDCAEOEBENEF"``.
+
+
+ :returns: The decoded NetBIOS name, e.g., ``"THE NETBIOS NAME"``.
+
+ .. bro:see:: decode_netbios_name_type
+
+.. bro:id:: decode_netbios_name_type
+
+ :Type: :bro:type:`function` (name: :bro:type:`string`) : :bro:type:`count`
+
+ Converts a NetBIOS name type to its corresponding numeric value.
+ See http://support.microsoft.com/kb/163409.
+
+
+ :name: The NetBIOS name type.
+
+
+ :returns: The numeric value of *name*.
+
+ .. bro:see:: decode_netbios_name
+
+Bro::NTLM
+---------
+
+NTLM analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_NTLM`
+
+Types
++++++
+
+.. bro:type:: NTLM::Negotiate
+
+ :Type: :bro:type:`record`
+
+ flags: :bro:type:`NTLM::NegotiateFlags`
+ The negotiate flags
+
+ domain_name: :bro:type:`string` :bro:attr:`&optional`
+ The domain name of the client, if known
+
+ workstation: :bro:type:`string` :bro:attr:`&optional`
+ The machine name of the client, if known
+
+ version: :bro:type:`NTLM::Version` :bro:attr:`&optional`
+ The Windows version information, if supplied
+
+
+.. bro:type:: NTLM::Challenge
+
+ :Type: :bro:type:`record`
+
+ flags: :bro:type:`NTLM::NegotiateFlags`
+ The negotiate flags
+
+ target_name: :bro:type:`string` :bro:attr:`&optional`
+ The server authentication realm. If the server is
+ domain-joined, the name of the domain. Otherwise
+ the server name. See flags.target_type_domain
+ and flags.target_type_server
+
+ version: :bro:type:`NTLM::Version` :bro:attr:`&optional`
+ The Windows version information, if supplied
+
+ target_info: :bro:type:`NTLM::AVs` :bro:attr:`&optional`
+ Attribute-value pairs specified by the server
+
+
+.. bro:type:: NTLM::Authenticate
+
+ :Type: :bro:type:`record`
+
+ flags: :bro:type:`NTLM::NegotiateFlags`
+ The negotiate flags
+
+ domain_name: :bro:type:`string` :bro:attr:`&optional`
+ The domain or computer name hosting the account
+
+ user_name: :bro:type:`string` :bro:attr:`&optional`
+ The name of the user to be authenticated.
+
+ workstation: :bro:type:`string` :bro:attr:`&optional`
+ The name of the computer to which the user was logged on.
+
+ session_key: :bro:type:`string` :bro:attr:`&optional`
+ The session key
+
+ version: :bro:type:`NTLM::Version` :bro:attr:`&optional`
+ The Windows version information, if supplied
+
+
+.. bro:type:: NTLM::NegotiateFlags
+
+ :Type: :bro:type:`record`
+
+ negotiate_56: :bro:type:`bool`
+ If set, requires 56-bit encryption
+
+ negotiate_key_exch: :bro:type:`bool`
+ If set, requests an explicit key exchange
+
+ negotiate_128: :bro:type:`bool`
+ If set, requests 128-bit session key negotiation
+
+ negotiate_version: :bro:type:`bool`
+ If set, requests the protocol version number
+
+ negotiate_target_info: :bro:type:`bool`
+ If set, indicates that the TargetInfo fields in the
+ CHALLENGE_MESSAGE are populated
+
+ request_non_nt_session_key: :bro:type:`bool`
+ If set, requests the usage of the LMOWF function
+
+ negotiate_identify: :bro:type:`bool`
+ If set, requests and identify level token
+
+ negotiate_extended_sessionsecurity: :bro:type:`bool`
+ If set, requests usage of NTLM v2 session security
+ Note: NTML v2 session security is actually NTLM v1
+
+ target_type_server: :bro:type:`bool`
+ If set, TargetName must be a server name
+
+ target_type_domain: :bro:type:`bool`
+ If set, TargetName must be a domain name
+
+ negotiate_always_sign: :bro:type:`bool`
+ If set, requests the presence of a signature block
+ on all messages
+
+ negotiate_oem_workstation_supplied: :bro:type:`bool`
+ If set, the workstation name is provided
+
+ negotiate_oem_domain_supplied: :bro:type:`bool`
+ If set, the domain name is provided
+
+ negotiate_anonymous_connection: :bro:type:`bool`
+ If set, the connection should be anonymous
+
+ negotiate_ntlm: :bro:type:`bool`
+ If set, requests usage of NTLM v1
+
+ negotiate_lm_key: :bro:type:`bool`
+ If set, requests LAN Manager session key computation
+
+ negotiate_datagram: :bro:type:`bool`
+ If set, requests connectionless authentication
+
+ negotiate_seal: :bro:type:`bool`
+ If set, requests session key negotiation for message
+ confidentiality
+
+ negotiate_sign: :bro:type:`bool`
+ If set, requests session key negotiation for message
+ signatures
+
+ request_target: :bro:type:`bool`
+ If set, the TargetName field is present
+
+ negotiate_oem: :bro:type:`bool`
+ If set, requests OEM character set encoding
+
+ negotiate_unicode: :bro:type:`bool`
+ If set, requests Unicode character set encoding
+
+
+.. bro:type:: NTLM::Version
+
+ :Type: :bro:type:`record`
+
+ major: :bro:type:`count`
+ The major version of the Windows operating system in use
+
+ minor: :bro:type:`count`
+ The minor version of the Windows operating system in use
+
+ build: :bro:type:`count`
+ The build number of the Windows operating system in use
+
+ ntlmssp: :bro:type:`count`
+ The current revision of NTLMSSP in use
+
+
+.. bro:type:: NTLM::AVs
+
+ :Type: :bro:type:`record`
+
+ nb_computer_name: :bro:type:`string`
+ The server's NetBIOS computer name
+
+ nb_domain_name: :bro:type:`string`
+ The server's NetBIOS domain name
+
+ dns_computer_name: :bro:type:`string` :bro:attr:`&optional`
+ The FQDN of the computer
+
+ dns_domain_name: :bro:type:`string` :bro:attr:`&optional`
+ The FQDN of the domain
+
+ dns_tree_name: :bro:type:`string` :bro:attr:`&optional`
+ The FQDN of the forest
+
+ constrained_auth: :bro:type:`bool` :bro:attr:`&optional`
+ Indicates to the client that the account
+ authentication is constrained
+
+ timestamp: :bro:type:`time` :bro:attr:`&optional`
+ The associated timestamp, if present
+
+ single_host_id: :bro:type:`count` :bro:attr:`&optional`
+ Indicates that the client is providing
+ a machine ID created at computer startup to
+ identify the calling machine
+
+ target_name: :bro:type:`string` :bro:attr:`&optional`
+ The SPN of the target server
+
+
+Events
+++++++
+
+.. bro:id:: ntlm_negotiate
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, negotiate: :bro:type:`NTLM::Negotiate`)
+
+ Generated for :abbr:`NTLM (NT LAN Manager)` messages of type *negotiate*.
+
+
+ :c: The connection.
+
+
+ :negotiate: The parsed data of the :abbr:`NTLM (NT LAN Manager)` message. See init-bare for more details.
+
+ .. bro:see:: ntlm_challenge ntlm_authenticate
+
+.. bro:id:: ntlm_challenge
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, challenge: :bro:type:`NTLM::Challenge`)
+
+ Generated for :abbr:`NTLM (NT LAN Manager)` messages of type *challenge*.
+
+
+ :c: The connection.
+
+
+ :negotiate: The parsed data of the :abbr:`NTLM (NT LAN Manager)` message. See init-bare for more details.
+
+ .. bro:see:: ntlm_negotiate ntlm_authenticate
+
+.. bro:id:: ntlm_authenticate
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, request: :bro:type:`NTLM::Authenticate`)
+
+ Generated for :abbr:`NTLM (NT LAN Manager)` messages of type *authenticate*.
+
+
+ :c: The connection.
+
+
+ :request: The parsed data of the :abbr:`NTLM (NT LAN Manager)` message. See init-bare for more details.
+
+ .. bro:see:: ntlm_negotiate ntlm_challenge
+
+Bro::NTP
+--------
+
+NTP analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_NTP`
+
+Events
+++++++
+
+.. bro:id:: ntp_message
+
+ :Type: :bro:type:`event` (u: :bro:type:`connection`, msg: :bro:type:`ntp_msg`, excess: :bro:type:`string`)
+
+ Generated for all NTP messages. Different from many other of Bro's events,
+ this one is generated for both client-side and server-side messages.
+
+ See `Wikipedia `__ for
+ more information about the NTP protocol.
+
+
+ :u: The connection record describing the corresponding UDP flow.
+
+
+ :msg: The parsed NTP message.
+
+
+ :excess: The raw bytes of any optional parts of the NTP packet. Bro does not
+ further parse any optional fields.
+
+ .. bro:see:: ntp_session_timeout
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+Bro::PIA
+--------
+
+Analyzers implementing Dynamic Protocol
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_PIA_TCP`
+
+:bro:enum:`Analyzer::ANALYZER_PIA_UDP`
+
+Bro::POP3
+---------
+
+POP3 analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_POP3`
+
+Events
+++++++
+
+.. bro:id:: pop3_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, command: :bro:type:`string`, arg: :bro:type:`string`)
+
+ Generated for client-side commands on POP3 connections.
+
+ See `Wikipedia `__ for more information
+ about the POP3 protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :command: The command sent.
+
+
+ :arg: The argument to the command.
+
+ .. bro:see:: pop3_data pop3_login_failure pop3_login_success pop3_reply
+ pop3_unexpected
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: pop3_reply
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, cmd: :bro:type:`string`, msg: :bro:type:`string`)
+
+ Generated for server-side replies to commands on POP3 connections.
+
+ See `Wikipedia `__ for more information
+ about the POP3 protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the command was sent by the originator of the TCP
+ connection.
+
+
+ :cmd: The success indicator sent by the server. This corresponds to the
+ first token on the line sent, and should be either ``OK`` or ``ERR``.
+
+
+ :msg: The textual description the server sent along with *cmd*.
+
+ .. bro:see:: pop3_data pop3_login_failure pop3_login_success pop3_request
+ pop3_unexpected
+
+ .. todo:: This event is receiving odd parameters, should unify.
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: pop3_data
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, data: :bro:type:`string`)
+
+ Generated for server-side multi-line responses on POP3 connections. POP3
+ connections use multi-line responses to send bulk data, such as the actual
+ mails. This event is generated once for each line that's part of such a
+ response.
+
+ See `Wikipedia `__ for more information
+ about the POP3 protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the data was sent by the originator of the TCP connection.
+
+
+ :data: The data sent.
+
+ .. bro:see:: pop3_login_failure pop3_login_success pop3_reply pop3_request
+ pop3_unexpected
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: pop3_unexpected
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, msg: :bro:type:`string`, detail: :bro:type:`string`)
+
+ Generated for errors encountered on POP3 sessions. If the POP3 analyzer
+ finds state transitions that do not conform to the protocol specification,
+ or other situations it can't handle, it raises this event.
+
+ See `Wikipedia `__ for more information
+ about the POP3 protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: True if the data was sent by the originator of the TCP connection.
+
+
+ :msg: A textual description of the situation.
+
+
+ :detail: The input that triggered the event.
+
+ .. bro:see:: pop3_data pop3_login_failure pop3_login_success pop3_reply pop3_request
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: pop3_starttls
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated when a POP3 connection goes encrypted. While POP3 is by default a
+ clear-text protocol, extensions exist to switch to encryption. This event is
+ generated if that happens and the analyzer then stops processing the
+ connection.
+
+ See `Wikipedia `__ for more information
+ about the POP3 protocol.
+
+
+ :c: The connection.
+
+ .. bro:see:: pop3_data pop3_login_failure pop3_login_success pop3_reply
+ pop3_request pop3_unexpected
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: pop3_login_success
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, user: :bro:type:`string`, password: :bro:type:`string`)
+
+ Generated for successful authentications on POP3 connections.
+
+ See `Wikipedia `__ for more information
+ about the POP3 protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: Always false.
+
+
+ :user: The user name used for authentication. The event is only generated if
+ a non-empty user name was used.
+
+
+ :password: The password used for authentication.
+
+ .. bro:see:: pop3_data pop3_login_failure pop3_reply pop3_request
+ pop3_unexpected
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: pop3_login_failure
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, is_orig: :bro:type:`bool`, user: :bro:type:`string`, password: :bro:type:`string`)
+
+ Generated for unsuccessful authentications on POP3 connections.
+
+ See `Wikipedia `__ for more information
+ about the POP3 protocol.
+
+
+ :c: The connection.
+
+
+ :is_orig: Always false.
+
+
+ :user: The user name attempted for authentication. The event is only
+ generated if a non-empty user name was used.
+
+
+ :password: The password attempted for authentication.
+
+ .. bro:see:: pop3_data pop3_login_success pop3_reply pop3_request
+ pop3_unexpected
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+Bro::RADIUS
+-----------
+
+RADIUS analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_RADIUS`
+
+Types
++++++
+
+.. bro:type:: RADIUS::AttributeList
+
+ :Type: :bro:type:`vector` of :bro:type:`string`
+
+
+.. bro:type:: RADIUS::Attributes
+
+ :Type: :bro:type:`table` [:bro:type:`count`] of :bro:type:`RADIUS::AttributeList`
+
+
+.. bro:type:: RADIUS::Message
+
+ :Type: :bro:type:`record`
+
+ code: :bro:type:`count`
+ The type of message (Access-Request, Access-Accept, etc.).
+
+ trans_id: :bro:type:`count`
+ The transaction ID.
+
+ authenticator: :bro:type:`string`
+ The "authenticator" string.
+
+ attributes: :bro:type:`RADIUS::Attributes` :bro:attr:`&optional`
+ Any attributes.
+
+
+Events
+++++++
+
+.. bro:id:: radius_message
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, result: :bro:type:`RADIUS::Message`)
+
+ Generated for RADIUS messages.
+
+ See `Wikipedia `__ for more
+ information about RADIUS.
+
+
+ :c: The connection.
+
+
+ :result: A record containing fields parsed from a RADIUS packet.
+
+
+.. bro:id:: radius_attribute
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, attr_type: :bro:type:`count`, value: :bro:type:`string`)
+
+ Generated for each RADIUS attribute.
+
+ See `Wikipedia `__ for more
+ information about RADIUS.
+
+
+ :c: The connection.
+
+
+ :attr_type: The value of the code field (1 == User-Name, 2 == User-Password, etc.).
+
+
+ :value: The data/value bound to the attribute.
+
+
+Bro::RDP
+--------
+
+RDP analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_RDP`
+
+Types
++++++
+
+.. bro:type:: RDP::EarlyCapabilityFlags
+
+ :Type: :bro:type:`record`
+
+ support_err_info_pdu: :bro:type:`bool`
+
+ want_32bpp_session: :bro:type:`bool`
+
+ support_statusinfo_pdu: :bro:type:`bool`
+
+ strong_asymmetric_keys: :bro:type:`bool`
+
+ support_monitor_layout_pdu: :bro:type:`bool`
+
+ support_netchar_autodetect: :bro:type:`bool`
+
+ support_dynvc_gfx_protocol: :bro:type:`bool`
+
+ support_dynamic_time_zone: :bro:type:`bool`
+
+ support_heartbeat_pdu: :bro:type:`bool`
+
+
+.. bro:type:: RDP::ClientCoreData
+
+ :Type: :bro:type:`record`
+
+ version_major: :bro:type:`count`
+
+ version_minor: :bro:type:`count`
+
+ desktop_width: :bro:type:`count`
+
+ desktop_height: :bro:type:`count`
+
+ color_depth: :bro:type:`count`
+
+ sas_sequence: :bro:type:`count`
+
+ keyboard_layout: :bro:type:`count`
+
+ client_build: :bro:type:`count`
+
+ client_name: :bro:type:`string`
+
+ keyboard_type: :bro:type:`count`
+
+ keyboard_sub: :bro:type:`count`
+
+ keyboard_function_key: :bro:type:`count`
+
+ ime_file_name: :bro:type:`string`
+
+ post_beta2_color_depth: :bro:type:`count` :bro:attr:`&optional`
+
+ client_product_id: :bro:type:`string` :bro:attr:`&optional`
+
+ serial_number: :bro:type:`count` :bro:attr:`&optional`
+
+ high_color_depth: :bro:type:`count` :bro:attr:`&optional`
+
+ supported_color_depths: :bro:type:`count` :bro:attr:`&optional`
+
+ ec_flags: :bro:type:`RDP::EarlyCapabilityFlags` :bro:attr:`&optional`
+
+ dig_product_id: :bro:type:`string` :bro:attr:`&optional`
+
+
+Events
+++++++
+
+.. bro:id:: rdp_connect_request
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, cookie: :bro:type:`string`)
+
+ Generated for X.224 client requests.
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :cookie: The cookie included in the request.
+
+.. bro:id:: rdp_negotiation_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, security_protocol: :bro:type:`count`)
+
+ Generated for RDP Negotiation Response messages.
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :security_protocol: The security protocol selected by the server.
+
+.. bro:id:: rdp_negotiation_failure
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, failure_code: :bro:type:`count`)
+
+ Generated for RDP Negotiation Failure messages.
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :failure_code: The failure code sent by the server.
+
+.. bro:id:: rdp_client_core_data
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, data: :bro:type:`RDP::ClientCoreData`)
+
+ Generated for MCS client requests.
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :data: The data contained in the client core data structure.
+
+.. bro:id:: rdp_gcc_server_create_response
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, result: :bro:type:`count`)
+
+ Generated for MCS server responses.
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :result: The 8-bit integer representing the GCC Conference Create Response result.
+
+.. bro:id:: rdp_server_security
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, encryption_method: :bro:type:`count`, encryption_level: :bro:type:`count`)
+
+ Generated for MCS server responses.
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :encryption_method: The 32-bit integer representing the encryption method used in the connection.
+
+
+ :encryption_level: The 32-bit integer representing the encryption level used in the connection.
+
+.. bro:id:: rdp_server_certificate
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, cert_type: :bro:type:`count`, permanently_issued: :bro:type:`bool`)
+
+ Generated for a server certificate section. If multiple X.509
+ certificates are included in chain, this event will still
+ only be generated a single time.
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :cert_type: Indicates the type of certificate.
+
+
+ :permanently_issued: Value will be true is the certificate(s) is permanent on the server.
+
+.. bro:id:: rdp_begin_encryption
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, security_protocol: :bro:type:`count`)
+
+ Generated when an RDP session becomes encrypted.
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :security_protocol: The security protocol being used for the session.
+
+Bro::RFB
+--------
+
+Parser for rfb (VNC) analyzer
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_RFB`
+
+Events
+++++++
+
+.. bro:id:: rfb_event
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`)
+
+ Generated for RFB event
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+.. bro:id:: rfb_authentication_type
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, authtype: :bro:type:`count`)
+
+ Generated for RFB event authentication mechanism selection
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :authtype: the value of the chosen authentication mechanism
+
+.. bro:id:: rfb_auth_result
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, result: :bro:type:`bool`)
+
+ Generated for RFB event authentication result message
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :result: whether or not authentication was succesful
+
+.. bro:id:: rfb_share_flag
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, flag: :bro:type:`bool`)
+
+ Generated for RFB event share flag messages
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :flag: whether or not the share flag was set
+
+.. bro:id:: rfb_client_version
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, major_version: :bro:type:`string`, minor_version: :bro:type:`string`)
+
+ Generated for RFB event client banner message
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :version: of the client's rfb library
+
+.. bro:id:: rfb_server_version
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, major_version: :bro:type:`string`, minor_version: :bro:type:`string`)
+
+ Generated for RFB event server banner message
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :version: of the server's rfb library
+
+.. bro:id:: rfb_server_parameters
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, name: :bro:type:`string`, width: :bro:type:`count`, height: :bro:type:`count`)
+
+ Generated for RFB event server parameter message
+
+
+ :c: The connection record for the underlying transport-layer session/flow.
+
+
+ :name: name of the shared screen
+
+
+ :width: width of the shared screen
+
+
+ :height: height of the shared screen
+
+Bro::RPC
+--------
+
+Analyzers for RPC-based protocols
+
+Components
+++++++++++
+
+:bro:enum:`Analyzer::ANALYZER_CONTENTS_NFS`
+
+:bro:enum:`Analyzer::ANALYZER_CONTENTS_RPC`
+
+:bro:enum:`Analyzer::ANALYZER_MOUNT`
+
+:bro:enum:`Analyzer::ANALYZER_NFS`
+
+:bro:enum:`Analyzer::ANALYZER_PORTMAPPER`
+
+Events
+++++++
+
+.. bro:id:: nfs_proc_null
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, info: :bro:type:`NFS3::info_t`)
+
+ Generated for NFSv3 request/reply dialogues of type *null*. The event is
+ generated once we have either seen both the request and its corresponding
+ reply, or an unanswered request has timed out.
+
+ NFS is a service running on top of RPC. See `Wikipedia
+ `__ for more
+ information about the service.
+
+
+ :c: The RPC connection.
+
+
+ :info: Reports the status of the dialogue, along with some meta information.
+
+ .. bro:see:: nfs_proc_create nfs_proc_getattr nfs_proc_lookup nfs_proc_mkdir
+ nfs_proc_not_implemented nfs_proc_read nfs_proc_readdir nfs_proc_readlink
+ nfs_proc_remove nfs_proc_rmdir nfs_proc_write nfs_reply_status rpc_call
+ rpc_dialogue rpc_reply
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: nfs_proc_getattr
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, info: :bro:type:`NFS3::info_t`, fh: :bro:type:`string`, attrs: :bro:type:`NFS3::fattr_t`)
+
+ Generated for NFSv3 request/reply dialogues of type *getattr*. The event is
+ generated once we have either seen both the request and its corresponding
+ reply, or an unanswered request has timed out.
+
+ NFS is a service running on top of RPC. See `Wikipedia
+ `__ for more
+ information about the service.
+
+
+ :c: The RPC connection.
+
+
+ :info: Reports the status of the dialogue, along with some meta information.
+
+
+ :fh: TODO.
+
+
+ :attrs: The attributes returned in the reply. The values may not be valid if
+ the request was unsuccessful.
+
+ .. bro:see:: nfs_proc_create nfs_proc_lookup nfs_proc_mkdir
+ nfs_proc_not_implemented nfs_proc_null nfs_proc_read nfs_proc_readdir
+ nfs_proc_readlink nfs_proc_remove nfs_proc_rmdir nfs_proc_write nfs_reply_status
+ rpc_call rpc_dialogue rpc_reply file_mode
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: nfs_proc_sattr
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, info: :bro:type:`NFS3::info_t`, req: :bro:type:`NFS3::sattrargs_t`, rep: :bro:type:`NFS3::sattr_reply_t`)
+
+ Generated for NFSv3 request/reply dialogues of type *sattr*. The event is
+ generated once we have either seen both the request and its corresponding
+ reply, or an unanswered request has timed out.
+
+ NFS is a service running on top of RPC. See `Wikipedia
+ `__ for more
+ information about the service.
+
+
+ :c: The RPC connection.
+
+
+ :info: Reports the status of the dialogue, along with some meta information.
+
+
+ :req: The arguments passed in the request.
+
+
+ :rep: The attributes returned in the reply. The values may not be
+ valid if the request was unsuccessful.
+
+ .. bro:see:: nfs_proc_create nfs_proc_lookup nfs_proc_mkdir
+ nfs_proc_not_implemented nfs_proc_null nfs_proc_read nfs_proc_readdir
+ nfs_proc_readlink nfs_proc_remove nfs_proc_rmdir nfs_proc_write nfs_reply_status
+ rpc_call rpc_dialogue rpc_reply file_mode
+
+ .. todo:: Bro's current default configuration does not activate the protocol
+ analyzer that generates this event; the corresponding script has not yet
+ been ported to Bro 2.x. To still enable this event, one needs to
+ register a port for it or add a DPD payload signature.
+
+.. bro:id:: nfs_proc_lookup
+
+ :Type: :bro:type:`event` (c: :bro:type:`connection`, info: :bro:type:`NFS3::info_t`, req: :bro:type:`NFS3::diropargs_t`, rep: :bro:type:`NFS3::lookup_reply_t`)
+
+ Generated for NFSv3 request/reply dialogues of type *lookup*. The event is
+ generated once we have either seen both the request and its corresponding
+ reply, or an unanswered request has timed out.
+
+ NFS is a service running on top of RPC. See `Wikipedia
+