Imported Upstream version 2.7
[ossec-hids.git] / etc / decoder.xml
1 <!-- @(#) $Id: decoder.xml,v 1.166 2010/06/15 12:52:01 dcid Exp $
2   -  OSSEC log decoder.
3   -  Author: Daniel B. Cid
4   -  License: http://www.ossec.net/en/licensing.html
5   -->
6         
7
8 <!--
9    - Allowed fields:
10    - location - where the log came from (only on FTS)
11    - srcuser  - extracts the source username
12    - dstuser  - extracts the destination (target) username
13    - user     - an alias to dstuser (only one of the two can be used)
14    - srcip    - source ip
15    - dstip    - dst ip
16    - srcport  - source port
17    - dstport  - destination port
18    - protocol - protocol
19    - id       - event id 
20    - url      - url of the event
21    - action   - event action (deny, drop, accept, etc)
22    - status   - event status (success, failure, etc)
23    - extra_data     - Any extra data
24   -->
25
26
27 <!-- Pam decoder.
28   -  Will extract username and srcip whenever is possible.
29   - Examples:
30   - su(pam_unix)[23164]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost=  user=osaudit
31   - su(pam_unix)[2298]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost=  user=root
32   - vsftpd(pam_unix)[25073]: authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=211.100.27.101
33   - vsftpd(pam_unix)[25073]: check pass; user unknown
34   - sshd(pam_unix)[16660]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=202.110.184.100  user=root
35   - su(pam_unix)[14592]: session opened for user news by (uid=0)
36   - su(pam_unix)[14592]: session closed for user news
37   - sshd(pam_unix)[13025]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=210.70.129.207  user=nobody
38   - sshd(pam_unix)[18987]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=languedoc-2-81-56-82-49.fbx.proxad.net  user=root
39   - sshd(pam_unix)[17365]: session opened for user test by (uid=508)
40   - sshd(pam_unix)[1345]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=222.237.79.237  user=root
41   - sshd(pam_unix)[15794]: 2 more authentication failures; logname= uid=0
42   euid=0 tty=ssh ruser= rhost=10.0.3.1  user=root
43   - Nov 17 21:41:22 localhost su[8060]: (pam_unix) session opened for user root by (uid=0)
44   - Nov 11 22:46:29 localhost vsftpd: pam_unix(vsftpd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=1.2.3.4
45   - Sep 28 15:28:58 server login: pam_unix(login:session): session opened for user carl by LOGIN(uid=0)
46   - Sep 28 15:35:18 server sshd[123]: pam_unix(sshd:session): session opened for user carl by (uid=0)
47   -->
48 <decoder name="pam">
49   <program_name>(pam_unix)$</program_name>
50 </decoder>
51
52 <decoder name="pam">
53   <program_name></program_name>
54   <prematch>^pam_unix|^\(pam_unix\)</prematch>
55 </decoder>
56
57 <decoder name="pam-user">
58   <parent>pam</parent>
59   <prematch>^session \w+ </prematch>
60   <regex offset="after_prematch">^for user (\S+)</regex>
61   <order>user</order>
62 </decoder>  
63
64 <!--XXXX<decoder name="pam-user2">
65   <parent>pam</parent>
66   <prematch>^session \S+ </prematch>
67   <regex>for user (\S+)</regex>
68   <order>user</order>
69 </decoder>
70 -->
71
72 <decoder name="pam-host-user">
73   <parent>pam</parent>
74   <prematch>rhost=\S+\s+user=\S+</prematch>
75   <regex>rhost=(\S+)\s+user=(\S+)</regex>
76   <order>srcip, user</order>
77 </decoder>
78
79 <decoder name="pam-host">
80   <parent>pam</parent>
81   <prematch> rhost</prematch>
82   <regex offset="after_prematch">^=(\S+)</regex>
83   <order>srcip</order>
84 </decoder>
85
86   
87 <!-- SSH decoder.
88   -  Will extract username and srcip from the logs.
89   -  Only add to the FTS if the login was successful
90   -  If the login failed, just extract the username/srcip for correlation
91   -  Examples:
92   -  sshd[8813]: Accepted password for root from 192.168.10.1 port 1066 ssh2
93   -  sshd[2404]: Accepted password for root from 192.168.11.1 port 2011 ssh2
94   -  sshd[21405]: Accepted password for root from 192.1.1.1 port 6023 ssh2
95   -  sshd[21487]: Failed password for root from 192.168.1.1 port 1045 ssh2
96   -  sshd[8813]: Failed none for root from 192.168.10.161 port 1066 ssh2
97   -  sshd[12675]: Failed password for invalid user lala11 from x.x.x.x ..
98   -  sshd[12914]: Failed password for invalid user lala6 from ...
99   -  sshd[8267]: Failed password for illegal user test from 62.67.45.4 port 39141 ssh2
100   -  sshd[11259]: Invalid user abc from 127.0.0.1
101   -  "" Failed keyboard-interactive for root from 192.1.1.1 port 1066 ssh2    
102   -  sshd[23857]: [ID 702911 auth.notice] User xxx, coming from zzzz,
103   -  authenticated. 
104   -  sshd[23578]: reverse mapping checking getaddrinfo for pib4.catv-bauer.at failed - POSSIBLE BREAKIN ATTEMPT!
105   -  sshd[61834]: reverse mapping checking getaddrinfo for sv.tvcm.ch
106   -  failed - POSSIBLE BREAKIN ATTEMPT!
107   -  sshd[3251]: User root not allowed because listed in DenyUsers
108   -  [Time 2006.12.28 15:53:55 UTC] [Facility auth] [Sender sshd] [PID 483] [Message error: PAM: Authentication failure for username from 192.168.0.2] [Level 3] [UID -2] [GID -2] [Host Hostname]
109   -  [Time 2006.11.02 11:41:44 UTC] [Facility auth] [Sender sshd] [PID 800] [Message refused connect from 51.124.44.34] [Level 4] [UID -2] [GID -2] [Host test2-emac]
110   -  Apr 23 07:03:53 machinename sshd[29961]: User root from 12.3.4.5
111   not allowed because not listed in AllowUsers
112   -  sshd[9815]: scanned from 127.0.0.1 with SSH-1.99-AKASSH_Version_Mapper1.  Don't panic.
113   -  Sep  4 23:58:33 junction sshd[9351]: fatal: Write failed: Broken pipe
114   -  Sep 18 14:58:47 ix sshd[11816]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
115   -  Sep 23 10:32:25 server sshd[25209]: pam_ldap: error trying to bind as user "uid=user123,ou=People,dc=domain,dc=com" (Invalid credentials)
116   -  Aug 10 08:38:40 junction sshd[20013]: error: connect_to 192.168.179 port 8080: failed
117   -  Jun  9 00:00:01 ix sshd[9815]: scanned from 127.0.0.1 with SSH-1.99-AKASSH_Version_Mapper1.  Don't panic.
118   -  Jan 26 11:57:26 ix sshd[14879]: error: connect to ix.example.com port 7777 failed: Connection refused
119   -  Oct  8 10:07:27 y sshd[7644]: debug1: attempt 2 failures 2
120   -  Oct  8 08:58:37 y sshd[6956]: fatal: PAM: pam_setcred(): Authentication service cannot retrieve user credentials
121   -  Oct  8 08:48:33 y sshd[6856]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
122   -  Oct  8 11:18:26 172.16.51.132 sshd[7618]: error: PAM: Module is unknown for ddp from 172.16.51.1
123   -  Jun 19 20:56:00 tiny sshd[11605]: fatal: Write failed: Host is down
124   -  Jun 11 06:32:17 gorilla sshd[28293]: fatal: buffer_get_bignum2: buffer error
125   -  Jun 11 06:32:17 gorilla sshd[28293]: error: buffer_get_bignum2_ret: negative numbers not supported
126   -  Apr 14 19:28:21 gorilla sshd[31274]: Connection closed by 192.168.1.33
127   -  Jun 22 12:01:13 junction sshd[11283]: Received disconnect from 212.14.228.46: 11: Bye Bye
128   -  Nov  9 07:40:25 ginaz sshd[5973]: error: setsockopt SO_KEEPALIVE: Connection reset by peer
129   -  Nov  2 12:08:27 192.168.17.7 sshd[9665]: fatal: Cannot bind any address.
130   -  Nov  2 12:11:40 192.168.17.7 sshd[9814]: pam_loginuid(sshd:session): set_loginuid failed opening loginuid
131   -  Nov  6 09:53:38 hagal sshd[697]: error: accept: Software caused connection abort
132   -  Nov  9 11:36:55 ecaz sshd[26967]: pam_succeed_if(sshd:auth): error retrieving information about user _z9xxbBW
133   -->
134
135 <decoder name="sshd">
136   <program_name>^sshd</program_name>
137 </decoder>
138
139 <decoder name="sshd-success">
140   <parent>sshd</parent>
141   <prematch>^Accepted</prematch>
142   <regex offset="after_prematch">^ \S+ for (\S+) from (\S+) port </regex>
143   <order>user, srcip</order>
144   <fts>name, user, location</fts>
145 </decoder>
146
147 <decoder name="ssh-denied">
148   <parent>sshd</parent>
149   <prematch>^User \S+ from </prematch>
150   <regex offset="after_parent">^User (\S+) from (\S+) </regex>
151   <order>user, srcip</order>
152 </decoder>
153
154 <decoder name="sshd-success-solaris">
155   <parent>sshd</parent>
156   <prematch>^User </prematch>
157   <regex offset="after_prematch">^(\S+), coming from (\S+), </regex>
158   <order>user, srcip</order>
159   <fts>name, user, location</fts>
160 </decoder>
161
162 <decoder name="ssh-invfailed">
163   <parent>sshd</parent>
164   <prematch>^Failed \S+ for invalid user|^Failed \S+ for illegal user</prematch>
165   <regex offset="after_prematch">from (\S+) port \d+ \w+$</regex>
166   <order>srcip</order>
167 </decoder>
168
169 <decoder name="ssh-failed">
170   <parent>sshd</parent>
171   <prematch>^Failed \S+ </prematch>
172   <regex offset="after_prematch">^for (\S+) from (\S+) port \d+ \w+$</regex>
173   <order>user, srcip</order>
174 </decoder>
175
176 <decoder name="ssh-error">
177   <parent>sshd</parent>
178   <prematch>^error: PAM: Authentication \w+ </prematch>
179   <regex offset="after_prematch">^for (\S+) from (\S+)$</regex>
180   <order>user, srcip</order>
181 </decoder>
182
183 <decoder name="ssh-reverse-mapping">
184   <parent>sshd</parent>
185   <prematch>^reverse mapping checking </prematch>
186   <regex offset="after_prematch">^\w+ for \S+ [(\S+)] |^\w+ for (\S+) </regex>
187   <order>srcip</order>
188 </decoder>       
189
190 <decoder name="ssh-invalid-user">
191   <parent>sshd</parent>
192   <prematch>^Invalid user|^Illegal user</prematch>
193   <regex offset="after_prematch"> from (\S+)$</regex>
194   <order>srcip</order>
195 </decoder>
196
197 <decoder name="ssh-scan">
198   <parent>sshd</parent>
199   <prematch>^scanned from</prematch>
200   <regex offset="after_prematch"> (\S+) </regex>
201   <order>srcip</order>
202 </decoder>
203
204 <decoder name="ssh-scan2">
205   <parent>sshd</parent>
206   <prematch>^Did not receive identification|^Bad protocol version</prematch>
207   <regex offset="after_prematch"> from (\S+)$</regex>
208   <order>srcip</order>
209 </decoder>
210
211 <decoder name="ssh-osx-refuse">
212   <parent>sshd</parent>
213   <prematch>^refused connect </prematch>
214   <regex offset="after_prematch">^from (\S+)$</regex>
215   <order>srcip</order>
216 </decoder>
217
218 <decoder name="ssh-closed">
219   <parent>sshd</parent>
220   <prematch>^Connection closed </prematch>
221   <regex offset="after_prematch">^by (\S+)$</regex>
222   <order>srcip</order>
223 </decoder>
224
225 <decoder name="ssh-disconnect">
226   <parent>sshd</parent>
227   <prematch>^Received disconnect </prematch>
228   <regex offset="after_prematch">^from (\S+):</regex>
229   <order>srcip</order>
230 </decoder>
231
232 <!--XXX
233 <decoder name="ssh-pam">
234   <parent>sshd</parent>
235   <prematch>PAM: Module</prematch>
236   <regex>for (\S+) from (\S+)$</regex>
237   <order>user, srcip</order>
238 </decoder>
239
240 <decoder name="ssh-connect-to">
241   <parent>sshd</parent>
242   <prematch>connect_to</prematch>
243   <regex>connect_to: (\S+) port (\d+):</regex>
244   <order>dstip,dstport</order>
245 </decoder>
246 -->
247
248 <decoder name="sshd-ldap">
249   <parent>sshd</parent>
250   <prematch>^pam_ldap: </prematch>
251   <regex>user "uid=(\S+),ou=\w+,dc=\w+,dc=\w+"</regex>
252   <order>user</order>
253 </decoder>
254
255
256 <!-- Dropbear rules -->
257 <decoder name="dropbear">
258   <program_name>^dropbear</program_name>
259 </decoder>
260
261 <decoder name="dropbear-from">
262   <parent>dropbear</parent>
263   <regex>for '(\S+)' from (\S+):\d+$</regex>
264   <order>dstuser,srcip</order>
265 </decoder>
266
267
268
269 <!--
270  - Telnet decoder
271  - Will extract the srcip
272  - Examples:
273  - May 31 12:33:44 queen telnetd[9876]: warning: can't verify hostname: 
274    gethostbyname(131.1.satis-tl.ru) failed
275  - May 29 21:12:18 queen telnetd[6474]: refused connect from 81.215.42.27
276  - Jun  1 23:02:07 queen telnetd[62948]: connect from external.example.net
277  - Jun  1 23:02:07 queen telnetd[62948]: ttloop:  read: A connection with a remote socket was reset by that socket.
278  - Jun  2 09:54:28 valhalla in.telnetd[19723]: [ID 927837 local2.info] connect from external.example.net
279  - Jun  2 09:54:28 valhalla telnetd[19723]: [ID 485252 daemon.info] ttloop:  peer died: Error 0
280  -->
281 <decoder name="telnetd">
282   <program_name>^telnetd|^in.telnetd</program_name>
283 </decoder>
284
285 <decoder name="telnetd-ip">
286   <parent>telnetd</parent>
287   <regex>from (\d+.\d+.\d+.\d+)$</regex>
288   <order>srcip</order>
289 </decoder>
290
291
292
293 <!--
294  - rshd decoder
295  - Example message:
296  - Dec 17 10:49:23 hostname rshd[347339]: Connection from 10.217.223.31 on illegal port
297  -->
298 <decoder name="rshd">
299   <program_name>^rshd$</program_name>
300 </decoder>
301                           
302 <decoder name="rshd-illegal-connection">
303   <parent>rshd</parent>
304   <regex>^Connection from (\S+) on illegal port$</regex>
305   <order>srcip</order>
306 </decoder>
307
308
309
310 <!--
311  - cimserver decoder
312  - Example messages:
313  - Dec 18 18:06:28 hostname cimserver[18575]: PGS17200: Authentication failed for user jones_b.
314  - Dec 18 18:06:29 hostname cimserver[18575]: PGS17200: Authentication failed for user domain\jones_b.
315  -->
316 <decoder name="cimserver">
317   <program_name>^cimserver$</program_name>
318 </decoder>
319
320 <decoder name="cimserver-failed-authentication">
321   <parent>cimserver</parent>
322   <prematch>^\w+: Authentication failed for user </prematch>
323   <regex offset="after_prematch">^(\S+).$</regex>
324   <order>user</order>
325 </decoder>
326
327
328
329 <!--
330  - Samba decoder.
331  - Will extraxt the username/srcip
332  - Examples:
333  - smbd[832]: Denied connection from (192.168.3.23)
334  - smbd[832]: Connection denied from 0.0.0.0
335  - smbd[17535]: Permission denied\-\- user not allowed to delete, 
336    pause, or resume print job. User name: ahmet. Printer name: prnq1.
337   -->
338
339 <decoder name="smbd">
340   <program_name>^smbd</program_name>
341 </decoder>
342
343 <decoder name="smbd-user">
344   <parent>smbd</parent>
345   <prematch>User name:</prematch>
346   <regex offset="after_prematch">^ (\S+).</regex>
347   <order>user</order>
348 </decoder>
349
350 <decoder name="smbd-ip">
351   <parent>smbd</parent>
352   <regex> from \((\d+.\d+.\d+.\d+)\)</regex>
353   <order>srcip</order>
354 </decoder>
355
356 <decoder name="smbd-from">
357   <parent>smbd</parent>
358   <prematch> from (\S+)$</prematch>
359   <regex> from (\S+)$</regex>
360   <order>srcip</order>
361 </decoder>
362
363 <decoder name="smbd-client">
364   <parent>smbd</parent>
365   <prematch>to client \S+.</prematch>
366   <regex>to client (\S+). </regex>
367   <order>srcip</order>
368 </decoder>
369
370 <decoder name="nmbd">
371   <program_name>^nmbd</program_name>
372 </decoder>
373
374
375 <!-- Sudo decoder.
376   -  Will extract the username
377   -  Examples:
378   -  Apr 27 15:22:23 niban sudo:     dcid : TTY=pts/4 ; PWD=/home/dcid ; USER=root ; COMMAND=/usr/bin/tail /var/log/snort/alert.fast
379   -  Apr 27 15:25:08 niban sudo:     dcid : TTY=pts/4 ; PWD=/home/dcid ; USER=root ; COMMAND=/usr/bin/tail /var/log/snort/alert.fast
380   -  Apr 14 10:59:01 enigma sudo:     dcid : TTY=ttyp3 ; PWD=/home/dcid/ossec-hids.0.1a/src/analysisd ; USER=root ; COMMAND=/bin/cp -pr ../../bin/addagent ../../bin/osaudit-logaudit ../../bin/ossec-execd ../../bin/ossec-logcollector ../../bin/ossec-maild ../../bin/ossec-remoted /var/ossec/bin
381   -  Apr 19 14:52:02 enigma sudo:     dcid : TTY=ttyp3 ; PWD=/var/www/alex ; USER=root ; COMMAND=/sbin/chown dcid.dcid .
382   -->
383 <decoder name="sudo">
384   <program_name>^sudo</program_name>
385   <regex>^\s+(\S+)\s:</regex>
386   <order>user</order>
387   <fts>name,user,location</fts>
388   <ftscomment>First time user executed the sudo command</ftscomment>
389 </decoder>  
390
391
392 <!-- Su decoder.
393   -  Will extract the username.
394   -  Examples:
395   -  su[2921936]: failed: ttyq4 changing from ldap to root
396   -  su[234]: BAD SU ger to fwmaster on /dev/ttyp0
397   -  su(pam_unix)[23164]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost=  user=osaudit
398   -  su(pam_unix)[2298]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost=  user=root
399   -  Jul  5 12:17:38 lili su[2702]: - pts/5 ab-dc-root
400   -  Jul  5 12:13:15 lili su[2614]: - pts/6 dcid-root
401   -  su[29149]: + pts/5 dcid:root
402   -  SU 07/23 01:24 + pts/4 lcid-root
403   -  Apr 22 17:51:51 enigma su: dcid to root on /dev/ttyp1
404   - 'su root' failed for chapman on /dev/pts/1
405   -->
406 <decoder name="su">
407   <program_name>^su$</program_name>
408 </decoder>
409
410 <decoder name="su-detail">
411   <parent>su</parent>  
412   <prematch>^'su </prematch>
413   <regex>^'su (\S+)' \S+ for (\S+) on \S+$</regex>
414   <order>dstuser, srcuser</order>
415   <fts>name, srcuser, location</fts>
416 </decoder>
417
418 <decoder name="su-ldap">
419   <parent>su</parent>
420   <prematch>pam_ldap</prematch>                                                                                                                                        
421   <regex>user "uid=(\S+),</regex>
422   <order>user</order>
423 </decoder>
424
425 <decoder name="su-detail2">
426   <parent>su</parent>  
427   <regex>^BAD SU (\S+) to (\S+) on|</regex>
428   <regex>^failed: \S+ changing from (\S+) to (\S+)|</regex>
429   <regex>^\S \S+ (\S+)\p(\S+)$|^(\S+) to (\S+) on </regex>
430   <order>srcuser, dstuser</order>
431   <fts>name, srcuser, location</fts>
432 </decoder>
433
434 <decoder name="su">
435   <prematch>^SU \S+ \S+ </prematch>
436   <regex offset="after_prematch">^\S \S+ (\S+)-(\S+)$</regex>
437   <order>srcuser, dstuser</order>
438   <fts>name, srcuser, location</fts>
439 </decoder>
440
441
442
443 <!-- ProFTPD decoder.
444   - Will extract the username/srcip
445   - Examples:
446   - proftpd[26916]: hayaletgemi (85.101.218.135[85.101.218.135]) - ANON anonymous: Login successful.
447   - proftpd[12564]: juf01 (pD9EE35B1.dip.t-dialin.net[217.238.53.177]) - USER jufu: Login successful
448   - proftpd[30362] xx.yy.zz (aa.bb.cc[aa.bb.vv.dd]): USER backup: Login successful.
449   - proftpd[2344]: refused connect from 192.168.1.2 (192.168.1.2)
450   - proftpd[15181]: valhalla (crawl-66-249-66-80.googlebot.com[66.249.66.80]) - Connection from crawl-66-249-66-80.googlebot.com [66.249.66.80] denied.
451   -->
452 <decoder name="proftpd">  
453   <program_name>^proftpd</program_name>
454 </decoder>
455
456 <decoder name="proftpd-success">
457   <parent>proftpd</parent>  
458   <prematch>: Login successful</prematch>
459   <regex>^\S+ \(\S+[(\S+)]\)\s*\S \w+ (\S+): </regex>
460   <regex>Login successful</regex>
461   <order>srcip, user</order>
462   <fts>name, user, srcip, location</fts>
463 </decoder>
464
465 <decoder name="proftpd-ip">
466   <parent>proftpd</parent>
467   <regex>^\S+ \(\S+[(\S+)]\)</regex>
468   <order>srcip</order>
469 </decoder>
470
471
472
473 <!-- Pure-FTPd decoder.
474   - Will extract the username/srcip whenever possible.
475   - Samples by Peter Ahlert <peter@ifup.de> (thanks!)
476   - Examples:
477   - pure-ftpd-wrapper[926]: connect from 1.1.0.1 (1.1.0.1)
478   - pure-ftpd: (?@1.1.0.1) [INFO] New connection from 1.1.0.1
479   - pure-ftpd: (abcde@1.1.0.1) [INFO] Can't change directory to /.test: Permission denied
480   - pure-ftpd: (abcde@1.1.0.1) [INFO] Logout.
481   - pure-ftpd: (?@59.150.14.54) [WARNING] Authentication failed for user [newuser]
482   -->
483 <decoder name="pure-ftpd">
484   <program_name>^pure-ftpd</program_name>
485 </decoder>
486
487 <decoder name="pure-ftpd-login">
488   <parent>pure-ftpd</parent>
489   <prematch>^\S+ [INFO] \S+ is now logged in</prematch>
490   <regex>^\(?@(\S+)\) [INFO] (\S+) is now logged in</regex>
491   <order>srcip, user</order>
492   <fts>name, user, srcip, location</fts>
493 </decoder>
494
495 <decoder name="pure-ftpd-generic">
496   <parent>pure-ftpd</parent>
497   <regex>^\((\S+)@(\S+)\) [</regex>
498   <order>user,srcip</order>
499 </decoder>  
500
501
502
503 <!-- vsftpd decoder.
504   - Will extract the srcip.
505   - Examples:
506   - Sun Jun  4 22:08:04 2006 [pid 21612] CONNECT: Client "192.168.2.10"
507   - Sun Jun  4 22:08:39 2006 [pid 21611] [dcid] OK LOGIN: Client "192.168.2.10"
508   - Sun Jun  4 22:09:22 2006 [pid 21622] CONNECT: Client "192.168.2.10"
509   - Sun Jun  4 22:09:24 2006 [pid 21621] [lalal] FAIL LOGIN: Client "192.168.2.10"
510   - Sat Jun  3 07:51:42 2006 [pid 25073] [Administrator] FAIL LOGIN: Client
511   "211.100.27.101"
512   - Sun Aug 27 16:28:20 2006 [pid 13962] [xx] OK UPLOAD: Client "1.2.3.4", "/a.php", 8338 bytes, 18.77Kbyte/sec
513   - Jul 13 12:31:20 www vsftpd: Sun Jul 13 10:31:20 2008 [pid 27528] [anonymous] FAIL LOGIN: Client "84.140.234.76"
514   -->
515 <decoder name="vsftpd">
516   <prematch>^\w\w\w \w\w\w\s+\d+ \S+ \d+ [pid \d+] </prematch>
517   <regex offset="after_prematch">Client "(\d+.\d+.\d+.\d+)"$</regex>
518   <order>srcip</order>
519 </decoder>
520
521 <decoder name="vsftpd">
522   <program_name>^vsftpd</program_name>
523   <prematch>^\w\w\w \w\w\w\s+\d+ \S+ \d+ [pid \d+] </prematch>
524   <regex offset="after_prematch">Client "(\d+.\d+.\d+.\d+)"$</regex>
525   <order>srcip</order>
526 </decoder>
527
528
529
530 <!-- FTPD decoder - Solaris, MacOS and Wu-ftpd).
531   - Examples:
532   - ftpd[811166]: refused connect from 88.225.42.182
533   - in.ftpd[18561]: [ID 484914 daemon.notice] gethostbyaddr: nameservices.net. != 216.117.134.168
534   - ftpd[31918]: FTPD: EXPORT file local , remote
535   - Dec 21 12:21:20 hostname ftpd[323115]: login jones_b from client.example.org failed.
536   -->
537 <decoder name="ftpd">
538   <program_name>^ftpd|^in.ftpd</program_name>
539 </decoder>
540
541 <decoder name="ftpd-mac-failure">
542   <parent>ftpd</parent>
543   <prematch>^Failed authentication from: \S+ |</prematch>
544   <prematch>^repeated login failures from </prematch>
545   <!--<regex offset="after_prematch">(\S+)</regex>-->
546   <regex offset="after_prematch">^\S+ [(\d+.\d+.\d+.\d+)]$|^(\S+)</regex>
547   <order>srcip</order>
548 </decoder>
549
550 <decoder name="ftpd-refused">
551   <parent>ftpd</parent>
552   <prematch>^FTP LOGIN REFUSED </prematch>
553   <regex offset="after_prematch">[(\d+.\d+.\d+.\d+)]$</regex>
554   <order>srcip</order>
555 </decoder>
556
557 <decoder name="ftpd-ip">
558   <parent>ftpd</parent>
559   <regex>from (\d+.\d+.\d+.\d+)$</regex>
560   <order>srcip</order>
561 </decoder>
562
563 <decoder name="ftpd-tru64">
564   <parent>ftpd</parent>
565   <prematch>^login \S+ from \S+ failed.</prematch>
566   <regex>^login (\S+) from (\S+) failed.$</regex>
567   <order>user, srcip</order>
568 </decoder>
569
570
571
572 <!-- Arpwatch decoder.
573   - Will extract srcip/mac for "new station" messages.
574   - Examples:
575   - arpwatch: new station 192.168.1.103 0:11:43:5e:5d:80 eth0
576   - arpwatch: bogon 172.16.150.149 0:2:b3:d6:e5:68 eth0
577   - arpwatch: new station 192.168.2.10 0:c0:4f:78:32:be
578   - arpwatch: pcap open re0: /dev/bpf0: Permission denied
579   - arpwatch: reused old ethernet address 192.168.17.248 0:e:3b:a:cb:67 (0:1e:8c:72:b0:d0)
580   -->
581 <decoder name="arpwatch">
582   <program_name>^arpwatch</program_name>
583 </decoder>
584
585 <decoder name="arpwatch-new">
586   <parent>arpwatch</parent>
587   <prematch>^new station |^bogon </prematch>
588   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+) (\S+)</regex>
589   <order>srcip, extra_data</order>
590   <fts>name, srcip, extra_data</fts>
591 </decoder>
592
593
594
595 <!-- MySQL decoder.
596   - Examples:
597   - MySQL log: 060516 22:38:46 mysqld started
598   - MySQL log: 060516 22:38:46 mysqld ended
599   - MySQL log: 070823 21:23:08 2 Query       INSERT INTO signature(id, rule_id, level, description) VALUES (NULL, '18103','5','Windows error event.') ON DUPLICATE KEY UPDATE level='5'
600   - 070824 11:33:51       6 Connect     Access denied for user 'roota'@'localhost' (using password: YES)
601   -->
602 <decoder name="mysql_log">
603   <prematch>^MySQL log:</prematch>
604 </decoder>
605
606
607
608 <!-- PostgreSQL decoder.
609   - Examples:
610   - [2007-08-31 18:37:09.454 ADT] 192.168.2.99: LOG:  connection authorized: user=ossec_user database=ossecdb
611   - [2007-08-31 18:37:15.525 ADT] 192.168.2.99: ERROR:  relation "alert2" does not exist
612   -->
613 <decoder name="postgresql_log">
614   <prematch>^[\d\d\d\d-\d\d-\d\d \S+ \w+] </prematch>
615   <regex offset="after_prematch">^\S+ (\w+): </regex>
616   <order>status</order>
617 </decoder>  
618
619
620
621 <!-- Imapd decoder.
622   - Will extract the username/srcip
623   - Examples:
624   - imapd[26888]: Login failed user=babadosfashion auth=babadosfashion host=bahiana.resenet.com.br [200.255.5.8]
625   - imapd[21040]: Login failed user=root domain=(null) auth=root host=host29-141.poo
626     l8249.interbusiness.it [82.49.141.29]
627   - imapd[27113]: Authenticated user=badyy host=a.resenet.com.br [1.2.3.4]
628   - imapd[27113]: Logout user=badyy host=a.resenet.com.br [1.2.3.4]  
629   -->
630 <decoder name="imapd">
631   <program_name>^imapd</program_name>
632   <regex offset="after_prematch">user=(\S+) \.+ [(\d+.\d+.\d+.\d+)]$</regex>    
633   <order>user,srcip</order>
634 </decoder>
635
636
637
638 <!-- Vpopmail decoder. (by Ceg Ryan <cegryan ( at ) gmail.com>)
639   - Examples:
640   - vpopmail[32485]: vchkpw-pop3: password fail abc@xxx.com:x.x.x.x
641   - vpopmail[32485]: vchkpw-2110 password fail abc@xxx.com:x.x.x.x
642   -                  vchkpw-pop3: password fail (pass: 'test') user@my_domain:1.2.3.4
643   - vpopmail[2100]: vchkpw-pop3: vpopmail user not found abc@xxx.com:x.x.x.x
644   - vpopmail[4162]: vchkpw-pop3: vpopmail user not found support@:69.3.64.3
645   -->
646 <decoder name="vpopmail">
647   <program_name>^vpopmail</program_name>
648 </decoder>
649
650 <decoder name="vpopmail-fail">
651   <parent>vpopmail</parent>
652   <prematch>^vchkpw-\S+: password fail</prematch>
653   <regex offset="after_prematch"> (\S+)@\S+:(\d+.\d+.\d+.\d+)$</regex>
654   <order>user, srcip</order>
655 </decoder>
656
657 <decoder name="vpopmail-notfound">
658   <parent>vpopmail</parent>
659   <prematch>^vchkpw-\S+: vpopmail user not </prematch>
660   <regex offset="after_prematch">^found (\S+):(\d+.\d+.\d+.\d+)$</regex>
661   <order>user, srcip</order>
662 </decoder>
663
664 <decoder name="vpopmail-empty">
665   <parent>vpopmail</parent>
666   <prematch>^vchkpw-\S+: null password </prematch>
667   <regex offset="after_prematch">^given (\S+):(\d+.\d+.\d+.\d+)$</regex>
668   <order>user, srcip</order>
669 </decoder>
670
671 <decoder name="vpopmail-success">
672   <parent>vpopmail</parent>
673   <prematch>^vchkpw-\S+: \(\S+\) login </prematch>
674   <regex offset="after_prematch">^success (\S+):(\d+.\d+.\d+.\d+)$</regex>
675   <order>user, srcip</order>
676 </decoder>
677
678
679
680 <!-- VM-POP3 - Virtual Mail Pop3
681   - Examples:
682   -->
683 <decoder name="vm-pop3d">
684   <program_name>^vm-pop3d</program_name>
685 </decoder>
686
687 <decoder name="vm-pop3d-fail">
688   <parent>vm-pop3d</parent>
689   <prematch>^User '</prematch>
690   <regex offset="after_prematch">^(\S+)' - \w+ auth, </regex>
691   <regex>from=(\d+.\d+.\d+.\d+)$</regex>
692   <order>user, srcip</order>
693 </decoder>
694
695
696
697 <!-- Courier decoder
698   - Examples:
699   - pop3d-ssl: LOGIN FAILED, ip=[::ffff:192.168.0.200]
700   - courierpop3login: LOGIN, user=web10_mauricio, ip=[::ffff:192.168.0.100]
701   - courierpop3login: LOGIN FAILED, ip=[::ffff:192.168.0.188]
702   - imaplogin: DISCONNECTED, ip=[::ffff:127.0.0.1], time=0
703   - Nov 24 18:18:28 gandalf pop3d: LOGIN FAILED, ip=[::ffff:1.2.3.4]
704   -->
705 <decoder name="courier">
706   <program_name>^pop3d|^courierpop3login|^imaplogin</program_name>
707 </decoder>
708
709 <decoder name="courier-login">
710   <parent>courier</parent>
711   <prematch>^LOGIN, </prematch>
712   <regex offset="after_prematch">^user=(\S+), ip=[(\S+\d)]$</regex>
713   <order>user, srcip</order>
714 </decoder>
715
716 <decoder name="courier-generic">
717   <parent>courier</parent>
718   <regex>, ip=[(\S+\d)]$</regex>
719   <order>srcip</order>
720 </decoder>
721
722
723
724 <!-- Dovecot Decoder
725   - Will extract username, srcip and dstip when available.
726   - Jun 17 10:15:24 hostname dovecot: Dovecot v1.2.rc3 starting up (core dumps disabled)
727   - Jun 17 10:15:24 hostname dovecot: Fatal: auth(default): Support not compiled in for passdb driver 'ldap'
728   - Jun 17 10:15:24 hostname dovecot: Fatal: Auth process died too early - shutting down
729   - dovecot: Jun 23 15:04:05 Info: imap-login: Login: user=<username>, method=PLAIN, rip=1.2.3.4, lip=1.2.3.5 Authentication Failure:
730   - Jan 11 03:42:09 hostname dovecot: auth-worker(default): sql(user@example.com,1.2.3.4): Password mismatch
731   - dovecot: Jan 07 14:46:28 Warn: auth(default): userdb(username,::ffff:127.0.0.1): user not found from userdb
732   - dovecot: Mar 13 15:25:07 Info: auth(default): pam(user@example.com,::ffff:1.2.3.4): pam_authenticate() failed: User not known to the underlying authentication module
733   - dovecot: Mar 13 15:25:07 Info: auth(default): passwd-file(user@example.com,::ffff:1.2.3.4): unknown user
734   - Jan 11 03:45:09 hostname dovecot: auth-worker(default): sql(username,1.2.3.4): unknown user 
735   - Jan 11 03:42:09 hostname dovecot: auth(default): pam(user@example.com,1.2.3.4): pam_authenticate() failed: User not known to the underlying authentication module
736   - Jul  4 17:30:51 hostname dovecot[2992]: pop3-login: Disconnected: rip=1.2.3.4, lip=1.2.3.5
737   - dovecot: Jun 23 15:04:06 Info: IMAP(username): Disconnected: Logged out bytes=59/566
738   - dovecot: May 31 09:43:57 Info: pop3-login: Aborted login (1 authentication attempts): user=<username>, method=PLAIN, rip=::ffff:1.2.3.4, lip=::ffff:1.2.3.5, secured
739   - Jan 30 09:37:55 hostname dovecot: pop3-login: Aborted login: user=<username>, method=PLAIN, rip=::ffff:1.2.3.4, lip=::ffff:1.2.3.5
740 -->
741
742 <decoder name="dovecot">
743   <program_name>^dovecot</program_name>
744 </decoder>
745
746 <decoder name="dovecot-success">
747   <parent>dovecot</parent>
748   <prematch offset="after_parent">^\w\w\w\w-login: Login: </prematch>
749   <regex offset="after_prematch">^user=\p(\S+)\p, method=\S+, rip=\S*(\d+.\d+.\d+.\d+), lip=\S*(\d+.\d+.\d+.\d+), (\S*)$</regex>
750   <order>user, srcip, dstip, protocol</order>
751 </decoder>
752
753 <decoder name="dovecot-aborted">
754   <parent>dovecot</parent>
755   <prematch offset="after_parent">^\w\w\w\w-login: Aborted login</prematch>
756   <regex offset="after_prematch">: user=\p(\S+)\p, method=\S+, rip=::ffff:(\d+.\d+.\d+.\d+), lip=::ffff:(\d+.\d+.\d+.\d+)$</regex>
757   <order>user, srcip, dstip</order>
758 </decoder> 
759
760 <decoder name="dovecot-fail">
761   <parent>dovecot</parent>
762   <prematch offset="after_parent">^auth\(default\)|auth-worker\(default\)</prematch>
763   <regex offset="after_prematch">^: \S+\((\S+),(\d+.\d+.\d+.\d+)\)</regex>
764   <order>user, srcip</order>
765 </decoder>
766
767 <decoder name="dovecot-disconnect">
768   <parent>dovecot</parent>
769   <prematch offset="after_parent">^\w\w\w\w-login: Disconnected: </prematch>
770   <regex offset="after_prematch">^rip=(\S+), lip=(\d+.\d+.\d+.\d+)</regex>
771   <order>srcip, dstip</order>
772 </decoder>
773
774
775
776 <!-- Named decoder.
777   - Will extract the srcip
778   - Examples:
779   -  valhalla named[7885]: client 192.168.1.231#1142: update 'hayaletgemi.edu/IN' denied
780   - named[12637]: client 1.2.3.4#32769: query (cache) 'somedomain.com/MX/IN' denied
781   -  Oct 22 10:12:33 junction named[31687]: /etc/blocked.slave:9892: syntax error near ';'
782   -  Oct 22 10:12:33 junction named[31687]: reloading configuration failed: unexpected token
783  -->           
784 <decoder name="named">
785   <program_name>^named</program_name>
786 </decoder>
787
788 <decoder name="named-query">
789   <parent>named</parent>
790   <prematch>: query: </prematch>
791   <regex>client (\S+)#\d+: query: (\S+) IN </regex>
792   <order>srcip,url</order>
793 </decoder>
794
795
796 <decoder name="named_client">
797   <parent>named</parent>  
798   <prematch>^client </prematch>
799   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+)#</regex>
800   <order>srcip</order>
801 </decoder>
802
803 <decoder name="named_from">
804   <parent>named</parent>  
805   <regex offset="after_parent"> from [(\d+.\d+.\d+.\d+)]</regex>
806   <order>srcip</order>
807 </decoder>
808
809 <decoder name="named-master">
810   <parent>named</parent>
811   <prematch> for master</prematch>
812   <regex>for master (\d+.\d+.\d+.\d+):(\d+) \S+ \(source (\d+.\d+.\d+.\d+)#d+\)$</regex>
813   <order>dstip,dstport,srcip</order>
814 </decoder>
815
816
817 <!-- Postfix  decoder.
818   - Will extract the srcip
819   - Examples: 
820   - postfix/smtpd[32297]: NOQUEUE: reject: RCPT from unknown[213.255.237.245]: 554 
821     <ce101@ce.metu.edu.tr>: Relay access denied; from=<kryonomm@yahoo.com> 
822     to=<e10445@jubiipost.dk> proto=SMTP helo=<SM01.net>
823   - postfix/smtpd[27712]: NOQUEUE: reject: MAIL from localhost[127.0.0.1]: 452 Insufficient system storage
824  -->
825
826 <decoder name="postfix">
827   <program_name>^postfix</program_name>
828 </decoder>
829
830 <decoder name="postfix-reject">
831   <use_own_name>true</use_own_name>
832   <parent>postfix</parent>  
833   <prematch>^NOQUEUE: reject: \w\w\w\w from </prematch>
834   <regex offset="after_prematch">[(\d+.\d+.\d+.\d+)]: (\d+) </regex>
835   <order>srcip,id</order>
836 </decoder>
837
838 <decoder name="postfix-sasl">
839   <parent>postfix</parent>  
840   <prematch>^warning: \S+: SASL </prematch>
841   <regex>^warning: \S+[(\d+.\d+.\d+.\d+)]:</regex>
842   <order>srcip</order>
843 </decoder>
844
845
846 <!-- Sendmail decoder.
847   - Will extract the srcip
848   - Examples: 
849   - sendmail[15806618]: k1SN9pkK15806618: ruleset=check_mail, arg1=<rtreter@qffff.com>, 
850   - relay=dsl.static81215198185.ttnet.net.tr [81.215.198.185] (may be forged), reject=553 5.1.8 
851   - <rtreter@qffff.com>... Domain of sender address rtreter@qffff.com does not exist
852   - sm-msp-queue[13484]: k5TKj6L5012934: to=root, ctladdr=root (0/0), delay=00:04:00, xdelay=00:00:00, mailer=relay, pri=120112, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
853   - sendmail[7735]: [ID 801593 mail.notice] k856Hah0007735: ruleset=check_rcpt, arg1=<sc@sd.com>, relay=[216.22.33.7], reject=553 5.3.0 <sc@sd.com>... Spammer 216.22.33.7 usergl@displaytoward.net rejected by RBL:http://www.spamhaus.org/
854   - sm-mta[23868]: k9BEQK0c023868: rejecting commands
855   from [200.121.73.169] [200.121.73.169] due to pre-greeting traffic
856   - sendmail[7818]: j6KKHo2d007818: rejecting commands from sv.e103gng.com [66.62.19.10] due to pre-greeting traffic
857  -->
858 <decoder name="sendmail-reject">
859   <program_name>^sendmail|^sm-mta|^sm-msp-queue</program_name>
860 </decoder>  
861
862 <decoder name="sendmail-pre-greeting">
863   <parent>sendmail-reject</parent>
864   <prematch>^\S+: rejecting commands from</prematch>
865   <regex offset="after_prematch">^ \S+ [(\d+.\d+.\d+.\d+)]</regex>
866   <order>srcip</order>
867 </decoder>
868
869 <decoder name="sendmail-reject-nodns">
870   <parent>sendmail-reject</parent>
871   <prematch>relay=[</prematch>
872   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+)]</regex>
873   <order>srcip</order>
874 </decoder>
875
876 <decoder name="sendmail-reject-dns">
877   <parent>sendmail-reject</parent>
878   <prematch>relay=\S+ [</prematch>
879   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+)]</regex>
880   <order>srcip</order>
881 </decoder>
882
883
884
885
886 <!-- SMF-SAV Sendmail Milter decoder.
887   - Will extract the srcip
888   - Examples:
889   - smf-sav[513]: [ID 987462 mail.notice] sender check failed: <xkyjywqvophshu@mypersonalemail.com>, 125.133.22.112, [125.133.22.112], [00:00:01]
890   - smf-sav[513]: [ID 407019 mail.info] sender check succeeded (cached): <asterisk-users-bounces@lists.digium.com>, 216.207.245.17, lists.digium.com
891   - smf-sav[513]: [ID 987894 mail.notice] sender check tempfailed: <31363****-org@targetedpages.com>, 69.8.190.101, smtp101.tramailer.info, [00:00:05]
892   - smf-sav[1883]: sender check tempfailed (cached): <k@vooC7b>, 87.103.236.97, [87.103.236.97]
893   - smf-sav[1883]: sender check failed (cached): <clahaiclahai@email.iis.com.br
894    >, 91.146.176.140, pool176-140.cable.tolna.net
895   -->
896 <decoder name="smf-sav-reject">
897   <program_name>^smf-sav</program_name>
898   <prematch>^sender check failed|</prematch>
899   <prematch>^sender check tempfailed</prematch>
900   <regex offset="after_prematch">^ \(cached\): \S+, (\d+.\d+.\d+.\d+),|</regex>
901   <regex>^: \S+, (\d+.\d+.\d+.\d+),</regex>
902   <order>srcip</order>
903 </decoder>
904
905
906
907 <!-- Mail scanner
908   - Will extract the srcip/action
909   - Examples:
910   - MailScanner[24112]: Message k7B9Mc6b015925 from 
911   68.171.145.34 (nilsenator@hotmail.com) to yyyyy.no is spam, SpamAssassin
912   - May  3 16:28:40 jarjar MailScanner[4732]: Message k436SX2M005191 from  
913   111.222.111.222 (david@our.domain.org) to our.domain.org is spam
914   , SpamAssassin
915   - MailScanner[5317]: Message k436dCIW005370 from  
916   111.222.111.222 (david@our.domain.org) to another.domain.org is not s
917   pam, SpamAssassin
918   - MailScanner[29107]: Message j0EMandY027564 from xxx.xxx.xxx.xxx(xxxxx@xxxxx.ie) to xxxxx.ie is not spam
919   -->
920 <decoder name="mailscanner">
921   <program_name>^MailScanner</program_name>
922 </decoder>
923
924 <decoder name="mailscanner-ip">
925   <parent>mailscanner</parent>
926   <prematch>^Message \S+ from </prematch>
927   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+) \S+ to \S+ is (\w+)</regex>
928   <order>srcip, action</order>
929 </decoder>
930
931
932 <!-- OpenBSD smtpd decoders -->
933
934 <decoder name="smtpd">
935   <program_name>smtpd</program_name>
936 </decoder>
937
938 <decoder name="smtpd-client">
939   <parent>smtpd</parent>
940   <prematch offset="after_parent">^client</prematch>
941   <regex>^client (\S+) </regex>
942   <order>srcip</order>
943 </decoder>
944
945 <decoder name="smtpd-relay">
946   <parent>smtpd</parent>
947   <prematch>relay=</prematch>
948   <regex>relay=\S+ [(\S+)], </regex>
949   <order>srcip</order>
950 </decoder>
951
952
953
954 <!-- Iptables decoder.
955   - Will extract the srcip, dstip, srcport, dstport, protocol
956   - Examples:
957   - kernel: FIREWALL_OUT IN= OUT=eth0
958     SRC=192.168.6.57 DST=216.161.248.225 LEN=40 TOS=0x00 PREC=0x00 TTL=64
959     ID=18547 DF PROTO=TCP SPT=46388 DPT=37628 WINDOW=6930 RES=0x00 ACK RST
960     URGn=0
961   - kernel: IPTABLE IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:03:93:db:2e:b4:08:00 
962     SRC=10.4.11.40 DST=255.255.255.255 LEN=180 TOS=0x00 PREC=0x00 TTL=64 
963     ID=4753 PROTO=UDP SPT=49320 DPT=2222 LEN=160
964   - kernel: [4475569.016000] IN= OUT=lo SRC=192.168.2.11 DST=192.168.2.11 
965     LEN=52 TOS=0x10 PREC=0x00 TTL=64 ID=49546 DF PROTO=TCP SPT=43068 
966     DPT=22 WINDOW=8192 RES=0x00 ACK URGP=0     
967   - Aug 17 10:03:37 myhostname kernel: SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=00:08:02:da:c8:51:00:0f:f7:74:31:8a:08:00 SRC=1.2.3.36 DST=1.2.3.194 LEN=28 TOS=0x00 PREC=0x00 TTL=44 ID=60200 PROTO=ICMP TYPE=8 CODE=0 ID=10466 SEQ=21229   
968   -->
969 <decoder name="iptables">
970    <program_name>^kernel</program_name>
971 </decoder>
972      
973 <decoder name="iptables-1">
974    <parent>iptables</parent>
975    <type>firewall</type>
976    <prematch>^[\d+.\d+] \S+ IN=</prematch>
977    
978    <regex>^[\d+.\d+] (\S+) \.+ SRC=(\S+) DST=(\S+)</regex>
979    <regex> \.+ PROTO=(\w+) </regex>
980    <order>action,srcip,dstip,protocol</order>
981 </decoder>
982
983 <decoder name="iptables-1">
984    <parent>iptables</parent>
985    <type>firewall</type>
986    <regex offset="after_regex">^SPT=(\d+) DPT=(\d+) </regex>
987    <order>srcport,dstport</order>
988 </decoder>
989
990 <decoder name="iptables-2">
991    <parent>iptables</parent>
992    <type>firewall</type>
993    <prematch>^\S+ IN=</prematch>
994    
995    <regex>^(\S+) \.+ SRC=(\S+) DST=(\S+) \.+ </regex>
996    <regex>PROTO=(\w+) </regex>
997    <order>action,srcip,dstip,protocol</order>
998 </decoder>
999
1000 <decoder name="iptables-2">
1001    <parent>iptables</parent>
1002    <type>firewall</type>
1003    <regex offset="after_regex">^SPT=(\d+) DPT=(\d+) </regex>
1004    <order>srcport,dstport</order>
1005 </decoder>
1006
1007 <decoder name="iptables-shorewall">
1008    <parent>iptables</parent>
1009    <type>firewall</type>
1010    <prematch>^Shorewall:\S+:</prematch>
1011    
1012    <regex offset="after_prematch">^(\S+):\.+ SRC=(\S+) DST=(\S+) \.+ </regex>
1013    <regex>PROTO=(\w+) </regex>
1014    <order>action,srcip,dstip,protocol</order>
1015 </decoder>
1016
1017 <decoder name="iptables-shorewall">
1018    <parent>iptables</parent>
1019    <type>firewall</type>
1020    <regex offset="after_regex">^SPT=(\d+) DPT=(\d+) </regex>
1021    <order>srcport,dstport</order>
1022 </decoder>   
1023
1024 <decoder name="iptables-shorewall2">
1025   <parent>iptables</parent>
1026   <type>firewall</type>
1027   <prematch>^\p\S+\p Shorewall:\S+:</prematch>
1028   <regex offset="after_prematch">^(\S+):\.+ SRC=(\S+) DST=(\S+) \.+ </regex>
1029   <regex>PROTO=(\w+) </regex>
1030   <order>action,srcip,dstip,protocol</order>
1031 </decoder>
1032
1033
1034 <!-- Solaris IPFilter decoder.
1035   - Will extract the action, srcip, srcport, dstip, dstport
1036   - Examples:
1037   - ipmon[11523]: [ID 702911 local0.warning] 09:30:39.300795 3x ce0 @0:1
1038     b 10.4.0.25,43873 -> 10.4.122.243,22 PR tcp len 20 100 -AP IN
1039   - ipmon[11523]: [ID 702911 local0.warning] 09:31:53.285032 hme0 @0:1
1040     b 10.4.122.243,138 -> 255.255.255.255,138 PR udp len 20 229 IN mbcast
1041   - ipmon[11523]: [ID 702911 local0.notice] 09:30:40.398290 ce0 @0:14
1042     p 10.4.122.243,123 -> 10.4.122.16,123 PR udp len 20 76 K-S OUT
1043   -->
1044 <decoder name="ipfilter">
1045    <type>firewall</type>
1046    <program_name>^ipmon</program_name>
1047    <regex> (\w) (\d+.\d+.\d+.\d+),(\d+) -> </regex>
1048    <regex>(\d+.\d+.\d+.\d+),(\d+) PR (\w+) </regex>
1049    <order>action,srcip,srcport,dstip,dstport,protocol</order>
1050 </decoder>
1051   
1052
1053 <!-- AIX IPSec decoder.
1054   - Will extract the action,srcip,dstip,protocol,srcport,dstport
1055   - Examples:
1056   - ipsec_logd: #:3 R:p  I:10.0.0.99 S:10.0.0.82 D:10.0.0.99 
1057     P:tcp/ack SP:50349 DP:22 R:l I:en0 F:n T:0 L:88
1058   - ipsec_logd: #:1 R:p  O:10.0.0.99. S:10.0.0.99 D:10.0.0.25 
1059     P:udp SP:2063 DP:53 R:l I:en0 F:n T:0 L:81 
1060  -->
1061 <decoder name="aix-ipsec">
1062    <type>firewall</type>
1063    <program_name>^ipsec_logd</program_name>
1064    <regex> R:(\w)  \w:\S+ S:(\d+.\d+.\d+.\d+) </regex>
1065    <regex>D:(\d+.\d+.\d+.\d+) P:(\S+) SP:(\d+) DP:(\d+) </regex>
1066    <order>action,srcip,dstip,protocol,srcport,dstport</order>
1067 </decoder>
1068
1069
1070
1071 <!-- OpenBSD pf decoder (as a plugin - compiled).
1072   - Will extract the action,srcip,dstip,protocol,srcport,dstport
1073   - Examples:
1074   - Mar 30 15:33:26 enigma pf: Mar 30 15:32:33.483712 rule 2/(match) pass in on xl0: 140.211.166.3.6667 > 192.168.2.10.16290: P 7408:7677(269) ack 1773 win 2520 <nop,nop,timestamp 3960674784 2860123562> (DF)
1075   - Mar 30 15:47:05.522341 rule 4/(match) block in on lo0: 127.0.0.1.48784 > 127.0.0.1.23: S 1381529123:1381529123(0) win 16384 <mss 33184,nop,nop,sackOK,nop,wscale 0,[|tcp]> (DF) [tos 0x10]
1076   - Mar 30 15:54:22.171929 rule 3/(match) pass out on xl0: 192.168.2.10.1514 > 192.168.2.190.1030:  udp 73
1077   - Mar 30 15:54:22.174412 rule 3/(match) pass out on xl0: 192.168.2.10.1514 > 192.168.2.190.1030:  udp 89
1078   
1079   -->
1080 <decoder name="pf">
1081    <type>firewall</type>
1082    <program_name>^pf$</program_name>
1083    <plugin_decoder>PF_Decoder</plugin_decoder>
1084 </decoder>
1085
1086   
1087
1088 <!-- SonicWall decoder.
1089   - Will extract action, srcip, dstip, protocol, srcport and dstport
1090   - Examples:
1091   - Jan  3 13:45:36 192.168.5.1 id=firewall sn=000SERIAL time="2007-01-03 14:48:06" fw=1.1.1.1 pri=6 c=262144 m=98 msg="Connection Opened" n=23419 src=2.2.2.2:36701:WAN dst=1.1.1.1:50000:WAN proto=tcp/50000
1092   - Jan  3 13:45:36 192.168.5.1 id=firewall sn=000SERIAL time="2007-01-03 14:48:07" fw=1.1.1.1 pri=1 c=32 m=30 msg="Administrator login denied due to bad credentials" n=7 src=2.2.2.2:36701:WAN dst=1.1.1.1:50000:WAN
1093   - id=firewall sn=00301E0526B1 time="2004-04-01 10:39:35"
1094   fw=67.32.44.2 pri=5 c=64 m=36 msg="TCP connection dropped" n=2686 src=67.101.200.27:4507:WAN dst=67.32.44.2:445:LAN rule=0
1095   -->
1096 <decoder name="sonicwall">
1097   <type>firewall</type>
1098   <prematch>^id=\w+ sn=\w+ time=\S+ \S+ fw=\S+ pri=\d </prematch>
1099   <plugin_decoder>SonicWall_Decoder</plugin_decoder>
1100 </decoder>
1101
1102
1103
1104 <!-- Netscreen Firewall decoder.
1105   - Will extract the action,srcip,dstip,protocol,srcport,dstport
1106   - Examples:
1107   - Jan  1 10:02:11 xx ns5gt: NetScreen device_id=ns5gt  [No Name]system-notification-00257(traffic): start_time="2006-01-01 10:09:38" duration=0 policy_id=310101 service=tcp/port:1526 proto=6 src zone=Null dst zone=self action=Deny sent=0 rcvd=38 src=10.1.2.3 dst=10.1.1.1 src_port=51350 dst_port=1426
1108   - <13>Mar 16 15:27:56 192.168.2.1 ns5gt: NetScreen device_id=ns5gt  [No Name]system-notification-00257(traffic): start_time=\"2004-03-16 16:31:22\" duration=0 policy_id=310001 service=tcp/port:120 proto=6 src zone=Null dst zone=self action=Deny sent=0 rcvd=60 src=10.1.1.1 dst=10.1.2.1 src_port=32047 dst_port=22
1109   - Jun  2 11:24:16 fire00 sav00: NetScreen device_id=sav00  [Root]system-critical-00436: Large ICMP packet! From 210.232.20.7 to 148.100.114.126, proto 1 (zone Untrust, int ethernet1/2). Occurred 1 times. (2006-06-02 11:24:16)
1110   -  NetScreen device_id=ns5gt [Root]system-critical-00027: Multiple login failures occurred for user netscreen from IP address 1.2.3.4:1567 (2004-10-07)
1111   - 
1112   - ** Program name for netscreen is empty, since it is the hostname.
1113   -->
1114 <decoder name="netscreenfw">
1115   <program_name />
1116   <prematch>^NetScreen device_id</prematch>
1117 </decoder>  
1118
1119 <decoder name="netscreenfw-traffic">
1120   <parent>netscreenfw</parent>
1121   <type>firewall</type>
1122   
1123   <prematch offset="after_parent">system-notification-00257</prematch>
1124   <prematch>\(traffic\): </prematch>
1125   
1126   <regex offset="after_prematch"> proto=(\w+) \.+action=(\w+) </regex>
1127   <regex>\.+src=(\S+) dst=(\S+) src_port=(\d+) dst_port=(\d+)</regex>
1128   <order>protocol, action, srcip, dstip, srcport, dstport</order>
1129 </decoder>
1130
1131 <decoder name="netscreenfw-critical">
1132   <parent>netscreenfw</parent>
1133   <prematch offset="after_parent">system-critical-\.+ from |</prematch>
1134   <prematch>system-alert-\.+ from </prematch>
1135   
1136   <regex offset="after_parent">system-(\w+)-(\d+): \.+ </regex>
1137   <regex>from\.+(\d+.\d+.\d+.\d+)</regex>
1138   <order>action, id, srcip</order>
1139 </decoder>
1140
1141 <decoder name="netscreenfw-admin">
1142   <parent>netscreenfw</parent>
1143   <regex offset="after_parent">system-(\w+)-(\d+):</regex>
1144   <order>action, id</order>  
1145 </decoder>
1146
1147
1148 <!-- Pix decoder.
1149   - Will extract the srcip, srcport, dstip and dstport whenever possible.
1150   - Examples:
1151   - %PIX-6-106015: Deny TCP (no connection) from 161.58.238.151/110 to a.b.c.d/3782 flags RST ACK
1152   - %PIX-2-106001: Inbound TCP connection denied from 165.139.46.7/3854 to 165.189.27.70/139 flags
1153   - %PIX-3-106010: Deny inbound tcp src outside:213.98.79.233/2620 dst dmz:213.98.254.145/135
1154   - %PIX-3-106011: Deny inbound (No xlate) udp src outside:192.168.2.1/137
1155   dst outside:192.168.2.14/137
1156   - %PIX-3-106011: Deny inbound (No xlate) tcp src inside:10.100.7.43/80 dst 
1157   inside:10.100.4.71/2285
1158   - %PIX-3-710003: TCP access denied by ACL from 216.39.220.130/54065 to outside:62.192.113.98/ssh
1159   - %PIX-7-710001: TCP access requested from X.X.X.X/1292 to outside:Y.Y.Y.Y/ssh
1160   - %PIX-7-710002: UDP access permitted from 33.33.33.4/943 to inside:33.33.33.15/snmp
1161   - %PIX-7-710005: UDP request discarded from <public IP of 525>/4500 to outside:192.168.69.137/4500
1162   - %PIX-2-106002   protocol Connection denied by outbound list acl_ID src inside_address dest outside_address
1163   - %PIX-2-106002: udp connection denied by outbound list 30 src 216.53.120.62 138 dest 169.132.10.82 138
1164   -  %PIX-4-106023: Deny tcp src inside:111.11.11.1/2143 dst YYY:172.11.1.11/139 by access-group "inside_inbound"
1165   - %PIX-4-400013 IDS:2003 ICMP redirect from 10.4.1.2 to 10.2.1.1 on interface dmz
1166   - %PIX-2-106006: Deny inbound UDP from ***/20031 to ***/20031 on  
1167   interface vpn
1168   - %PIX-7-710002: TCP access permitted from 10.0.0.1/60749 to db:10.0.0.2/ssh
1169   - %PIX-6-305012: Teardown dynamic UDP translation from inside:1.1.1.1/12 to outside:1.2.1.2/11 duration 0:00:11.
1170   - %PIX-3-305005: No translation group found for icmp src outside:x.x.x.x dst inside:x.x.x.x (type 3, code 0)
1171   - %ASA-2-106001: Inbound TCP connection denied from 1.2.3.4/1234 to 213.207.99.248/445 flags SYN on interface outside (Message repeated 2 times)
1172   - %PIX-6-605005: Login permitted from 192.168.1.2/2953 to inside:192.168.1.1/telnet for user ""
1173   - %PIX-6-605004: Login denied from 192.168.2.10/32597 to outside:192.168.2.14/ssh for user "root"
1174   - %PIX-6-305011: Built dynamic UDP translation from inside:192.168.1.2/1026 to outside:192.168.2.14/1163
1175   - %PIX-6-305011: Built dynamic TCP translation from inside:192.168.1.3/54946 to outside:192.168.2.14/1033
1176   - %PIX-6-302015: Built outbound UDP connection 156 for outside:192.168.2.10/1514 (192.168.2.10/1514) to inside:192.168.1.2/1026 (192.168.2.14/1163)
1177   -->
1178 <decoder name="pix">
1179   <prematch>^%PIX-|^\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %PIX-|</prematch>
1180   <prematch>^%ASA-|^\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %ASA-|</prematch>
1181   <prematch>^%FWSM-|^\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %FWSM-</prematch>
1182 </decoder>
1183
1184 <decoder name="pix-fw1">
1185   <parent>pix</parent>
1186   <type>firewall</type>
1187   <prematch offset="after_parent">^2-106001</prematch>
1188   <regex offset="after_parent">^(\S+): \w+ (\w+) \S+ (\S+) from </regex>
1189   <regex>(\S+)/(\S+) to (\S+)/(\S+)</regex>
1190   <order>id, protocol, action, srcip, srcport, dstip, dstport</order>
1191 </decoder>
1192
1193 <decoder name="pix-fw2">
1194   <parent>pix</parent>
1195   <type>firewall</type>
1196   <prematch offset="after_parent">^3-710003|^7-710002|^7-710005</prematch>
1197   <regex offset="after_parent">^(\S+): (\S+) \w+ (\w+)\.+from </regex>
1198   <regex>(\S+)/(\S+) to \w+:(\S+)/(\S+)</regex>
1199   <order>id, protocol, action, srcip, srcport, dstip, dstport</order>
1200 </decoder>
1201
1202 <decoder name="pix-fw3">
1203   <parent>pix</parent>
1204   <type>firewall</type>
1205   <prematch offset="after_parent">^4-106023</prematch>
1206   <regex offset="after_parent">^(\S+): (\w+) (\w+) src \w+:</regex>
1207   <regex>(\S+)/(\S+) dst \w+:(\S+)/(\S+)</regex>
1208   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1209 </decoder>
1210
1211 <decoder name="pix-fw4">
1212   <parent>pix</parent>
1213   <type>firewall</type>
1214   <prematch offset="after_parent">^4-106019</prematch>
1215   <regex offset="after_parent">^(\S+): IP packet from (\S+) to </regex>
1216   <regex>(\S+), protocol (\w+) (\w+) </regex>
1217   <order>id, srcip, dstip, protocol, action</order>
1218 </decoder>
1219
1220 <decoder name="pix-fw5">
1221   <parent>pix</parent>
1222   <type>firewall</type>
1223   <prematch offset="after_parent">^2-106006|^2-106007</prematch>
1224   <regex offset="after_parent">^(\S+): (\w+) \S+ (\w+) from </regex>
1225   <regex>(\d+.\d+.\d+.\d+)/(\d+) to (\d+.\d+.\d+.\d+)/(\d+) </regex>
1226   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1227 </decoder>
1228
1229 <decoder name="pix-fw6">
1230   <parent>pix</parent>
1231   <type>firewall</type>
1232   <prematch offset="after_parent">^6-106015</prematch>
1233   <regex offset="after_parent">^(\S+): (\w+) (\w+) \S+ \S+ (\S+) from </regex>
1234   <regex>(\S+)/(\S+) to (\S+)/(\S+)</regex>
1235   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1236 </decoder>
1237
1238 <decoder name="pix-fw7">
1239   <parent>pix</parent>
1240   <type>firewall</type>
1241   <prematch offset="after_parent">^6-305012</prematch>
1242   <regex offset="after_parent">^(\S+): (\w+) \w+ (\w+) translation </regex>
1243   <regex>from \w+:(\S+)/(\d+) to \w+:(\S+)/(\d+) </regex>
1244   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1245 </decoder>
1246
1247 <decoder name="pix-fw8">
1248   <parent>pix</parent>
1249   <type>firewall</type>
1250   <prematch offset="after_parent">^3-106011|^3-106010</prematch>
1251   <regex offset="after_parent">^(\S+): (\w+) \.+ (\w+) src </regex>
1252   <regex>\w+:(\S+)/(\d+) dst \w+:(\S+)/(\d+)</regex>
1253   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1254 </decoder>
1255
1256 <decoder name="pix-url-success">
1257   <parent>pix</parent>
1258   <prematch offset="after_parent">^5-304001: </prematch>
1259   <regex offset="after_parent">^(\S+): (\d+.\d+.\d+.\d+) Accessed URL </regex>
1260   <regex>(\d+.\d+.\d+.\d+):(http\w*://\.+)|</regex>
1261   <regex>^(\S+): (\d+.\d+.\d+.\d+) Accessed URL (\d+.\d+.\d+.\d+):</regex>
1262   <order>id, srcip, dstip, url</order>
1263 </decoder>
1264
1265 <decoder name="pix-url-deny">
1266   <parent>pix</parent>
1267   <prematch offset="after_parent">^5-304002: </prematch>
1268   <regex offset="after_parent">^(\S+): Access (denied) URL (http\w*://\.+) </regex>
1269   <regex>SRC (\d+.\d+.\d+.\d+) DEST (\d+.\d+.\d+.\d+) on interface</regex>  
1270   <order>id, action, url, srcip, dstip</order>
1271 </decoder>
1272
1273 <decoder name="pix-attacks">
1274   <parent>pix</parent>
1275   <prematch offset="after_parent">^2-106012: |^2-106017: |</prematch>
1276   <prematch>^2-106020|^1-106021|^1-106022|</prematch>
1277   <prematch>^4-4000</prematch>
1278   <regex offset="after_parent">^(\S+): \.+ from (\d+.\d+.\d+.\d+) </regex>
1279   <order>id, srcip</order>
1280 </decoder>
1281
1282 <decoder name="pix-srcip">
1283   <parent>pix</parent>
1284   <prematch offset="after_parent">^6-605004|^6-308001|^6-605005</prematch>
1285   <regex offset="after_parent">^(\S+): \.+ (\d+.\d+.\d+.\d+)</regex>
1286   <order>id, srcip</order>
1287 </decoder>
1288
1289 <decoder name="pix-generic">
1290   <parent>pix</parent>
1291   <regex offset="after_parent">^(\S+): </regex>
1292   <order>id</order>
1293 </decoder>
1294
1295
1296
1297 <!-- Cisco VPN Concentrator
1298   - Will exatract srcip and username.
1299   - Examples:
1300   -
1301   - Jan 8 09:10:37 vpn.example.com 11504 01/08/2007 09:10:37.780 SEV=3 AUTH/5 RPT=124 192.168.0.1 Authentication rejected: Reason = Unspecified handle = 805, server = auth.example.com, user = testuser, domain = <not specified>
1302   11504 01/08/2007 09:10:37.780 SEV=3
1303   -->
1304 <decoder name="cisco-vpn-concentrator">
1305   <prematch>^\d+ \d\d/\d\d/\d\d\d\d \S+ SEV=\d </prematch>
1306   <regex offset="after_prematch">^(\S+) RPT=\d+ (\d+.\d+.\d+.\d+) </regex>
1307   <order>id, srcip</order>
1308 </decoder> 
1309
1310
1311
1312 <!-- Snort decoder.
1313   - Will extract the id, srcip and dstip
1314   - Examples:
1315   - snort: [1:469:3] ICMP PING NMAP [Classification: Attempted Information 
1316     Leak] [Priority: 2]: {ICMP} 10.4.12.26 -> 10.4.10.231
1317   - snort: [1:1420:11] SNMP trap tcp [Classification: Attempted Information 
1318     Leak] [Priority: 2]: {TCP} 10.4.12.26:37020 -> 10.4.10.231:162
1319   - [**] [1:1054:7] WEB-MISC weblogic/tomcat .jsp view source attempt [**]
1320     [Classification: Web Application Attack]
1321     [Priority: 1]  10.4.12.26:34041 -> 66.179.53.37:80
1322   - [**] [1:1421:11] SNMP AgentX/tcp request [**]
1323     [Classification: Attempted Information Leak] [Priority: 2]
1324     10.4.3.20:626 -> 10.4.10.161:705              
1325   - [**] [1:1882:10] ATTACK-RESPONSES id check returned userid [**]
1326     [Classification: Potentially Bad Traffic] [Priority: 2]
1327     {UDP} 192.168.20.32 -> 192.168.20.2  
1328   -->
1329
1330 <decoder name="snort">
1331   <program_name>^snort</program_name>
1332 </decoder>
1333
1334 <decoder name="snort">
1335   <type>ids</type>
1336   <prematch>^[**] [\d+:\d+:\d+] </prematch>
1337 </decoder>
1338   
1339 <decoder name="snort2">
1340    <parent>snort</parent>
1341    <type>ids</type>
1342    <prematch>^[**] |^[\d+:\d+:\d+] </prematch>
1343    <regex>^[**] [(\d+:\d+:\d+)] \.+ (\d+.\d+.\d+.\d+)\p*\d* -> </regex>
1344    <regex>(\d+.\d+.\d+.\d+)|^[(\d+:\d+:\d+)] \.+ </regex>
1345    <regex>(\d+.\d+.\d+.\d+)\p*\d* -> (\d+.\d+.\d+.\d+)</regex>
1346    <order>id,srcip,dstip</order>
1347    <fts>name,id,srcip,dstip</fts>
1348 </decoder>
1349
1350
1351
1352 <!-- OpenBSD isakmpd decoders -->
1353
1354 <decoder name="isakmpd">
1355   <program_name>^isakmpd</program_name>
1356 </decoder>
1357
1358 <decoder name="isakmpd-from">
1359   <parent>isakmpd</parent>
1360   <prematch>message from </prematch>
1361   <regex>from (\S+) port (\d+)</regex>
1362   <order>srcip,srcport</order>
1363 </decoder>
1364
1365 <decoder name="isakmpd-peer">
1366   <parent>isakmpd</parent>
1367   <prematch>from peer</prematch>
1368   <regex>from peer (\S+):(\d+)$</regex>
1369   <order>srcip,srcport</order>
1370 </decoder>
1371
1372
1373
1374 <!-- Suhosin decoder.
1375   - Will extract the attack name and srcip.
1376   - Examples:
1377   - suhosin[76366]: ALERT - canary mismatch on efree() - heap overflow detected (attacker '200.139.164.149', file 'xyz')
1378   - suhosin[24239]: ALERT - configured request variable value length limit exceeded - dropped variable 'introtext' (attacker '192.168.1.2', file '/var/www/site/administrator/index2.php')
1379   - suhosin[32150]: ALERT - configured POST variable limit exceeded - dropped variable 'setting[sg_allow_delete_empty_group]' (attacker '32.104.x.y', file '/home/htdocs/admincp/options.php') 
1380   -->
1381 <decoder name="suhosin">
1382   <program_name>^suhosin</program_name>
1383   <type>ids</type>
1384   <regex>^ALERT - (\.+) \(attacker '(\d+.\d+.\d+.\d+)', </regex>
1385   <order>id, srcip</order>
1386   <fts>name, location, id</fts>
1387 </decoder>
1388
1389
1390
1391 <!-- Dragon Decoder
1392   - Will extract srcip, dstip and id
1393   - Examples:
1394   - 2007-02-24 00:07:30|xx-ids|MS:MDTC-DOS|1.2.3.4|5.6.7.8|123|456|I||6|tcp,xx
1395   -
1396   -->
1397 <decoder name="dragon-nids">
1398    <type>ids</type>
1399    <prematch>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\|</prematch>
1400    <regex offset="after_prematch">^\S+\|(\S+)\|</regex>
1401    <regex>(\d+.\d+.\d+.\d+)\|(\d+.\d+.\d+.\d+)\|</regex>
1402    <order>id, srcip, dstip</order>
1403    <fts>name, id, srcip, dstip</fts>
1404 </decoder>
1405                         
1406    
1407    
1408 <!-- Horde decoder
1409   - Will extract: username and srcip.
1410   - Examples:
1411   - [notice] [imp] Login success for raphaelv@xx [100.121.170.41] to {a.b.c:143} [on line 92 of "/home/webmail/horde/imp/redirect.php"]
1412   - [error] [imp] FAILED LOGIN 210.179.154.213 to xxx:143[imap] as mala1
1413   -->
1414 <decoder name="horde_imp">
1415   <prematch>^[\w+] [imp] |^[\w+] [horde] </prematch>
1416 </decoder>  
1417
1418 <decoder name="horde_imp_success">
1419   <parent>horde_imp</parent>
1420   <prematch offset="after_parent">^Login success </prematch>
1421   <regex offset="after_prematch">^for (\S+) [(\d+.\d+.\d+.\d+)] </regex>
1422   <order>user, srcip</order>
1423 </decoder>
1424
1425 <decoder name="horde_imp_failed">
1426   <parent>horde_imp</parent>
1427   <prematch offset="after_parent">^FAILED LOGIN</prematch>
1428   <regex offset="after_prematch">^ (\d+.\d+.\d+.\d+) to \S+ as (\S+) </regex>
1429   <order>srcip, user</order> 
1430 </decoder>
1431
1432
1433
1434 <!-- Wordpress decoder.
1435   -  It needs the WPsyslog2 plugin.
1436   - Examples:
1437   - WPsyslog[14382]: [127.0.0.1 na] Info: User authentication failed. User name: lala
1438   - WPsyslog[14382]: [127.0.0.1 na] Info: User logged in. User name: admin (admin).
1439   -->
1440 <decoder name="wordpress">
1441   <program_name>^WPsyslog</program_name>
1442   <prematch>^[</prematch>
1443   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+) </regex>
1444   <order>srcip</order>
1445 </decoder>
1446
1447
1448
1449 <!-- Roundcube decoder
1450  - Will extract username and src IP from the logs, when available.
1451    Examples:
1452  - Apr 10 22:45:20 hostname roundcube: [10-Apr-2009 22:45:20 -0500] IMAP
1453    Error: Authentication for username failed (LOGIN): "a001 NO Authentication
1454    failed." (POST /roundcube/?_task=&_action=login)
1455  - Apr 10 23:01:23 hostname roundcube: [10-Apr-2009 23:01:23 -0500]:
1456    Successful login for username (id 1) from 127.0.0.1
1457 -->
1458 <decoder name="roundcube">
1459   <program_name>^roundcube</program_name>
1460   <prematch>^[\d\d-\w\w\w-\d\d\d\d \d\d:\d\d:\d\d \S+]</prematch>
1461 </decoder>
1462
1463 <decoder name="roundcube-success">
1464   <parent>roundcube</parent>
1465   <prematch>^: Successful login for </prematch>
1466   <regex offset="after_prematch">^(\S+) \(id \d+\) from (\d+.\d+.\d+.\d+)$</regex>
1467   <order>user, srcip</order>
1468 </decoder>
1469
1470 <decoder name="roundcube-denied">
1471   <parent>roundcube</parent>
1472   <prematch>^ \w+ Error: Authentication </prematch>
1473   <regex offset="after_prematch">^for (\.+) failed</regex>
1474   <order>user</order>
1475 </decoder>
1476
1477
1478
1479 <!-- Apache decoder.
1480   - Will extract the srcip
1481   - Examples:
1482   - [error] [client 80.230.208.105] Directory index forbidden by rule: /home/
1483   - [error] [client 64.94.163.159] Client sent malformed Host header
1484   - [error] [client 66.31.142.16] File does not exist: /var/www/html/default.ida
1485   - [notice] Apache configured  
1486   - httpd[18660]: [error] [client 12.34.56.78] File does not exist: /usr/local/htdocs/cache
1487   - httpd[23745]: [error] [client 12.34.56.78] PHP Notice:
1488   -->
1489 <decoder name="apache-errorlog">
1490   <program_name>^httpd</program_name>
1491 </decoder>  
1492
1493 <decoder name="apache-errorlog">
1494   <prematch>^[warn] |^[notice] |^[error] </prematch>
1495 </decoder>  
1496
1497 <decoder name="apache-errorlog-ip">
1498   <parent>apache-errorlog</parent>
1499   
1500   <prematch offset="after_parent">^[client</prematch>
1501   <regex offset="after_prematch">^ (\d+.\d+.\d+.\d+)] </regex>
1502   <order>srcip</order>
1503 </decoder> 
1504
1505
1506
1507
1508 <!-- Nginx error log decoder.
1509   - Will extract the srcip.
1510   - Examples:
1511   - 2009/09/15 20:55:40 [error] 63858#0: *3663 open() "/srv/www/ossec.net/robots.txt" failed (2: No such file or directory), client: 1.2.3.4, server: ossec.net, request: "GET /robots.txt HTTP/1.1", host: "www.ossec.net"
1512   - 2009/09/15 19:51:07 [error] 37992#0: accept() failed (53: Software caused connection abort)
1513   -->
1514 <decoder name="nginx-errorlog">
1515   <prematch>^20\d\d/\d\d/\d\d \d\d:\d\d:\d\d [</prematch>
1516 </decoder>
1517
1518 <decoder name="nginx-errorlog-ip">
1519   <parent>nginx-errorlog</parent>
1520   <prematch offset="after_parent">, client: \S+, server: \S+, request: "\S+ </prematch>
1521   <regex offset="after_parent">, client: (\d+.\d+.\d+.\d+), </regex> 
1522   <order>srcip</order>
1523 </decoder>
1524
1525
1526
1527
1528 <!-- NCSA common log decoder (used by apache, Lotus Domino and IIS NCSA).
1529   -  Will extract the srcip, url and id.
1530   -  Every web access log must use "web-log" as their
1531   -  type if they want to be matched against the web rules.
1532   - Examples:
1533   -  63.91.167.39 - - [03/Aug/2001:21:56:18 -0700] "GET /default.ida?NNNN
1534   -  206.78.62.16 - - [06/Aug/2001:08:57:08 -0700] "GET /default.ida?XX
1535   -  5.211.112.6 - - [04/Feb/2003:16:17:30 -0500] "GET /mod_ssl:error: 
1536   -  192.168.2.190 - - [18/Jan/2006:13:10:06 -0500] "GET /xxx.html HTTP/1.1"
1537      200 1732
1538   -  1.1.1.1 - username [18/Jan/2006:13:10:06 -0500] "GET /xxx.html HTTP/1.1"   
1539   -  123.4.5.6 aa.xx.com - [05/Nov/2006:00:46:56 -0500] "GET / HTTP/1.1" 302 -
1540   - ::ffff:202.194.15.192 190.7.138.180 - [18/Oct/2010:10:48:55 -0500] "GET //php-my-admin/config/config.inc.php?p=phpinfo(); HTTP/1.1" 404 345 "-"  "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"
1541   -->
1542 <decoder name="web-accesslog">
1543   <type>web-log</type>
1544   <prematch>^\d+.\d+.\d+.\d+ |^::ffff:\d+.\d+.\d+.\d+ </prematch>
1545   <regex>^(\d+.\d+.\d+.\d+) \S+ \S+ [\S+ \S\d+] </regex>
1546   <regex>"\w+ (\S+) HTTP\S+ (\d+) </regex>
1547   <order>srcip, url, id</order>
1548 </decoder>
1549
1550
1551 <!-- Windows date format.
1552   -  Pre match for windows date format. Used on Windows firewall,
1553   -  IIS, etc.
1554   -  Examples:
1555   -  2006-07-23 04:40:02 xxx
1556   -->
1557 <decoder name="windows-date-format">
1558   <prematch>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d </prematch>
1559 </decoder>
1560  
1561
1562
1563 <!-- Windows firewall decoder.
1564   - Will extract action, protocol, srcip, dstip, srcport and dstport.
1565   - Examples:
1566   - 2006-09-18 22:25:30 OPEN TCP 11.12.72.10 12.252.71.6 3311 445 - - - - - - - - -
1567   - 2006-09-18 22:26:23 DROP UDP 11.152.183.14 239.255.255.250 65299 1900 310 - - - - - - - RECEIVE
1568   - 2006-09-18 22:26:23 DROP UDP 11.152.183.14 239.255.255.250 65299 1900 310 - - - - - - - RECEIVE
1569   - 2006-09-18 22:26:23 DROP UDP 11.152.183.14 239.255.255.250 65298 1900 319 - - - - - - - RECEIVE
1570   -->
1571 <decoder name="windows-firewall">
1572   <parent>windows-date-format</parent>
1573   <type>firewall</type>
1574   <use_own_name>true</use_own_name>
1575   <prematch offset="after_parent">^OPEN|^CLOSE|^DROP</prematch>
1576   <regex offset="after_parent">^(\w+) (\w+) </regex>
1577   <regex>(\S+) (\S+) (\d+) (\d+) </regex>
1578   <order>action, protocol, srcip, dstip, srcport, dstport</order>
1579 </decoder>
1580  
1581  
1582 <!-- IIS 5 WWW W3C log format.
1583   - #Fields: date time c-ip cs-username s-sitename s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status cs-host cs(User-Agent) cs(Referer)
1584   - Examples:
1585   - 2006-07-23 04:40:02 1.2.3.4 - W3SVC3 CIN1WEB03 1.2.3.4 443 GET /Default.asp - 200 hiden.com Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+Avant+Browser;+Avant+Browser;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727) -
1586   -->
1587 <decoder name="web-accesslog-iis5">
1588   <parent>windows-date-format</parent>
1589   <type>web-log</type>
1590   <use_own_name>true</use_own_name>
1591   <prematch offset="after_parent">^\d+.\d+.\d+.\d+ \S+ W3SVC</prematch>
1592   <regex offset="after_parent">^(\d+.\d+.\d+.\d+) \S+ \S+ \S+ \S+ </regex>
1593   <regex>\d+ \S+ (\S+ \S+) (\d+) </regex>
1594   <order>srcip,url,id</order>
1595 </decoder>
1596
1597
1598 <!-- IIS6 WWW W3C log format.
1599   - #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem
1600   cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent)
1601   cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status
1602   sc-bytes cs-bytes time-taken
1603   - Examples:
1604   - 2007-01-22 05:00:11 W3SVC1 HOSTNAME 1.1.1.1 POST /SimpleAuthWebService/SimpleAuth.asmx - 80 - 2.2.2.2 HTTP/1.1 Windows-Update-Agent - - hostname 200 0 0 1467 841 31
1605   -->
1606 <decoder name="web-accesslog-iis6">
1607   <parent>windows-date-format</parent>
1608   <type>web-log</type>
1609   <use_own_name>true</use_own_name>
1610   <prematch offset="after_parent">^W3SVC\d+ \S+ \S+ \S+ </prematch>
1611   <regex offset="after_prematch">^(\S+ \S+) \d+ \S+ (\d+.\d+.\d+.\d+) </regex>
1612   <regex>\S+ \S+ \S+ \S+ \S+ (\d+) </regex>
1613   <order>url, srcip, id</order>
1614 </decoder>
1615
1616
1617 <!-- IIS 5 W3C FTP log format.
1618   - Examples:
1619   - #Fields: date time c-ip cs-username s-sitename s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status sc-win32-status sc-bytes cs-bytes time-taken cs-version cs-host cs(User-Agent) cs(Cookie) cs(Referer)
1620   - 2006-07-23 17:57:59 192.168.3.64 Administrator MSFTPSVC1 HAIJO2 192.168.1.12 21 [144]USER Administrator - 331 0 0 0 0 FTP - - - -
1621   - 2006-07-23 17:57:59 192.168.3.64 Administrator MSFTPSVC1 HAIJO2 192.168.1.12 21 [144]PASS - - 230 0 0 0 16 FTP - - - -
1622   -->
1623 <decoder name="msftp">
1624   <parent>windows-date-format</parent>
1625   <use_own_name>true</use_own_name>
1626   <prematch offset="after_parent">^\d+.\d+.\d+.\d+ \S+ MSFTPSVC</prematch>
1627   <regex offset="after_parent">^(\d+.\d+.\d+.\d+) (\S+) \S+ \S+ \S+ </regex>
1628   <regex>\d+ [\d+](\S+) \S+ \S+ (\d+) </regex>
1629   <order>srcip,user,action,id</order>
1630 </decoder>  
1631
1632
1633
1634 <!-- IIS 5 W3C SMTP log format (Exchange).
1635   - Examples:
1636   - #Fields: date time c-ip cs-username s-sitename s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status sc-win32-status sc-bytes cs-bytes time-taken cs-version cs-host cs(User-Agent) cs(Cookie) cs(Referer)
1637   - 2006-10-09 14:04:46 69.217.186.117 - SMTPSVC1 MEE-PDC 192.168.X.X 0 xxxx -
1638   > +hupylaw.hupy.local 500 0 32 23 0 SMTP - - - -
1639   -->
1640 <decoder name="msexchange">
1641   <parent>windows-date-format</parent>
1642   <use_own_name>true</use_own_name>
1643   <prematch offset="after_parent">^\d+.\d+.\d+.\d+ \S+ SMTPSVC</prematch>
1644   <regex offset="after_parent">^(\d+.\d+.\d+.\d+) \S+ \S+ \S+ \S+ </regex>
1645   <regex>\d+ (\S+) \S+ \S+ (\d+) </regex>
1646   <order>srcip, action, id</order>
1647 </decoder>
1648
1649
1650
1651 <!-- Racoon VPN.
1652   - Extract id (error or info) and ip address whenever possible.
1653   - 2006-08-08 01:42:09: ERROR: couldn't find the pskey for 222.155.15.88.
1654   - 
1655   -->
1656 <decoder name="racoon">
1657   <prematch>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d: </prematch>
1658 </decoder>
1659
1660 <decoder name="racoon-failed">
1661   <parent>racoon</parent>
1662   <use_own_name>true</use_own_name>
1663     
1664   <prematch offset="after_parent">^ERROR: couldn't find the pskey </prematch>
1665   <regex offset="after_prematch">^for (\d+.\d+.\d+.\d+)</regex>
1666   <order>srcip</order>
1667 </decoder>
1668
1669 <decoder name="racoon-action">
1670   <parent>racoon</parent>
1671   <regex offset="after_parent">^(\w+): </regex>
1672   <order>action</order>
1673 </decoder>
1674
1675             
1676
1677 <!-- Squid access log decoder.
1678   - Will extract the srcip.
1679   - Author: Ahmet Ozturk
1680   - Examples:
1681   - 1140701044.525   1231 192.168.1.201 TCP_DENIED/400 1536
1682     GET ahmet - NONE/- text/html
1683   - 1140701230.827    781 192.168.1.210 TCP_DENIED/407 1785
1684     GET http://www.ossec.net oahmet NONE/- text/html
1685   -->
1686 <decoder name="squid-accesslog">
1687   <type>squid</type>
1688   <prematch>^\d+ \d+.\d+.\d+.\d+ </prematch>
1689   <regex>^\d+ (\d+.\d+.\d+.\d+) (\w+)/(\d+) \d+ \w+ (\S+) </regex>
1690   <order>srcip,action,id,url</order>
1691 </decoder>  
1692
1693
1694 <!-- Windows decoder
1695   - Will extract extra_data (as win source),action (as win category), id,
1696   - username and computer name (as system_name).
1697   - Examples:
1698   - WinEvtLog: Application: INFORMATION(0x00000064): ESENT: 
1699     (no user)(no domain): 
1700   - WinEvtLog: Security: AUDIT_FAILURE(0x000002A9): Security: 
1701     SYSTEM: NT AUTHORITY: The logon to account: xyz    by: 
1702     MICROSOFT_AUTHENTICATION_PACKAGE_V1_0    from workstation: la    failed. 
1703     The error code was: 3221225572
1704   - WinEvtLog: Security: AUDIT_FAILURE(0x00000211): Security: 
1705     SYSTEM: NT AUTHORITY: Logon Failure:      Reason:     Unknown user 
1706     name or bad password       User Name:  ab      Domain:     cd      
1707     Logon Type: 2       Logon Process:  User32          Authentication 
1708     Package: Negotiate       Workstation Name:   ad
1709   - WinEvtLog: Security: AUDIT_SUCCESS(538): Security: lac: OSSEC-HM: OSSEC-HM: User Logoff:        User Name:      lac     Domain:         OSSEC-HM        Logon ID:               (0x0,0x7C966E)          Logon Type:     2  
1710   -->
1711 <decoder name="windows">
1712   <type>windows</type>
1713   <prematch>^WinEvtLog: </prematch>
1714   <regex offset="after_prematch">^\.+: (\w+)\((\d+)\): (\.+): </regex>
1715   <regex>(\.+): \.+: (\S+): </regex>
1716   <order>status, id, extra_data, user, system_name</order>
1717   <fts>name, location, user, system_name</fts>
1718 </decoder>    
1719
1720
1721 <!-- Windows decoder -NTsyslog format
1722   - Will extract extra_data (as win source),action (as win category), id,
1723   - username and computer name (as url).
1724   - Examples:
1725   - security[failure] 577 IBM17M\Jeremy Lee  Privileged Service Called:  Server:Security  Service:-  Primary User Name:IBM17M$  Primary Domain:LEETHERNET  Primary Logon ID:(0x0,0x3E7)  Client User Name:Jeremy Lee  Client Domain:IBM17M  Client Logon ID:(0x0,0x1447F)  Privileges:SeSecurityPrivilege
1726   - security[success] 528 IBM17M\Jeremy Lee  Successful Logon:  User Name:Jeremy Lee  Domain:IBM17M  Logon ID:(0x0,0x3A2E471)  Logon Type:2  Logon Process:User32    Authentication Package:Negotiate  Workstation Name:IBM17M  Logon GUID: {00000000-0000-0000-0000-000000000000}
1727   -->
1728 <decoder name="windows-ntsyslog">
1729   <type>windows</type>
1730   <prematch>^security[\w+] \d+ </prematch>
1731   <regex>^(\w+)[(\w+)] (\d+) </regex>
1732   <order>extra_data, status, id</order>
1733 </decoder>
1734
1735
1736 <!-- Windows decoder - Snare format. 
1737   - Will extract extra_data (as win source), action (as category), id,
1738   - username and computer name (as system_name).
1739   -
1740   - These logs must be tab-separated (as specified in the Snare format)
1741   -
1742   - Examples:
1743   - Aug 11 11:11:11 xx.org MSWinEventLog  1       System 59221    Thu Aug 11 01:11:11 2006        17      Windows Update Agent    Unknown User
1744   - Jan 16 05:52:15 hostname.xx.org MSWinEventLog 1
1745   Security        13049   Tue Jan 16 05:52:15 2007        680     Security
1746   SYSTEM  User    Success Audit   ACTUATE Account Logon
1747   Account Used for Logon by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
1748   Account Name:     IUSR_HOSTNAME    Workstation:      ACTUATE
1749   12653
1750   - Jan 16 13:02:24 hostname.yy.org MSWinEventLog 1
1751   Application     14539   Tue Jan 16 13:02:24 2007        1704    SceCli
1752   Unknown User    N/A     Information     ACTUATE None      Security
1753   policy in the Group policy objects are applied successfully.    67
1754   - Jan 16 15:41:37 hostname.zz.org MSWinEventLog 1       System
1755   15059   Tue Jan 16 15:41:37 2007        10      Print   username User
1756   Information     HOSTNAME None            Document 76,
1757   /directory/directory/directory/directory/directory/date/Afilename owned
1758   by username was printed on hostname_duplex via port hostname_duplex.
1759   Size in bytes: 19543296; pages printed: 162        361
1760   -->
1761 <decoder name="windows-snare">
1762   <type>windows</type>
1763   <prematch>^MSWinEventLog\t\d\t\.+\t\d+\t\w\w\S+ \w\w\w \d\d \d\d</prematch>
1764   <regex offset="after_prematch">^:\d\d:\d\d \d\d\d\d\t(\d+)\t(\.+)</regex>
1765   <regex>\t(\.+)\t\.+\t(\.+)\t(\.+)\t</regex>
1766   <order>id, extra_data, user, status, system_name</order>
1767   <fts>name, id, location, user, system_name</fts>
1768 </decoder>
1769
1770
1771 <!-- Symantec AV decoder.
1772   - Source: http://www.ossec.net/wiki/index.php/Symantec_Antivirus
1773   - Examples:
1774   - 24090D00000A,4,3,7,ACMELABS-SRV2,SYSTEM,,,,,,,16777216,"Update to computer ACMELABS-LU2K3 of virus definition file 81011r succeeded.",0,,0,,,,,0,,,,,,,,,,,,,(IP)-192.168.49.66,ACMELABSav,ACMELABS,,8.1.825
1775   - 24090D00000F,4,3,7,ACMELABS-SRV2,SYSTEM,,,,,,,16777216,"Update to computer ACMELABS-APPS-BOX4 of virus definition file 81011r succeeded.",0,,0,,,,,0,,,,,,,,,,,,,(IP)-192.168.49.66,ACMELABSav,ACMELABS,,8.1.825
1776   - 240801012128,5,1,720997,RBLWAP,SYSTEM,Trojan.Zlob,C:\WINDOWS\system32\ld100.tmp,5,4,4,256,570441764,"",0,,0,,0,4254,0,0,0,0,0,0,20060830.022,58100,2,4,0,acme-AVSRV,{579642AA-5A5E-46E1-8613-2289349D1F27},,(IP)-192.168.100.237,acmeav,acme,,8.1.825
1777   -->
1778 <decoder name="symantec-av">
1779   <prematch>^\w\w\w\w\w\w\w\w\w\w\w\w,</prematch>
1780   <regex offset="after_prematch">^(\d+),\d+,\d+,(\S+),(\.+),</regex>
1781   <order>id, system_name, extra_data</order>
1782   <fts>name, location, id, system_name, extra_data</fts>
1783 </decoder>
1784
1785
1786 <!-- Symantec Web Security.
1787   - Source: http://www.ossec.net/wiki/index.php/Symantec_Websecurity
1788   - Examples:
1789   - 20070717,30517,1=3,41=SWS-3.0.1.86/vendor-config,100=Version 3.0.6,3=7,2=29
1790   - 20070717,73556,1=5,100=Logoff due to timeout.,11=1.2.3.4,10=usera,3=1,2=2
1791     20070717,73559,1=5,11=2.3.4.5,10=userb,3=2,2=1
1792   -->
1793 <decoder name="symantec-websecurity">
1794   <prematch>^\d\d\d\d\d\d\d\d,\d\d\d+,</prematch>
1795   <plugin_decoder>SymantecWS_Decoder</plugin_decoder>
1796 </decoder>
1797
1798
1799
1800 <!-- Trend Micro OSCE (Office Scan) decoder.
1801   - 20090716<;>948<;>TROJ_Generic.DIT<;>25<;>3<;>0<;>C:\Documents and Settings\Administrator\Desktop\HyperSnap 6.02.01_EN\HprSnap6Man.chm<;>
1802   - 20090716<;>950<;>WORM_DOWNAD.A<;>1<;>3<;>0<;>C:\Documents and Settings\DCS_VM-ICRC-WFBS6\Local Settings\Temporary Internet Files\Content.IE5\9JK3DN67\sitb[1].jpg<;>
1803   - 20090716<;>951<;>WORM_DOWNAD.A<;>1<;>3<;>0<;>C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files\Content.IE5\9JK3DN67\sitb[1].jpg<;>
1804   - Date<;>Time<;>Virus name<;>Scan result<;>Scan type<;>Seen<;>Filename<;>
1805   - We are only extracting the scan result right now.
1806   -->
1807 <decoder name="trend-osce">
1808   <prematch>^20\d\d\d\d\d\d\<;></prematch>
1809   <regex offset="after_prematch">^\d+\<;>\S+\<;>(\d+)\<;</regex>
1810   <order>id</order>
1811 </decoder>
1812
1813
1814
1815 <!-- ossec decoder.
1816   - Deals with ossec internal messages.
1817   -->
1818 <decoder name="ossec">
1819   <prematch>^ossec: </prematch>
1820   <type>ossec</type>
1821 </decoder>  
1822
1823 <decoder name="ossec-agent">
1824   <parent>ossec</parent>
1825   <type>ossec</type>
1826   <prematch offset="after_parent">^Agent started:</prematch>
1827   <regex offset="after_prematch">^ '(\S+)'</regex>
1828   <order>extra_data</order>
1829   <fts>name, location, extra_data</fts>
1830 </decoder>
1831
1832 <decoder name="ossec-alert1">
1833    <parent>ossec</parent>
1834    <prematch>^ossec: Alert Level:</prematch>
1835    <plugin_decoder>OSSECAlert_Decoder</plugin_decoder>
1836 </decoder>
1837
1838 <decoder name="ossec-alert">
1839   <program_name>^ossec$</program_name>
1840   <plugin_decoder>OSSECAlert_Decoder</plugin_decoder>
1841 </decoder>  
1842
1843 <!-- decoder for active responses as logged by an OSSEC agent or server 
1844 - Examples
1845 Sat May  7 03:17:27 CDT 2011 /var/ossec/active-response/bin/host-deny.sh add - 172.16.0.1 1304756247.60385 31151
1846 Sat May  7 03:17:27 CDT 2011 /var/ossec/active-response/bin/firewall-drop.sh add - 172.16.0.1 1304756247.60385 31151
1847 Sat May  7 03:27:57 CDT 2011 /var/ossec/active-response/bin/host-deny.sh delete - 172.16.0.1 1304756247.60385 31151
1848 Sat May  7 03:27:57 CDT 2011 /var/ossec/active-response/bin/firewall-drop.sh delete - 172.16.0.1 1304756247.60385 31151
1849 -->
1850
1851 <decoder name="ar_log"> 
1852         <prematch>^Mon|^Tue|^Wed|^Thu|^Fri|^Sat|^Sun \S+\s+\d+ \d\d:\d\d:\d\d \S+ \d+ /\.+/active-response</prematch>
1853         <regex offset="after_prematch">/bin/(\S+) (\S+) - (\S+) (\d+.\d+) (\d+)</regex> 
1854         <order>action, status, srcip, id, extra_data</order> 
1855 </decoder>
1856
1857 <!-- Zeus decoder.
1858   - Will extract the severity and the srcip/username when available.
1859   - Examples:
1860   - [08/Aug/2006:22:32:12 +0100] WARN:admin:Authentication failure, url=/index.cgi, host=xx.yy.com, user=admin
1861   - [10/Dec/2006:16:59:26 +0000] INFO:Zeus Admin Server running
1862   -->
1863 <decoder name="zeus">
1864   <prematch>^[\d\d/\w\w\w/\d\d\d\d:\d\d:\d\d:\d\d \S+] </prematch>
1865   <regex offset="after_prematch"> host=(\S+), </regex>
1866   <order>srcip</order>
1867 </decoder>
1868
1869
1870
1871 <!-- Vmware ESX logs.
1872   - Will extract the severity and username/ip when availavle.
1873   - Examples:
1874   - [2008-03-09 22:43:35.924 'ha-eventmgr' 84503472 info] Event 2053 : User root@127.0.0.1 logged in
1875   - [2008-02-05 02:13:18.112 'ha-eventmgr' 95833272 info] Event xyz : User m@1.2.3.4 logged in
1876   -  [2008-08-26 11:06:16.359 'ha-eventmgr' 20532144 info] Event 285 : Failed login attempt for root@127.0.0.1
1877   - Aug 25 06:01:10 hostname vmware-hostd[1863]: Accepted password for user root from 127.0.0.1
1878   - Aug  7 11:05:34 localhost vmware-authd[9709]: login from 172.16.129.78 as 523b717c-4542-f5fc-c006-1644eb8f4330
1879   - Aug 26 11:42:29 localhost vmware-hostd[1863]: Rejected password for user blablabla from 127.0.0.1
1880   -->
1881 <decoder name="vmware">
1882   <prematch>^[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d.\d\d\d '\S+' \d+ </prematch>
1883 </decoder>  
1884
1885 <decoder name="vmware-extra">
1886   <parent>vmware</parent>
1887   <regex offset="after_parent">^(\w+)] \S+ \S+ </regex>
1888   <order>status</order>
1889 </decoder>  
1890
1891 <decoder name="vmware-extra">
1892   <parent>vmware</parent>
1893   <regex offset="after_regex">^: User (\w+)@(\d+.\d+.\d+.\d+)</regex>
1894   <regex> logged |^: Failed login \w+ for (\w+)@(\d+.\d+.\d+.\d+)</regex>
1895   <order>user, srcip</order>
1896 </decoder>  
1897
1898 <decoder name="vmware-syslog">
1899   <program_name>vmware</program_name>
1900 </decoder>
1901
1902 <decoder name="vmware-success">
1903   <parent>vmware-syslog</parent>
1904   <prematch>^Accepted|^Rejected</prematch>
1905   <regex offset="after_prematch">^ \S+ for user (\S+) from (\S+)$</regex>
1906   <order>user, srcip</order>
1907 </decoder>
1908           
1909 <decoder name="vmware-login">
1910   <parent>vmware-syslog</parent>
1911   <prematch>^login from </prematch>
1912   <regex offset="after_prematch">^(\S+) as</regex>
1913   <order>srcip</order>
1914 </decoder>
1915
1916
1917
1918 <!-- Solaris BSM
1919   - Examples:
1920   - Nov 21 15:12:56 unknown audit: [ID 905220 audit.notice] system booted
1921     text booting kernel
1922   - Nov 21 15:16:22 unknown audit: [ID 984917 audit.notice] login - telnet
1923     failed session 2740580090 by root as root:root from 1.254.168.192
1924   - failed session 2740580090 by root as root:root from 1.254.168.192
1925   - ok session 347344759 by 500959152 as root:root from 3.11.8.4 obj   
1926   -->
1927 <decoder name="solaris_bsm">
1928   <program_name>^audit$</program_name>
1929 </decoder>
1930
1931 <decoder name="solaris_bsm_session">
1932   <parent>solaris_bsm</parent>
1933   <prematch> \w+ session \d+ by </prematch>
1934   <regex> (\w+) session \d+ by</regex>
1935   <order>status</order>
1936 </decoder>
1937
1938 <decoder name="solaris_bsm_session">
1939   <parent>solaris_bsm</parent>
1940   <regex offset="after_regex">^ \S+ as \S+:\S+ from (\S+)</regex>
1941   <order>srcip</order>
1942 </decoder>
1943
1944
1945
1946 <!-- Asterisk logs
1947   - Examples:
1948   - Dec 16 18:02:04 asterisk1 asterisk[31774]: NOTICE[31787]:
1949   chan_sip.c:11242 in handle_request_register: Registration from
1950   '"503"<sip:503@192.168.1.107>' failed for '192.168.1.137' - Wrong
1951   password
1952   -->
1953 <decoder name="asterisk">
1954   <program_name>^asterisk</program_name>
1955 </decoder>
1956
1957 <decoder name="asterisk-hijacking">
1958   <parent>asterisk</parent>
1959   <prematch>^WARNING[\d+]: \S+ in \S+: Don't know </prematch>
1960   <regex offset="after_prematch">^\S+ how to respond via '(\w+/\d.\d/\w+)'</regex>
1961   <order>user</order>
1962 </decoder>
1963
1964 <decoder name="asterisk-denied">
1965   <parent>asterisk</parent>
1966   <prematch>^NOTICE[\d+]: \S+ in \S+: Registration from </prematch>
1967   <regex offset="after_prematch">^\S+ failed for '(\d+.\d+.\d+.\d+)'</regex>
1968   <order>srcip</order>
1969 </decoder>
1970
1971 <decoder name="asterisk-denied2">
1972   <parent>asterisk</parent>
1973   <prematch>Registration from </prematch>
1974   <regex offset="after_prematch">failed for '(\d+.\d+.\d+.\d+)'</regex>
1975   <order>srcip</order>
1976 </decoder>
1977
1978 <decoder name="asterisk-iax-authentication-denied">
1979   <parent>asterisk</parent>
1980   <prematch>^NOTICE[\d+]: \S+ in \S+: Host </prematch>
1981   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+) failed MD5 authentication for (\S+)</regex>
1982   <order>srcip, user</order>
1983 </decoder>
1984
1985 <!-- Cisco IOS
1986   - Group for Cisco IOS messages.
1987   - We would need to support multiple formats, but currently we require
1988   - no service time stamp and no sequence-numbers.
1989   -
1990   - Aug 17 17:41:26 xyz.com 681: Aug 17 17:41:24.776 AEST: %SEC-6-IPACCESSLOGS: list 30 denied 124.254.75.141 1 packet
1991   - Aug 20 11:33:41 RouterName 696: %SYS-5-CONFIG_I: Configured from
1992   console by admin on vty0 (210.x.x.12)
1993   - 681: Aug 17 17:41:24.776 AEST: %SEC-6-IPACCESSLOGS:
1994   - 1348: .Jun 12 18:22:22 UTC: %SYS-5-CONFIG_I:
1995   - 1348: *Jun 12 18:22:22 UTC: %SYS-5-CONFIG_I:
1996   - 23: May  3 05:15:25.217 UTC: %SEC-6-IPACCESSLOGP:
1997   - Possible regex:
1998   "^%\w+-\d-\w+: |^\S\w\w+ \.\d \d\d:\S+ \w+: %\w+-\d-\w+:"
1999   -->
2000 <decoder name="cisco-ios">
2001   <prematch>^%\w+-\d-\w+: </prematch>
2002 </decoder>
2003
2004 <decoder name="cisco-ios">
2005   <program_name />
2006   <prematch>^%\w+-\d-\w+: </prematch>
2007 </decoder>
2008   
2009   
2010 <!-- Cisco IOS
2011   - Will extract the action, srcip, srcport, dstip and dstport
2012   - Samples:
2013   -
2014   - %SEC-6-IPACCESSLOGP: list 102 denied tcp 10.0.6.56(3067) -> 172.36.4.7(139), 1 packet
2015   - %SEC-6-IPACCESSLOGP: list 199 denied tcp 10.0.61.108(1477) -> 10.0.127.20(445), 1 packet
2016   -->
2017 <decoder name="cisco-ios-acl">
2018   <parent>cisco-ios</parent>
2019   <type>firewall</type>
2020   <prematch>^%SEC-6-IPACCESSLOGP: </prematch>
2021   <regex offset="after_prematch">^list \S+ (\w+) (\w+) </regex>
2022   <regex>(\S+)\((\d+)\) -> (\S+)\((\d+)\),</regex>
2023   <order>action, protocol, srcip, srcport, dstip, dstport</order>
2024 </decoder>
2025
2026
2027 <!-- Cisco IOS IDS/IPS module 
2028   - Will extract the id, srcip, srcport, dstip and dstport
2029   - Sep  1 10:25:29 10.10.10.1 %IPS-4-SIGNATURE: Sig:3051 Subsig:1 Sev:4 TCP Connection Window Size DoS [192.168.100.11:51654 -> 10.10.10.10:4444]
2030   - Sep  1 10:25:29 10.10.10.1 %IPS-4-SIGNATURE: Sig:3051 Subsig:1 Sev:4 TCP Connection Window Size DoS [192.168.100.11:60797 -> 10.10.10.10:80]
2031   - Sep  1 10:25:29 10.10.10.1 %IPS-4-SIGNATURE: Sig:5123 Subsig:2 Sev:5 WWW IIS Internet Printing Overflow [192.168.100.11:60797 -> 10.10.10.10:80]
2032   -->
2033 <decoder name="cisco-ios-ids">
2034   <parent>cisco-ios</parent>
2035   <type>ids</type>
2036   <prematch>^%IPS-4-SIGNATURE: </prematch>
2037   <regex offset="after_prematch">^Sig:(\d+) \.+[(\S+):(\d+) -> </regex>
2038   <regex>(\S+):(\d+)]</regex>
2039   <order>id, srcip, srcport, dstip, dstport</order>
2040   <fts>name, id, srcip, dstip</fts>
2041   <ftscomment>First time Cisco IOS IDS/IPS module rule fired.</ftscomment>
2042 </decoder>
2043
2044
2045 <!-- Cisco IOS
2046   - Extracts the ID of cisco ios messages.
2047   -->
2048 <decoder name="cisco-ios-generic">
2049   <parent>cisco-ios</parent>
2050   <regex>^(%\w+-\d-\w+): </regex>
2051   <order>id</order>
2052 </decoder>
2053
2054
2055
2056 <!-- Checkpoint via syslog decoder.
2057   - Does not currently handle all types of Checkpoint events.
2058   - Checkpoint NG(X)/FW-1 logs via (Linux) syslog
2059   - Ex. fw log -ftnp fw.log | logger -t Checkpoint
2060   -
2061   - fw log :
2062   -         -f select current log file
2063   -         -t tail file
2064   -         -n use ip instead of name
2065   -         -p use port number instead of name
2066   -
2067   -         -l add date before timestamp
2068   -            Use of -l changes log format slightly
2069   -
2070   -         -g without : and ; delimiters
2071   -            use of -g significantly changes log format
2072   -            this decoder is incompatible with -g
2073   -
2074   - logger :
2075   -         -t <tag> prepends "tag: " to log entry
2076   -        the tag here must match "program name" in the decoder
2077   -            
2078   - Examples:
2079   -
2080   - Checkpoint: 21Aug2007 12:00:00 accept 10.10.10.2 >eth0 rule: 100; rule_uid:
2081 {00000000-0000-0000-0000-000000000000}; service_id: nbdatagram; src:
2082 10.10.10.3; dst: 10.10.10.255; proto: udp; product: VPN-1 & FireWall-1;
2083 service: 138; s_port: 138;
2084   -
2085   - Checkpoint: 13:00:00 accept 10.10.10.2 >eth0 rule: 101; rule_uid:
2086 {00000000-0000-0000-0000-000000000000}; service_id: http; src: 10.10.10.3; dst:
2087 10.1.2.3; proto: tcp; product: VPN-1 & FireWall-1; service: 80; s_port: 1111;
2088   -
2089   - Checkpoint: 21Aug2007 14:49:26 drop   10.10.10.1 >eth4 rule: 102; rule_uid:
2090 {00000000-0000-0000-0000-000000000000}; ICMP: Echo Request; src: 10.10.10.2;
2091 dst: 10.10.10.3; proto: icmp; ICMP Type: 8; ICMP Code: 0; product: VPN-1 &
2092 FireWall-1;
2093   -
2094   - Checkpoint:  3Apr2008 15:02:15 monitor 10.10.10.3 >eth2 Attack Info: Line 
2095 in HTTP request too long; attack: Malformed HTTP; src: 10.10.10.4; dst: 
2096 10.10.10.5; proto: tcp; product: SmartDefense; service: 111; s_port: 222;
2097   -->
2098
2099 <!-- \s+\S+ \d\d:\d\d:\d\d (\w+) \d+.\d+.\d+.\d+ \p\S+ rule: -->
2100 <decoder name="checkpoint-syslog">
2101   <program_name>^Checkpoint</program_name>
2102   <prematch>^\s+\S+ \d\d:\d\d:\d\d </prematch>
2103 </decoder>
2104
2105 <decoder name="checkpoint-syslog-fw">
2106   <parent>checkpoint-syslog</parent>
2107   <type>firewall</type>
2108   <prematch offset="after_parent">^drop|^accept|^reject</prematch>
2109   <regex offset="after_parent">^(\w+)\s+\S+ \p\S+ rule:\.+</regex>
2110   <regex>src: (\d+.\d+.\d+.\d+); dst: (\d+.\d+.\d+.\d+); proto: (\S+);</regex>
2111   <order>action,srcip,dstip,protocol</order>
2112 </decoder>  
2113
2114 <decoder name="checkpoint-syslog-fw">
2115   <parent>checkpoint-syslog</parent>
2116   <type>firewall</type>
2117   <regex offset="after_regex">service: (\d+); s_port: (\d+);</regex>
2118   <order>dstport,srcport</order>
2119 </decoder>
2120             
2121 <decoder name="checkpoint-syslog-ids">
2122   <parent>checkpoint-syslog</parent>
2123   <type>ids</type>
2124   <prematch offset="after_parent">^monitor|^drop</prematch>
2125   <regex offset="after_prematch">attack: (\.+); </regex>
2126   <regex>src: (\d+.\d+.\d+.\d+); dst: (\d+.\d+.\d+.\d+); </regex>
2127   <regex>proto: (\S+);</regex>
2128   <order>extra_data, srcip, dstip, protocol</order>
2129   <fts>name, extra_data, srcip, dstip</fts>
2130   <ftscomment>First time Checkpoint rule fired.</ftscomment>
2131 </decoder>
2132
2133
2134
2135 <!-- Microsoft Windows 2003 ipv4, 2008 ipv4/ipv6 DHCP decoder for OSSEC
2136   -  Author: phishphreek@gmail.com
2137   -->
2138   
2139 <!--
2140   -  Server 2008 DHCP IPv4 Decoder (must go first)
2141   -  ID,Date,Time,Description,IP Address,Host Name,MAC Address,User Name, TransactionID, QResult,Probationtime, CorrelationID.
2142   -  24,3/10/2009,0:00:46,Database Cleanup Begin,,,,
2143   -  0,3/10/2009,0:00:46,DNS Update Request,201.10.168.192,OPS03W034.,,
2144 -->
2145
2146 <decoder name="ms-dhcp-ipv4">
2147   <prematch>^\d\d,\d+/\d+/\d\d\d\d,\d+:\d+:\d+,|</prematch>
2148   <prematch>^\d\d,\d+/\d+/\d\d,\d+:\d+:\d+,</prematch>
2149   <regex>^(\d\d),\d+/\d+/\d\d\d*,\d+:\d+:\d+,(\w+),(\d+.\d+.\d+.\d+)</regex>
2150   <order>id,extra_data,srcip</order>
2151 </decoder>
2152
2153 <!--
2154   -  Server 2008 DHCP IPv6 Decoder (must go second)
2155   -  ID,Date,Time,Description,IPV6 Address,Host Name,Error Code, Duid Length, Duid Bytes(Hex),User Name.
2156 -->
2157 <decoder name="ms-dhcp-ipv6">
2158   <prematch>^\d\d\d\d\d,\d\d/\d\d/\d\d,\d\d:\d\d:\d\d,</prematch>
2159   <regex>^(\d\d\d\d\d),</regex>
2160   <order>id</order>
2161 </decoder>
2162
2163
2164 <!-- OpenBSD kernel messages -->
2165 <decoder name="bsd_kernel">
2166   <program_name>^/bsd</program_name>
2167 </decoder>
2168
2169 <decoder name="bsd_arp">
2170   <parent>bsd_kernel</parent>
2171   <prematch offset="after_parent">^arp </prematch>
2172   <regex offset="after_prematch"> for (\S+) by (\S+) on \S+</regex>
2173   <order>dstip, extra_data</order>
2174 </decoder>
2175
2176
2177 <!-- OpenBSD mountd decoder
2178 - Apr 11 20:01:02 ix mountd[11618]: Refused mount RPC from host 192.168.17.10 port 45659
2179 -->
2180
2181 <decoder name="mountd">
2182   <program_name>^mountd</program_name>
2183 </decoder>
2184
2185 <decoder name="mountd-host">
2186   <parent>mountd</parent>
2187   <prematch>from host </prematch>
2188   <regex offset="after_prematch">(\S+) port \d+$</regex>
2189   <order>srcip</order>
2190 </decoder>
2191
2192
2193 <!-- bro-ids decoders
2194   - Aug 25 08:52:10 junction bro: no=PortScanSummary na=NOTICE_ALARM_ALWAYS es=bro sa=192.168.17.8 num=988 msg=192.168.17.8\\\\ scanned\\\\ a\\\\ total\\\\ of\\\\ 988\\\\ ports tag=@ef-24ad-af
2195   - Aug 26 12:34:27 junction bro: no=PortScan na=NOTICE_ALARM_ALWAYS es=bro sa=192.168.17.8 p=17/tcp num=250 msg=192.168.17.8\\ has\\ scanned\\ 250\\ ports\\ of\\ 192.168.17.17 tag=@11-68e9-5
2196   - junction bro: Starting incremental serialization...
2197   - junction bro: Finished incremental serialization.
2198   - ix bro: no=NoticeTally na=NOTICE_ALARM_ALWAYS es=bro num=307 msg=AckAboveHole\\ (307\\ times) tag=@81-2fd-1f9
2199   - ix bro: no=NoticeTally na=NOTICE_ALARM_ALWAYS es=bro num=7 msg=ContentGap\\ (7\\ times) tag=@81-2fd-1fa
2200   - ix bro: no=ResourceSummary na=NOTICE_ALARM_ALWAYS es=bro msg=elapsed\\ time\\ \\=\\ 376.0\\ msecs\\ 174.0\\ usecs,\\ total\\ CPU\\ \\=\\ 390.0\\ msecs,\\ maximum\\ memory\\ \\=\\ 0\\ KB,\\ peak\\ connections\\ \\=\\ 0,\\ peak\\ timers\\ \\=\\ 84,\\ peak\\ fragments\\ \\=\\ 0 tag=@69-1f25-1
2201   - junction bro: no=PortScanSummary na=NOTICE_ALARM_ALWAYS es=bro sa=192.168.17.8 num=988 msg=192.168.17.8\\\\ scanned\\\\ a\\\\ total\\\\ of\\\\ 988\\\\ ports tag=@ef-24ad-af
2202   - junction bro: no=ZoneTransfer na=NOTICE_ALARM_ALWAYS es=bro sa=192.168.1.9 sp=4175/tcp da=192.168.1.17 dp=53/tcp p=53/tcp msg=transfer\\ of\\example.com\\ requested\\ by\\ 192.168.1.9 tag=@61-3a46-d
2203   - ix bro: no=SensitivePortmapperAccess na=NOTICE_ALARM_ALWAYS es=bro sa=192.168.17.8 sp=2957/tcp da=192.168.17.9 dp=111/tcp p=111/tcp msg=rpc:\\ 192.168.17.8/2957\\ >\\ 192.168.17.9/portmap\\ pm_dump:\\ (done) tag=@46-764d-5d
2204   - junction bro: no=PortScan na=NOTICE_ALARM_ALWAYS es=bro sa=192.168.17.8 p=17/tcp num=250 msg=192.168.17.8\\ has\\ scanned\\ 250\\ ports\\ of\\ 192.168.17.17 tag=@11-68e9-5
2205 -->
2206
2207 <decoder name="bro-ids">
2208   <program_name>^bro</program_name>
2209 </decoder>
2210
2211 <decoder name="bro-portscan">
2212   <parent>bro-ids</parent>
2213   <prematch>no=PortscanSummary</prematch>
2214   <regex>sa=(\S+) num=(\d+) msg=</regex>
2215   <order>srcip,extra_data</order>
2216 </decoder>
2217
2218 <decoder name="bro-portscan2">
2219   <parent>bro-ids</parent>
2220   <prematch>no=PortScan </prematch>
2221   <regex>sa=(\S+) p=(\d+)/(\S+) num=(\d+)</regex>
2222   <order>srcip,srcport,protocol,extra_data</order>
2223 </decoder>
2224
2225 <decoder name="bro-typical">
2226   <parent>bro-ids</parent>
2227   <prematch>na=NOTICE</prematch>
2228   <regex>sa=(\S+) sp=(\d+)/(\S+) da=(\S+) dp=(\d+)/\S+</regex>
2229   <order>srcip,srcport,protocol,dstip,dstport</order>
2230 </decoder>
2231
2232
2233
2234 <!-- nss ldap decoders
2235 - Jun 26 08:19:25 servername sh: nss_ldap: reconnecting to LDAP server (sleeping 32 seconds)...
2236 - Aug 16 10:58:12 client nscd: nss_ldap: failed to bind to LDAP server ldap://ldap.example.com: Can't contact LDAP server
2237 -->
2238 <!--
2239 <decoder name="nss-ldap">
2240   <program_name>^sh$|^nscd$</program_name>
2241   <prematch>^nss_ldap</prematch>
2242 </decoder>
2243
2244 <decoder name="ldap-server">
2245   <parent>nss-ldap</parent>
2246   <prematch> server </prematch>
2247   <regex offset="after_prematch">ldap://(\S+):</regex>
2248   <order>system_name</order>
2249 </decoder>
2250 -->
2251
2252
2253
2254 <!-- OpenBSD groupdel
2255   - May 28 09:15:43 ix groupdel[25984]: group deleted: name=_dbus
2256 -->
2257 <decoder name="groupdel">
2258   <program_name>groupdel</program_name>
2259   <regex>^group deleted: name=(\S+)$</regex>
2260   <order>extra_data</order>
2261 </decoder>
2262
2263
2264 <!-- Portsentry -->
2265 <decoder name="portsentry">
2266   <program_name>^portsentry</program_name>
2267 </decoder>
2268
2269 <decoder name="portsentry-attackalert">
2270   <parent>portsentry</parent>
2271   <prematch>attackalert: Connect from host: </prematch>
2272   <regex offset="after_prematch">(\S+)/\S+ to (\S+) port: (\d+)$</regex>
2273   <order>srcip,protocol,dstport</order>
2274 </decoder>
2275
2276 <decoder name="portsentry-blocked">
2277   <parent>portsentry</parent>
2278   <prematch>is already blocked. Ignoring$</prematch>
2279   <regex>Host: (\S+) is</regex>
2280   <order>srcip</order>
2281 </decoder>
2282
2283
2284 <!-- Clamav and Freshclam decoder
2285   -  Nov  5 22:59:19 ix freshclam[32349]: Incremental update failed, trying to download daily.cvd
2286 -->
2287 <decoder name="clamd">
2288   <program_name>^clamd</program_name>
2289 </decoder>
2290
2291 <decoder name="freshclam">
2292   <program_name>^freshclam</program_name>
2293 </decoder>
2294
2295
2296 <!-- OpenLDAP decoder.
2297   - Jan 11 09:26:57 hostname slapd2.4[20872]: conn=999999 fd=64 ACCEPT from IP=10.10.248.27:33957 (IP=10.10.241.77:389)
2298   -->
2299 <decoder name="openldap">
2300    <program_name>^slapd</program_name>
2301    <regex>^conn=(\d+) </regex>
2302    <order>id</order>
2303 </decoder>
2304
2305
2306
2307 <!-- NTP decoder 
2308   - gorilla ntpd[27379]: bad sensor nmea0
2309   - tiny ntpd[25875]: bad peer 192.168.1.233 (192.168.1.233)
2310   - gorilla ntpd[29719]: bind on 192.168.1.233 failed, skipping: Can't assign requested address
2311   - ix ntpd[8392]: bind on 192.168.17.9 failed, skipping: Address already in use
2312   - ix ntpd[11685]: bad peer from pool pool.ntp.org (64.73.32.135)
2313   - richese ntpd[3465]: bad peer ix (192.168.17.9)
2314   - ix ntpd[11685]: bad peer from pool pool.ntp.org (69.50.219.51)
2315   - ix ntpd[7045]: recvmsg 192.168.17.17: Connection refused
2316   - ix ntpd[29411]: 2 out of 3 peers valid
2317   - bridge ntpd[5877]: logconfig: illegal argument  - ignored
2318   - bridge ntpd[5902]: offset 0.000000 sec freq 0.000 ppm error 0.000011 poll 6
2319 -->
2320 <decoder name="ntpd">
2321   <program_name>^ntpd</program_name>
2322 </decoder>
2323
2324 <decoder name="ntpd-bad-peer">
2325   <parent>ntpd</parent>
2326   <prematch offset="after_parent">^bad peer </prematch>
2327   <regex>^bad peer \S+ \p(\S+)\p$|^bad peer from pool \S+ \p(\S+)\p$</regex>
2328   <order>srcip</order>
2329 </decoder>
2330
2331
2332 <!-- Auditd
2333 163
2334 164   - Will extract action, id, status, extra_data, srcip
2335 165   - Author and (c): Michael Starks, 2011
2336 166   - Future enhancements should ensure that all log samples regress properly due to the complexity of these decoders
2337 167   - Examples: 
2338
2339 <!-- CentOS 5.5 -->
2340 type=USER_ACCT msg=audit(1310592861.936:1222): user pid=24675 uid=0 auid=501 ses=188 subj=system_u:system_r:unconfined_t:s0 msg='op=PAM:accounting acct="username" exe="/usr/bin/sudo" (hostname=?, addr=?, terminal=pts/5 res=success)'
2341 type=CRED_ACQ msg=audit(1305666154.831:51859): user pid=21250 uid=0 auid=4294967295 subj=system_u:system_r:unconfined_t:s0-s0:c0.c1023 msg='PAM: setcred acct="username" : exe="/usr/sbin/sshd" (hostname=lala.example.com, addr=172.16.0.1, terminal=ssh res=success)'
2342 type=CRED_ACQ msg=audit(1273182001.226:148635): user pid=29770 uid=0 auid=4294967295 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='PAM: setcred acct="root" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron
2343 type=USER_AUTH msg=audit(1305666163.690:51871): user pid=21269 uid=0 auid=500 subj=user_u:system_r:unconfined_t:s0 msg='PAM: authentication acct="root" : exe="/bin/su" (hostname=?, addr=?, terminal=pts/0 res=success)'
2344 type=USER_ACCT msg=audit(1306939201.750:67934): user pid=4401 uid=0 auid=4294967295 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='PAM: accounting acct="root" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron res=success)'
2345 type=CRED_ACQ msg=audit(1306939201.751:67935): user pid=4401 uid=0 auid=4294967295 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='PAM: setcred acct="root" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron res=success)'
2346 type=USER_START msg=audit(1306939201.756:67937): user pid=4401 uid=0 auid=0 subj=system_u:system_r:crond_t:s0-s0:c0.c1023 msg='PAM: session open acct="root" : exe="/usr/sbin/crond" (hostname=?, addr=?, terminal=cron res=success)'
2347 type=USER_CHAUTHTOK msg=audit(1304523288.952:37394): user pid=7258 uid=0 auid=500 subj=user_u:system_r:unconfined_t:s0 msg='op=change password id=505 exe="/usr/bin/passwd" (hostname=?, addr=?, terminal=pts/1 res=success)'
2348
2349 <!-- Unknown source -->
2350 type=USER_ACCT msg=audit(1310592861.936:1222): user pid=24675 uid=0 auid=501 ses=188 subj=system_u:system_r:unconfined_t:s0 msg='op=PAM:accounting acct="username" exe="/usr/bin/sudo" (hostname=?, addr=?, terminal=pts/5 res=success)'
2351
2352 <!-- Ubuntu 10.04 LTS -->
2353 type=SYSCALL msg=audit(1307045440.943:148): arch=c000003e syscall=59 success=yes exit=0 a0=de1fa8 a1=de23a8 a2=dc3008 a3=7fff1db3cc60 items=2 ppid=11719 pid=12140 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts8 ses=4294967295 comm="wget" exe="/tmp/wget" key="webserver-watch-tmp"
2354 type=SYSCALL msg=audit(1307045820.403:151): arch=c000003e syscall=59 success=no exit=-13 a0=de24c8 a1=de2408 a2=dc3008 a3=7fff1db3cc60 items=1 ppid=11719 pid=12347 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts8 ses=4294967295 comm="bash" exe="/bin/bash" key=(null)
2355 type=SYSCALL msg=audit(1306939143.715:67933): arch=40000003 syscall=94 success=yes exit=0 a0=5 a1=180 a2=8ebd360 a3=8ec4978 items=1 ppid=4383 pid=4388 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=8038 comm="less" exe="/usr/bin/less" subj=user_u:system_r:unconfined_t:s0 key="perm_mod"
2356 type=USER_ROLE_CHANGE msg=audit(1280266360.845:51): user pid=1978 uid=0 auid=500 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='pam: default-context=user_u:system_r:unconfined_t:s0 selected-context=user_u:system_r:unconfined_t:s0: exe="/bin/login" (hostname=?, addr=?, terminal=tty1 res=success)'
2357 type=PATH msg=audit(1306967989.163:119): item=0 name="./ls" inode=261813 dev=fb:00 mode=0100755 ouid=0 ogid=0 rdev=00:00
2358
2359 <!-- Will not decode due to null name, that's OK -->
2360 type=PATH msg=audit(1273924468.947:179534): item=0 name=(null) inode=424783 dev=fd:07 mode=0100640 ouid=0 ogid=502 rdev=00:00 obj=user_u:object_r:file_t:s0
2361
2362 -->
2363
2364 <decoder name="auditd">
2365   <prematch>^type=</prematch>
2366 </decoder>
2367
2368 <!-- SELinux -->
2369   <decoder name="auditd-selinux">
2370     <parent>auditd</parent>
2371     <prematch offset="after_parent">^AVC </prematch>
2372     <regex offset="after_parent">^(AVC) msg=audit\(\d\d\d\d\d\d\d\d\d\d.\d\d\d:(\d+)\): avc:  (\S+)  { \.+ } for  pid=\d+ comm="(\S+)" path="\S+" dev=\S+ ino=\d+ scontext=\S+ tcontext=\S+ tclass=\S+$</regex>
2373     <order>action,id,status,extra_data</order>
2374   </decoder>
2375
2376 <!-- syscall -->
2377   <decoder name="auditd-syscall">
2378     <parent>auditd</parent>
2379     <prematch offset="after_parent">^SYSCALL </prematch>
2380     <regex offset="after_parent">^(SYSCALL) msg=audit\(\d\d\d\d\d\d\d\d\d\d.\d\d\d:(\d+)\): arch=\w+ syscall=\d+ success=(\S+) exit=\S+ a0=\w+ a1=\w+ a2=\w+ a3=\w+ items=\d+ ppid=\d+ pid=\d+ auid=\d+ uid=\d+ gid=\d+ euid=\d+ suid=\d+ fsuid=\d+ egid=\d+ sgid=\d+ fsgid=\d+ tty=\S+ ses=\d+ comm="\S+" exe="(\.+)"</regex>
2381     <order>action,id,status,extra_data</order>
2382   </decoder>
2383
2384 <!-- config -->
2385   <decoder name="auditd-config">
2386     <parent>auditd</parent>
2387     <prematch offset="after_parent">^CONFIG_CHANGE </prematch>
2388     <regex offset="after_parent">^(CONFIG_CHANGE) msg=audit\(\d\d\d\d\d\d\d\d\d\d.\d\d\d:(\d+)\): auid=\d+ ses=\d+ op="\.+" path="(\.+)" key="\S+" list=\d+ res=\d+$</regex>
2389     <order>action,id,extra_data</order>
2390   </decoder>
2391
2392 <!-- path (will only decode if name is not null)-->
2393   <decoder name="auditd-path">
2394     <parent>auditd</parent>
2395     <prematch offset="after_parent">^PATH </prematch>
2396     <regex offset="after_parent">^(PATH) msg=audit\(\d\d\d\d\d\d\d\d\d\d.\d\d\d:(\d+)\): item=\d+ name="(\.+)" inode=\d+ dev=\S+ mode=\d+ ouid=\d+ ogid=\d+ rdev=\S+</regex>
2397     <order>action,id,extra_data</order>
2398   </decoder>
2399
2400 <!-- user-related -->
2401   <decoder name="auditd-user">
2402     <parent>auditd</parent>
2403     <regex offset="after_parent">^(USER_\S+) msg=audit\(\d\d\d\d\d\d\d\d\d\d.\d\d\d:(\d+)\): user pid=\d+ uid=\d+ auid=\d+|</regex>
2404     <regex>^(CRED_\S+) msg=audit\(\d\d\d\d\d\d\d\d\d\d.\d\d\d:(\d+)\): user pid=\d+ uid=\d+ auid=\d+</regex>
2405     <order>action,id</order>
2406   </decoder>
2407
2408   <decoder name="auditd-user">
2409     <parent>auditd</parent>
2410     <regex offset="after_regex"> acct="(\.+)" : exe="(\.+)" \(hostname=\S+, addr=(\S+), terminal=\S+$</regex>
2411     <order>user,extra_data,srcip</order>
2412   </decoder>
2413
2414   <decoder name="auditd-user">
2415     <parent>auditd</parent>
2416     <regex offset="after_regex"> ses=\d+ subj=\S+ msg='\.+ acct="(\.+)" exe="(\.+)" hostname=\S+ addr=(\S+) terminal=\S+ res=(\S+)$</regex>
2417     <order>user,extra_data,srcip,status</order>
2418   </decoder>
2419
2420    <decoder name="auditd-user">
2421     <parent>auditd</parent>
2422     <regex offset="after_regex"> subj=\S+ msg='\.+ acct="(\.+)" \p*\s*exe="(\.+)" \(hostname=\S+, addr=(\S+), terminal=\S+ res=(\S+)\)'$</regex>
2423     <order>user,extra_data,srcip,status</order>
2424   </decoder>
2425
2426   <decoder name="auditd-user">
2427     <parent>auditd</parent>
2428     <regex offset="after_regex"> subj=\S+ msg='\.+ exe="(\.+)" \(hostname=\S+, addr=(\S+), terminal=\S+ res=(\S+)\)'$</regex>
2429     <order>extra_data,srcip,status</order>
2430   </decoder>
2431
2432 <!-- EOF -->