The prelude module serves to interface Orchids with the Prelude SIEM and with its associated security console, Prewikka. (On Linuxes—not available on the Mac OS X platform.)
It is both an input module and an extension module.
- Prelude can act as an event collecting mechanism. In that case Orchids takes Prelude as a source of events, and the
preludemodule serves as an input module.
This is done by settingMode analyzerin the configuration section of thepreludemodule (see Configuration below).
In that mode, Orchids will poll the Prelude SIEM regularly for new alerts (Orchids currently ignores Prelude error and heartbeat events), and build one Orchids event for each new alert. The Orchids fields are defined by simple accessor expressions, not XPath expressions. Again, see Configuration below. - Conversely, Orchids can act as an event source to Prelude. The primitives that allow one to construct Prelude alerts and send them to Prelude are an extension of the Orchids language provided by the
preludemodule.
This can be configured in two ways:- by setting
Mode sensororMode analyzerin the configuration section of thepreludemodule (see Configuration below). Orchids then provides new primitives to build and populate Prelude alert documents, and send them to a running Prelude instance through its new primitiveprelude_message_send(see Primitives, below), - or by setting
Mode prewikkain the configuration section of thepreludemodule. In that case, Orchids provides the same primitives as above, except thatprelude_message_sendnow adds an IDMEF alert to the Prewikka database instead of sending it directly to a Prelude instance.
Inprewikkamode, Orchids does not read events from Prelude.
- by setting
Prelude alerts are IDMEF documents, however of a kind that is private to the Prelude SIEM. In particular, they cannot be handled by the primitives provided by the idmef and xml modules. The prelude module provides specific primitives to deal with them: see the Primitives section below.
Configuration options
<module prelude>
Modemode: the mode can be set toanalyzer,sensor, orprewikka.
Orchids can read Prelude alerts if mode is equal toanalyzer, and it can build and send alerts in any of the three modes. When mode isprewikka, theprelude-specific primitiveprelude_message_sendwrites the IDMEF alert given as argument to the Prewikka database. In the other two modes, it sends it to the running Prelude client.PollPeriodnumber: (ifModeisanalyzer)
set the polling period to number seconds: Orchids will poll Prelude for new alerts every number seconds. Default is 1.str_fieldfield-name accessor: (ifModeisanalyzer)
define new Orchids field name.prelude.field-name, with accessor defined by the accessor string. For example:str_field assessment_type "alert.assessment.impact.type" str_field first_source_addr "alert.source(0).node.address(0).address"
The first one reads the
typesubitem of theimpactsubitem of theassessmentitem of the mainalertnode. The second one selects theaddresssubitem of the first (number 0) subitem of theaddresssubitem of thenodesubitem of etc.
The fields defined for Orchids, here.prelude.assessment_typeand.prelude.first_source_addr, are of typestr.
This is the only field type that thepreludemodule provides.PreludeDBSettingsstring: (ifModeisprewikka)
string is a string of options passed when opening the Prelude database, used by Prewikka.
Options are of the form:-
host=string: set host name on which the database engine listens (default:localhost) -
port=number: port on which the database engine listens -
type=type: type of database, can bemysql,pgsql, orsqlite -
name=string: name of the database -
file=string: file name where the database is stored (iftypeissqlite) -
user=name: user id who will access the database -
pass=string: password used by user to access the database.
-
Profilename:
set Prelude profile name to name. Default isorchids.
</module>
Primitives
prelude_message_new: →prelude
create a new Prelude IDMEF document- Prelude has its own notion of IDMEF documents, which are incompatible with the
xmldoctype used in theidmefmodule
- Prelude has its own notion of IDMEF documents, which are incompatible with the
prelude_message_set:prelude,str, type →int
where type is amongint,uint,float,str,ctime.- usage:
prelude_message_set(prelude-document, path, value)
set attribute located at path path in prelude-document to value
path should be a valid XPath path specification - returns: 1 (true) if all went well, 0 (false) otherwise, typically if path is invalid
- usage:
prelude_message_get_string:prelude,str→str
obtain attribute from prelude IDMEF document- usage:
prelude_message_set(prelude-document, path)
get attribute located at path path in prelude-document
path should be a valid XPath path specification - returns: the value if all went well, the undefined value
nullotherwise, typically if path is invalid
- usage:
prelude_message_send:prelude→int
send prelude document in argument- will either insert it into the PreWikka database (if ‘
Mode prewikka‘ is given in the configuration options), or send it to the Prelude manager (if ‘Mode sensor‘ or ‘Mode analyzer‘ is given in the configuration options) - returns: 1 (true) if all went well, 0 (false) otherwise
an error can only occur inMode prewikka
- will either insert it into the PreWikka database (if ‘
prelude_message_print:prelude→int
print prelude document on stderr (for debugging purposes)- returns: 1 (true)
- returns: 1 (true)