- Firepower System Event Streamer Integration Guide, Version 7.1.0
- Introduction to Event Streamer
- Understanding the eStreamer Application Protocol
- Understanding Intrusion and Correlation Data Structures
- Understanding Discovery & Connection Data Structures
- Understanding Host Data Structures
- Configuring eStreamer
- Data Structure Examples
- Understanding Legacy Data Structures
- Connection Specifications
- Understanding eStreamer Communication Stages
- Understanding eStreamer Message Types
- Null Message Format
- Error Message Format
- Event Stream Request Message Format
- Event Data Message Format
- Host Request Message Format
- Rule Documentation Message Format
- Host Data and Multiple Host Data Message Format
- Streaming Information Message Format
- Streaming Request Message Format
- Streaming Service Request Structure
- Domain Streaming Request Message Format
- Streaming Event Type Structure
- Sample Extended Request Messages
- Message Bundle Format
- Understanding Metadata
Understanding the eStreamer Application Protocol
The Firepower System Event Streamer (eStreamer) uses a message-oriented protocol to stream events and host profile information to your client application. Your client can request event and host profile data from a Management Center, and intrusion event data only from a managed device. Your client application initiates the data stream by submitting request messages, which specify the data to be sent, and then controls the message flow from the Management Center or managed device after streaming begins.
Throughout this document, the eStreamer service on the Management Center or a managed device may be referred to as the eStreamer server or eStreamer.
The following sections describe requirements for connecting to the eStreamer service and introduce commands and data formats used in the eStreamer protocol:
- Connection Specifications describes the communication flow between the eStreamer service and your client and describes how the client interacts with it.
- Understanding eStreamer Communication Stages describes the communication protocol for client applications to submit data requests to the eStreamer server and for eStreamer to deliver the requested information to the client.
- Understanding eStreamer Message Types describes the message types used in the eStreamer protocol; discusses the basic structure of data packets used by eStreamer to return intrusion event data, discovery event data, metadata, and host data to a client; and provides other information to help you write a client that can interpret eStreamer messages.
Connection Specifications
Understanding eStreamer Communication Stages
There are four major stages of communication that occur between a client and the eStreamer service:
1. The client establishes a connection with the eStreamer server and the connection is authenticated by both parties.
See Establishing an Authenticated Connection for more information.
2. The client requests data from the eStreamer service and specifies the types of data to be streamed. A single event request message can specify any combination of available event data, including event metadata. A single host profile request can specify a single host or multiple hosts.
Two request modes are available for requesting event data:
– Event Stream Request — The client submits a message containing request flags that specify the requested event types and version of each type, and the eStreamer server responds by streaming the requested data.
– Extended Request — The client submits a request with the same message format as for Event Stream requests but sets a flag for an extended request. This initiates a message interaction between client and eStreamer server through which the client requests additional information and version combinations not available via Event Stream requests.
For information on requesting data, see Requesting Data from eStreamer.
3. eStreamer establishes the requested data stream to the client.
See Accepting Data from eStreamer for more information.
4. The connection terminates.
See Terminating Connections for more information.
Establishing an Authenticated Connection
Before a client can request data from eStreamer, the client must initiate an SSL-enabled TCP connection with the eStreamer service. The client can request on any configured management interface on the Management Center or managed device. Client connections do not enforce traffic channel configuration for management interfaces so that configuration can be ignored when choosing an interface for your connection. When the client initiates the connection, the eStreamer server responds, initiating an SSL handshake with the client. As part of the SSL handshake, the eStreamer server requests the client’s authentication certificate, and verifies that the certificate is valid (signed by the Internal Certifying Authority [Internal CA] on the eStreamer server).
Note Cisco recommends that you also require your client to verify that the certificate presented by the eStreamer server has been signed by a trusted Certifying Authority. This is the Internal CA certificate included in the PKCS#12 file that Cisco provides when you register a new eStreamer client with the Management Center or managed device. See Adding Authentication for eStreamer Clients for more information.
After the SSL session is established, the eStreamer server performs an additional post-connection verification of the certificate. This includes verifying that the client connection originates from the host specified in the certificate and that the subject name of the certificate contains the appropriate value. If either post-connection check fails, the eStreamer server closes the connection. If necessary, you can configure the eStreamer service so that it does not perform a client host name check (see eStreamer Service Options for more information).
While the client is not required to perform post-connection verification, Cisco recommends that the client perform this verification step. The authentication certificate contains the following field values in the subject name of the certificate:
|
|
---|---|
|
|
|
|
After the post-connection verification is finished, the eStreamer server awaits a data request from the client.
Requesting Data from eStreamer
Your client performs the following high-level tasks in managing data requests:
- Initializing the request session — See Establishing a Session.
- Requesting events from the eStreamer event archive — Using Event Stream Requests and Extended Requests to Initiate Event Streaming.
- Requesting host data — See Requesting Host Data.
- Changing a request — See Changing a Request.
Establishing a Session
The client establishes a session by sending an initial Event Stream request to the eStreamer service.
In this initial message, you can either include data request flags or submit the data requests in a follow-on message. This initial Event Stream request message itself is a prerequisite for all eStreamer requests, whether for event data or for host data. For information about using the Event Stream request message, see Event Stream Request Message Format.
Note The eStreamer client can request on any configured management interface on the Management Center or managed device. Client connections do not enforce traffic channel configuration for management interfaces so that configuration can be ignored when choosing an interface for your connection.
Using Event Stream Requests and Extended Requests to Initiate Event Streaming
The eStreamer service provides two modes of requests for event streaming. Your request can combine modes. In both modes, your client starts the request with an Event Stream request message but sets the request flag bits differently. For details about the Event Stream message format, see Event Stream Request Message Format.
When eStreamer receives an Event Stream request message, it processes the client request as follows:
- If the request message does not set bit 30 in the request flag field, eStreamer begins streaming any events requested by other set bits in the request flag field. For information, see Submitting Event Stream Requests.
- If bit 30 is set in the Event Stream request, eStreamer provides extended request processing. Extended request flags must be sent if this bit is set. For information, see Submitting Extended Requests. Note that eStreamer resolves any duplicate requests. If you request multiple versions of the same data, either by multiple flags or multiple extended requests, the highest version is used. For example, if eStreamer receives flag requests for discovery events version 1 and 6 and an extended request for version 3, it sends version 6.
Submitting Event Stream Requests
Event stream requests use a simple process:
- Your client sends a request message to the eStreamer service with a start date and time and a request flag field that specifies the events and their version level to be included in the data stream.
- eStreamer streams events beginning at the specified time. For information about the streaming protocol, see Accepting Data from eStreamer.
For information on the format and content of the client’s Event Stream request message, see Event Stream Request Message Format.
For information on the event types and versions of events that the client can request, see Table 2-6.
Submitting Extended Requests
If you set bit 30 in the request flags field of an Event Stream Request message, you initiate an extended request, which starts a negotiation with the server. Extended request flags must be sent if this bit is set. For the event types available by extended request, see Table 2-22.
The steps for extended requests are as follows:
- Your client sends an Event Streaming Request message to eStreamer with the request flags bit 30 set to
1
, which signals an extended request. See Event Stream Request Message Format for message format details. - eStreamer answers with a Streaming Information message that advertises the list of services available to the client. For details about the Streaming Information message, see Streaming Information Message Format.
- The client returns a Streaming Request message that indicates the service it wants to use, with a request list of event types and versions available from that service. The request list corresponds to setting bits in the request flag field when making a standard event stream request. For details about how to use the Streaming Request message to request events, see “Sample Extended Request Messages” section.
- eStreamer processes the client’s Streaming Request message and begins streaming the data at the time specified in the message. For information about the streaming protocol, see Accepting Data from eStreamer.
Requesting Host Data
Once you have established a session, you can submit a request for host data at any time. eStreamer generates information for the requested hosts from the Firepower System network map.
Changing a Request
To change request parameters for an established session, the client must disconnect and request a new session.
Accepting Data from eStreamer
Note The eStreamer server does not keep a history of the events it sends. Your client application must check for duplicate events, which can inadvertently occur for a number of reasons. For example, when starting up a new streaming session, the time specified by the client as the starting point for the new session can have multiple messages, some of which may have been sent in the previous session and some of which were not. eStreamer sends all message that meet the specified request criteria. Your application should detect any resulting duplicates.
During periods of inactivity, eStreamer sends periodic null messages to the client to keep the connection open. If it receives an error message from the client or an intermediate host, it closes the connection.
eStreamer transmits requested data to the client differently, depending on the request mode.
Event Stream Requests
If the client submits an event stream request, eStreamer returns data message by message. It may send multiple messages in a row without waiting for a client acknowledgment. At a certain point, it pauses and waits for the client. The client operating system buffers received data and lets the client process it at its own pace.
If the client request includes a request for metadata, eStreamer sends the metadata first. The client should store it in memory to be available when processing the event records that follow.
Extended Requests
If the client submits an extended request, eStreamer queues up messages and sends them in bundles. eStreamer may send multiple bundles in a row without waiting for a client acknowledgment. At a certain point, it pauses and waits for the client. The client operating system buffers received data and lets the client read it off at its own pace.
The client unpacks each bundle, message by message, and uses the lengths of the records and the blocks to parse each message. The overall message length in each message header can be used to calculate when the end of each message has been reached, and the overall bundle length can be used to know when the end of the bundle is reached. The bundle requires no index of its contents to be correctly parsed.
For information about the message bundling mechanism, see Message Bundle Format.
For information about the null message that the client can use for additional flow control, see Null Message Format.
Terminating Connections
The eStreamer server attempts to send an error message before closing the connection. For information on error messages, see Error Message Format.
The eStreamer server can close a client connection for the following reasons:
- Any time sending a message results in an error. This includes both event data messages and the null keep-alive message eStreamer sends during periods of inactivity.
- An error occurs while processing a client request.
- Client authentication fails (no error message is sent).
- eStreamer service is shutting down (no error message is sent).
Your client can close the connection to eStreamer server at any time and should attempt to use the error message format to notify the eStreamer server of the reason.
Understanding eStreamer Message Types
The eStreamer application protocol uses a simple message format that includes a standard message header and various sub-header fields followed by the record data which contains the message’s payload. The message header is the same in all eStreamer message types; for more information, see eStreamer Message Header.
|
|
|
---|---|---|
Both the eStreamer server and the client send null messages to control data flow. For information, see Null Message Format. |
||
Both the eStreamer server and the client use error messages to indicate why a connection closed. For information, see Error Message Format. |
||
A client sends this message type to the eStreamer service to initiate a new streaming session and request data. For information, see Event Stream Request Message Format. |
||
The eStreamer service uses this message type to send event data and metadata to the client. For information, see Event Data Message Format. |
||
A client sends this message type to the eStreamer service to request host data. A session must be started already via an Event Stream Request message. For information, see Host Request Message Format. |
||
The eStreamer service uses this message type to send single host data requested by the client. For information, see Host Data and Multiple Host Data Message Format. |
||
The eStreamer service uses this message type to send multiple host data requested by the client. For information, see Host Data and Multiple Host Data Message Format. |
||
A client uses this message type in extended requests to specify which of the advertised events from the Stream Information message it wants. For information, see Sample Extended Request Messages. |
||
The eStreamer service uses this message type in extended requests to advertise the list of services available to the client. For information, see Streaming Information Message Format. |
||
The eStreamer service uses this message type to package messages that it streams to clients. For information, see Message Bundle Format. |
eStreamer Message Header
All eStreamer messages start with the message header illustrated in the graphic below. The following table explains the fields.
|
|
|
---|---|---|
Indicates the version of the header used on the message. For the current version of eStreamer, this value is always |
||
Indicates the type of message transmitted. For the list of current values, see Table 2-2. |
||
Indicates the length of the content that follows, and excludes the bytes in the message header itself. A message with a header and no data has a message length of zero. |
Null Message Format
Both the client application and the eStreamer service send null messages. The null message has a type of 0 and contains no data after the message header.
The client sends a null message to the eStreamer server to indicate readiness to accept more data. The eStreamer service sends null messages to the client to keep the connection alive when no data is being transmitted. The message length value for null messages is always set to 0
.
Tip In data structure diagrams in this book, integers in parentheses such as (1
) or (115
) represent constant field values. For example, Header Version (1
) means that the field in the data structure under discussion always has a value of 1
.
The Null message format is shown below. The only non-zero value in the message is the header version.
An example of a null message in binary format follows. Notice that the only non-zero value is in the second byte, signifying a header version value of 1
. The message type and length fields (shaded) each have a value of 0
.
Tip Examples in this guide appear in binary format to clearly display which bits are set. This is important for some messages, such as the event request message and event impact fields.
Error Message Format
Both the client application and the eStreamer service use error messages. Error messages have a message type of 1 and contain a header, an error code, an error text length, and the actual error text. Error text can contain between 0 and 65,535 bytes.
When you create custom error messages for your client application, Cisco recommends using -1
as the error code.
The following graphic illustrates the basic error message format. Shaded fields are specific to error messages.
The following table describes each field in error code messages.
|
|
|
---|---|---|
The following diagram shows an example error message:
In the preceding example, the following information appears:
Event Stream Request Message Format
eStreamer clients use the Event Stream Request message to start a streaming session. The request message includes a start time and a bit flag field to specify the data the eStreamer service should include, which can be any combination of events, as well as intrusion event extra data and metadata. The Event Stream Request message can initiate both event stream requests and extended requests. The message type is 2.
You must submit an Event Stream Request message for all data requests, including a request exclusively for host profile information. In such a case, you first submit an Event Stream Request message, then a Host Request message (type 5) to specify the host data.
The following graphic illustrates the Event Stream Request message format. The message uses the standard header. The shaded fields are specific to the request message and are described in the following table.
The following table describes each field in Event Stream Request messages.
|
|
|
---|---|---|
Defines the start of the session. To start at:
See Initial Timestamp below for important information. |
||
Specifies the types and versions of events and metadata to be returned in event stream requests. See Request Flags for flag definitions. Setting bit 30 initiates an extended request, which can co-exist with event stream requests in the same message. |
Initial Timestamp
Note Your client application should use the archival timestamp in the Initial Timestamp field when submitting an event stream request, as explained below. This ensures that you do not inadvertently exclude events. Devices transmit data to the Management Center using a “store and forward” mechanism with transmission delays. If you request events by the generation timestamp assigned by the device that detects it, delayed events may be missed.
When starting a session, a best practice is to start up from the archival timestamp (also known as the “server timestamp”) of the last record in the previous session. It is not a technical requirement but is strongly recommended. By using the archival timestamp of the last record in the previous session, the eStreamer service will not resend prior records or metadata. Under certain circumstances, if you use the generation timestamp you can inadvertently exclude events from the new streaming session.
To include the archival timestamp in your streamed events, you must set bit 23 in the request flag field.
Note that only time-based events have archival timestamps. Events that eStreamer generates, such as metadata, have zero in this field when extended event headers have been requested with bit 23 set.
Request Flags
You set bits 0 through 29 in the event data request flag field to select the types of events you want eStreamer to send. You set bit 30 to activate the extended request mode. Setting bit 30 does not directly request any data. Extended request flags must be sent if this bit is set. Your client requests data during the server-client message dialog that follows submission of the Event Stream Request message. For information on extended requests, see Requesting Data from eStreamer.
See Table 2-6 for definitions of the bit settings in the Request Flags field. Different flags request different versions of the event data. For example, to obtain data in Firepower System 4.9 format instead of 4.10 format you set a different flag bit. For specific information on the flags to use when requesting data for particular product versions, see Table 2-7.
Note that you request metadata by version, not by the individual metadata record. For information about each supported version of metadata, see Request Flags.
The following diagram shades the bits in the flags field that are currently used:
For information on each request flag bit, see the following table.
|
|
---|---|
Requests the transmission of packet data associated with intrusion events. If set to |
|
Requests the transmission of version 1 metadata associated with intrusion, discovery, correlation, and connection events. If set to You can use metadata to resolve coded and numeric fields in events. See Understanding Metadata for general information on the way eStreamer transmits metadata to clients and how a client can use metadata. |
|
Requests the transmission of intrusion events. If bit 2, bit 6, or both bit 2 and 6 are set to For details on requesting record types, see Submitting Extended Requests. If bit 2, bit 6, and bit 30 are all set to |
|
Requests the transmission of discovery data version 1 (Management Center 3.2). If set to For more information about discovery events, see Understanding Discovery & Connection Data Structures. |
|
Requests the transmission of correlation data version 1 (Management Center 3.2). If set to |
|
Requests the transmission of impact correlation events (intrusion impact alerts). If set to See Intrusion Impact Alert Data 5.3+ for more information about intrusion impact alerts. |
|
Bit 6 is used in a manner identical to bit 2. See Bit 2. |
|
Requests the transmission of discovery data version 2 (Management Center 4.0 - 4.1) if set to |
|
Requests the transmission of connection data version 1 (Management Center 4.0 - 4.1) if set to |
|
Requests the transmission of correlation data version 2 (Management Center 4.0 - 4.1.x) if set to |
|
Requests the transmission of discovery data version 3 (Management Center 4.5 - 4.6.1) if set to For more information about legacy discovery events, see Legacy Discovery Data Structures. |
|
Requests the transmission of connection data version 3 (Management Center 4.5 - 4.6.1) if set to |
|
Requests the transmission of correlation data version 3 (Management Center 4.5 - 4.6.1). If set to |
|
Requests the transmission of version 2 metadata associated with intrusion, discovery, correlation, and connection events. If set to See Understanding Metadata for general information on the way eStreamer transmits metadata to clients and how a client can use metadata. |
|
Requests the transmission of version 3 metadata associated with intrusion, correlation, discovery, and connection events. If set to See Understanding Metadata for general information on the way eStreamer transmits metadata to clients and how a client can use metadata. |
|
Requests the transmission of discovery data version 4 (Management Center 4.7 - 4.8.x). If set to |
|
Requests the transmission of connection data version 4 (Management Center 4.7 - 4.9.0.x) if set to |
|
Requests the transmission of correlation data version 4 (Management Center 4.7). If set to See Legacy Correlation Event Data Structures for information about correlation events transmitted in Management Center 4.7 format. |
|
Requests the transmission of version 4 metadata associated with intrusion, discovery, user activity, correlation, and connection events. If set to Version 4 metadata includes the following:
If you request bit 20 with bit 22, user metadata is also sent. See Understanding Metadata for general information on the way eStreamer transmits metadata to clients and how a client can use metadata. |
|
Requests the transmission of version 1 user events. For more information on user events, see User Record. |
|
Requests the transmission of correlation data version 5 (Management Center 4.8.0.2 - 4.9.1). If set to If you request bit 20 with bit 22, user metadata is also sent. For more information about legacy correlation (compliance) events, see Legacy Correlation Event Data Structures. |
|
Requests extended event headers. If set to See eStreamer Message Header for information about the event message header. |
|
Requests the transmission of discovery data version 5 (Management Center 4.9.0.x). If set to For more information about discovery events, see Understanding Discovery & Connection Data Structures. |
|
Requests the transmission of discovery data version 6 (Management Center 4.9.1+). If set to For more information about discovery events, see Understanding Discovery & Connection Data Structures. |
|
Requests the transmission of connection data version 5 (Management Center 4.9.1 - 4.10.x) if set to |
|
Requests event extra data associated with an intrusion event in an Extra Data record. For more information about event data, see Intrusion Event Extra Data Data Block Fields. |
|
Requests the transmission of discovery data version 7 (Management Center 4.10.0+). If set to For more information about discovery events, see Understanding Discovery & Connection Data Structures. |
|
Requests the transmission of correlation data version 6 (Management Center 4.10 - 4.10.x). If set to If you request bit 20 with bit 29, user metadata is also sent. For more information about correlation events, see earlier versions of the product. |
|
Indicates an extended request to eStreamer. Extended request flags must be sent if this bit is set. For information about extended requests, see Submitting Extended Requests. |
To help you decide which flags to use to request data for a particular version, see the following table. For Version 5.0 and later, see Submitting Extended Requests for more information about using Bit 30.
|
|
|
|
|
|
|
---|---|---|---|---|---|---|
detection engine ID
fields as
sensor ID
.
The following example requests intrusion events of type 7 (compatible with Firepower System 3.2+) with both version 1 metadata and packet flags:
To request only data compatible with Firepower System 3.2 (including intrusion events, packets, metadata, impact alerts, policy violation events, and version 2.0 events), use the following:
To request intrusion impact alerts, correlation events, discovery events, connection events, and intrusion events of type 7 with packets and version 3 metadata in Management Center 4.6.1+ format, use the following:
Event Data Message Format
The eStreamer service transmits event data and related metadata to clients when it receives an event request. Event data messages have a message type of 3. Each message contains a single data record with either event data or metadata.
Note that type 3 messages carry only event data and metadata. eStreamer transmits host information in type 6 (single-host) and type 7 (multiple-host) messages. See Host Data and Multiple Host Data Message Format for information on host message formats.
Understanding the Organization of Event Data Messages
The event data and metadata messages that eStreamer sends contain the following sections:
- eStreamer message header — The standard message header defined at eStreamer Message Header.
- Event-specific sub-headers — Sets of fields that vary by event type, with codes that describe additional event details and determine the structure of the payload data that follows.
- Data record — Fixed-length fields and a data block.
Note The client should unpack all messages on the basis of field length.
For the event message formats by event type, see the following:
- Intrusion Event and Metadata Message Format for intrusion event data records and all metadata records. These messages have fixed-length fields.
- Discovery Event Message Format for messages with discovery event or user event data. In addition to the standard eStreamer message header and a record header similar to the intrusion event message, discovery messages have a distinctive discovery event header with an event type and subtype field. The data record in discovery event messages is packaged in a series 1 block that can have variable length fields and multiple layers of encapsulated blocks.
- Connection Event Message Format for messages with connection statistics. Their general structure is identical to discovery event messages. Their data block types, however, are specific for connection statistics.
- Correlation Event Message Format for messages with correlation (compliance) event data. The headers in these messages are the same as in intrusion event messages but the data blocks are series 1 blocks.
- Event Extra Data Message Format for a series of messages that deliver intrusion-related record types with variable-length fields and multiple layers of nested data blocks such as intrusion event extra data. See Event Extra Data Message Format for general information on the structure of this message series. See Data Block Header for information about the structures of this series of blocks which are similar to series 1 blocks but numbered separately.
Intrusion Event and Metadata Message Format
The graphic below shows the general structure of intrusion event and metadata messages.
The following graphic shows the details of the record header portion of the intrusion event and metadata message format. The record header fields are shaded. The table that follows defines the fields.
See Table 3-1 |
||||||||||||||||||||||||||||||||
eStreamer Server Timestamp |
||||||||||||||||||||||||||||||||
The following table describes each field in the header of intrusion events and metadata messages.
|
|
|
---|---|---|
The first bit of this field is a flag indicating whether the header is an extended header containing an archive timestamp. The remaining 15 bits are an optional field containing the Netmap ID for the domain on which the event was detected. If this field is not used, it is left empty. Netmap IDs map to domains as provided in metadata. |
||
Identifies the data record content type. See Intrusion Event and General Metadata Record Types for the list of record types. |
||
Length of the content of the message after the record header. Does not include the 8 or 16 bytes of the record header. (Record Length plus the length of the record header equals Message Length.) |
||
Indicates the timestamp applied when the event was archived by the eStreamer server. Also called the archival timestamp. Field present only if bit 23 is set in the request message flags. |
||
Field present only if bit 23 is set in the request message flags. |
Discovery Event Message Format
The graphic below shows the structure of discovery event messages. The standard eStreamer message header and event record header are followed by a discovery event header used only in discovery and user event messages. The discovery event header section of the message contains the discovery event type and subtype fields, which together form a key to the data block that follows. For the current discovery event types and subtypes, see Discovery and Connection Events by Type and Subtype.
See Discovery Event Message Headers for field details. |
||||||||||||||||||||||||||||||||
See Discovery Event Header 5.2+ for field details. |
||||||||||||||||||||||||||||||||
Discovery Event Message Headers
The shaded section in the following graphic shows the fields of the record header in the discovery event data message format, and shows the location of the event header that follows it. The following table defines the fields of the discovery event message headers.
Discovery Event Header |
||||||||||||||||||||||||||||||||
The following table describes the fields in the record header and the event header of the discovery event message.
|
|
|
---|---|---|
The first bit of this field is a flag indicating whether the header is an extended header containing an archive timestamp. The remaining 15 bits are an optional field containing the Netmap ID for the domain on which the event was detected. If this field is not used, it is left empty. Netmap IDs map to domains as provided in metadata. |
||
Identifies the data record content type. See Discovery and Connection Event Record Types for the list of record types. |
||
Length of the content of the message after the record header. Does not include the 8 or 16 bytes of the record header. (Record Length plus the length of the record header equals Message Length.) |
||
Indicates the timestamp applied when the event was archived by the eStreamer server. Also called the archival timestamp. Field present only if bit 23 is set in the request flags field of the event stream request. |
||
Reserved for future use. Field present only if bit 23 is set in the request message flags. |
||
Contains a number of fields, including the event type and subtype, which together form a unique key to the data structure that follows. See Discovery Event Header 5.2+ for definitions of fields in the discovery event header. |
Connection Event Message Format
Messages with connection statistics have a structure identical to discovery event messages. See Discovery Event Message Format for general message format information. Connection event messages are distinct in terms of the data block types they incorporate.
Correlation Event Message Format
The graphic below shows the general structure of correlation (compliance) event messages. The standard eStreamer message header and record header are followed immediately by a data block in the data record section of the message. Correlation messages use Series 1 data blocks.
See Correlation Record Header for field details. |
||||||||||||||||||||||||||||||||
Correlation Record Header
The shaded section of the following graphic shows the fields of the record header in correlation event messages. Note that correlation messages use series 1 data blocks; however, they do not have the discovery header that appears in discovery event messages. Their header fields resemble those of intrusion event messages. The table that follows the graphic below defines the record header fields for correlation events.
Record Type |
||||||||||||||||||||||||||||||||
eStreamer Server Timestamp |
||||||||||||||||||||||||||||||||
Uses Series 1 block, see Understanding Discovery (Series 1) Blocks |
The following table describes each field in the record header of correlation event messages.
|
|
|
---|---|---|
The first bit of this field is a flag indicating whether the header is an extended header containing an archive timestamp. The remaining 15 bits are an optional field containing the Netmap ID for the domain on which the event was detected. If this field is not used, it is left empty. Netmap IDs map to domains as provided in metadata. |
||
Identifies the data record content type. See Table 3-1 for the list of intrusion, correlation, and metadata record types. |
||
Length of the content of the message after the record header. Does not include the 8 or 16 bytes of the record header. (Record Length plus the length of the record header equals Message Length.) |
||
Indicates the timestamp applied when the event was archived by the eStreamer server. Also called the archival timestamp. Field present only if bit 23 is set in the request message flags. Field is zero for data generated by the Management Center such as host profiles and metadata. |
||
Field present only if bit 23 is set in the request message flags. |
Event Extra Data Message Format
The graphic below shows the structure of event extra data messages. The Intrusion Event Extra Data message is an example of this message group.
Event extra data messages have the same format as correlation event messages, with a data block directly after the record header. Unlike correlation messages, they use series 2 data blocks, not series 1 data blocks, which have a separate numbering sequence. For information about series 2 block types, see Understanding Series 2 Data Blocks.
Event Extra Data Message Record Header
The shaded section of the following graphic shows the fields of the record header in event extra data messages. The table that follows defines the record header fields for event extra data messages.
Record Type |
||||||||||||||||||||||||||||||||
eStreamer Server Timestamp |
||||||||||||||||||||||||||||||||
Uses series 2 block, see Understanding Series 2 Data Blocks |
The following table describes each field in the record header of event extra data messages.
|
|
|
---|---|---|
The first bit of this field is a flag indicating whether the header is an extended header containing an archive timestamp. The remaining 15 bits are an optional field containing the Netmap ID for the domain on which the event was detected. If this field is not used, it is left empty. Netmap IDs map to domains as provided in metadata. |
||
Identifies the data record content type. See Intrusion Event and General Metadata Record Types for the list of event extra data record types. |
||
Length of the content of the message after the record header. Does not include the 8 or 16 bytes of the record header. (Record Length plus the length of the record header equals Message Length.) |
||
Indicates the timestamp applied when the event was archived by the eStreamer server. Also called the archival timestamp. Field present only if bit 23 is set in the request message flags. Field is not present for events generated by the Management Center. |
||
Field present only if bit 23 is set in the request message flags. Field is not present for events generated by the Management Center. |
Data Block Header
Series 1 blocks and series 2 blocks have similar structures but distinct numbering. These blocks can appear anywhere in the data portion of a discovery, correlation, connection, or event extra data message. These blocks encapsulate other blocks at multiple levels of nesting.
The data blocks in both the first and second series begin with the header structure shown in the graphic below. The following table provides information about the header fields. The header is followed immediately by the data structure associated with the data block type.
|
|
|
---|---|---|
For series 1 block types, see Understanding Discovery (Series 1) Blocks. For series 2 block types, see Series 2 Block Types. |
||
Length of the data block. Includes the number of bytes of data plus the 8 bytes in the two data block header fields. |
Host Request Message Format
To receive host profiles, you submit Host Request messages. You can request data for a single host or multiple hosts defined by an IP address range.
Note that it is mandatory for all data requests, including requests for host profile information, to first initialize the session by submitting an Event Stream Request message. To set up for streaming host data only, you can use any of the following request flag settings in your initial Event Stream Request message:
- set the bit for the appropriate version of metadata (this can be beneficial when streaming host data)
- set no request flags
- set bit 11 (to suppress any default event streaming if using legacy versions of eStreamer)
After the initial message, you then use a Host Request message (type 5) to specify the hosts.
Note For legacy eStreamer versions with default event streaming, if you want to stream only host profile data, you need to suppress the default event messages. First send the server an Event Stream Request message with bit 11 in the Request Flags field set to 1
; then, send the Host Request message.
The graphic below shows the format for the Host Request message. The shaded fields are specific to the Host Request message format and are defined in the following table. The preceding three fields are the standard message header.
The following table explains the message fields.
|
|
|
---|---|---|
Requests data for a single host or multiple hosts, using the following codes:
|
||
|
||
IP address of the host whose data should be returned (if request is for a single host), or the starting address in an IP address range (if request is for multiple hosts). Can be either an IPv4 or IPv6 address. |
||
Ending address in an IP address range (if request is for multiple hosts), or the Start IP Address value (if request is for single host). Can be either an IPv4 or IPv6 address. |
The graphic below shows the format for the legacy Host Request message. eStreamer will still respond to this request. The only difference from the current request is the smaller IPv4 address fields. The shaded fields are specific to the Host Request message format and are defined in the following table. The preceding three fields are the standard message header.
The following table explains the message fields.
|
|
|
---|---|---|
Requests data for a single host or multiple hosts, using the following codes:
|
||
|
||
IP address of the host whose data should be returned (if request is for a single host), or the starting address in an IP address range (if request is for multiple hosts). Specify the address in IP address octets. |
||
Ending address in an IP address range (if request is for multiple hosts), or the Start IP Address value (if request is for single host). |
Rule Documentation Message Format
To receive rule documentation profiles, you submit Rule Documentation messages. You request these by generator ID, signature ID, and revision.
Note that it is mandatory for all data requests, including requests for rule documentation information, to first initialize the session by submitting an Event Stream Request message. To set up for streaming host data only, you can use any of the following request flag settings in your initial Event Stream Request message:
- set the bit for the appropriate version of metadata (this can be beneficial when streaming host data)
- set no request flags
- set bit 11 (to suppress any default event streaming if using legacy versions of eStreamer)
After the initial message, you then use a Rule Documentation message (type 10) to specify the rule.
The graphic below shows the format for the Rule Documentation message. The shaded fields are specific to the Rule Documentation message format and are defined in the following table. The preceding three fields are the standard message header.
The following table explains the message fields.
|
|
|
---|---|---|
Requests data for a Rule Documentation Data Block. This value is always |
||
|
||
Identification number of the Firepower System preprocessor for the requested rule. |
||
Host Data and Multiple Host Data Message Format
eStreamer responds to host requests by sending host data messages, each with a full host profile data block. eStreamer sends one host data message for each host specified in the request. eStreamer uses the type 6 message to respond to requests for a single host profile, and uses the type 7 message to respond to requests for multiple hosts. The formats of the type 6 and type 7 messages are identical, only the message type is different.
Host data messages do not have a record type field. The structure of the message is communicated by the message type and the data block type of the full host profile included in the message. Full host profile data blocks are in the series a group of blocks.
The graphic below shows the format of the host data message and the table that follows defines the shaded fields:
The fields specific to the Host Request message are:
|
|
|
---|---|---|
Specifies the block type for the full host profile data included in the message. See Host Discovery and Connection Data Block Types. |
||
The host data. For links to the definitions of current full host profile data blocks, see Host Discovery and Connection Data Block Types. |
Streaming Information Message Format
When the eStreamer service receives a request for an extended request, it sends the client the Streaming Information message described below. This message advertises the server’s list of available services. Currently, the only relevant option is the eStreamer service (6667), although the message can list other services, which should be ignored. Each advertised service is represented by a Streaming Service Request structure described in Streaming Service Request Structure.
The graphic below illustrates the format for the Streaming Information message. The shaded field is specific to this message type. The preceding three fields are the standard message header.
Service... |
The fields of the Streaming Information message are:
|
|
|
---|---|---|
eStreamer message type. Set to |
||
Length of the content of the message after the message header. Does not include the bytes in the Header Version, Message Type, and Message Length fields. |
||
List of available services. See Streaming Service Request Structure. |
Streaming Request Message Format
The client uses the Streaming Request message to specify to eStreamer the service in the Streaming Information message that it wants to use, followed by a set of requests for event types and versions to be streamed. The graphic below shows the message structure and the following table defines the fields. The requested service is represented by a Streaming Service Request structure described in Streaming Service Request Structure.
The graphic below illustrates the format for the Streaming Information message. The shaded field is specific to this message type. The preceding three fields are the standard message header.
Service... |
The fields of the Streaming Request message are:
|
|
|
---|---|---|
eStreamer message type. Set to |
||
Length of the content of the message after the message header. Does not include the bytes in the Header Version, Message Type, and Message Length fields. |
||
List of requested service structures. See Streaming Service Request Structure. |
Streaming Service Request Structure
The eStreamer service sends one Streaming Service Request data structure in the Streaming Information message for each service it advertises. The eStreamer service does not use the last field of the Streaming Service Request, which provides for a list of event types to be included.
The client processes the Streaming Service Request structure from eStreamer and uses the same structure in the response it returns to the server. In the Streaming Service Request that the client sends to the server, it includes, first, a request for the service advertised by eStreamer, and, second, a list of Streaming Event Type structures, which specify the requested event types the client wants to receive.
Each Streaming Event Type structure contains two fields to specify the event type and version for each requested event type. For information on the Streaming Event Type structure, see .
The graphic below shows the fields of the Streaming Service Request structure. The table that follows defines the fields.
The fields of the Streaming Service Request structure are:
Domain Streaming Request Message Format
The client uses the Domain Streaming Request message to request events from a specific domain from eStreamer. The graphic below shows the message structure and the following table defines the fields. The shaded fields are specific to this message type. The preceding three fields are the standard message header.
The fields of the Domain Streaming Request message are:
Streaming Event Type Structure
eStreamer clients use the Streaming Event Type structure to specify an event’s version and version. Each event version/type combination is a request for an event stream.
Lists of Streaming Event Type structures must be terminated with a structure with all fields set to zero. That is:
Event Version = 0
Event Type = 0
The following diagram illustrates the format for the Streaming Event Type structure.
The fields of the Streaming Event Type structure are:
|
|
|
---|---|---|
Version number of event type. For list of versions supported for each event type, see Event Types and Versions for Extended Request. |
||
Code for requested event type. For the current list of valid event types and version codes, see Event Types and Versions for Extended Request. List of event types should be terminated with a zero event type and zero event version. |
The following table lists the event types and versions that clients can specify in extended requests. The table indicates the Management Center software versions that correspond to each event type version. For example, to request the correlation events that were supported by the Management Center in version 4.8.0.2 - 4.9.1, you should request Event Type 31, Version 5. If an event was recorded with a different event type, it will be upgraded or downgraded to match the format of the requested event type.
Sample Extended Request Messages
Streaming Information Message
In the sample below, the server advertises two services, the first type 6667
(eStreamer) and the second type 5000
. In Streaming Information messages from the server, the flags field and initial timestamp fields are zero, and the message specifies no event types.
Streaming Request Message
Below is a Streaming Request message where the client requests service type 6667
(eStreamer) and specifies two event types: version 6 of connection events (event type 71
) and version 4
of metadata (event type 21
).
Message Bundle Format
The eStreamer server sends messages in a bundle format when the client submits an extended request.
The client responds with a null message to acknowledge receipt of an entire bundle. The client should not acknowledge receipt of individual messages in a bundle.
Message bundles have a message type of 4002
.
The graphic below shows the structure of a message bundle. The shaded fields are specific to the bundle message type. The following table describes the content of the fields and data structures.
The fields of a message bundle message are:
Understanding Metadata
The eStreamer server can provide metadata along with requested event records. To receive metadata, you must explicitly request it. See Request Flags for information on how to request a given version of metadata. The metadata provides context information for codes and numeric identifiers in the event records. For example, an intrusion event contains only the internal identifier of the detecting device, and the metadata provides the device’s name.
Depending on the metadata requested and the environment, the amount of metadata sent may vary considerably.
Metadata Transmission
If the request message specifies metadata, eStreamer sends the relevant metadata record before it sends any related event records.
eStreamer keeps track of the metadata it has sent to the client and does not resend the same metadata record. The client should cache each received metadata record. If the client application uses a limited cache size, when the cache becomes full the client should flush the cache and reconnect to the eStreamer service in order to ensure that the client receives all metadata values for the events that are being streamed. eStreamer does not keep a history of metadata transmissions from one session to the next, so when a new session starts and a request message specifies metadata, eStreamer restarts metadata streaming from scratch. When reconnecting, the client can specify the "Initial Timestamp" in the Request Message in order to avoid duplicate or missing events.