The openbsm module is a dissection module: its purpose is to take an Orchids event, parse its last field (which should be a binary string, of type bstr) and return a refined Orchids events, with additional fields. Typically, the openbsm module is meant to dissect raw data coming from the udp module, parsing it as an OpenBSM record.
Configuration options
None.
Fields
OpenBSM records consist of a header, a list of tokens, and a trailer. Each contains one or several fields. The Orchids events returned by the openbsm module are a complete list of fields appearing in an OpenBSM record.
OPENBSM_OTHER_FILE32 header
Although OpenBSM defines 5 kinds of headers, the first four really are variants of each other. We start with OpenBSM records that have an OPENBSM_OTHER_FILE32 header (all constants are defined in $OCONF/rules/openbsm.h; the constant OPENBSM_OTHER_FILE32 is called AUT_OTHER_FILE32 in the OpenBSM specification). These merely specify a file name:
| Field | Type | Mono? | Description |
|---|---|---|---|
.openbsm.kind |
uint |
header kind (=OPENBSM_OTHER_FILE32 here) |
|
.openbsm.time |
timeval |
✓ | time |
.openbsm.file |
str |
file name |
OPENBSM_HEADER{32,64}(_EX)? headers
The usual OpenBSM records have a .openbsm.kind field taken among OPENBSM_HEADER32, OPENBSM_HEADER32_EX, OPENBSM_HEADER64, or OPENBSM_HEADER64_EX. (Those correspond to AUT_HEADER32, AUT_HEADER32_EX, AUT_HEADER64, and AUT_HEADER64_EX respectively in the OpenBSM specification.)
The OPENBSM_HEADER{32,64}_EX headers have an extra IP address field .openbsm.ip. This is always returned as an ipv6 value, even when the IP address is an IPv4 address. (Every IPv4 address embeds as an IPv6 address.)
The contents of the header will then be found under the following Orchids fields:
| Field | Type | Mono? | Description |
|---|---|---|---|
.openbsm.kind |
uint |
header kind (anything but OPENBSM_OTHER_FILE32 here) |
|
.openbsm.version |
uint |
version | |
.openbsm.type |
uint |
type | |
.openbsm.modifier |
uint |
modifier | |
.openbsm.time |
timeval |
✓ | time |
.openbsm.ip |
ipv6 |
IP address (if .openbsm.kind is of the form OPENBSM_HEADER{32,64}_EX) |
Additional fields are provided, depending on the tokens present in the OpenBSM record. They are listed by token sort now.
AUT_ARG32,AUT_ARG64tokens:
There are at most 128 of these. Each one has a name and a value. There is no field starting how many arguments are present.Field Type Mono? Description .openbsm.argname1strargument name 1 .openbsm.arg1uintargument value 1 .openbsm.argname2strargument name 2 .openbsm.arg2uintargument value 2 … .openbsm.argname128strargument name 128 .openbsm.arg128uintargument value 128 AUT_DATAtokens:
Arrays of 1, 2, 4 or 8-byte numbers, with formatting instructions. Since Orchids does not have arrays, andAUT_DATAtokens are meant to be printed anyway, such tokens are rendered as strings. E.g., aAUT_DATAtoken with two 1-byte entries (say, 7 and 11), specified to be printed in hex, would yield the Orchids string"0x7 0xb".Field Type Mono? Description .openbsm.datastrraw data, printed as a string AUT_ATTR32,AUT_ATTR64tokens:
Specifies file attributes.Field Type Mono? Description .openbsm.file_access_modeuintfile access mode .openbsm.owner_uiduintowner user id .openbsm.owner_giduintowner group id .openbsm.fsiduintfile system id .openbsm.niduintnode id .openbsm.devuintdevice id AUT_EXITtoken:
Field Type Mono? Description .openbsm.exit_statusuintexit status .openbsm.exit_valueuintexit return value AUT_EXEC_ARGStoken:
Arguments passed toexecve()and related syscalls.
There are at most 128 of these. The.openbsm.execarg_numfield states how much there are.Field Type Mono? Description .bsm.execarg_numuintnumber of arguments to execve().openbsm.execarg1uintexec argument value 1 .openbsm.execarg2uintexec argument value 2 … .openbsm.execarg128uintexec argument value 128 AUT_EXEC_ENVtoken:
Environment variables passed toexecve()and related syscalls.
There are at most 128 of these. The.openbsm.execarg_numfield states how much there are.Field Type Mono? Description .bsm.execarg_numuintnumber of arguments to execve().openbsm.arg1strexec environment variable 1 .openbsm.arg2strexec environment variable 2 … .openbsm.arg128strexec environment variable 128 AUT_NEWGROUPStoken:
New groups created. There are at most 16 of these. The.openbsm.newgroups_numfield states how much there are.Field Type Mono? Description .bsm.newgroups_numuintnumber of new groups .openbsm.newgroup1uintnew group number 1 .openbsm.newgroup2uintnew group number 2 … .openbsm.newgroup16uintnew group number 16 AUT_IN_ADDRtoken:
IPv4 address.Field Type Mono? Description .openbsm.inaddripv4IPv4 address AUT_IN_ADDR_EXtoken:
IPv4 or IPv6 address.Field Type Mono? Description .openbsm.inaddr6ipv6IPv6 address, or IPv4 address encoded as IPv6 AUT_IPtoken:
Internet Protocol (IP) header contents.Field Type Mono? Description .openbsm.ip_versionuintversion .openbsm.ip_tosuinttype of service .openbsm.ip_lenuintlength .openbsm.ip_iduintidentifier .openbsm.ip_offsetuintoffset .openbsm.ip_ttluinttime to live .openbsm.ip_protocoluintprotocol .openbsm.ip_checksumuintchecksum .openbsm.ip_sourceipv4source address .openbsm.ip_destipv4destination address AUT_IPCtoken:
Inter-process communication info.Field Type Mono? Description .openbsm.ipc_typeuintobject type .openbsm.ipc_iduintobject identifier AUT_IPC_PERMtoken:
Inter-process communication permission info.Field Type Mono? Description .openbsm.ipcperm_uiduintowner user id .openbsm.ipcperm_giduintowner group id .openbsm.ipcperm_puiduintcreator user id .openbsm.ipcperm_pgiduintcreator group id .openbsm.ipcperm_modeuintaccess mode .openbsm.ipcperm_sequintslot sequence number .openbsm.ipcperm_keyuintkey AUT_IPORTtoken:
IP port.Field Type Mono? Description .openbsm.iportuintIP port AUT_OPAQUEtoken:
Opaque data. There is no way to do anything sensible with such data, I’m afraid, except pass it on.Field Type Mono? Description .openbsm.opaquebstropaque data AUT_PATHtoken:
Specifies a file or directory name passed as an argument to a command or system call.Field Type Mono? Description .openbsm.pathstrfile or directory name AUT_PROCESS{32,64}(_EX)?tokens:
A process and its various user and group ids.Field Type Mono? Description .openbsm.proc_auiduintaudit id .openbsm.proc_euiduinteffective user id .openbsm.proc_egiduinteffective group id .openbsm.proc_ruiduintreal user id .openbsm.proc_rgiduintreal group id .openbsm.proc_piduintprocess id .openbsm.proc_siduintsession id .openbsm.proc_portuintport id .openbsm.proc_addripv6machine id, as an IPv6 (or IPv4, encoded as IPv6) address AUT_SUBJECT{32,64}(_EX)?tokens:
A subject, with all its various user and group ids.Field Type Mono? Description .openbsm.subj_auiduintaudit id .openbsm.subj_euiduinteffective user id .openbsm.subj_egiduinteffective group id .openbsm.subj_ruiduintreal user id .openbsm.subj_rgiduintreal group id .openbsm.subj_piduintprocess id .openbsm.subj_siduintsession id .openbsm.subj_portuintport id .openbsm.subj_addripv6machine id, as an IPv6 (or IPv4, encoded as IPv6) address AUT_RETURN{32,64}tokens:
Return codes.Field Type Mono? Description .openbsm.return_statusuintreturn status .openbsm.return_valueuintreturn value AUT_SEQtoken:
Sequence number.Field Type Mono? Description .openbsm.seqnouintsequence number AUT_SOCKINET{32,128}tokens:
Internet socket (IPv4, resp. IPv6). The.openbsm.sock_family field is shared with theAUT_SOCKUNIXtoken.Field Type Mono? Description .openbsm.sock_familyuintsocket family .openbsm.sock_portuintsocket local port .openbsm.sock_addripv6socket address AUT_SOCKUNIXtoken:
Unix (local) socket. The.openbsm.sock_familyfield is shared with theAUT_SOCKINT{32,128}tokens.Field Type Mono? Description .openbsm.sock_familyuintsocket family .openbsm.sock_pathstrname of the socket, as a local file AUT_SOCKET,AUT_SOCKET_EXtokens:
Socket. The.openbsm.socket_domainis only present forAUT_SOCKET_EXtokens.Field Type Mono? Description .openbsm.socket_domainuintdomain (optional) .openbsm.socket_typeuinttype .openbsm.socket_lportuintlocal port .openbsm.socket_laddripv6IPv6 (or IPv4 encoded as IPv6) local address .openbsm.socket_rportuintremote port .openbsm.socket_raddripv6IPv6 (or IPv4 encoded as IPv6) remote address AUT_TEXTtoken:
Text message.Field Type Mono? Description .openbsm.textstrtext string AUT_ZONENAMEtoken:
Zone name.Field Type Mono? Description .openbsm.zonenamestrzone name