Building Collector Plugins 1.1 - AlienVault
Building Collector Plugins 1.1 - AlienVault
Building Collector Plugins 1.1 - AlienVault
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Building</strong> <strong>Collector</strong> <strong>Plugins</strong> - Admin Guide<br />
2.4 Aliases<br />
2.4.1 Path<br />
/etc/ossim/agent/aliases.cfg<br />
2.4.2 Predefined Regular Expressions<br />
The predefined regular expressions can be used when creating new plugins.<br />
IPV4= \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}<br />
MAC= \w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}<br />
PORT= \d{1,5}<br />
TIME=<br />
\d\d:\d\d:\d\d<br />
SYSLOG_DATE= \w{3}\s+\d{1,2}\s\d\d:\d\d:\d\d<br />
SYSLOG_WY_DATE= \w+\s+\d{1,2}\s\d{4}\s\d\d:\d\d:\d\d<br />
To use an Alias in the regular expression use the \IPV4, \MAC, \SYSLOG_DATE, etc.<br />
2.5 Functions<br />
2.5.1 Path<br />
/usr/share/ossim-agent/ossim_agent/ParserUtil.py<br />
2.5.2 Conversions<br />
resolv(host):<br />
resolv_ip(addr):<br />
resolv_port(port):<br />
normalize_date(date):<br />
normalize_protocol(proto):<br />
md5sum(datastring):<br />
upper(string):<br />
hextoint(string):<br />
translates a host name to an IPv4 address<br />
translates an IPv4 address to a host name<br />
translate a port name into its number<br />
convert date strings to isoformat (must tag the regular expressions<br />
with the following: , , , , ,<br />
or for timestamps. To define new date<br />
formats add a new regexp to the DATE_REGEXPS array.<br />
translates the protocols to the protocol numbers, based on the<br />
PROTO_TABLE<br />
calculates the md5 checksum<br />
all upper case<br />
get the integer value of a hexadecimal number<br />
Page 16 Copyright © Alienvault 2010