base/bif/plugins/Bro_HTTP.events.bif.bro

GLOBAL
Namespace:GLOBAL
Source File:/scripts/base/bif/plugins/Bro_HTTP.events.bif.bro

Summary

Events

http_all_headers: event Generated for HTTP headers, passing on all headers of an HTTP message at once.
http_begin_entity: event Generated when starting to parse an HTTP body entity.
http_content_type: event Generated for reporting an HTTP body’s content type.
http_end_entity: event Generated when finishing parsing an HTTP body entity.
http_entity_data: event Generated when parsing an HTTP body entity, passing on the data.
http_event: event Generated for errors found when decoding HTTP requests or replies.
http_header: event Generated for HTTP headers.
http_message_done: event Generated once at the end of parsing an HTTP message.
http_reply: event Generated for HTTP replies.
http_request: event Generated for HTTP requests.
http_stats: event Generated at the end of an HTTP session to report statistics about it.

Detailed Interface

Events

http_all_headers
Type:event (c: connection, is_orig: bool, hlist: 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.).

See also: 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

Note

This event is also raised for headers found in nested body entities.

http_begin_entity
Type:event (c: connection, is_orig: 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.

See also: 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_content_type
Type:event (c: connection, is_orig: bool, ty: string, subty: 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.

See also: 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

Note

This event is also raised for headers found in nested body entities.

http_end_entity
Type:event (c: connection, is_orig: 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.

See also: 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_entity_data
Type:event (c: connection, is_orig: bool, length: count, data: 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 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.

See also: 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_event
Type:event (c: connection, event_type: string, detail: 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.

See also: 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_header
Type:event (c: connection, is_orig: bool, name: string, value: 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.

See also: 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

Note

This event is also raised for headers found in nested body entities.

http_message_done
Type:event (c: connection, is_orig: bool, stat: 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.

See also: 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_reply
Type:event (c: connection, version: string, code: count, reason: 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 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.

See also: 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_request
Type:event (c: connection, method: string, original_URI: string, unescaped_URI: string, version: 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 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).

See also: 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_stats
Type:event (c: connection, stats: 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.

See also: 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


Copyright 2016, The Bro Project. Last updated on December 07, 2018. Created using Sphinx 1.8.2.