1 <!-- @(#) $Id: ./etc/rules/squid_rules.xml, 2011/09/08 dcid Exp $
3 - Official Squid rules for OSSEC.
5 - Copyright (C) 2009 Trend Micro Inc.
8 - This program is a free software; you can redistribute it
9 - and/or modify it under the terms of the GNU General Public
10 - License (version 2) as published by the FSF - Free Software
13 - License details: http://www.ossec.net/en/licensing.html
15 - Contributed by: Ahmet Ozturk
19 <!-- More information about squid codes below:
20 - http://www.uniar.ukrnet.net/tools/Squid-FAQ/FAQ-6.html
24 <!-- Squid frequency -->
25 <var name="SQUID_FREQ">8</var>
29 <rule id="35000" level="0">
30 <category>squid</category>
31 <description>Squid messages grouped.</description>
34 <!-- Pre-rule with all the 400 error codes.
35 - This will make searching faster for most
39 <rule id="35002" level="4">
40 <if_sid>35000</if_sid>
42 <description>Squid generic error codes.</description>
45 <rule id="35003" level="5">
46 <if_sid>35002</if_sid>
48 <description>Bad request/Invalid syntax.</description>
51 <rule id="35004" level="5">
52 <if_sid>35002</if_sid>
54 <description>Unauthorized: Failed attempt to access </description>
55 <description>authorization-required file or directory.</description>
58 <rule id="35005" level="5">
59 <if_sid>35002</if_sid>
61 <description>Forbidden: Attempt to access forbidden file </description>
62 <description>or directory.</description>
65 <rule id="35006" level="5">
66 <if_sid>35002</if_sid>
68 <description>Not Found: Attempt to access non-existent </description>
69 <description>file or directory.</description>
72 <rule id="35007" level="5">
73 <if_sid>35002</if_sid>
75 <description>Proxy Authentication Required: User is not </description>
76 <description>authorized to use proxy.</description>
79 <rule id="35008" level="5">
80 <if_sid>35002</if_sid>
82 <description>Squid 400 error code (request failed).</description>
85 <rule id="35009" level="5">
86 <if_sid>35002</if_sid>
88 <description>Squid 500/600 error code (server error).</description>
91 <rule id="35010" level="4">
92 <if_sid>35009</if_sid>
94 <description>Squid 503 error code (server unavailable).</description>
97 <!-- Special rules for 403/404 errors -->
98 <rule id="35021" level="6">
99 <if_sid>35006</if_sid>
100 <url>blst.php|xxx3.php|ngr7.php|ngr2.php|/nul.php$|/mul.php$|/444.php</url>
101 <description>Attempt to access a Beagle worm (or variant) </description>
102 <description>file.</description>
103 <info type="link">http://www.symantec.com/avcenter/venc/data/w32.beagle.dp.html</info>
104 <info type="text">W32.Beagle.DP is a Worm that drops Trojan.Lodear and opens a back door on the compromised computer.</info>
105 <group>automatic_attack,</group>
109 <rule id="35022" level="6">
110 <if_sid>35006</if_sid>
111 <url>/jk/exp.wmf$|/PopupSh.ocx$</url>
112 <description>Attempt to access a worm/trojan related site.</description>
113 <group>automatic_attack,</group>
116 <!-- Ignoring google earth, ms web site access and some other
117 - common extensions to cause false positives (specially anti virus).
118 - It includes most of the time bugs on IE that always
119 - access these pages (causing 403/404 errors).
121 <rule id="35023" level="0">
122 <if_sid>35004, 35005, 35006, 35009</if_sid>
123 <url>.jpg|.gif|favicon.ico$|.png$|.swf|.txt$|.zip|.css|.xml|.js|.bmp$|</url>
124 <url>windowsupdate/redir/wuredir.cab|</url>
125 <url>^http://codecs.microsoft.com/isapi/ocget.dll|</url>
126 <url>^http://activex.microsoft.com/objects/ocget.dll|</url>
127 <url>^http://webmessenger.msn.com/session/null|</url>
128 <url>^http://sqm.msn.com/sqm/wmp/sqmserver.dll|</url>
129 <url>^http://config.messenger.msn.com/Config/MsgrConfig.asmx|</url>
130 <url>kaspersky-labs.com/|</url>
131 <url>^http://liveupdate.symantecliveupdate.com/|</url>
132 <url>_vti_bin/owssvr.dll|MSOffice/cltreq.asp|</url>
133 <url>google.com/mt?|</url>
134 <url>google.com/kh?|</url>
135 <url>^http://kh.google.com/flatfile</url>
137 <!-- Add more extensions to be ignored in here.
138 <url>|.html$|.htm</url>
141 <description>Ignored files on a 40x error.</description>
144 <!-- Context relevant rules (correlated) -->
145 <rule id="35051" level="10" frequency="$SQUID_FREQ" timeframe="120">
146 <if_matched_sid>35005</if_matched_sid>
149 <description>Multiple attempts to access forbidden file </description>
150 <description>or directory from same source ip.</description>
153 <rule id="35052" level="10" frequency="$SQUID_FREQ" timeframe="120">
154 <if_matched_sid>35007</if_matched_sid>
156 <description>Multiple unauthorized attempts to use proxy.</description>
159 <rule id="35053" level="10" frequency="$SQUID_FREQ" timeframe="120">
160 <if_matched_sid>35003</if_matched_sid>
163 <description>Multiple Bad requests/Invalid syntax.</description>
166 <rule id="35054" level="12" frequency="$SQUID_FREQ" timeframe="240">
167 <if_matched_sid>35021</if_matched_sid>
169 <description>Infected machine with W32.Beagle.DP.</description>
170 <info type="link">http://www.symantec.com/avcenter/venc/data/w32.beagle.dp.html</info>
171 <info type="text">W32.Beagle.DP is a Worm that drops Trojan.Lodear and opens a back door on the compromised computer.</info>
174 <rule id="35055" level="10" frequency="$SQUID_FREQ" timeframe="90">
175 <if_matched_sid>35006</if_matched_sid>
178 <description>Multiple attempts to access a non-existent file.</description>
181 <rule id="35056" level="12" frequency="$SQUID_FREQ" timeframe="240">
182 <if_matched_sid>35022</if_matched_sid>
184 <description>Multiple attempts to access a worm/trojan/virus </description>
185 <description>related web site. System probably infected.</description>
188 <rule id="35057" level="10" frequency="$SQUID_FREQ" timeframe="240">
189 <if_matched_sid>35008</if_matched_sid>
192 <description>Multiple 400 error codes (requests failed).</description>
195 <rule id="35058" level="10" frequency="$SQUID_FREQ" timeframe="240">
196 <if_matched_sid>35009</if_matched_sid>
199 <description>Multiple 500/600 error codes (server error).</description>
202 <rule id="35095" level="0" frequency="2" timeframe="360">
203 <if_matched_sid>35055</if_matched_sid>
205 <description>Ignoring multiple attempts from same source ip</description>
206 <description> (alert only once).</description>
209 </group> <!-- ACCESSLOG,SQUID -->