Read "introduction" section of 
http://www.ossec.net/wiki/index.php/Know_How:Ignore_Rules

When OSSEC breaks the log entry into separate strings, CRON will be in the 
Program_name field.
Match acts against the Log field, so it will never find "CRON".
<program_name>^CRON</program_name> should do it. I don't know why the 
beginning-of-field marker ^ is used in the example. I guess this is so it will 
not match the program "NOTCRON"...

HTH
Rick




-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Xavier Romero
Sent: Monday, January 19, 2009 4:12 PM
To: [email protected]
Subject: [ossec-list] RV: Rule questions
Importance: Low


Hello all,

I just want this default rule:

<group name="pam,syslog,">
...
  <rule id="5501" level="3">
    <if_sid>5500</if_sid>
    <match>session opened for user </match>
    <description>Login session opened.</description>
    <group>authentication_success,</group>
  </rule>
...
</group>

to avoid alerts for CRON executions like:
=> CRON[23946]: (pam_unix) session opened for user root by (uid=0)

I've tried

  <rule id="100001" level="0">
    <if_sid>5501, 5502</if_sid>
    <match>CRON</match>
    <description>Ignored</description>
  </rule>

and

   <rule id="100001" level="0">
    <if_sid>5500</if_sid>
    <match>CRON</match>
    <match>session opened for user </match>
    <description>Ignored</description>
  </rule>

and

   <rule id="100001" level="0">
    <if_sid>5500</if_sid>
    <match>CRON</match>
    <description>Ignored</description>
  </rule>

But none of these produces the desired effect.

Which is the right way to achieve that?
When there are no more rules executed? First match? Lower level? ...?
What happens when tehre are 2 <match> or 2 <url>..  that acts as OR or as AND 
?!?
<group> have any implication on rules or it's just for logical classification?


Thanks in advance!
Xavier Romero.

This message contains TMA Resources confidential information and is intended 
only for the individual named. If you are not the named addressee you should 
not disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system. E-mail transmission cannot be guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents of this 
message which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version.

Reply via email to