base/frameworks/intel/main.bro
-
Intel
The intelligence framework provides a way to store and query intelligence
data (e.g. IP addresses, URLs and hashes). The intelligence items can be
associated with metadata to allow informed decisions about matching and
handling.
Detailed Interface
Redefinable Options
-
Intel::item_expiration
-
The expiration timeout for intelligence items. Once an item expires, the
Intel::item_expired
hook is called. Reinsertion of an item
resets the timeout. A negative value disables expiration of intelligence
items.
Types
-
Intel::Info
-
Record used for the logging framework representing a positive
hit within the intelligence framework.
-
Intel::Item
Type: | record
- indicator:
string
The intelligence indicator.
- indicator_type:
Intel::Type
The type of data that the indicator field represents.
- meta:
Intel::MetaData
Metadata for the item. Typically represents more deeply
descriptive data for a piece of intelligence.
|
Represents a piece of intelligence.
-
Intel::MetaData
-
Data about an Intel::Item
.
-
Intel::Seen
Type: | record
- indicator:
string &log &optional
The string if the data is about a string.
- indicator_type:
Intel::Type &log &optional
The type of data that the indicator represents.
- host:
addr &optional
If the indicator type was Intel::ADDR , then this
field will be present.
- where:
Intel::Where &log
Where the data was discovered.
- node:
string &optional &log
The name of the node where the match was discovered.
- conn:
connection &optional
If the data was discovered within a connection, the
connection record should go here to give context to the data.
- uid:
string &optional
If the data was discovered within a connection, the
connection uid should go here to give context to the data.
If the conn field is provided, this will be automatically
filled out.
- f:
fa_file &optional
(present if base/frameworks/intel/files.bro is loaded)
If the data was discovered within a file, the file record
should go here to provide context to the data.
- fuid:
string &optional
(present if base/frameworks/intel/files.bro is loaded)
If the data was discovered within a file, the file uid should
go here to provide context to the data. If the file record f
is provided, this will be automatically filled out.
|
Information about a piece of “seen” data.
-
Intel::Type
Type: | enum
-
Intel::ADDR
An IP address.
-
Intel::SUBNET
A subnet in CIDR notation.
-
Intel::URL
A complete URL without the prefix "http://" .
-
Intel::SOFTWARE
Software name.
-
Intel::EMAIL
Email address.
-
Intel::DOMAIN
DNS domain name.
-
Intel::USER_NAME
A user name.
-
Intel::CERT_HASH
Certificate SHA-1 hash.
-
Intel::PUBKEY_HASH
Public key MD5 hash. (SSH server host keys are a good example.)
-
Intel::FILE_HASH
(present if base/frameworks/intel/files.bro is loaded)
File hash which is non-hash type specific. It’s up to the
user to query for any relevant hash types.
-
Intel::FILE_NAME
(present if base/frameworks/intel/files.bro is loaded)
File name. Typically with protocols with definite
indications of a file name.
|
Enum type to represent various types of intelligence data.
-
Intel::TypeSet
-
Set of intelligence data types.
-
Intel::Where
-
Enum to represent where data came from when it was discovered.
The convention is to prefix the name with IN_
.
Events
-
Intel::log_intel
-
-
Intel::match
-
Event to represent a match in the intelligence data from data that
was seen. On clusters there is no assurance as to when this event
will be generated so do not assume that arbitrary global state beyond
the given data will be available.
This is the primary mechanism where a user may take actions based on
data provided by the intelligence framework.
Hooks
-
Intel::extend_match
-
This hook can be used to influence the logging of intelligence hits
(e.g. by adding data to the Info record). The default information is
added with a priority of 5.
Info: | The Info record that will be logged. |
S: | Information about the data seen. |
Items: | The intel items that match the seen data. |
In case the hook execution is terminated using break, the match will
not be logged.
-
Intel::item_expired
-
This hook can be used to handle expiration of intelligence items.
Indicator: | The indicator of the expired item. |
Indicator_type: | The indicator type of the expired item. |
Metas: | The set of metadata describing the expired item. |
If all hook handlers are executed, the expiration timeout will be reset.
Otherwise, if one of the handlers terminates using break, the item will
be removed.
Functions
-
Intel::insert
-
Function to insert intelligence data. If the indicator is already
present, the associated metadata will be added to the indicator. If
the indicator already contains a metadata record from the same source,
the existing metadata record will be updated.
-
Intel::remove
-
Function to remove intelligence data. If purge_indicator is set, the
given metadata is ignored and the indicator is removed completely.
-
Intel::seen
-
Function to declare discovery of a piece of data in order to check
it against known intelligence for matches.