On Thu, Aug 30, 2012 at 5:22 PM, Jason Haar <
jason...@gmail.com> wrote:
>
> Weird - I got beenph's reply via email, but it's not showing up in this
> browser view?
Browser view?
https://groups.google.com/forum/?fromgroups#!topic/barnyard2-users/yvRLdBREKQM
...
i agree it dosen't seem to show up even tho i effectively replied to the list.
>
> Anyway, the issue is that I can't see an output option besides the unified
> ones that contain both packet information and metadata (classification, sid,
> etc) - the syslog/alert.file options only contain metadata as far as I can
> see? The "text mode" option writes an ASCII representation of the packet
> content out - but it's not truly the packet - and docs say it's slow too as
> barnyard has to do the extra thinking and writing I suppose. There are those
> other output modules to cef/prelude - but again I think they are only sent
> the metadata - not the packet itself? (I don't use them so I dunno)
>
syslog_full in 2.1-10 with (output log_syslog_full: operation_mode
complete, etc...)
will output the full hexed packet for example.
> So it seems to me that I basically have to use unified and write my own
> barnyard replacement in order to be able to "fiddle" with the internals of
> an alert? Hence my question about adding it as a feature to barnyard instead
> :-)
Nothing wrong with writing your own unified2 processing script if you have
more specific needs, or you can write your own output plugin and adapt
it for your needs.
> What about writing to a socket instead of executing a program? That way I
> could have a program that monitors that socket, and does whatever it wants
> when a line of data comes in, and barnyard would just rattle on its way, not
> caring what happens next? Load then becomes the script's problem.
Unix Domain Socket? UDS to be reliable will be blocking on I/O and if
you have to wait until it unblock then it can have an impact on event
processing/event logging if
you have other output plugin enabled at the same time. (Which is not
really an issue if its only this
output plugin that is enabled).
>
> The issue I have is that today I use a rather complicated script triggered
> off of syslog to decide whether or not a snort event should generate a true
> alert (eg email). I do "extra" checks like downloading the server cert on
> events that involve port 443, or doing DNS PTR lookups, etc. On top of that
> I want to do things like look inside the packet that caused the event - to
> pull out URLs or filenames - so that they can influence script behaviour and
> show up in the email directly - ie I want to gain CONTEXT in order to make
> decisions about how important this raw IDS event actually is. That I can't
> do at the moment using the output modules such as syslog.
>
Because with the details i read in the original e-mail, and mabey im
still not understanding, but i do not see
how invocation of a script on each event will allow the script be make
better decision
than having a larger event base to correlate and evaluate the information.
If i interpret the need correctly, i think that if you want to make
decision based on contextual interpretation of an event,
you need to be able to look back and store some information to be able
to adjust whatever the storage mechanism is ex: file database,
relational database
or NO SQL Store.
If you only base your decision on a runtime analysis ex (being called
by a external program) wouldnt there be smarter ways to make
decisions?
-elz