On Wed, Jul 30, 2014 at 3:29 PM, James Whittington
<
james.whit...@gmail.com> wrote:
> Thanks for the feedback on this issue where I couldn't fetch action types
> (POST,GET) on newer versions of IIS
> Updating the web-accesslog-iis6 decoder as follows seemed to work on IIS7,
> IIS7.5, and IIS8 all long as you remember to log all fields in IIS (one of
> my servers wasn't thus we weren't triggering on things properly)..
>
>
> <decoder name="web-accesslog-iis6">
> <parent>windows-date-format</parent>
> <type>web-log</type>
> <use_own_name>true</use_own_name>
> <prematch offset="after_parent">^W3SVC\d+ \S+ \S+ </prematch>
> <regex offset="after_prematch">^(\S+) (\S+ \S+) \d+ \S+ (\d+.\d+.\d+.\d+)
> </regex>
> <regex>\S+ \S+ \S+ \S+ \S+ (\d+) </regex>
> <order>action, url, srcip, id</order>
> </decoder>
>
> A point of confusion for me was that ossec logtester doesn't seem to display
> the child decoder, so although decoder web-accesslog-iis6 is being triggered
> the only decoder that is referenced in logtest is the parent
> (windows-date-format).
>
The parent decoder is the what a message is decoded as, child decoders
just offer finer grained bits. It is confusing, but I'm not sure how
to handle it better (easily).
> Also I am a little confused about whether or not local_decoder.xml has to be
> defined in the ossec.conf file to be seen?
>
No, it should be automagically applied.
> I found this blog article (
>
http://jentalkstoomuch.blogspot.com/2010/09/writing-custom-ossec-rules-for-your.html
> )
> Someone had an issue where windows-date-format was showing as the decoder
> instead of the one they expected.
>
> It was suggested to add the following to /etc/ossec.conf inside the rules
> element:
> <decoder>etc/local_decoder.xml</decoder>
> <decoder>etc/decoder.xml</decoder>
>
> However I am pretty sure on our production instance we don't specifically
> define local_decoder.xml so I think OSSEC must discover it if it's in the
> "./ossec/etc" folder
>
Just a guess (based on the order), they wanted the local decoder to be
applied before the OSSEC decoder. In that case it would have to be
added manually. But for a default install it should work just fine.