Imported Upstream version 2.5.1
[ossec-hids.git] / etc / rules / ids_rules.xml
1 <!-- @(#) $Id$
2   -  Official IDS rules for OSSEC.
3   -
4   -  Copyright (C) 2009 Trend Micro Inc.
5   -  All rights reserved.
6   -
7   -  This program is a free software; you can redistribute it
8   -  and/or modify it under the terms of the GNU General Public
9   -  License (version 2) as published by the FSF - Free Software
10   -  Foundation.
11   -
12   -  License details: http://www.ossec.net/en/licensing.html
13   -->
14
15
16 <var name="IDS_FREQ">8</var>      
17
18 <group name="ids,">
19   <rule id="20100" level="8">
20     <category>ids</category>
21     <if_fts></if_fts>
22     <description>First time this IDS alert is generated.</description>
23     <group>fts,</group>
24   </rule>
25
26   <rule id="20101" level="6">
27     <category>ids</category>
28     <check_if_ignored>srcip, id</check_if_ignored>
29     <description>IDS event.</description>
30   </rule>
31
32   <!-- This rule ignores some Ids that cause too much
33     -  false positives. Snort specific.
34     -->
35   <rule id="20102" level="0">
36     <if_sid>20100, 20101</if_sid>
37     <decoded_as>snort</decoded_as>
38     <!-- 1:1852 -> robots.txt access
39        - 1:368 - ICMP ping.
40        - 1:384 - ICMP ping.
41        - 1:366 - ICMP ping.
42        - 1:399 - ICMP host unreachable
43        - 1:402 - ICMP port unreachable
44        - 1:408 - ICMP reply
45        - 1:480 - ICMP ping speedera.
46        - 1:1365 - RM commant attempt (too many false positives)
47        - 1:2925 - web bug 0x0 gif attempt
48        -->
49     <id>^1:1852:|^1:368:|^1:384:|^1:366:|^1:402:|^1:408:|^1:1365:|</id>
50     <id>^1:480:|^1:399:|^1:2925:</id>
51     <description>Ignored snort ids.</description>
52   </rule>
53
54   <!-- Ignored Dragon ids -->
55   <rule id="20103" level="0">
56     <if_sid>20100, 20101</if_sid>
57     <decoded_as>dragon-nids</decoded_as>
58     <!-- EOL -> end of line
59        - SOF -> start of file
60        - HEARTBEAT -> Heartbeat
61        - DYNAMIC-TCP -> ?
62        - DYNAMIC-UDP -> ?
63        -->
64     <id>^EOL$|^SOF$|^HEARTBEAT$|^DYNAMIC-TCP$|^DYNAMIC-UDP$</id>
65     <description>Ignored snort ids.</description>
66   </rule>
67
68   <rule id="20152" level="10" frequency="$IDS_FREQ" timeframe="120" ignore="90">
69     <if_matched_sid>20101</if_matched_sid>
70     <same_id />
71     <check_if_ignored>id</check_if_ignored>
72     <description>Multiple IDS alerts for same id.</description>
73   </rule>  
74
75   <rule id="20151" level="10" frequency="$IDS_FREQ" timeframe="120" ignore="90">
76     <if_matched_sid>20101</if_matched_sid>
77     <same_source_ip />
78     <check_if_ignored>srcip, id</check_if_ignored>
79     <description>Multiple IDS events from same source ip.</description>
80   </rule>
81   
82   
83   <!-- This rule is to detect bad configured IDSs alerting on
84      - the same thing all the time. We will skip those events
85      - since they became just noise.
86      -->
87   <rule id="20161" level="11" frequency="3" timeframe="3800">
88     <if_matched_sid>20151</if_matched_sid>
89     <same_source_ip />
90     <same_id />
91     <ignore>srcip, id</ignore>
92     <description>Multiple IDS events from same source ip </description>
93     <description>(ignoring now this srcip and id).</description>
94   </rule>
95
96   <rule id="20162" level="11" frequency="3" timeframe="3800">
97     <if_matched_sid>20152</if_matched_sid>
98     <same_id />
99     <ignore>id</ignore>
100     <description>Multiple IDS alerts for same id </description>
101     <description>(ignoring now this id).</description>
102   </rule>    
103 </group>