I have a rule limiting alerts on 18154 events inside my local_rules.xml file
<rule id="101013" level="7" frequency="4" timeframe="1600">
<if_matched_sid>18154</if_matched_sid>
<match>WinEvtLog: System: ERROR(13): NPS:</match>
<description>turn down the noise on this event</description>
</rule>
My understanding is that this rule will generate an email (level 7) after more than 4 matching events, and will not send more than one alert every 1600 seconds.
http://www.ossec.net/ossec-docs/OSSEC-book-ch4.pdf
Read the section on Understanding rules of this doc it helped me a lot to grasp alert filtering.
I'm still new to this. If someone sees an error with my rule, I don't mind if you point out the error of my ways...
cheers
-tom
| From: | Thomas Bartos <tba...@boardvantage.com> |
| To: | ossec...@googlegroups.com |
| Date: | 03/15/2012 11:15 AM |
| Subject: | Re: [ossec-list] Turn off rule? |
| Sent by: | ossec...@googlegroups.com |
I tried the rule change below and got an error when I tried to start ossec.
-bash-3.2# /etc/init.d/ossec-hids start
Starting ossec-hids: 2012/03/16 09:37:46 ossec-testrule: INFO: Reading local dec oder file.
2012/03/16 09:37:46 rules_op: Invalid root element "rule".Only "group" is allowe d
2012/03/16 09:37:46 ossec-testrule(1220): ERROR: Error loading the rules: 'local _rules.xml'.
2012/03/16 09:37:46 ossec-maild: INFO: E-Mail notification disabled. Clean Exit.
2012/03/16 09:37:46 ossec-logcollector(1905): INFO: No file configured to monito r.
2012/03/16 09:37:49 ossec-syscheckd(1210): ERROR: Queue '/var/ossec/queue/ossec/ queue' not accessible: 'Connection refused'.
2012/03/16 09:37:49 ossec-rootcheck(1210): ERROR: Queue '/var/ossec/queue/ossec/ queue' not accessible: 'Connection refused'.
Then I tried the example from the book to disable the rule altogether and got the same error
Here is the file, can someone tell me what I did wrong please?
-bash-3.2# cat local_rules.xml.filter
<!-- @(#) $Id$
- Example of local rules for OSSEC.
-
- Copyright (C) 2009 Trend Micro Inc.
- All rights reserved.
-
- This program is a free software; you can redistribute it
- and/or modify it under the terms of the GNU General Public
- License (version 2) as published by the FSF - Free Software
- Foundation.
-
- License details: http://www.ossec.net/en/licensing.html
-->
<rule id="101013" level="0">
<if_sid>18154</if_sid><description>turn down the noise on this event</description><!-- Modify it at your will. -->
</rule>
<group name="local,syslog,">
| From: | "dan (ddp)" <ddp...@gmail.com> |
| To: | ossec...@googlegroups.com |
| Date: | 03/16/2012 11:32 AM |
| Subject: | Re: [ossec-list] Turn off rule? |
| Sent by: | ossec...@googlegroups.com |
That wasn't a corruption, it was pointing out the error in the log
messages you posted. It was meant as a hint. I also (probably) fixed
the config for you further down the email.
Instead of dragging this out more though, rules need to be in groups.
The rule at the top of your rule file was not inside of the <group
name="whatever"> tag, it was all by itself. The error message I tried
to draw attention to pointed that out.
| From: | "dan (ddp)" <ddp...@gmail.com> |
| To: | ossec...@googlegroups.com |
| Date: | 03/16/2012 03:01 PM |
| Subject: | Re: [ossec-list] Turn off rule? |
| Sent by: | ossec...@googlegroups.com |