Gross.
I was going to look into OpenLDAP at some point, now I think I see why
it wasn't done before.
Out of curiosiry, can connection logs from different conn's be mixed
together? For example:
Jan 11 09:27:34 blah slapd: conn=99997 blahblah
Jan 11 09:27:35 blah slapd: conn=99998 blahblah
Jan 11 09:27:36 blah slapd: conn=99999 blahblah
Jan 11 09:27:36 blah slapd: conn=99997 More blahblah
Unfortunately I haven't seem much about the multi-line log option.
Here's the source in logcollector that should be handling it:
http://bitbucket.org/dcid/ossec-hids/src/tip/src/logcollector/read_multiline.c
I'm going to try and get an idea of how do use it tonight, and ask
about it on IRC tomrrow. I'm just not sure how it'll handle multiple
connection logs getting mixed together.
It's almost like we need a log format where we can specify an
identifier that groups logs together (conn=ID)...
The "best" idea I've come up with so far is write support into
logcollector for these logs and make sure slapd is writing its logs to
a file specific to those logs. I'm not a programmer, but I'm looking
at the snort_full code right now to see if that can spark some
inspiration for how to do this.
Sent from my iPhone
Would configuring OpenLDAP to use syslog be the path of least resistance
here?
--
Michael Starks
[I] Immutable Security
http://www.immutablesecurity.com
To get a list of predefined application decoders
# cat /var/ossec/etc/decoder.xml|grep decoder\ name|sort
--
R. Loyd Darby, OSSIM-OCSE
Project Manager DOC/NOAA/NMFS
Infrastructure coordinator
Southeast Fisheries Science Center
305-361-4297
Diff here: http://bitbucket.org/dcid/ossec-hids/changeset/0db70d4431e2
It should fire alerts like that now:
** Alert 1290703467.17021198: - syslog,access_control,
2010 Nov 25 12:44:27 hostname->/var/log/messages
Rule: 2509 (level 5) -> 'OpenLDAP authentication failed.'
Jan 11 09:26:57 hostname slapd2.4[20872]: conn=999999 op=3 RESULT
tag=97 err=49 text=
Jan 11 09:26:57 hostname slapd2.4[20872]: conn=999999 fd=64 ACCEPT
from IP=10.10.248.27:33957 (IP=10.10.241.77:389)
Basically I extracted the conn=(\d+) and set that as the id, so we can
correlate connections. After that, I used if_match_sid to get
the ACCEPT events... What we need now is to fix the decoder to extract
the IP, user, etc and put it all together. At least
a start :)
Thanks,
--
Daniel B.Cid
dcid ( at ) ossec.net