izmjene licence
[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+)]\)|^\S+ \(\S+[::ffff:(\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 <!-- Pure-FTPd transfer log decoder
502   - Examples from ossec-list:
503   - example.com - user1 [11/Mar/2013:12:10:23 -0000] "PUT /ftpdrive/user1/FinalBackup.zip" 200 25268220
504   - example.com - user1 [11/Mar/2013:12:24:57 -0000] "GET /ftpdrive/user1/FinalBackup.zip" 200 25268220
505   -->
506
507 <decoder name="pure-transfer">
508   <prematch>^\S+ - \S+ [\d\d/\S\S\S/\d\d\d\d:\d\d:\d\d:\d\d -\d\d\d\d] </prematch>
509   <regex>^(\S+) - (\S+) [\d\d/\S\S\S/\d\d\d\d:\d\d:\d\d:\d\d -\d\d\d\d] "(\S+) (\.+) (\d+) \d+$</regex>
510   <order>extra_data,dstuser,action,url,status</order>
511 </decoder>
512
513
514
515
516 <!-- vsftpd decoder.
517   - Will extract the srcip.
518   - Examples:
519   - Sun Jun  4 22:08:04 2006 [pid 21612] CONNECT: Client "192.168.2.10"
520   - Sun Jun  4 22:08:39 2006 [pid 21611] [dcid] OK LOGIN: Client "192.168.2.10"
521   - Sun Jun  4 22:09:22 2006 [pid 21622] CONNECT: Client "192.168.2.10"
522   - Sun Jun  4 22:09:24 2006 [pid 21621] [lalal] FAIL LOGIN: Client "192.168.2.10"
523   - Sat Jun  3 07:51:42 2006 [pid 25073] [Administrator] FAIL LOGIN: Client
524   "211.100.27.101"
525   - Sun Aug 27 16:28:20 2006 [pid 13962] [xx] OK UPLOAD: Client "1.2.3.4", "/a.php", 8338 bytes, 18.77Kbyte/sec
526   - Jul 13 12:31:20 www vsftpd: Sun Jul 13 10:31:20 2008 [pid 27528] [anonymous] FAIL LOGIN: Client "84.140.234.76"
527   -->
528 <decoder name="vsftpd">
529   <prematch>^\w\w\w \w\w\w\s+\d+ \S+ \d+ [pid \d+] </prematch>
530   <regex offset="after_prematch">Client "(\d+.\d+.\d+.\d+)"$</regex>
531   <order>srcip</order>
532 </decoder>
533
534 <decoder name="vsftpd">
535   <program_name>^vsftpd</program_name>
536   <prematch>^\w\w\w \w\w\w\s+\d+ \S+ \d+ [pid \d+] </prematch>
537   <regex offset="after_prematch">Client "(\d+.\d+.\d+.\d+)"$</regex>
538   <order>srcip</order>
539 </decoder>
540
541
542
543 <!-- FTPD decoder - Solaris, MacOS and Wu-ftpd).
544   - Examples:
545   - ftpd[811166]: refused connect from 88.225.42.182
546   - in.ftpd[18561]: [ID 484914 daemon.notice] gethostbyaddr: nameservices.net. != 216.117.134.168
547   - ftpd[31918]: FTPD: EXPORT file local , remote
548   - Dec 21 12:21:20 hostname ftpd[323115]: login jones_b from client.example.org failed.
549   -->
550 <decoder name="ftpd">
551   <program_name>^ftpd|^in.ftpd</program_name>
552 </decoder>
553
554 <decoder name="ftpd-mac-failure">
555   <parent>ftpd</parent>
556   <prematch>^Failed authentication from: \S+ |</prematch>
557   <prematch>^repeated login failures from </prematch>
558   <!--<regex offset="after_prematch">(\S+)</regex>-->
559   <regex offset="after_prematch">^\S+ [(\d+.\d+.\d+.\d+)]$|^(\S+)</regex>
560   <order>srcip</order>
561 </decoder>
562
563 <decoder name="ftpd-refused">
564   <parent>ftpd</parent>
565   <prematch>^FTP LOGIN REFUSED </prematch>
566   <regex offset="after_prematch">[(\d+.\d+.\d+.\d+)]$</regex>
567   <order>srcip</order>
568 </decoder>
569
570 <decoder name="ftpd-ip">
571   <parent>ftpd</parent>
572   <regex>from (\d+.\d+.\d+.\d+)$</regex>
573   <order>srcip</order>
574 </decoder>
575
576 <decoder name="ftpd-tru64">
577   <parent>ftpd</parent>
578   <prematch>^login \S+ from \S+ failed.</prematch>
579   <regex>^login (\S+) from (\S+) failed.$</regex>
580   <order>user, srcip</order>
581 </decoder>
582
583
584
585 <!-- Arpwatch decoder.
586   - Will extract srcip/mac for "new station" messages.
587   - Examples:
588   - arpwatch: new station 192.168.1.103 0:11:43:5e:5d:80 eth0
589   - arpwatch: bogon 172.16.150.149 0:2:b3:d6:e5:68 eth0
590   - arpwatch: new station 192.168.2.10 0:c0:4f:78:32:be
591   - arpwatch: pcap open re0: /dev/bpf0: Permission denied
592   - arpwatch: reused old ethernet address 192.168.17.248 0:e:3b:a:cb:67 (0:1e:8c:72:b0:d0)
593   -->
594 <decoder name="arpwatch">
595   <program_name>^arpwatch</program_name>
596 </decoder>
597
598 <decoder name="arpwatch-new">
599   <parent>arpwatch</parent>
600   <prematch>^new station |^bogon </prematch>
601   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+) (\S+)</regex>
602   <order>srcip, extra_data</order>
603   <fts>name, srcip, extra_data</fts>
604 </decoder>
605
606
607
608 <!-- MySQL decoder.
609   - Examples:
610   - MySQL log: 060516 22:38:46 mysqld started
611   - MySQL log: 060516 22:38:46 mysqld ended
612   - 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'
613   - 070824 11:33:51       6 Connect     Access denied for user 'roota'@'localhost' (using password: YES)
614   -->
615 <decoder name="mysql_log">
616   <prematch>^MySQL log:</prematch>
617 </decoder>
618
619
620
621 <!-- PostgreSQL decoder.
622   - Examples:
623   - [2007-08-31 18:37:09.454 ADT] 192.168.2.99: LOG:  connection authorized: user=ossec_user database=ossecdb
624   - [2007-08-31 18:37:15.525 ADT] 192.168.2.99: ERROR:  relation "alert2" does not exist
625   -->
626 <decoder name="postgresql_log">
627   <prematch>^[\d\d\d\d-\d\d-\d\d \S+ \w+] </prematch>
628   <regex offset="after_prematch">^\S+ (\w+): </regex>
629   <order>status</order>
630 </decoder>  
631
632
633
634 <!-- Imapd decoder.
635   - Will extract the username/srcip
636   - Examples:
637   - imapd[26888]: Login failed user=babadosfashion auth=babadosfashion host=bahiana.resenet.com.br [200.255.5.8]
638   - imapd[21040]: Login failed user=root domain=(null) auth=root host=host29-141.poo
639     l8249.interbusiness.it [82.49.141.29]
640   - imapd[27113]: Authenticated user=badyy host=a.resenet.com.br [1.2.3.4]
641   - imapd[27113]: Logout user=badyy host=a.resenet.com.br [1.2.3.4]  
642   -->
643 <decoder name="imapd">
644   <program_name>^imapd</program_name>
645   <regex offset="after_prematch">user=(\S+) \.+ [(\d+.\d+.\d+.\d+)]$</regex>    
646   <order>user,srcip</order>
647 </decoder>
648
649
650
651 <!-- Vpopmail decoder. (by Ceg Ryan <cegryan ( at ) gmail.com>)
652   - Examples:
653   - vpopmail[32485]: vchkpw-pop3: password fail abc@xxx.com:x.x.x.x
654   - vpopmail[32485]: vchkpw-2110 password fail abc@xxx.com:x.x.x.x
655   -                  vchkpw-pop3: password fail (pass: 'test') user@my_domain:1.2.3.4
656   - vpopmail[2100]: vchkpw-pop3: vpopmail user not found abc@xxx.com:x.x.x.x
657   - vpopmail[4162]: vchkpw-pop3: vpopmail user not found support@:69.3.64.3
658   -->
659 <decoder name="vpopmail">
660   <program_name>^vpopmail</program_name>
661 </decoder>
662
663 <decoder name="vpopmail-fail">
664   <parent>vpopmail</parent>
665   <prematch>^vchkpw-\S+: password fail</prematch>
666   <regex offset="after_prematch"> (\S+)@\S+:(\d+.\d+.\d+.\d+)$</regex>
667   <order>user, srcip</order>
668 </decoder>
669
670 <decoder name="vpopmail-notfound">
671   <parent>vpopmail</parent>
672   <prematch>^vchkpw-\S+: vpopmail user not </prematch>
673   <regex offset="after_prematch">^found (\S+):(\d+.\d+.\d+.\d+)$</regex>
674   <order>user, srcip</order>
675 </decoder>
676
677 <decoder name="vpopmail-empty">
678   <parent>vpopmail</parent>
679   <prematch>^vchkpw-\S+: null password </prematch>
680   <regex offset="after_prematch">^given (\S+):(\d+.\d+.\d+.\d+)$</regex>
681   <order>user, srcip</order>
682 </decoder>
683
684 <decoder name="vpopmail-success">
685   <parent>vpopmail</parent>
686   <prematch>^vchkpw-\S+: \(\S+\) login </prematch>
687   <regex offset="after_prematch">^success (\S+):(\d+.\d+.\d+.\d+)$</regex>
688   <order>user, srcip</order>
689 </decoder>
690
691
692
693 <!-- VM-POP3 - Virtual Mail Pop3
694   - Examples:
695   -->
696 <decoder name="vm-pop3d">
697   <program_name>^vm-pop3d</program_name>
698 </decoder>
699
700 <decoder name="vm-pop3d-fail">
701   <parent>vm-pop3d</parent>
702   <prematch>^User '</prematch>
703   <regex offset="after_prematch">^(\S+)' - \w+ auth, </regex>
704   <regex>from=(\d+.\d+.\d+.\d+)$</regex>
705   <order>user, srcip</order>
706 </decoder>
707
708
709
710 <!-- Courier decoder
711   - Examples:
712   - pop3d-ssl: LOGIN FAILED, ip=[::ffff:192.168.0.200]
713   - courierpop3login: LOGIN, user=web10_mauricio, ip=[::ffff:192.168.0.100]
714   - courierpop3login: LOGIN FAILED, ip=[::ffff:192.168.0.188]
715   - imaplogin: DISCONNECTED, ip=[::ffff:127.0.0.1], time=0
716   - Nov 24 18:18:28 gandalf pop3d: LOGIN FAILED, ip=[::ffff:1.2.3.4]
717   -->
718 <decoder name="courier">
719   <program_name>^pop3d|^courierpop3login|^imaplogin|^courier-pop3|^courier-imap</program_name>
720 </decoder>
721
722 <decoder name="courier-login">
723   <parent>courier</parent>
724   <prematch>^LOGIN, </prematch>
725   <regex offset="after_prematch">^user=(\S+), ip=[(\S+\d)]$</regex>
726   <order>user, srcip</order>
727 </decoder>
728
729 <decoder name="courier-generic">
730   <parent>courier</parent>
731   <regex>, ip=[(\S+\d)]$|, ip=[::ffff:(\S+\d)]$</regex>
732   <order>srcip</order>
733 </decoder>
734
735
736
737 <!-- Dovecot Decoder
738   - Will extract username, srcip and dstip when available.
739   - Jun 17 10:15:24 hostname dovecot: Dovecot v1.2.rc3 starting up (core dumps disabled)
740   - Jun 17 10:15:24 hostname dovecot: Fatal: auth(default): Support not compiled in for passdb driver 'ldap'
741   - Jun 17 10:15:24 hostname dovecot: Fatal: Auth process died too early - shutting down
742   - 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:
743   - Jan 11 03:42:09 hostname dovecot: auth-worker(default): sql(user@example.com,1.2.3.4): Password mismatch
744   - dovecot: Jan 07 14:46:28 Warn: auth(default): userdb(username,::ffff:127.0.0.1): user not found from userdb
745   - 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
746   - dovecot: Mar 13 15:25:07 Info: auth(default): passwd-file(user@example.com,::ffff:1.2.3.4): unknown user
747   - Jan 11 03:45:09 hostname dovecot: auth-worker(default): sql(username,1.2.3.4): unknown user 
748   - 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
749   - Jul  4 17:30:51 hostname dovecot[2992]: pop3-login: Disconnected: rip=1.2.3.4, lip=1.2.3.5
750   - dovecot: Jun 23 15:04:06 Info: IMAP(username): Disconnected: Logged out bytes=59/566
751   - 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
752   - 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
753 -->
754
755 <decoder name="dovecot">
756   <program_name>^dovecot</program_name>
757 </decoder>
758
759 <decoder name="dovecot-success">
760   <parent>dovecot</parent>
761   <prematch offset="after_parent">^\w\w\w\w-login: Login: </prematch>
762   <regex offset="after_prematch">^user=\p(\S+)\p, method=\S+, rip=\S*(\d+.\d+.\d+.\d+), lip=\S*(\d+.\d+.\d+.\d+), (\S*)$</regex>
763   <order>user, srcip, dstip, protocol</order>
764 </decoder>
765
766 <decoder name="dovecot-aborted">
767   <parent>dovecot</parent>
768   <prematch offset="after_parent">^\w\w\w\w-login: Aborted login</prematch>
769   <regex offset="after_prematch">: user=\p(\S+)\p, method=\S+, rip=::ffff:(\d+.\d+.\d+.\d+), lip=::ffff:(\d+.\d+.\d+.\d+)$</regex>
770   <order>user, srcip, dstip</order>
771 </decoder> 
772
773 <decoder name="dovecot-fail">
774   <parent>dovecot</parent>
775   <prematch offset="after_parent">^auth\(default\)|auth-worker\(default\)</prematch>
776   <regex offset="after_prematch">^: \S+\((\S+),(\d+.\d+.\d+.\d+)\)</regex>
777   <order>user, srcip</order>
778 </decoder>
779
780 <decoder name="dovecot-disconnect">
781   <parent>dovecot</parent>
782   <prematch offset="after_parent">^\w\w\w\w-login: Disconnected: </prematch>
783   <regex offset="after_prematch">^rip=(\S+), lip=(\d+.\d+.\d+.\d+)</regex>
784   <order>srcip, dstip</order>
785 </decoder>
786
787
788
789 <!-- Named decoder.
790   - Will extract the srcip
791   - Examples:
792   -  valhalla named[7885]: client 192.168.1.231#1142: update 'hayaletgemi.edu/IN' denied
793   - named[12637]: client 1.2.3.4#32769: query (cache) 'somedomain.com/MX/IN' denied
794   -  Oct 22 10:12:33 junction named[31687]: /etc/blocked.slave:9892: syntax error near ';'
795   -  Oct 22 10:12:33 junction named[31687]: reloading configuration failed: unexpected token
796  -->           
797 <decoder name="named">
798   <program_name>^named</program_name>
799 </decoder>
800
801 <decoder name="named-query">
802   <parent>named</parent>
803   <prematch>: query: </prematch>
804   <regex>client (\S+)#\d+: query: (\S+) IN </regex>
805   <order>srcip,url</order>
806 </decoder>
807
808
809 <decoder name="named_client">
810   <parent>named</parent>  
811   <prematch>^client </prematch>
812   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+)#</regex>
813   <order>srcip</order>
814 </decoder>
815
816 <decoder name="named_from">
817   <parent>named</parent>  
818   <regex offset="after_parent"> from [(\d+.\d+.\d+.\d+)]</regex>
819   <order>srcip</order>
820 </decoder>
821
822 <decoder name="named-master">
823   <parent>named</parent>
824   <prematch> for master</prematch>
825   <regex>for master (\d+.\d+.\d+.\d+):(\d+) \S+ \(source (\d+.\d+.\d+.\d+)#d+\)$</regex>
826   <order>dstip,dstport,srcip</order>
827 </decoder>
828
829
830 <!-- Postfix  decoder.
831   - Will extract the srcip
832   - Examples: 
833   - postfix/smtpd[32297]: NOQUEUE: reject: RCPT from unknown[213.255.237.245]: 554 
834     <ce101@ce.metu.edu.tr>: Relay access denied; from=<kryonomm@yahoo.com> 
835     to=<e10445@jubiipost.dk> proto=SMTP helo=<SM01.net>
836   - postfix/smtpd[27712]: NOQUEUE: reject: MAIL from localhost[127.0.0.1]: 452 Insufficient system storage
837  -->
838
839 <decoder name="postfix">
840   <program_name>^postfix</program_name>
841 </decoder>
842
843 <decoder name="postfix-reject">
844   <use_own_name>true</use_own_name>
845   <parent>postfix</parent>  
846   <prematch>^NOQUEUE: reject: \w\w\w\w from </prematch>
847   <regex offset="after_prematch">[(\d+.\d+.\d+.\d+)]: (\d+) </regex>
848   <order>srcip,id</order>
849 </decoder>
850
851 <decoder name="postfix-sasl">
852   <parent>postfix</parent>  
853   <prematch>^warning: \S+: SASL </prematch>
854   <regex>^warning: \S+[(\d+.\d+.\d+.\d+)]:</regex>
855   <order>srcip</order>
856 </decoder>
857
858
859 <!-- Sendmail decoder.
860   - Will extract the srcip
861   - Examples: 
862   - sendmail[15806618]: k1SN9pkK15806618: ruleset=check_mail, arg1=<rtreter@qffff.com>, 
863   - relay=dsl.static81215198185.ttnet.net.tr [81.215.198.185] (may be forged), reject=553 5.1.8 
864   - <rtreter@qffff.com>... Domain of sender address rtreter@qffff.com does not exist
865   - 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]
866   - 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/
867   - sm-mta[23868]: k9BEQK0c023868: rejecting commands
868   from [200.121.73.169] [200.121.73.169] due to pre-greeting traffic
869   - sendmail[7818]: j6KKHo2d007818: rejecting commands from sv.e103gng.com [66.62.19.10] due to pre-greeting traffic
870  -->
871 <decoder name="sendmail-reject">
872   <program_name>^sendmail|^sm-mta|^sm-msp-queue</program_name>
873 </decoder>  
874
875 <decoder name="sendmail-pre-greeting">
876   <parent>sendmail-reject</parent>
877   <prematch>^\S+: rejecting commands from</prematch>
878   <regex offset="after_prematch">^ \S+ [(\d+.\d+.\d+.\d+)]</regex>
879   <order>srcip</order>
880 </decoder>
881
882 <decoder name="sendmail-reject-nodns">
883   <parent>sendmail-reject</parent>
884   <prematch>relay=[</prematch>
885   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+)]</regex>
886   <order>srcip</order>
887 </decoder>
888
889 <decoder name="sendmail-reject-dns">
890   <parent>sendmail-reject</parent>
891   <prematch>relay=\S+ [</prematch>
892   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+)]</regex>
893   <order>srcip</order>
894 </decoder>
895
896
897
898
899 <!-- SMF-SAV Sendmail Milter decoder.
900   - Will extract the srcip
901   - Examples:
902   - smf-sav[513]: [ID 987462 mail.notice] sender check failed: <xkyjywqvophshu@mypersonalemail.com>, 125.133.22.112, [125.133.22.112], [00:00:01]
903   - smf-sav[513]: [ID 407019 mail.info] sender check succeeded (cached): <asterisk-users-bounces@lists.digium.com>, 216.207.245.17, lists.digium.com
904   - smf-sav[513]: [ID 987894 mail.notice] sender check tempfailed: <31363****-org@targetedpages.com>, 69.8.190.101, smtp101.tramailer.info, [00:00:05]
905   - smf-sav[1883]: sender check tempfailed (cached): <k@vooC7b>, 87.103.236.97, [87.103.236.97]
906   - smf-sav[1883]: sender check failed (cached): <clahaiclahai@email.iis.com.br
907    >, 91.146.176.140, pool176-140.cable.tolna.net
908   -->
909 <decoder name="smf-sav-reject">
910   <program_name>^smf-sav</program_name>
911   <prematch>^sender check failed|</prematch>
912   <prematch>^sender check tempfailed</prematch>
913   <regex offset="after_prematch">^ \(cached\): \S+, (\d+.\d+.\d+.\d+),|</regex>
914   <regex>^: \S+, (\d+.\d+.\d+.\d+),</regex>
915   <order>srcip</order>
916 </decoder>
917
918
919
920 <!-- Mail scanner
921   - Will extract the srcip/action
922   - Examples:
923   - MailScanner[24112]: Message k7B9Mc6b015925 from 
924   68.171.145.34 (nilsenator@hotmail.com) to yyyyy.no is spam, SpamAssassin
925   - May  3 16:28:40 jarjar MailScanner[4732]: Message k436SX2M005191 from  
926   111.222.111.222 (david@our.domain.org) to our.domain.org is spam
927   , SpamAssassin
928   - MailScanner[5317]: Message k436dCIW005370 from  
929   111.222.111.222 (david@our.domain.org) to another.domain.org is not s
930   pam, SpamAssassin
931   - MailScanner[29107]: Message j0EMandY027564 from xxx.xxx.xxx.xxx(xxxxx@xxxxx.ie) to xxxxx.ie is not spam
932   -->
933 <decoder name="mailscanner">
934   <program_name>^MailScanner</program_name>
935 </decoder>
936
937 <decoder name="mailscanner-ip">
938   <parent>mailscanner</parent>
939   <prematch>^Message \S+ from </prematch>
940   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+) \S+ to \S+ is (\w+)</regex>
941   <order>srcip, action</order>
942 </decoder>
943
944
945 <!-- OpenBSD smtpd decoders -->
946
947 <decoder name="smtpd">
948   <program_name>smtpd</program_name>
949 </decoder>
950
951 <decoder name="smtpd-client">
952   <parent>smtpd</parent>
953   <prematch offset="after_parent">^client</prematch>
954   <regex>^client (\S+) </regex>
955   <order>srcip</order>
956 </decoder>
957
958 <decoder name="smtpd-relay">
959   <parent>smtpd</parent>
960   <prematch>relay=</prematch>
961   <regex>relay=\S+ [(\S+)], </regex>
962   <order>srcip</order>
963 </decoder>
964
965
966
967 <!-- Iptables decoder.
968   - Will extract the srcip, dstip, srcport, dstport, protocol
969   - Examples:
970   - kernel: FIREWALL_OUT IN= OUT=eth0
971     SRC=192.168.6.57 DST=216.161.248.225 LEN=40 TOS=0x00 PREC=0x00 TTL=64
972     ID=18547 DF PROTO=TCP SPT=46388 DPT=37628 WINDOW=6930 RES=0x00 ACK RST
973     URGn=0
974   - kernel: IPTABLE IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:03:93:db:2e:b4:08:00 
975     SRC=10.4.11.40 DST=255.255.255.255 LEN=180 TOS=0x00 PREC=0x00 TTL=64 
976     ID=4753 PROTO=UDP SPT=49320 DPT=2222 LEN=160
977   - kernel: [4475569.016000] IN= OUT=lo SRC=192.168.2.11 DST=192.168.2.11 
978     LEN=52 TOS=0x10 PREC=0x00 TTL=64 ID=49546 DF PROTO=TCP SPT=43068 
979     DPT=22 WINDOW=8192 RES=0x00 ACK URGP=0     
980   - 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   
981   -->
982 <decoder name="iptables">
983    <program_name>^kernel</program_name>
984 </decoder>
985      
986 <decoder name="iptables-1">
987    <parent>iptables</parent>
988    <type>firewall</type>
989    <prematch>^[\d+.\d+] \S+ IN=</prematch>
990    
991    <regex>^[\d+.\d+] (\S+) \.+ SRC=(\S+) DST=(\S+)</regex>
992    <regex> \.+ PROTO=(\w+) </regex>
993    <order>action,srcip,dstip,protocol</order>
994 </decoder>
995
996 <decoder name="iptables-1">
997    <parent>iptables</parent>
998    <type>firewall</type>
999    <regex offset="after_regex">^SPT=(\d+) DPT=(\d+) </regex>
1000    <order>srcport,dstport</order>
1001 </decoder>
1002
1003 <decoder name="iptables-2">
1004    <parent>iptables</parent>
1005    <type>firewall</type>
1006    <prematch>^\S+ IN=</prematch>
1007    
1008    <regex>^(\S+) \.+ SRC=(\S+) DST=(\S+) \.+ </regex>
1009    <regex>PROTO=(\w+) </regex>
1010    <order>action,srcip,dstip,protocol</order>
1011 </decoder>
1012
1013 <decoder name="iptables-2">
1014    <parent>iptables</parent>
1015    <type>firewall</type>
1016    <regex offset="after_regex">^SPT=(\d+) DPT=(\d+) </regex>
1017    <order>srcport,dstport</order>
1018 </decoder>
1019
1020 <decoder name="iptables-shorewall">
1021    <parent>iptables</parent>
1022    <type>firewall</type>
1023    <prematch>^Shorewall:\S+:</prematch>
1024    
1025    <regex offset="after_prematch">^(\S+):\.+ SRC=(\S+) DST=(\S+) \.+ </regex>
1026    <regex>PROTO=(\w+) </regex>
1027    <order>action,srcip,dstip,protocol</order>
1028 </decoder>
1029
1030 <decoder name="iptables-shorewall">
1031    <parent>iptables</parent>
1032    <type>firewall</type>
1033    <regex offset="after_regex">^SPT=(\d+) DPT=(\d+) </regex>
1034    <order>srcport,dstport</order>
1035 </decoder>   
1036
1037 <decoder name="iptables-shorewall2">
1038   <parent>iptables</parent>
1039   <type>firewall</type>
1040   <prematch>^\p\S+\p Shorewall:\S+:</prematch>
1041   <regex offset="after_prematch">^(\S+):\.+ SRC=(\S+) DST=(\S+) \.+ </regex>
1042   <regex>PROTO=(\w+) </regex>
1043   <order>action,srcip,dstip,protocol</order>
1044 </decoder>
1045
1046
1047 <!-- Solaris IPFilter decoder.
1048   - Will extract the action, srcip, srcport, dstip, dstport
1049   - Examples:
1050   - ipmon[11523]: [ID 702911 local0.warning] 09:30:39.300795 3x ce0 @0:1
1051     b 10.4.0.25,43873 -> 10.4.122.243,22 PR tcp len 20 100 -AP IN
1052   - ipmon[11523]: [ID 702911 local0.warning] 09:31:53.285032 hme0 @0:1
1053     b 10.4.122.243,138 -> 255.255.255.255,138 PR udp len 20 229 IN mbcast
1054   - ipmon[11523]: [ID 702911 local0.notice] 09:30:40.398290 ce0 @0:14
1055     p 10.4.122.243,123 -> 10.4.122.16,123 PR udp len 20 76 K-S OUT
1056   -->
1057 <decoder name="ipfilter">
1058    <type>firewall</type>
1059    <program_name>^ipmon</program_name>
1060    <regex> (\w) (\d+.\d+.\d+.\d+),(\d+) -> </regex>
1061    <regex>(\d+.\d+.\d+.\d+),(\d+) PR (\w+) </regex>
1062    <order>action,srcip,srcport,dstip,dstport,protocol</order>
1063 </decoder>
1064   
1065
1066 <!-- AIX IPSec decoder.
1067   - Will extract the action,srcip,dstip,protocol,srcport,dstport
1068   - Examples:
1069   - ipsec_logd: #:3 R:p  I:10.0.0.99 S:10.0.0.82 D:10.0.0.99 
1070     P:tcp/ack SP:50349 DP:22 R:l I:en0 F:n T:0 L:88
1071   - ipsec_logd: #:1 R:p  O:10.0.0.99. S:10.0.0.99 D:10.0.0.25 
1072     P:udp SP:2063 DP:53 R:l I:en0 F:n T:0 L:81 
1073  -->
1074 <decoder name="aix-ipsec">
1075    <type>firewall</type>
1076    <program_name>^ipsec_logd</program_name>
1077    <regex> R:(\w)  \w:\S+ S:(\d+.\d+.\d+.\d+) </regex>
1078    <regex>D:(\d+.\d+.\d+.\d+) P:(\S+) SP:(\d+) DP:(\d+) </regex>
1079    <order>action,srcip,dstip,protocol,srcport,dstport</order>
1080 </decoder>
1081
1082
1083
1084 <!-- OpenBSD pf decoder (as a plugin - compiled).
1085   - Will extract the action,srcip,dstip,protocol,srcport,dstport
1086   - Examples:
1087   - 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)
1088   - 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]
1089   - 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
1090   - 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
1091   
1092   -->
1093 <decoder name="pf">
1094    <type>firewall</type>
1095    <program_name>^pf$</program_name>
1096    <plugin_decoder>PF_Decoder</plugin_decoder>
1097 </decoder>
1098
1099   
1100
1101 <!-- SonicWall decoder.
1102   - Will extract action, srcip, dstip, protocol, srcport and dstport
1103   - Examples:
1104   - 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
1105   - 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
1106   - id=firewall sn=00301E0526B1 time="2004-04-01 10:39:35"
1107   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
1108   -->
1109 <decoder name="sonicwall">
1110   <type>firewall</type>
1111   <prematch>^id=\w+ sn=\w+ time=\S+ \S+ fw=\S+ pri=\d </prematch>
1112   <plugin_decoder>SonicWall_Decoder</plugin_decoder>
1113 </decoder>
1114
1115
1116
1117 <!-- Netscreen Firewall decoder.
1118   - Will extract the action,srcip,dstip,protocol,srcport,dstport
1119   - Examples:
1120   - 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
1121   - <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
1122   - 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)
1123   -  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)
1124   - 
1125   - ** Program name for netscreen is empty, since it is the hostname.
1126   -->
1127 <decoder name="netscreenfw">
1128   <program_name />
1129   <prematch>^NetScreen device_id</prematch>
1130 </decoder>  
1131
1132 <decoder name="netscreenfw-traffic">
1133   <parent>netscreenfw</parent>
1134   <type>firewall</type>
1135   
1136   <prematch offset="after_parent">system-notification-00257</prematch>
1137   <prematch>\(traffic\): </prematch>
1138   
1139   <regex offset="after_prematch"> proto=(\w+) \.+action=(\w+) </regex>
1140   <regex>\.+src=(\S+) dst=(\S+) src_port=(\d+) dst_port=(\d+)</regex>
1141   <order>protocol, action, srcip, dstip, srcport, dstport</order>
1142 </decoder>
1143
1144 <decoder name="netscreenfw-critical">
1145   <parent>netscreenfw</parent>
1146   <prematch offset="after_parent">system-critical-\.+ from |</prematch>
1147   <prematch>system-alert-\.+ from </prematch>
1148   
1149   <regex offset="after_parent">system-(\w+)-(\d+): \.+ </regex>
1150   <regex>from\.+(\d+.\d+.\d+.\d+)</regex>
1151   <order>action, id, srcip</order>
1152 </decoder>
1153
1154 <decoder name="netscreenfw-admin">
1155   <parent>netscreenfw</parent>
1156   <regex offset="after_parent">system-(\w+)-(\d+):</regex>
1157   <order>action, id</order>  
1158 </decoder>
1159
1160
1161 <!-- Pix decoder.
1162   - Will extract the srcip, srcport, dstip and dstport whenever possible.
1163   - Examples:
1164   - %PIX-6-106015: Deny TCP (no connection) from 161.58.238.151/110 to a.b.c.d/3782 flags RST ACK
1165   - %PIX-2-106001: Inbound TCP connection denied from 165.139.46.7/3854 to 165.189.27.70/139 flags
1166   - %PIX-3-106010: Deny inbound tcp src outside:213.98.79.233/2620 dst dmz:213.98.254.145/135
1167   - %PIX-3-106011: Deny inbound (No xlate) udp src outside:192.168.2.1/137
1168   dst outside:192.168.2.14/137
1169   - %PIX-3-106011: Deny inbound (No xlate) tcp src inside:10.100.7.43/80 dst 
1170   inside:10.100.4.71/2285
1171   - %PIX-3-710003: TCP access denied by ACL from 216.39.220.130/54065 to outside:62.192.113.98/ssh
1172   - %PIX-7-710001: TCP access requested from X.X.X.X/1292 to outside:Y.Y.Y.Y/ssh
1173   - %PIX-7-710002: UDP access permitted from 33.33.33.4/943 to inside:33.33.33.15/snmp
1174   - %PIX-7-710005: UDP request discarded from <public IP of 525>/4500 to outside:192.168.69.137/4500
1175   - %PIX-2-106002   protocol Connection denied by outbound list acl_ID src inside_address dest outside_address
1176   - %PIX-2-106002: udp connection denied by outbound list 30 src 216.53.120.62 138 dest 169.132.10.82 138
1177   -  %PIX-4-106023: Deny tcp src inside:111.11.11.1/2143 dst YYY:172.11.1.11/139 by access-group "inside_inbound"
1178   - %PIX-4-400013 IDS:2003 ICMP redirect from 10.4.1.2 to 10.2.1.1 on interface dmz
1179   - %PIX-2-106006: Deny inbound UDP from ***/20031 to ***/20031 on  
1180   interface vpn
1181   - %PIX-7-710002: TCP access permitted from 10.0.0.1/60749 to db:10.0.0.2/ssh
1182   - %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.
1183   - %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)
1184   - %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)
1185   - %PIX-6-605005: Login permitted from 192.168.1.2/2953 to inside:192.168.1.1/telnet for user ""
1186   - %PIX-6-605004: Login denied from 192.168.2.10/32597 to outside:192.168.2.14/ssh for user "root"
1187   - %PIX-6-305011: Built dynamic UDP translation from inside:192.168.1.2/1026 to outside:192.168.2.14/1163
1188   - %PIX-6-305011: Built dynamic TCP translation from inside:192.168.1.3/54946 to outside:192.168.2.14/1033
1189   - %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)
1190   -->
1191 <decoder name="pix">
1192   <prematch>^%PIX-|^\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %PIX-|</prematch>
1193   <prematch>^%ASA-|^\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %ASA-|</prematch>
1194   <prematch>^%FWSM-|^\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %FWSM-</prematch>
1195 </decoder>
1196
1197 <decoder name="pix-fw1">
1198   <parent>pix</parent>
1199   <type>firewall</type>
1200   <prematch offset="after_parent">^2-106001</prematch>
1201   <regex offset="after_parent">^(\S+): \w+ (\w+) \S+ (\S+) from </regex>
1202   <regex>(\S+)/(\S+) to (\S+)/(\S+)</regex>
1203   <order>id, protocol, action, srcip, srcport, dstip, dstport</order>
1204 </decoder>
1205
1206 <decoder name="pix-fw2">
1207   <parent>pix</parent>
1208   <type>firewall</type>
1209   <prematch offset="after_parent">^3-710003|^7-710002|^7-710005</prematch>
1210   <regex offset="after_parent">^(\S+): (\S+) \w+ (\w+)\.+from </regex>
1211   <regex>(\S+)/(\S+) to \w+:(\S+)/(\S+)</regex>
1212   <order>id, protocol, action, srcip, srcport, dstip, dstport</order>
1213 </decoder>
1214
1215 <decoder name="pix-fw3">
1216   <parent>pix</parent>
1217   <type>firewall</type>
1218   <prematch offset="after_parent">^4-106023</prematch>
1219   <regex offset="after_parent">^(\S+): (\w+) (\w+) src \w+:</regex>
1220   <regex>(\S+)/(\S+) dst \w+:(\S+)/(\S+)</regex>
1221   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1222 </decoder>
1223
1224 <decoder name="pix-fw4">
1225   <parent>pix</parent>
1226   <type>firewall</type>
1227   <prematch offset="after_parent">^4-106019</prematch>
1228   <regex offset="after_parent">^(\S+): IP packet from (\S+) to </regex>
1229   <regex>(\S+), protocol (\w+) (\w+) </regex>
1230   <order>id, srcip, dstip, protocol, action</order>
1231 </decoder>
1232
1233 <decoder name="pix-fw5">
1234   <parent>pix</parent>
1235   <type>firewall</type>
1236   <prematch offset="after_parent">^2-106006|^2-106007</prematch>
1237   <regex offset="after_parent">^(\S+): (\w+) \S+ (\w+) from </regex>
1238   <regex>(\d+.\d+.\d+.\d+)/(\d+) to (\d+.\d+.\d+.\d+)/(\d+) </regex>
1239   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1240 </decoder>
1241
1242 <decoder name="pix-fw6">
1243   <parent>pix</parent>
1244   <type>firewall</type>
1245   <prematch offset="after_parent">^6-106015</prematch>
1246   <regex offset="after_parent">^(\S+): (\w+) (\w+) \S+ \S+ (\S+) from </regex>
1247   <regex>(\S+)/(\S+) to (\S+)/(\S+)</regex>
1248   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1249 </decoder>
1250
1251 <decoder name="pix-fw7">
1252   <parent>pix</parent>
1253   <type>firewall</type>
1254   <prematch offset="after_parent">^6-305012</prematch>
1255   <regex offset="after_parent">^(\S+): (\w+) \w+ (\w+) translation </regex>
1256   <regex>from \w+:(\S+)/(\d+) to \w+:(\S+)/(\d+) </regex>
1257   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1258 </decoder>
1259
1260 <decoder name="pix-fw8">
1261   <parent>pix</parent>
1262   <type>firewall</type>
1263   <prematch offset="after_parent">^3-106011|^3-106010</prematch>
1264   <regex offset="after_parent">^(\S+): (\w+) \.+ (\w+) src </regex>
1265   <regex>\w+:(\S+)/(\d+) dst \w+:(\S+)/(\d+)</regex>
1266   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1267 </decoder>
1268
1269 <decoder name="pix-url-success">
1270   <parent>pix</parent>
1271   <prematch offset="after_parent">^5-304001: </prematch>
1272   <regex offset="after_parent">^(\S+): (\d+.\d+.\d+.\d+) Accessed URL </regex>
1273   <regex>(\d+.\d+.\d+.\d+):(http\w*://\.+)|</regex>
1274   <regex>^(\S+): (\d+.\d+.\d+.\d+) Accessed URL (\d+.\d+.\d+.\d+):</regex>
1275   <order>id, srcip, dstip, url</order>
1276 </decoder>
1277
1278 <decoder name="pix-url-deny">
1279   <parent>pix</parent>
1280   <prematch offset="after_parent">^5-304002: </prematch>
1281   <regex offset="after_parent">^(\S+): Access (denied) URL (http\w*://\.+) </regex>
1282   <regex>SRC (\d+.\d+.\d+.\d+) DEST (\d+.\d+.\d+.\d+) on interface</regex>  
1283   <order>id, action, url, srcip, dstip</order>
1284 </decoder>
1285
1286 <decoder name="pix-attacks">
1287   <parent>pix</parent>
1288   <prematch offset="after_parent">^2-106012: |^2-106017: |</prematch>
1289   <prematch>^2-106020|^1-106021|^1-106022|</prematch>
1290   <prematch>^4-4000</prematch>
1291   <regex offset="after_parent">^(\S+): \.+ from (\d+.\d+.\d+.\d+) </regex>
1292   <order>id, srcip</order>
1293 </decoder>
1294
1295 <decoder name="pix-srcip">
1296   <parent>pix</parent>
1297   <prematch offset="after_parent">^6-605004|^6-308001|^6-605005</prematch>
1298   <regex offset="after_parent">^(\S+): \.+ (\d+.\d+.\d+.\d+)</regex>
1299   <order>id, srcip</order>
1300 </decoder>
1301
1302 <decoder name="pix-generic">
1303   <parent>pix</parent>
1304   <regex offset="after_parent">^(\S+): </regex>
1305   <order>id</order>
1306 </decoder>
1307
1308
1309
1310 <!-- Cisco VPN Concentrator
1311   - Will exatract srcip and username.
1312   - Examples:
1313   -
1314   - 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>
1315   11504 01/08/2007 09:10:37.780 SEV=3
1316   -->
1317 <decoder name="cisco-vpn-concentrator">
1318   <prematch>^\d+ \d\d/\d\d/\d\d\d\d \S+ SEV=\d </prematch>
1319   <regex offset="after_prematch">^(\S+) RPT=\d+ (\d+.\d+.\d+.\d+) </regex>
1320   <order>id, srcip</order>
1321 </decoder> 
1322
1323
1324
1325 <!-- Snort decoder.
1326   - Will extract the id, srcip and dstip
1327   - Examples:
1328   - snort: [1:469:3] ICMP PING NMAP [Classification: Attempted Information 
1329     Leak] [Priority: 2]: {ICMP} 10.4.12.26 -> 10.4.10.231
1330   - snort: [1:1420:11] SNMP trap tcp [Classification: Attempted Information 
1331     Leak] [Priority: 2]: {TCP} 10.4.12.26:37020 -> 10.4.10.231:162
1332   - [**] [1:1054:7] WEB-MISC weblogic/tomcat .jsp view source attempt [**]
1333     [Classification: Web Application Attack]
1334     [Priority: 1]  10.4.12.26:34041 -> 66.179.53.37:80
1335   - [**] [1:1421:11] SNMP AgentX/tcp request [**]
1336     [Classification: Attempted Information Leak] [Priority: 2]
1337     10.4.3.20:626 -> 10.4.10.161:705              
1338   - [**] [1:1882:10] ATTACK-RESPONSES id check returned userid [**]
1339     [Classification: Potentially Bad Traffic] [Priority: 2]
1340     {UDP} 192.168.20.32 -> 192.168.20.2  
1341   -->
1342
1343 <decoder name="snort">
1344   <program_name>^snort</program_name>
1345 </decoder>
1346
1347 <decoder name="snort">
1348   <type>ids</type>
1349   <prematch>^[**] [\d+:\d+:\d+] </prematch>
1350 </decoder>
1351   
1352 <decoder name="snort2">
1353    <parent>snort</parent>
1354    <type>ids</type>
1355    <prematch>^[**] |^[\d+:\d+:\d+] </prematch>
1356    <regex>^[**] [(\d+:\d+:\d+)] \.+ (\d+.\d+.\d+.\d+)\p*\d* -> </regex>
1357    <regex>(\d+.\d+.\d+.\d+)|^[(\d+:\d+:\d+)] \.+ </regex>
1358    <regex>(\d+.\d+.\d+.\d+)\p*\d* -> (\d+.\d+.\d+.\d+)</regex>
1359    <order>id,srcip,dstip</order>
1360    <fts>name,id,srcip,dstip</fts>
1361 </decoder>
1362
1363
1364
1365 <!-- OpenBSD isakmpd decoders -->
1366
1367 <decoder name="isakmpd">
1368   <program_name>^isakmpd</program_name>
1369 </decoder>
1370
1371 <decoder name="isakmpd-from">
1372   <parent>isakmpd</parent>
1373   <prematch>message from </prematch>
1374   <regex>from (\S+) port (\d+)</regex>
1375   <order>srcip,srcport</order>
1376 </decoder>
1377
1378 <decoder name="isakmpd-peer">
1379   <parent>isakmpd</parent>
1380   <prematch>from peer</prematch>
1381   <regex>from peer (\S+):(\d+)$</regex>
1382   <order>srcip,srcport</order>
1383 </decoder>
1384
1385
1386
1387 <!-- Suhosin decoder.
1388   - Will extract the attack name and srcip.
1389   - Examples:
1390   - suhosin[76366]: ALERT - canary mismatch on efree() - heap overflow detected (attacker '200.139.164.149', file 'xyz')
1391   - 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')
1392   - 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') 
1393   -->
1394 <decoder name="suhosin">
1395   <program_name>^suhosin</program_name>
1396   <type>ids</type>
1397   <regex>^ALERT - (\.+) \(attacker '(\d+.\d+.\d+.\d+)', </regex>
1398   <order>id, srcip</order>
1399   <fts>name, location, id</fts>
1400 </decoder>
1401
1402
1403
1404 <!-- Dragon Decoder
1405   - Will extract srcip, dstip and id
1406   - Examples:
1407   - 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
1408   -
1409   -->
1410 <decoder name="dragon-nids">
1411    <type>ids</type>
1412    <prematch>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\|</prematch>
1413    <regex offset="after_prematch">^\S+\|(\S+)\|</regex>
1414    <regex>(\d+.\d+.\d+.\d+)\|(\d+.\d+.\d+.\d+)\|</regex>
1415    <order>id, srcip, dstip</order>
1416    <fts>name, id, srcip, dstip</fts>
1417 </decoder>
1418                         
1419    
1420    
1421 <!-- Horde decoder
1422   - Will extract: username and srcip.
1423   - Examples:
1424   - [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"]
1425   - [error] [imp] FAILED LOGIN 210.179.154.213 to xxx:143[imap] as mala1
1426   -->
1427 <decoder name="horde_imp">
1428   <prematch>^[\w+] [imp] |^[\w+] [horde] </prematch>
1429 </decoder>  
1430
1431 <decoder name="horde_imp_success">
1432   <parent>horde_imp</parent>
1433   <prematch offset="after_parent">^Login success </prematch>
1434   <regex offset="after_prematch">^for (\S+) [(\d+.\d+.\d+.\d+)] </regex>
1435   <order>user, srcip</order>
1436 </decoder>
1437
1438 <decoder name="horde_imp_failed">
1439   <parent>horde_imp</parent>
1440   <prematch offset="after_parent">^FAILED LOGIN</prematch>
1441   <regex offset="after_prematch">^ (\d+.\d+.\d+.\d+) to \S+ as (\S+) </regex>
1442   <order>srcip, user</order> 
1443 </decoder>
1444
1445
1446
1447 <!-- Wordpress decoder.
1448   -  It needs the WPsyslog2 plugin.
1449   - Examples:
1450   - WPsyslog[14382]: [127.0.0.1 na] Info: User authentication failed. User name: lala
1451   - WPsyslog[14382]: [127.0.0.1 na] Info: User logged in. User name: admin (admin).
1452   -->
1453 <decoder name="wordpress">
1454   <program_name>^WPsyslog</program_name>
1455   <prematch>^[</prematch>
1456   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+) </regex>
1457   <order>srcip</order>
1458 </decoder>
1459
1460
1461
1462 <!-- Roundcube decoder
1463  - Will extract username and src IP from the logs, when available.
1464    Examples:
1465  - Apr 10 22:45:20 hostname roundcube: [10-Apr-2009 22:45:20 -0500] IMAP
1466    Error: Authentication for username failed (LOGIN): "a001 NO Authentication
1467    failed." (POST /roundcube/?_task=&_action=login)
1468  - Apr 10 23:01:23 hostname roundcube: [10-Apr-2009 23:01:23 -0500]:
1469    Successful login for username (id 1) from 127.0.0.1
1470 -->
1471 <decoder name="roundcube">
1472   <program_name>^roundcube</program_name>
1473   <prematch>^[\d\d-\w\w\w-\d\d\d\d \d\d:\d\d:\d\d \S+]</prematch>
1474 </decoder>
1475
1476 <decoder name="roundcube-success">
1477   <parent>roundcube</parent>
1478   <prematch>^: Successful login for </prematch>
1479   <regex offset="after_prematch">^(\S+) \(id \d+\) from (\d+.\d+.\d+.\d+)$</regex>
1480   <order>user, srcip</order>
1481 </decoder>
1482
1483 <decoder name="roundcube-denied">
1484   <parent>roundcube</parent>
1485   <prematch>^ \w+ Error: Authentication </prematch>
1486   <regex offset="after_prematch">^for (\.+) failed</regex>
1487   <order>user</order>
1488 </decoder>
1489
1490
1491
1492 <!-- Apache decoder.
1493   - Will extract the srcip
1494   - Examples:
1495   - [error] [client 80.230.208.105] Directory index forbidden by rule: /home/
1496   - [error] [client 64.94.163.159] Client sent malformed Host header
1497   - [error] [client 66.31.142.16] File does not exist: /var/www/html/default.ida
1498   - [notice] Apache configured  
1499   - httpd[18660]: [error] [client 12.34.56.78] File does not exist: /usr/local/htdocs/cache
1500   - httpd[23745]: [error] [client 12.34.56.78] PHP Notice:
1501   -->
1502 <decoder name="apache-errorlog">
1503   <program_name>^httpd</program_name>
1504 </decoder>  
1505
1506 <decoder name="apache-errorlog">
1507   <prematch>^[warn] |^[notice] |^[error] </prematch>
1508 </decoder>  
1509
1510 <decoder name="apache-errorlog-ip">
1511   <parent>apache-errorlog</parent>
1512   
1513   <prematch offset="after_parent">^[client</prematch>
1514   <regex offset="after_prematch">^ (\d+.\d+.\d+.\d+)] </regex>
1515   <order>srcip</order>
1516 </decoder> 
1517
1518
1519
1520
1521 <!-- Nginx error log decoder.
1522   - Will extract the srcip.
1523   - Examples:
1524   - 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"
1525   - 2009/09/15 19:51:07 [error] 37992#0: accept() failed (53: Software caused connection abort)
1526   -->
1527 <decoder name="nginx-errorlog">
1528   <prematch>^20\d\d/\d\d/\d\d \d\d:\d\d:\d\d [</prematch>
1529 </decoder>
1530
1531 <decoder name="nginx-errorlog-ip">
1532   <parent>nginx-errorlog</parent>
1533   <prematch offset="after_parent">, client: \S+, server: \S+, request: "\S+ </prematch>
1534   <regex offset="after_parent">, client: (\d+.\d+.\d+.\d+), </regex> 
1535   <order>srcip</order>
1536 </decoder>
1537
1538
1539
1540
1541 <!-- NCSA common log decoder (used by apache, Lotus Domino and IIS NCSA).
1542   -  Will extract the srcip, url and id.
1543   -  Every web access log must use "web-log" as their
1544   -  type if they want to be matched against the web rules.
1545   - Examples:
1546   -  63.91.167.39 - - [03/Aug/2001:21:56:18 -0700] "GET /default.ida?NNNN
1547   -  206.78.62.16 - - [06/Aug/2001:08:57:08 -0700] "GET /default.ida?XX
1548   -  5.211.112.6 - - [04/Feb/2003:16:17:30 -0500] "GET /mod_ssl:error: 
1549   -  192.168.2.190 - - [18/Jan/2006:13:10:06 -0500] "GET /xxx.html HTTP/1.1"
1550      200 1732
1551   -  1.1.1.1 - username [18/Jan/2006:13:10:06 -0500] "GET /xxx.html HTTP/1.1"   
1552   -  123.4.5.6 aa.xx.com - [05/Nov/2006:00:46:56 -0500] "GET / HTTP/1.1" 302 -
1553   - ::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)"
1554   -->
1555 <decoder name="web-accesslog">
1556   <type>web-log</type>
1557   <prematch>^\d+.\d+.\d+.\d+ |^::ffff:\d+.\d+.\d+.\d+ </prematch>
1558   <regex>^(\d+.\d+.\d+.\d+) \S+ \S+ [\S+ \S\d+] </regex>
1559   <regex>"\w+ (\S+) HTTP\S+ (\d+) </regex>
1560   <order>srcip, url, id</order>
1561 </decoder>
1562
1563
1564 <!-- Windows date format.
1565   -  Pre match for windows date format. Used on Windows firewall,
1566   -  IIS, etc.
1567   -  Examples:
1568   -  2006-07-23 04:40:02 xxx
1569   -->
1570 <decoder name="windows-date-format">
1571   <prematch>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d </prematch>
1572 </decoder>
1573  
1574
1575
1576 <!-- Windows firewall decoder.
1577   - Will extract action, protocol, srcip, dstip, srcport and dstport.
1578   - Examples:
1579   - 2006-09-18 22:25:30 OPEN TCP 11.12.72.10 12.252.71.6 3311 445 - - - - - - - - -
1580   - 2006-09-18 22:26:23 DROP UDP 11.152.183.14 239.255.255.250 65299 1900 310 - - - - - - - RECEIVE
1581   - 2006-09-18 22:26:23 DROP UDP 11.152.183.14 239.255.255.250 65299 1900 310 - - - - - - - RECEIVE
1582   - 2006-09-18 22:26:23 DROP UDP 11.152.183.14 239.255.255.250 65298 1900 319 - - - - - - - RECEIVE
1583   -->
1584 <decoder name="windows-firewall">
1585   <parent>windows-date-format</parent>
1586   <type>firewall</type>
1587   <use_own_name>true</use_own_name>
1588   <prematch offset="after_parent">^OPEN|^CLOSE|^DROP</prematch>
1589   <regex offset="after_parent">^(\w+) (\w+) </regex>
1590   <regex>(\S+) (\S+) (\d+) (\d+) </regex>
1591   <order>action, protocol, srcip, dstip, srcport, dstport</order>
1592 </decoder>
1593  
1594  
1595 <!-- IIS 5 WWW W3C log format.
1596   - #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)
1597   - Examples:
1598   - 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) -
1599   -->
1600 <decoder name="web-accesslog-iis5">
1601   <parent>windows-date-format</parent>
1602   <type>web-log</type>
1603   <use_own_name>true</use_own_name>
1604   <prematch offset="after_parent">^\d+.\d+.\d+.\d+ \S+ W3SVC</prematch>
1605   <regex offset="after_parent">^(\d+.\d+.\d+.\d+) \S+ \S+ \S+ \S+ </regex>
1606   <regex>\d+ \S+ (\S+ \S+) (\d+) </regex>
1607   <order>srcip,url,id</order>
1608 </decoder>
1609
1610
1611 <!-- IIS6 WWW W3C log format.
1612   - #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem
1613   cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent)
1614   cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status
1615   sc-bytes cs-bytes time-taken
1616   - Examples:
1617   - 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
1618   -->
1619 <decoder name="web-accesslog-iis6">
1620   <parent>windows-date-format</parent>
1621   <type>web-log</type>
1622   <use_own_name>true</use_own_name>
1623   <prematch offset="after_parent">^W3SVC\d+ \S+ \S+ \S+ </prematch>
1624   <regex offset="after_prematch">^(\S+ \S+) \d+ \S+ (\d+.\d+.\d+.\d+) </regex>
1625   <regex>\S+ \S+ \S+ \S+ \S+ (\d+) </regex>
1626   <order>url, srcip, id</order>
1627 </decoder>
1628
1629 <!-- Windows IIS decoder for default settings
1630   -  Tested with IIS 7.5 and IIS 8.5 (Windows 2008R2 and Windows 2012R2)
1631   -  Will extract URL, Source IP, and HTTP response code
1632   -  Examples:
1633   -  IIS 7.5
1634   -  2015-07-28 15:07:26 1.2.3.4 GET /QOsa/Browser/Default.aspx UISessionId=SN1234123&DeviceId=SN12312232SHARP+MX-4111N 80 - 31.3.3.7 OpenSystems/1.0;+product-family="85";+product-version="123ER123" 302 0 0 624
1635   -  IIS 8.5
1636   -  2015-03-11 20:28:21 1.2.3.4 GET /certsrv/Default.asp - 80 - 31.3.3.7 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/7.0) - 401 2 5 0
1637   -  2015-03-11 21:59:09 1.2.3.4 GET /console/faces/com_sun_web_ui/jsp/version/version_30.jsp - 80 - 31.3.3.7 Sun+Web+Console+Fingerprinter/7.15 - 404 0 2 0
1638   -  2015-03-11 22:01:58 1.2.3.4 GET /IISADMPWD/aexp.htr - 80 - 31.3.3.7 - - 404 0 2 0
1639 -->
1640
1641 <decoder name="web-accesslog-iis-default">
1642   <parent>windows-date-format</parent>
1643   <type>web-log</type>
1644   <use_own_name>true</use_own_name>
1645   <prematch offset="after_parent">^\d+.\d+.\d+.\d+ GET |^\d+.\d+.\d+.\d+ POST </prematch>
1646   <regex offset="after_prematch">(\S+ \S*) \.* (\d+.\d+.\d+.\d+) \S*\.* (\d\d\d) \S+ \S+ \S+</regex>
1647   <order>url,srcip,id</order>
1648 </decoder>
1649
1650
1651 <!-- IIS 5 W3C FTP log format.
1652   - Examples:
1653   - #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)
1654   - 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 - - - -
1655   - 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 - - - -
1656   -->
1657 <decoder name="msftp">
1658   <parent>windows-date-format</parent>
1659   <use_own_name>true</use_own_name>
1660   <prematch offset="after_parent">^\d+.\d+.\d+.\d+ \S+ MSFTPSVC</prematch>
1661   <regex offset="after_parent">^(\d+.\d+.\d+.\d+) (\S+) \S+ \S+ \S+ </regex>
1662   <regex>\d+ [\d+](\S+) \S+ \S+ (\d+) </regex>
1663   <order>srcip,user,action,id</order>
1664 </decoder>  
1665
1666
1667
1668 <!-- IIS 5 W3C SMTP log format (Exchange).
1669   - Examples:
1670   - #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)
1671   - 2006-10-09 14:04:46 69.217.186.117 - SMTPSVC1 MEE-PDC 192.168.X.X 0 xxxx -
1672   > +hupylaw.hupy.local 500 0 32 23 0 SMTP - - - -
1673   -->
1674 <decoder name="msexchange">
1675   <parent>windows-date-format</parent>
1676   <use_own_name>true</use_own_name>
1677   <prematch offset="after_parent">^\d+.\d+.\d+.\d+ \S+ SMTPSVC</prematch>
1678   <regex offset="after_parent">^(\d+.\d+.\d+.\d+) \S+ \S+ \S+ \S+ </regex>
1679   <regex>\d+ (\S+) \S+ \S+ (\d+) </regex>
1680   <order>srcip, action, id</order>
1681 </decoder>
1682
1683
1684
1685 <!-- Racoon VPN.
1686   - Extract id (error or info) and ip address whenever possible.
1687   - 2006-08-08 01:42:09: ERROR: couldn't find the pskey for 222.155.15.88.
1688   - 
1689   -->
1690 <decoder name="racoon">
1691   <prematch>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d: </prematch>
1692 </decoder>
1693
1694 <decoder name="racoon-failed">
1695   <parent>racoon</parent>
1696   <use_own_name>true</use_own_name>
1697     
1698   <prematch offset="after_parent">^ERROR: couldn't find the pskey </prematch>
1699   <regex offset="after_prematch">^for (\d+.\d+.\d+.\d+)</regex>
1700   <order>srcip</order>
1701 </decoder>
1702
1703 <decoder name="racoon-action">
1704   <parent>racoon</parent>
1705   <regex offset="after_parent">^(\w+): </regex>
1706   <order>action</order>
1707 </decoder>
1708
1709             
1710
1711 <!-- Squid access log decoder.
1712   - Will extract the srcip.
1713   - Author: Ahmet Ozturk
1714   - Examples:
1715   - 1140701044.525   1231 192.168.1.201 TCP_DENIED/400 1536
1716     GET ahmet - NONE/- text/html
1717   - 1140701230.827    781 192.168.1.210 TCP_DENIED/407 1785
1718     GET http://www.ossec.net oahmet NONE/- text/html
1719   -->
1720 <decoder name="squid-accesslog">
1721   <type>squid</type>
1722   <prematch>^\d+ \d+.\d+.\d+.\d+ </prematch>
1723   <regex>^\d+ (\d+.\d+.\d+.\d+) (\w+)/(\d+) \d+ \w+ (\S+) </regex>
1724   <order>srcip,action,id,url</order>
1725 </decoder>  
1726
1727
1728 <!-- Windows decoder
1729   - Will extract extra_data (as win source),action (as win category), id,
1730   - username and computer name (as system_name).
1731   - Examples:
1732   - WinEvtLog: Application: INFORMATION(0x00000064): ESENT: 
1733     (no user)(no domain): 
1734   - WinEvtLog: Security: AUDIT_FAILURE(0x000002A9): Security: 
1735     SYSTEM: NT AUTHORITY: The logon to account: xyz    by: 
1736     MICROSOFT_AUTHENTICATION_PACKAGE_V1_0    from workstation: la    failed. 
1737     The error code was: 3221225572
1738   - WinEvtLog: Security: AUDIT_FAILURE(0x00000211): Security: 
1739     SYSTEM: NT AUTHORITY: Logon Failure:      Reason:     Unknown user 
1740     name or bad password       User Name:  ab      Domain:     cd      
1741     Logon Type: 2       Logon Process:  User32          Authentication 
1742     Package: Negotiate       Workstation Name:   ad
1743   - 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  
1744   - 2013 Oct 09 17:09:04 WinEvtLog: Application: INFORMATION(1): My Script: (no user): no domain: demo1.foo.example.com: test
1745   -->
1746 <decoder name="windows">
1747   <type>windows</type>
1748   <prematch>^\d\d\d\d \w\w\w \d\d \d\d:\d\d:\d\d WinEvtLog: |^WinEvtLog: </prematch>
1749   <regex offset="after_prematch">^\.+: (\w+)\((\d+)\): (\.+): </regex>
1750   <regex>(\.+): \.+: (\S+): </regex>
1751   <order>status, id, extra_data, user, system_name</order>
1752   <fts>name, location, user, system_name</fts>
1753 </decoder>    
1754
1755
1756 <!-- Windows decoder -NTsyslog format
1757   - Will extract extra_data (as win source),action (as win category), id,
1758   - username and computer name (as url).
1759   - Examples:
1760   - 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
1761   - 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}
1762   -->
1763 <decoder name="windows-ntsyslog">
1764   <type>windows</type>
1765   <prematch>^security[\w+] \d+ </prematch>
1766   <regex>^(\w+)[(\w+)] (\d+) </regex>
1767   <order>extra_data, status, id</order>
1768 </decoder>
1769
1770
1771 <!-- Windows decoder - Snare format. 
1772   - Will extract extra_data (as win source), action (as category), id,
1773   - username and computer name (as system_name).
1774   -
1775   - These logs must be tab-separated (as specified in the Snare format)
1776   -
1777   - Examples:
1778   - Aug 11 11:11:11 xx.org MSWinEventLog  1       System 59221    Thu Aug 11 01:11:11 2006        17      Windows Update Agent    Unknown User
1779   - Jan 16 05:52:15 hostname.xx.org MSWinEventLog 1
1780   Security        13049   Tue Jan 16 05:52:15 2007        680     Security
1781   SYSTEM  User    Success Audit   ACTUATE Account Logon
1782   Account Used for Logon by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
1783   Account Name:     IUSR_HOSTNAME    Workstation:      ACTUATE
1784   12653
1785   - Jan 16 13:02:24 hostname.yy.org MSWinEventLog 1
1786   Application     14539   Tue Jan 16 13:02:24 2007        1704    SceCli
1787   Unknown User    N/A     Information     ACTUATE None      Security
1788   policy in the Group policy objects are applied successfully.    67
1789   - Jan 16 15:41:37 hostname.zz.org MSWinEventLog 1       System
1790   15059   Tue Jan 16 15:41:37 2007        10      Print   username User
1791   Information     HOSTNAME None            Document 76,
1792   /directory/directory/directory/directory/directory/date/Afilename owned
1793   by username was printed on hostname_duplex via port hostname_duplex.
1794   Size in bytes: 19543296; pages printed: 162        361
1795   -->
1796 <decoder name="windows-snare">
1797   <type>windows</type>
1798   <prematch>^MSWinEventLog\t\d\t\.+\t\d+\t\w\w\S+ \w\w\w \d\d \d\d</prematch>
1799   <regex offset="after_prematch">^:\d\d:\d\d \d\d\d\d\t(\d+)\t(\.+)</regex>
1800   <regex>\t(\.+)\t\.+\t(\.+)\t(\.+)\t</regex>
1801   <order>id, extra_data, user, status, system_name</order>
1802   <fts>name, id, location, user, system_name</fts>
1803 </decoder>
1804
1805
1806 <!-- Symantec AV decoder.
1807   - Source: http://www.ossec.net/wiki/index.php/Symantec_Antivirus
1808   - Examples:
1809   - 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
1810   - 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
1811   - 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
1812   -->
1813 <decoder name="symantec-av">
1814   <prematch>^\w\w\w\w\w\w\w\w\w\w\w\w,</prematch>
1815   <regex offset="after_prematch">^(\d+),\d+,\d+,(\S+),(\.+),</regex>
1816   <order>id, system_name, extra_data</order>
1817   <fts>name, location, id, system_name, extra_data</fts>
1818 </decoder>
1819
1820
1821 <!-- Symantec Web Security.
1822   - Source: http://www.ossec.net/wiki/index.php/Symantec_Websecurity
1823   - Examples:
1824   - 20070717,30517,1=3,41=SWS-3.0.1.86/vendor-config,100=Version 3.0.6,3=7,2=29
1825   - 20070717,73556,1=5,100=Logoff due to timeout.,11=1.2.3.4,10=usera,3=1,2=2
1826     20070717,73559,1=5,11=2.3.4.5,10=userb,3=2,2=1
1827   -->
1828 <decoder name="symantec-websecurity">
1829   <prematch>^\d\d\d\d\d\d\d\d,\d\d\d+,</prematch>
1830   <plugin_decoder>SymantecWS_Decoder</plugin_decoder>
1831 </decoder>
1832
1833
1834
1835 <!-- Trend Micro OSCE (Office Scan) decoder.
1836   - 20090716<;>948<;>TROJ_Generic.DIT<;>25<;>3<;>0<;>C:\Documents and Settings\Administrator\Desktop\HyperSnap 6.02.01_EN\HprSnap6Man.chm<;>
1837   - 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<;>
1838   - 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<;>
1839   - Date<;>Time<;>Virus name<;>Scan result<;>Scan type<;>Seen<;>Filename<;>
1840   - We are only extracting the scan result right now.
1841   -->
1842 <decoder name="trend-osce">
1843   <prematch>^20\d\d\d\d\d\d\<;></prematch>
1844   <regex offset="after_prematch">^\d+\<;>\S+\<;>(\d+)\<;</regex>
1845   <order>id</order>
1846 </decoder>
1847
1848
1849
1850 <!-- ossec decoder.
1851   - Deals with ossec internal messages.
1852   -->
1853 <decoder name="ossec">
1854   <prematch>^ossec: </prematch>
1855   <type>ossec</type>
1856 </decoder>  
1857
1858 <decoder name="ossec-agent">
1859   <parent>ossec</parent>
1860   <type>ossec</type>
1861   <prematch offset="after_parent">^Agent started:</prematch>
1862   <regex offset="after_prematch">^ '(\S+)'</regex>
1863   <order>extra_data</order>
1864   <fts>name, location, extra_data</fts>
1865 </decoder>
1866
1867 <decoder name="ossec-alert1">
1868    <parent>ossec</parent>
1869    <prematch>^ossec: Alert Level:</prematch>
1870    <plugin_decoder>OSSECAlert_Decoder</plugin_decoder>
1871 </decoder>
1872
1873 <decoder name="ossec-alert">
1874   <program_name>^ossec$</program_name>
1875   <plugin_decoder>OSSECAlert_Decoder</plugin_decoder>
1876 </decoder>  
1877
1878 <!-- decoder for active responses as logged by an OSSEC agent or server 
1879 - Examples
1880 Sat May  7 03:17:27 CDT 2011 /var/ossec/active-response/bin/host-deny.sh add - 172.16.0.1 1304756247.60385 31151
1881 Sat May  7 03:17:27 CDT 2011 /var/ossec/active-response/bin/firewall-drop.sh add - 172.16.0.1 1304756247.60385 31151
1882 Sat May  7 03:27:57 CDT 2011 /var/ossec/active-response/bin/host-deny.sh delete - 172.16.0.1 1304756247.60385 31151
1883 Sat May  7 03:27:57 CDT 2011 /var/ossec/active-response/bin/firewall-drop.sh delete - 172.16.0.1 1304756247.60385 31151
1884 -->
1885
1886 <decoder name="ar_log"> 
1887   <prematch>^\w\w\w \w+\s+\d+ \d\d:\d\d:\d\d \w+ \d+ /\S+/active-response</prematch>
1888   <regex offset="after_prematch">/bin/(\S+) (\S+) - (\S+) (\d+.\d+) (\d+)</regex> 
1889   <order>action, status, srcip, id, extra_data</order> 
1890 </decoder>
1891
1892 <!-- Zeus decoder.
1893   - Will extract the severity and the srcip/username when available.
1894   - Examples:
1895   - [08/Aug/2006:22:32:12 +0100] WARN:admin:Authentication failure, url=/index.cgi, host=xx.yy.com, user=admin
1896   - [10/Dec/2006:16:59:26 +0000] INFO:Zeus Admin Server running
1897   -->
1898 <decoder name="zeus">
1899   <prematch>^[\d\d/\w\w\w/\d\d\d\d:\d\d:\d\d:\d\d \S+] </prematch>
1900   <regex offset="after_prematch"> host=(\S+), </regex>
1901   <order>srcip</order>
1902 </decoder>
1903
1904
1905
1906 <!-- Vmware ESX logs.
1907   - Will extract the severity and username/ip when availavle.
1908   - Examples:
1909   - [2008-03-09 22:43:35.924 'ha-eventmgr' 84503472 info] Event 2053 : User root@127.0.0.1 logged in
1910   - [2008-02-05 02:13:18.112 'ha-eventmgr' 95833272 info] Event xyz : User m@1.2.3.4 logged in
1911   -  [2008-08-26 11:06:16.359 'ha-eventmgr' 20532144 info] Event 285 : Failed login attempt for root@127.0.0.1
1912   - Aug 25 06:01:10 hostname vmware-hostd[1863]: Accepted password for user root from 127.0.0.1
1913   - Aug  7 11:05:34 localhost vmware-authd[9709]: login from 172.16.129.78 as 523b717c-4542-f5fc-c006-1644eb8f4330
1914   - Aug 26 11:42:29 localhost vmware-hostd[1863]: Rejected password for user blablabla from 127.0.0.1
1915   -->
1916 <decoder name="vmware">
1917   <prematch>^[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d.\d\d\d '\S+' \d+ </prematch>
1918 </decoder>  
1919
1920 <decoder name="vmware-extra">
1921   <parent>vmware</parent>
1922   <regex offset="after_parent">^(\w+)] \S+ \S+ </regex>
1923   <order>status</order>
1924 </decoder>  
1925
1926 <decoder name="vmware-extra">
1927   <parent>vmware</parent>
1928   <regex offset="after_regex">^: User (\w+)@(\d+.\d+.\d+.\d+)</regex>
1929   <regex> logged |^: Failed login \w+ for (\w+)@(\d+.\d+.\d+.\d+)</regex>
1930   <order>user, srcip</order>
1931 </decoder>  
1932
1933 <decoder name="vmware-syslog">
1934   <program_name>vmware</program_name>
1935 </decoder>
1936
1937 <decoder name="vmware-success">
1938   <parent>vmware-syslog</parent>
1939   <prematch>^Accepted|^Rejected</prematch>
1940   <regex offset="after_prematch">^ \S+ for user (\S+) from (\S+)$</regex>
1941   <order>user, srcip</order>
1942 </decoder>
1943           
1944 <decoder name="vmware-login">
1945   <parent>vmware-syslog</parent>
1946   <prematch>^login from </prematch>
1947   <regex offset="after_prematch">^(\S+) as</regex>
1948   <order>srcip</order>
1949 </decoder>
1950
1951
1952
1953 <!-- Solaris BSM
1954   - Examples:
1955   - Nov 21 15:12:56 unknown audit: [ID 905220 audit.notice] system booted
1956     text booting kernel
1957   - Nov 21 15:16:22 unknown audit: [ID 984917 audit.notice] login - telnet
1958     failed session 2740580090 by root as root:root from 1.254.168.192
1959   - failed session 2740580090 by root as root:root from 1.254.168.192
1960   - ok session 347344759 by 500959152 as root:root from 3.11.8.4 obj   
1961   -->
1962 <decoder name="solaris_bsm">
1963   <program_name>^audit$</program_name>
1964 </decoder>
1965
1966 <decoder name="solaris_bsm_session">
1967   <parent>solaris_bsm</parent>
1968   <prematch> \w+ session \d+ by </prematch>
1969   <regex> (\w+) session \d+ by</regex>
1970   <order>status</order>
1971 </decoder>
1972
1973 <decoder name="solaris_bsm_session">
1974   <parent>solaris_bsm</parent>
1975   <regex offset="after_regex">^ \S+ as \S+:\S+ from (\S+)</regex>
1976   <order>srcip</order>
1977 </decoder>
1978
1979
1980
1981 <!-- Asterisk logs
1982   - Examples:
1983   - Dec 16 18:02:04 asterisk1 asterisk[31774]: NOTICE[31787]:
1984   chan_sip.c:11242 in handle_request_register: Registration from
1985   '"503"<sip:503@192.168.1.107>' failed for '192.168.1.137' - Wrong
1986   password
1987   -->
1988 <decoder name="asterisk">
1989   <program_name>^asterisk</program_name>
1990 </decoder>
1991
1992 <decoder name="asterisk-hijacking">
1993   <parent>asterisk</parent>
1994   <prematch>^WARNING[\d+]: \S+ in \S+: Don't know </prematch>
1995   <regex offset="after_prematch">^\S+ how to respond via '(\w+/\d.\d/\w+)'</regex>
1996   <order>user</order>
1997 </decoder>
1998
1999 <decoder name="asterisk-denied">
2000   <parent>asterisk</parent>
2001   <prematch>^NOTICE[\d+]: \S+ in \S+: Registration from </prematch>
2002   <regex offset="after_prematch">^\S+ failed for '(\d+.\d+.\d+.\d+)'</regex>
2003   <order>srcip</order>
2004 </decoder>
2005
2006 <decoder name="asterisk-denied2">
2007   <parent>asterisk</parent>
2008   <prematch>Registration from </prematch>
2009   <regex offset="after_prematch">failed for '(\d+.\d+.\d+.\d+)'</regex>
2010   <order>srcip</order>
2011 </decoder>
2012
2013 <decoder name="asterisk-iax-authentication-denied">
2014   <parent>asterisk</parent>
2015   <prematch>^NOTICE[\d+]: \S+ in \S+: Host </prematch>
2016   <regex offset="after_prematch">^(\d+.\d+.\d+.\d+) failed MD5 authentication for (\S+)</regex>
2017   <order>srcip, user</order>
2018 </decoder>
2019
2020 <!-- Cisco IOS
2021   - Group for Cisco IOS messages.
2022   - We would need to support multiple formats, but currently we require
2023   - no service time stamp and no sequence-numbers.
2024   -
2025   - 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
2026   - Aug 20 11:33:41 RouterName 696: %SYS-5-CONFIG_I: Configured from
2027   console by admin on vty0 (210.x.x.12)
2028   - 681: Aug 17 17:41:24.776 AEST: %SEC-6-IPACCESSLOGS:
2029   - 1348: .Jun 12 18:22:22 UTC: %SYS-5-CONFIG_I:
2030   - 1348: *Jun 12 18:22:22 UTC: %SYS-5-CONFIG_I:
2031   - 23: May  3 05:15:25.217 UTC: %SEC-6-IPACCESSLOGP:
2032   - Possible regex:
2033   "^%\w+-\d-\w+: |^\S\w\w+ \.\d \d\d:\S+ \w+: %\w+-\d-\w+:"
2034   -->
2035 <decoder name="cisco-ios">
2036   <prematch>^%\w+-\d-\w+: </prematch>
2037 </decoder>
2038
2039 <decoder name="cisco-ios">
2040   <program_name />
2041   <prematch>^%\w+-\d-\w+: </prematch>
2042 </decoder>
2043   
2044   
2045 <!-- Cisco IOS
2046   - Will extract the action, srcip, srcport, dstip and dstport
2047   - Samples:
2048   -
2049   - %SEC-6-IPACCESSLOGP: list 102 denied tcp 10.0.6.56(3067) -> 172.36.4.7(139), 1 packet
2050   - %SEC-6-IPACCESSLOGP: list 199 denied tcp 10.0.61.108(1477) -> 10.0.127.20(445), 1 packet
2051   -->
2052 <decoder name="cisco-ios-acl">
2053   <parent>cisco-ios</parent>
2054   <type>firewall</type>
2055   <prematch>^%SEC-6-IPACCESSLOGP: </prematch>
2056   <regex offset="after_prematch">^list \S+ (\w+) (\w+) </regex>
2057   <regex>(\S+)\((\d+)\) -> (\S+)\((\d+)\),</regex>
2058   <order>action, protocol, srcip, srcport, dstip, dstport</order>
2059 </decoder>
2060
2061
2062 <!-- Cisco IOS IDS/IPS module 
2063   - Will extract the id, srcip, srcport, dstip and dstport
2064   - 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]
2065   - 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]
2066   - 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]
2067   -->
2068 <decoder name="cisco-ios-ids">
2069   <parent>cisco-ios</parent>
2070   <type>ids</type>
2071   <prematch>^%IPS-4-SIGNATURE: </prematch>
2072   <regex offset="after_prematch">^Sig:(\d+) \.+[(\S+):(\d+) -> </regex>
2073   <regex>(\S+):(\d+)]</regex>
2074   <order>id, srcip, srcport, dstip, dstport</order>
2075   <fts>name, id, srcip, dstip</fts>
2076   <ftscomment>First time Cisco IOS IDS/IPS module rule fired.</ftscomment>
2077 </decoder>
2078
2079
2080 <!-- Cisco IOS
2081   - Extracts the ID of cisco ios messages.
2082   -->
2083 <decoder name="cisco-ios-generic">
2084   <parent>cisco-ios</parent>
2085   <regex>^(%\w+-\d-\w+): </regex>
2086   <order>id</order>
2087 </decoder>
2088
2089
2090
2091 <!-- Checkpoint via syslog decoder.
2092   - Does not currently handle all types of Checkpoint events.
2093   - Checkpoint NG(X)/FW-1 logs via (Linux) syslog
2094   - Ex. fw log -ftnp fw.log | logger -t Checkpoint
2095   -
2096   - fw log :
2097   -         -f select current log file
2098   -         -t tail file
2099   -         -n use ip instead of name
2100   -         -p use port number instead of name
2101   -
2102   -         -l add date before timestamp
2103   -            Use of -l changes log format slightly
2104   -
2105   -         -g without : and ; delimiters
2106   -            use of -g significantly changes log format
2107   -            this decoder is incompatible with -g
2108   -
2109   - logger :
2110   -         -t <tag> prepends "tag: " to log entry
2111   -        the tag here must match "program name" in the decoder
2112   -            
2113   - Examples:
2114   -
2115   - Checkpoint: 21Aug2007 12:00:00 accept 10.10.10.2 >eth0 rule: 100; rule_uid:
2116 {00000000-0000-0000-0000-000000000000}; service_id: nbdatagram; src:
2117 10.10.10.3; dst: 10.10.10.255; proto: udp; product: VPN-1 & FireWall-1;
2118 service: 138; s_port: 138;
2119   -
2120   - Checkpoint: 13:00:00 accept 10.10.10.2 >eth0 rule: 101; rule_uid:
2121 {00000000-0000-0000-0000-000000000000}; service_id: http; src: 10.10.10.3; dst:
2122 10.1.2.3; proto: tcp; product: VPN-1 & FireWall-1; service: 80; s_port: 1111;
2123   -
2124   - Checkpoint: 21Aug2007 14:49:26 drop   10.10.10.1 >eth4 rule: 102; rule_uid:
2125 {00000000-0000-0000-0000-000000000000}; ICMP: Echo Request; src: 10.10.10.2;
2126 dst: 10.10.10.3; proto: icmp; ICMP Type: 8; ICMP Code: 0; product: VPN-1 &
2127 FireWall-1;
2128   -
2129   - Checkpoint:  3Apr2008 15:02:15 monitor 10.10.10.3 >eth2 Attack Info: Line 
2130 in HTTP request too long; attack: Malformed HTTP; src: 10.10.10.4; dst: 
2131 10.10.10.5; proto: tcp; product: SmartDefense; service: 111; s_port: 222;
2132   -->
2133
2134 <!-- \s+\S+ \d\d:\d\d:\d\d (\w+) \d+.\d+.\d+.\d+ \p\S+ rule: -->
2135 <decoder name="checkpoint-syslog">
2136   <program_name>^Checkpoint</program_name>
2137   <prematch>^\s+\S+ \d\d:\d\d:\d\d </prematch>
2138 </decoder>
2139
2140 <decoder name="checkpoint-syslog-fw">
2141   <parent>checkpoint-syslog</parent>
2142   <type>firewall</type>
2143   <prematch offset="after_parent">^drop|^accept|^reject</prematch>
2144   <regex offset="after_parent">^(\w+)\s+\S+ \p\S+ rule:\.+</regex>
2145   <regex>src: (\d+.\d+.\d+.\d+); dst: (\d+.\d+.\d+.\d+); proto: (\S+);</regex>
2146   <order>action,srcip,dstip,protocol</order>
2147 </decoder>  
2148
2149 <decoder name="checkpoint-syslog-fw">
2150   <parent>checkpoint-syslog</parent>
2151   <type>firewall</type>
2152   <regex offset="after_regex">service: (\d+); s_port: (\d+);</regex>
2153   <order>dstport,srcport</order>
2154 </decoder>
2155             
2156 <decoder name="checkpoint-syslog-ids">
2157   <parent>checkpoint-syslog</parent>
2158   <type>ids</type>
2159   <prematch offset="after_parent">^monitor|^drop</prematch>
2160   <regex offset="after_prematch">attack: (\.+); </regex>
2161   <regex>src: (\d+.\d+.\d+.\d+); dst: (\d+.\d+.\d+.\d+); </regex>
2162   <regex>proto: (\S+);</regex>
2163   <order>extra_data, srcip, dstip, protocol</order>
2164   <fts>name, extra_data, srcip, dstip</fts>
2165   <ftscomment>First time Checkpoint rule fired.</ftscomment>
2166 </decoder>
2167
2168
2169
2170 <!-- Microsoft Windows 2003 ipv4, 2008 ipv4/ipv6 DHCP decoder for OSSEC
2171   -  Author: phishphreek@gmail.com
2172   -->
2173   
2174 <!--
2175   -  Server 2008 DHCP IPv4 Decoder (must go first)
2176   -  ID,Date,Time,Description,IP Address,Host Name,MAC Address,User Name, TransactionID, QResult,Probationtime, CorrelationID.
2177   -  24,3/10/2009,0:00:46,Database Cleanup Begin,,,,
2178   -  0,3/10/2009,0:00:46,DNS Update Request,201.10.168.192,OPS03W034.,,
2179 -->
2180
2181 <decoder name="ms-dhcp-ipv4">
2182   <prematch>^\d\d,\d+/\d+/\d\d\d\d,\d+:\d+:\d+,|</prematch>
2183   <prematch>^\d\d,\d+/\d+/\d\d,\d+:\d+:\d+,</prematch>
2184   <regex>^(\d\d),\d+/\d+/\d\d\d*,\d+:\d+:\d+,(\w+),(\d+.\d+.\d+.\d+)</regex>
2185   <order>id,extra_data,srcip</order>
2186 </decoder>
2187
2188 <!--
2189   -  Server 2008 DHCP IPv6 Decoder (must go second)
2190   -  ID,Date,Time,Description,IPV6 Address,Host Name,Error Code, Duid Length, Duid Bytes(Hex),User Name.
2191 -->
2192 <decoder name="ms-dhcp-ipv6">
2193   <prematch>^\d\d\d\d\d,\d\d/\d\d/\d\d,\d\d:\d\d:\d\d,</prematch>
2194   <regex>^(\d\d\d\d\d),</regex>
2195   <order>id</order>
2196 </decoder>
2197
2198
2199 <!-- OpenBSD kernel messages -->
2200 <decoder name="bsd_kernel">
2201   <program_name>^/bsd</program_name>
2202 </decoder>
2203
2204 <decoder name="bsd_arp">
2205   <parent>bsd_kernel</parent>
2206   <prematch offset="after_parent">^arp </prematch>
2207   <regex offset="after_prematch"> for (\S+) by (\S+) on \S+</regex>
2208   <order>dstip, extra_data</order>
2209 </decoder>
2210
2211 <!-- OpenBSD deluser
2212   -  2014-02-21T10:22:55.134355-05:00 arrakis userdel[23023]: user removed: name=dac
2213 -->
2214
2215 <decoder name="open-userdel">
2216   <program_name>userdel</program_name>
2217   <regex>user removed: name=(\S+)$</regex>
2218   <order>srcuser</order>
2219 </decoder>
2220
2221
2222
2223 <!-- OpenBSD mountd decoder
2224 - Apr 11 20:01:02 ix mountd[11618]: Refused mount RPC from host 192.168.17.10 port 45659
2225 -->
2226
2227 <decoder name="mountd">
2228   <program_name>^mountd</program_name>
2229 </decoder>
2230
2231 <decoder name="mountd-host">
2232   <parent>mountd</parent>
2233   <prematch>from host </prematch>
2234   <regex offset="after_prematch">(\S+) port \d+$</regex>
2235   <order>srcip</order>
2236 </decoder>
2237
2238
2239 <!-- nss ldap decoders
2240 - Jun 26 08:19:25 servername sh: nss_ldap: reconnecting to LDAP server (sleeping 32 seconds)...
2241 - Aug 16 10:58:12 client nscd: nss_ldap: failed to bind to LDAP server ldap://ldap.example.com: Can't contact LDAP server
2242 -->
2243 <!--
2244 <decoder name="nss-ldap">
2245   <program_name>^sh$|^nscd$</program_name>
2246   <prematch>^nss_ldap</prematch>
2247 </decoder>
2248
2249 <decoder name="ldap-server">
2250   <parent>nss-ldap</parent>
2251   <prematch> server </prematch>
2252   <regex offset="after_prematch">ldap://(\S+):</regex>
2253   <order>system_name</order>
2254 </decoder>
2255 -->
2256
2257
2258
2259 <!-- OpenBSD groupdel
2260   - May 28 09:15:43 ix groupdel[25984]: group deleted: name=_dbus
2261 -->
2262 <decoder name="groupdel">
2263   <program_name>groupdel</program_name>
2264   <regex>^group deleted: name=(\S+)$</regex>
2265   <order>extra_data</order>
2266 </decoder>
2267
2268
2269 <!-- Portsentry -->
2270 <decoder name="portsentry">
2271   <program_name>^portsentry</program_name>
2272 </decoder>
2273
2274 <decoder name="portsentry-attackalert">
2275   <parent>portsentry</parent>
2276   <prematch>attackalert: Connect from host: </prematch>
2277   <regex offset="after_prematch">(\S+)/\S+ to (\S+) port: (\d+)$</regex>
2278   <order>srcip,protocol,dstport</order>
2279 </decoder>
2280
2281 <decoder name="portsentry-blocked">
2282   <parent>portsentry</parent>
2283   <prematch>is already blocked. Ignoring$</prematch>
2284   <regex>Host: (\S+) is</regex>
2285   <order>srcip</order>
2286 </decoder>
2287
2288
2289 <!-- Clamav and Freshclam decoder
2290   -  Nov  5 22:59:19 ix freshclam[32349]: Incremental update failed, trying to download daily.cvd
2291 -->
2292 <decoder name="clamd">
2293   <program_name>^clamd</program_name>
2294 </decoder>
2295
2296 <decoder name="freshclam">
2297   <program_name>^freshclam</program_name>
2298 </decoder>
2299
2300
2301 <!-- OpenLDAP decoder.
2302   - 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)
2303   -->
2304 <decoder name="openldap">
2305    <program_name>^slapd</program_name>
2306    <regex>^conn=(\d+) </regex>
2307    <order>id</order>
2308 </decoder>
2309
2310
2311
2312 <!-- NTP decoder 
2313   - gorilla ntpd[27379]: bad sensor nmea0
2314   - tiny ntpd[25875]: bad peer 192.168.1.233 (192.168.1.233)
2315   - gorilla ntpd[29719]: bind on 192.168.1.233 failed, skipping: Can't assign requested address
2316   - ix ntpd[8392]: bind on 192.168.17.9 failed, skipping: Address already in use
2317   - ix ntpd[11685]: bad peer from pool pool.ntp.org (64.73.32.135)
2318   - richese ntpd[3465]: bad peer ix (192.168.17.9)
2319   - ix ntpd[11685]: bad peer from pool pool.ntp.org (69.50.219.51)
2320   - ix ntpd[7045]: recvmsg 192.168.17.17: Connection refused
2321   - ix ntpd[29411]: 2 out of 3 peers valid
2322   - bridge ntpd[5877]: logconfig: illegal argument  - ignored
2323   - bridge ntpd[5902]: offset 0.000000 sec freq 0.000 ppm error 0.000011 poll 6
2324 -->
2325 <decoder name="ntpd">
2326   <program_name>^ntpd</program_name>
2327 </decoder>
2328
2329 <decoder name="ntpd-bad-peer">
2330   <parent>ntpd</parent>
2331   <prematch offset="after_parent">^bad peer </prematch>
2332   <regex>^bad peer \S+ \p(\S+)\p$|^bad peer from pool \S+ \p(\S+)\p$</regex>
2333   <order>srcip</order>
2334 </decoder>
2335
2336
2337 <!-- Auditd
2338 163
2339 164   - Will extract action, id, status, extra_data, srcip
2340 165   - Author and (c): Michael Starks, 2011
2341 166   - Future enhancements should ensure that all log samples regress properly due to the complexity of these decoders
2342 167   - Examples: 
2343
2344 <!-- CentOS 5.5 -->
2345 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)'
2346 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)'
2347 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
2348 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)'
2349 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)'
2350 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)'
2351 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)'
2352 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)'
2353
2354 <!-- Unknown source -->
2355 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)'
2356
2357 <!-- Ubuntu 10.04 LTS -->
2358 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"
2359 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)
2360 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"
2361 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)'
2362 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
2363
2364 <!-- Will not decode due to null name, that's OK -->
2365 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
2366
2367 -->
2368
2369 <decoder name="auditd">
2370   <prematch>^type=</prematch>
2371 </decoder>
2372
2373 <!-- SELinux -->
2374 <decoder name="auditd-selinux">
2375   <parent>auditd</parent>
2376   <prematch offset="after_parent">^AVC </prematch>
2377   <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>
2378   <order>action,id,status,extra_data</order>
2379 </decoder>
2380
2381 <!-- syscall -->
2382 <decoder name="auditd-syscall">
2383   <parent>auditd</parent>
2384   <prematch offset="after_parent">^SYSCALL </prematch>
2385   <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>
2386   <order>action,id,status,extra_data</order>
2387 </decoder>
2388
2389 <!-- config -->
2390 <decoder name="auditd-config">
2391   <parent>auditd</parent>
2392   <prematch offset="after_parent">^CONFIG_CHANGE </prematch>
2393   <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>
2394   <order>action,id,extra_data</order>
2395 </decoder>
2396
2397 <!-- path (will only decode if name is not null)-->
2398 <decoder name="auditd-path">
2399   <parent>auditd</parent>
2400   <prematch offset="after_parent">^PATH </prematch>
2401   <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>
2402   <order>action,id,extra_data</order>
2403 </decoder>
2404
2405 <!-- user-related -->
2406 <decoder name="auditd-user">
2407   <parent>auditd</parent>
2408   <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>
2409   <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>
2410   <order>action,id</order>
2411 </decoder>
2412
2413 <decoder name="auditd-user">
2414   <parent>auditd</parent>
2415   <regex offset="after_regex"> acct="(\.+)" : exe="(\.+)" \(hostname=\S+, addr=(\S+), terminal=\S+$</regex>
2416   <order>user,extra_data,srcip</order>
2417 </decoder>
2418
2419 <decoder name="auditd-user">
2420   <parent>auditd</parent>
2421   <regex offset="after_regex"> ses=\d+ subj=\S+ msg='\.+ acct="(\.+)" exe="(\.+)" hostname=\S+ addr=(\S+) terminal=\S+ res=(\S+)$</regex>
2422   <order>user,extra_data,srcip,status</order>
2423 </decoder>
2424
2425 <decoder name="auditd-user">
2426   <parent>auditd</parent>
2427   <regex offset="after_regex"> subj=\S+ msg='\.+ acct="(\.+)" \p*\s*exe="(\.+)" \(hostname=\S+, addr=(\S+), terminal=\S+ res=(\S+)\)'$</regex>
2428   <order>user,extra_data,srcip,status</order>
2429 </decoder>
2430
2431 <decoder name="auditd-user">
2432   <parent>auditd</parent>
2433   <regex offset="after_regex"> subj=\S+ msg='\.+ exe="(\.+)" \(hostname=\S+, addr=(\S+), terminal=\S+ res=(\S+)\)'$</regex>
2434   <order>extra_data,srcip,status</order>
2435 </decoder>
2436
2437 <!--
2438 mptscsih \ mptbase decoder
2439
2440 Description: module for SCSI controllers.
2441
2442 Examples:
2443 [ 5008.286061] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ffff88007a8a9f00)
2444
2445 [ 6498.769248] mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 1 id=8
2446 [ 6498.769252] mptbase: ioc0:   PhysDisk is now failed, out of sync
2447
2448 [ 6498.775783] mptbase: ioc0: RAID STATUS CHANGE for VolumeID 0
2449 [ 6498.775788] mptbase: ioc0:   volume is now degraded, enabled
2450 -->
2451 <decoder name="mptscsih-1">
2452   <parent>iptables</parent>
2453   <prematch>^[\s\d+.\d+] mptscsih: </prematch>
2454   <regex>^[\s\d+.\d+] (\w+): (\w+): task abort: (\w+)</regex>
2455   <order>id,data,status</order>
2456 </decoder>
2457
2458 <decoder name="mptbase-1">
2459   <parent>iptables</parent>
2460   <prematch>^[\s\d+.\d+] mptbase: </prematch>
2461   <regex>^[\s\d+.\d+] (\w+): (\w+):\s+\w+ is now (\w+)\p\s(\D+)$</regex>
2462   <order>id,data,action,status</order>
2463 </decoder>
2464
2465 <!-- Grandstream HT502 VoIP gateway decoder 
2466 Author and (c): Michael Starks, 2014 -->
2467
2468 <!-- HT502: [00:0B:82:14:5B:94] Transport error (-1) for transaction 2677 -- >
2469
2470 <decoder name="grandstream-ata">
2471  <prematch>^HT286: [\w\w:\w\w:\w\w:\w\w:\w\w:\w\w]\p*\.+\p* |</prematch>
2472  <prematch>^HT502: [\w\w:\w\w:\w\w:\w\w:\w\w:\w\w]\p*\.+\p* |</prematch>
2473  <prematch>^HT503: [\w\w:\w\w:\w\w:\w\w:\w\w:\w\w]\p*\.+\p* </prematch>
2474 </decoder>
2475
2476 <decoder name="grandstream-registration">
2477  <parent>grandstream-ata</parent>
2478  <prematch>Received </prematch>
2479  <regex offset="after_prematch">^(\d+) response for transaction (\d+)\((\w+)\)$</regex>
2480  <order>status, id, action</order>
2481 </decoder>
2482
2483 <decoder name="grandstream-fts-registered">
2484  <parent>grandstream-ata</parent>
2485  <prematch>Account </prematch>
2486  <regex offset="after_prematch">^(\d+) (registered), tried \d+; Next registration in \d+ seconds \(\d+/\d+\) on (\.+)$</regex>
2487  <order>id, status, extra_data</order>
2488  <fts>name, location, extra_data</fts>
2489 </decoder>
2490
2491 <decoder name="grandstream-incoming-cid">
2492  <parent>grandstream-ata</parent>
2493  <prematch>Vinetic::</prematch>
2494  <regex offset="after_prematch">^(startRing) with CID, Attempting to deliver CID (\d+) on port \d+$</regex>
2495  <order>action, id</order>
2496 </decoder>
2497
2498 <decoder name="grandstream-outgoing-call">
2499  <parent>grandstream-ata</parent>
2500  <regex offset="after_parent">^(Dialing) (\d+)$</regex>
2501  <order>action, id</order>
2502 </decoder>
2503
2504 <!-- EOF -->