1 <!-- @(#) $Id: syslog_rules.xml,v 1.22 2010/11/25 17:06:17 ddp Exp $
2 - Official Generic Syslog rules for OSSEC.
4 - Copyright (C) 2009 Trend Micro Inc.
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
12 - License details: http://www.ossec.net/en/licensing.html
16 <!-- Default variables for the SYSLOG rules. -->
18 <!-- Bad words matching. Any log containing these messages
21 <var name="BAD_WORDS">core_dumped|failure|error|attack|bad |illegal |denied|refused|unauthorized|fatal|failed|Segmentation Fault|Corrupted</var>
24 <!-- Syslog errors. -->
25 <group name="syslog,errors,">
26 <rule id="1001" level="2">
27 <match>^Couldn't open /etc/securetty</match>
28 <description>File missing. Root access unrestricted.</description>
31 <rule id="1002" level="2">
32 <match>$BAD_WORDS</match>
33 <options>alert_by_email</options>
34 <description>Unknown problem somewhere in the system.</description>
37 <rule id="1003" level="13" maxsize="1025">
38 <description>Non standard syslog message (size too large).</description>
41 <rule id="1004" level="5">
42 <match>^exiting on signal</match>
43 <description>Syslogd exiting (logging stopped).</description>
46 <rule id="1005" level="5">
47 <program_name>syslogd</program_name>
48 <match>^restart</match>
49 <description>Syslogd restarted.</description>
52 <rule id="1006" level="5">
53 <regex>^syslogd \S+ restart</regex>
54 <description>Syslogd restarted.</description>
57 <rule id="1007" level="7">
58 <match>file system full|No space left on device</match>
59 <description>File system full.</description>
60 <group>low_diskspace,</group>
63 <rule id="1008" level="5">
64 <match>killed by SIGTERM</match>
65 <description>Process exiting (killed).</description>
66 <group>service_availability,</group>
69 <rule id="1009" level="0">
71 <match>terminated without error|can't verify hostname: getaddrinfo|</match>
72 <match>PPM exceeds tolerance</match>
73 <description>Ignoring known false positives on rule 1002..</description>
75 </group> <!-- SYSLOG,ERRORS -->
80 <group name="syslog,nfs,">
81 <!-- XXX All These NFS rules need to be fixed. -->
82 <rule id="2100" level="0" noalert="1">
83 <program_name>^automount|^mount</program_name>
84 <description>NFS rules grouped.</description>
87 <rule id="2101" level="4">
89 <match>nfs: mount failure</match>
90 <description>Unable to mount the NFS share.</description>
93 <rule id="2102" level="4">
95 <match>reason given by server: Permission denied</match>
96 <description>Unable to mount the NFS directory.</description>
99 <rule id="2103" level="4">
100 <match>^rpc.mountd: refused mount request from</match>
101 <description>Unable to mount the NFS directory.</description>
104 <rule id="2104" level="2">
105 <if_sid>2100</if_sid>
106 <regex>lookup for \S+ failed</regex>
107 <description>Automount informative message</description>
109 </group> <!-- SYSLOG,NFS -->
113 <!-- xinetd messages -->
114 <group name="syslog,xinetd,">
115 <rule id="2301" level="10">
116 <match>^Deactivating service </match>
117 <description>Excessive number connections to a service.</description>
119 </group> <!-- SYSLOG,XINETD -->
123 <!-- Access control messages -->
124 <group name="syslog,access_control,">
125 <rule id="2501" level="5">
126 <match>FAILED LOGIN |authentication failure|</match>
127 <match>Authentication failed for|invalid password for|</match>
128 <match>LOGIN FAILURE|auth failure: |authentication error|</match>
129 <match>authinternal failed|Failed to authorize|</match>
130 <match>Wrong password given for|login failed|Auth: Login incorrect</match>
131 <group>authentication_failed,</group>
132 <description>User authentication failure.</description>
135 <rule id="2502" level="10">
136 <match>more authentication failures;|REPEATED login failures</match>
137 <description>User missed the password more than one time</description>
138 <group>authentication_failed,</group>
141 <rule id="2503" level="5">
142 <regex>^refused connect from|</regex>
143 <regex>^libwrap refused connection|</regex>
144 <regex>Connection from \S+ denied</regex>
145 <description>Connection blocked by Tcp Wrappers.</description>
146 <group>access_denied,</group>
149 <rule id="2504" level="9">
150 <match>ILLEGAL ROOT LOGIN|ROOT LOGIN REFUSED</match>
151 <description>Illegal root login. </description>
152 <group>invalid_login,</group>
155 <rule id="2505" level="3">
156 <match>^ROOT LOGIN on</match>
157 <description>Physical root login.</description>
160 <rule id="2506" level="3">
161 <match>^Authentication passed</match>
162 <description>Pop3 Authentication passed.</description>
165 <rule id="2507" level="0">
166 <decoded_as>openldap</decoded_as>
167 <description>OpenLDAP group.</description>
170 <rule id="2508" level="3">
171 <if_sid>2507</if_sid>
172 <match>ACCEPT from</match>
173 <description>OpenLDAP connection open.</description>
176 <rule id="2509" level="5" timeframe="10" frequency="0">
177 <if_sid>2507</if_sid>
178 <if_matched_sid>2508</if_matched_sid>
180 <match>RESULT tag=97 err=49</match>
181 <description>OpenLDAP authentication failed.</description>
184 </group> <!-- SYSLOG,ACESSCONTROL -->
189 <group name="syslog,access_control,">
190 <rule id="2550" level="0" noalert="1">
191 <decoded_as>rshd</decoded_as>
192 <description>rshd messages grouped.</description>
195 <rule id="2551" level="10">
196 <if_sid>2550</if_sid>
197 <regex>^Connection from \S+ on illegal port$</regex>
198 <description>Connection to rshd from unprivileged port. Possible network scan.</description>
199 <group>connection_attempt,</group>
205 <!-- Mail/Procmail messages -->
206 <group name="syslog,mail,">
207 <rule id="2701" level="0">
208 <program_name>^procmail</program_name>
209 <description>Ignoring procmail messages.</description>
211 </group> <!-- SYSLOG,SENDMAIL -->
215 <!-- Smartd messages -->
216 <group name="syslog,smartd,">
217 <rule id="2800" level="0" noalert="1">
218 <program_name>^smart</program_name>
219 <description>Pre-match rule for smartd.</description>
222 <rule id="2801" level="0">
223 <if_sid>2800</if_sid>
224 <match>No configuration file /etc/smartd.conf found</match>
225 <description>Smartd Started but not configured</description>
228 <rule id="2802" level="0">
229 <if_sid>2800</if_sid>
230 <match>Unable to register ATA device</match>
231 <description>Smartd configuration problem</description>
234 <rule id="2803" level="0">
235 <if_sid>2800</if_sid>
236 <match>No such device or address</match>
237 <description>Device configured but not available to Smartd</description>
239 </group> <!-- SYSLOG,SMARTD -->
243 <!-- Linux Kernel messages -->
244 <group name="syslog,linuxkernel,">
245 <rule id="5100" level="0" noalert="1">
246 <program_name>^kernel</program_name>
247 <description>Pre-match rule for kernel messages</description>
250 <rule id="5101" level="0">
251 <if_sid>5100</if_sid>
252 <match>PCI: if you experience problems, try using option</match>
253 <description>Informative message from the kernel.</description>
256 <rule id="5102" level="0">
257 <if_sid>5100</if_sid>
258 <match>modprobe: Can't locate module sound</match>
259 <description>Informative message from the kernel</description>
262 <rule id="5103" level="9">
263 <if_sid>5100</if_sid>
264 <match>Oversized packet received from</match>
265 <description>Error message from the kernel. </description>
266 <description>Ping of death attack.</description>
269 <rule id="5104" level="8">
270 <if_sid>5100</if_sid>
271 <regex>Promiscuous mode enabled|</regex>
272 <regex>device \S+ entered promiscuous mode</regex>
273 <description>Interface entered in promiscuous(sniffing) mode.</description>
274 <group>promisc,</group>
277 <rule id="5105" level="0">
278 <if_sid>5100</if_sid>
279 <match>end_request: I/O error, dev fd0, sector 0|</match>
280 <match>Buffer I/O error on device fd0, logical block 0</match>
281 <description>Invalid request to /dev/fd0 (bug on the kernel).</description>
284 <rule id="5106" level="0">
285 <if_sid>5100</if_sid>
286 <match>svc: unknown program 100227 (me 100003)</match>
287 <description>NFS incompability between Linux and Solaris.</description>
290 <rule id="5107" level="0">
291 <if_sid>5100</if_sid>
292 <match>svc: bad direction </match>
293 <description>NFS incompability between Linux and Solaris.</description>
296 <rule id="5108" level="12">
297 <if_sid>5100</if_sid>
298 <match>Out of Memory: </match>
299 <description>System running out of memory. </description>
300 <description>Availability of the system is in risk.</description>
301 <group>service_availability,</group>
304 <rule id="5109" level="4">
305 <if_sid>5100</if_sid>
306 <match>I/O error: dev |end_request: I/O error, dev</match>
307 <description>Kernel Input/Output error</description>
310 <rule id="5110" level="4">
311 <if_sid>5100</if_sid>
312 <match>Forged DCC command from</match>
313 <description>IRC misconfiguration</description>
316 <rule id="5111" level="0">
317 <if_sid>5100</if_sid>
318 <match>ipw2200: Firmware error detected.| ACPI Error</match>
319 <description>Kernel device error.</description>
322 <rule id="5112" level="0">
323 <if_sid>5100</if_sid>
324 <match>usbhid: probe of</match>
325 <description>Kernel usbhid probe error (ignored).</description>
328 <rule id="5113" level="7">
329 <if_sid>5100</if_sid>
330 <match>Kernel log daemon terminating</match>
331 <group>system_shutdown,</group>
332 <description>System is shutting down.</description>
335 <rule id="5130" level="7">
336 <if_sid>5100</if_sid>
337 <match>ADSL line is down</match>
338 <description>Monitor ADSL line is down.</description>
341 <rule id="5131" level="3">
342 <if_sid>5100</if_sid>
343 <match>ADSL line is up</match>
344 <description>Monitor ADSL line is up.</description>
347 <rule id="5200" level="0">
348 <match>^hpiod: unable to ParDevice</match>
349 <description>Ignoring hpiod for producing useless logs.</description>
351 </group> <!-- SYSLOG,LINUXKERNEL -->
355 <!-- Cron messages -->
356 <group name="syslog,cron,">
357 <rule id="2830" level="0">
358 <program_name>crond|crontab</program_name>
359 <description>Crontab rule group.</description>
362 <rule id="2831" level="0">
363 <if_sid>2830</if_sid>
364 <match>^unable to exec</match>
365 <description>Wrong crond configuration</description>
368 <rule id="2834" level="5">
369 <if_sid>2830</if_sid>
370 <match>BEGIN EDIT</match>
371 <description>Crontab opened for editing.</description>
374 <rule id="2832" level="5">
375 <if_sid>2830</if_sid>
376 <match>REPLACE</match>
377 <description>Crontab entry changed.</description>
380 <rule id="2833" level="8">
381 <if_sid>2832</if_sid>
382 <match>^(root)</match>
383 <description>Root's crontab entry changed.</description>
386 </group> <!-- SYSLOG,CRON -->
391 <group name="syslog, su,">
392 <rule id="5300" level="0" noalert="1">
393 <decoded_as>su</decoded_as>
394 <description>Initial grouping for su messages.</description>
397 <rule id="5301" level="5">
398 <if_sid>5300</if_sid>
399 <match>authentication failure; |failed|BAD su|^-| - </match>
400 <description>User missed the password to change UID (user id).</description>
401 <group>authentication_failed,</group>
404 <rule id="5302" level="9">
405 <if_sid>5301</if_sid>
407 <description>User missed the password to change UID to root.</description>
408 <group>authentication_failed,</group>
411 <rule id="5303" level="3">
412 <if_sid>5300</if_sid>
413 <regex>session opened for user root|^'su root'|</regex>
414 <regex>^+ \S+ \S+\proot$|^\S+ to root on|^SU \S+ \S+ + \S+ \S+-root$</regex>
415 <description>User successfully changed UID to root.</description>
416 <group>authentication_success,</group>
419 <rule id="5304" level="3">
420 <if_sid>5300</if_sid>
421 <regex>session opened for user|succeeded for|</regex>
422 <regex>^+|^\S+ to |^SU \S+ \S+ + </regex>
423 <description>User successfully changed UID.</description>
424 <group>authentication_success,</group>
427 <rule id="5305" level="4">
428 <if_sid>5303, 5304</if_sid>
430 <options>alert_by_email</options>
431 <description>First time (su) is executed by user.</description>
434 <rule id="5306" level="0">
435 <if_sid>5300</if_sid>
436 <match>unknown class</match>
437 <info>OpenBSD uses login classes, and an inappropriate login class was used.</info>
438 <description>A user has attempted to su to an unknown class.</description>
441 </group> <!-- SYSLOG,SU -->
445 <!-- Tripwire messages -->
446 <group name="syslog,tripwire,">
447 <rule id="7101" level="8">
448 <match>Integrity Check failed: File could not</match>
449 <description>Problems with the tripwire checking</description>
451 </group> <!-- SYSLOG,TRIPWIRE -->
455 <!-- Adduser messages -->
456 <group name="syslog,adduser">
457 <rule id="5901" level="8">
458 <match>^new group</match>
459 <description>New group added to the system</description>
462 <rule id="5902" level="8">
463 <match>^new user|^new account added</match>
464 <description>New user added to the system</description>
467 <rule id="5903" level="2">
468 <match>^delete user|^account deleted|^remove group</match>
469 <description>Group (or user) deleted from the system</description>
472 <rule id="5904" level="8">
473 <match>^changed user</match>
474 <description>Information from the user was changed</description>
476 </group> <!-- SYSLOG,ADDUSER -->
480 <!-- Sudo messages -->
481 <group name="syslog,sudo">
482 <rule id="5400" level="0" noalert="1">
483 <decoded_as>sudo</decoded_as>
484 <description>Initial group for sudo messages</description>
487 <rule id="5401" level="10">
488 <if_sid>5400</if_sid>
489 <match>3 incorrect password attempts</match>
490 <description>Three failed attempts to run sudo</description>
493 <rule id="5402" level="3">
494 <if_sid>5400</if_sid>
495 <match> ; USER=root ; COMMAND=</match>
496 <description>Successful sudo to ROOT executed</description>
499 <rule id="5403" level="4">
500 <if_sid>5400</if_sid>
501 <options>alert_by_email</options>
503 <description>First time user executed sudo.</description>
505 </group> <!-- SYSLOG, SUDO -->
508 <!-- PPTP messages -->
509 <group name="syslog,pptp">
510 <rule id="9100" level="0" noalert="1">
511 <program_name>^pptpd</program_name>
512 <description>PPTPD messages grouped</description>
515 <rule id="9101" level="0">
516 <if_sid>9100</if_sid>
517 <regex>^GRE: \S+ from \S+ failed: status = -1 </regex>
518 <description>PPTPD failed message (communication error)</description>
519 <info type="link">http://poptop.sourceforge.net/dox/gre-protocol-unavailable.phtml</info>
522 <rule id="9102" level="0">
523 <if_sid>9100</if_sid>
524 <match>^tcflush failed: Bad file descriptor</match>
525 <description>PPTPD communication error</description>
532 <group name="syslog,fts,">
533 <rule id="10100" level="4">
534 <if_group>authentication_success</if_group>
535 <options>alert_by_email</options>
537 <group>authentication_success</group>
538 <description>First time user logged in.</description>
543 <group name="syslog,squid,">
544 <rule id="9200" level="0" noalert="1">
545 <program_name>^squid</program_name>
546 <description>Squid syslog messages grouped</description>
549 <rule id="9201" level="0">
550 <if_sid>9200</if_sid>
551 <match>^ctx: enter level|^sslRead|^urlParse: Illegal |</match>
552 <match>^httpReadReply: Request not yet |^httpReadReply: Excess data</match>
553 <description>Squid debug message</description>
558 <group name="syslog,dpkg,">
559 <rule id="2900" level="0">
560 <decoded_as>windows-date-format</decoded_as>
561 <regex>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d \w+ </regex>
562 <description>Dpkg (Debian Package) log.</description>
565 <rule id="2901" level="3">
566 <if_sid>2900</if_sid>
567 <regex>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d install</regex>
568 <description>New dpkg (Debian Package) requested to install.</description>
571 <rule id="2902" level="7">
572 <if_sid>2900</if_sid>
573 <regex>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d status installed</regex>
574 <description>New dpkg (Debian Package) installed.</description>
575 <group>config_changed,</group>
578 <rule id="2903" level="7">
579 <if_sid>2900</if_sid>
580 <regex>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d remove|</regex>
581 <regex>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d purge</regex>
582 <description>Dpkg (Debian Package) removed.</description>
583 <group>config_changed,</group>
588 <group name="syslog,yum,">
589 <rule id="2930" level="0">
590 <program_name>^yum</program_name>
591 <description>Yum logs.</description>
594 <rule id="2931" level="0">
595 <hostname>yum.log$</hostname>
596 <match>^Installed|^Updated|^Erased</match>
597 <description>Yum logs.</description>
600 <rule id="2932" level="7">
601 <if_sid>2930,2931</if_sid>
602 <match>^Installed</match>
603 <group>config_changed,</group>
604 <description>New Yum package installed.</description>
607 <rule id="2933" level="7">
608 <if_sid>2930,2931</if_sid>
609 <match>^Updated</match>
610 <group>config_changed,</group>
611 <description>Yum package updated.</description>
614 <rule id="2934" level="7">
615 <if_sid>2930,2931</if_sid>
616 <match>^Erased</match>
617 <group>config_changed,</group>
618 <description>Yum package deleted.</description>