1d73df8bdbacc766558eaa33661e6c65b3b126c7
[ossec-hids.git] / debian / ossec-hids / var / ossec / 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   - Mar 29 00:42:09 server saslauthd[1230]: pam_succeed_if(smtp:auth): error retrieving information about user demo
48   -->
49 <decoder name="pam">
50   <program_name>(pam_unix)$</program_name>
51 </decoder>
52
53 <decoder name="pam">
54   <program_name></program_name>
55   <prematch>^pam_unix|^\(pam_unix\)|^pam_succeed_if</prematch>
56 </decoder>
57
58 <decoder name="pam-user">
59   <parent>pam</parent>
60   <prematch>^session \w+ </prematch>
61   <regex offset="after_prematch">^for user (\S+)</regex>
62   <order>user</order>
63 </decoder>
64
65 <!--XXXX<decoder name="pam-user2">
66   <parent>pam</parent>
67   <prematch>^session \S+ </prematch>
68   <regex>for user (\S+)</regex>
69   <order>user</order>
70 </decoder>
71 -->
72
73 <decoder name="pam-host-user">
74   <parent>pam</parent>
75   <prematch>rhost=\S+\s+user=\S+</prematch>
76   <regex>rhost=(\S+)\s+user=(\S+)</regex>
77   <order>srcip, user</order>
78 </decoder>
79
80 <decoder name="pam-ruser">
81   <parent>pam</parent>
82   <prematch> ruser</prematch>
83   <regex offset="after_prematch">^=(\S+) </regex>
84   <order>user</order>
85 </decoder>
86
87 <decoder name="pam-ruser">
88   <parent>pam</parent>
89   <regex> rhost=(\S+)</regex>
90   <order>srcip</order>
91 </decoder>
92
93 <decoder name="pam-host">
94   <parent>pam</parent>
95   <prematch> rhost</prematch>
96   <regex offset="after_prematch">^=(\S+)</regex>
97   <order>srcip</order>
98 </decoder>
99
100
101 <!-- SSH decoder.
102   -  Will extract username and srcip from the logs.
103   -  Only add to the FTS if the login was successful
104   -  If the login failed, just extract the username/srcip for correlation
105   -  Examples:
106   -  sshd[8813]: Accepted password for root from 192.168.10.1 port 1066 ssh2
107   -  sshd[2404]: Accepted password for root from 192.168.11.1 port 2011 ssh2
108   -  sshd[21405]: Accepted password for root from 192.1.1.1 port 6023 ssh2
109   -  sshd[21487]: Failed password for root from 192.168.1.1 port 1045 ssh2
110   -  sshd[8813]: Failed none for root from 192.168.10.161 port 1066 ssh2
111   -  sshd[12675]: Failed password for invalid user lala11 from x.x.x.x ..
112   -  sshd[12914]: Failed password for invalid user lala6 from ...
113   -  sshd[8267]: Failed password for illegal user test from 62.67.45.4 port 39141 ssh2
114   -  sshd[11259]: Invalid user abc from 127.0.0.1
115   -  "" Failed keyboard-interactive for root from 192.1.1.1 port 1066 ssh2
116   -  sshd[23857]: [ID 702911 auth.notice] User xxx, coming from zzzz,
117   -  authenticated.
118   -  sshd[23578]: reverse mapping checking getaddrinfo for pib4.catv-bauer.at failed - POSSIBLE BREAKIN ATTEMPT!
119   -  sshd[61834]: reverse mapping checking getaddrinfo for sv.tvcm.ch
120   -  failed - POSSIBLE BREAKIN ATTEMPT!
121   -  sshd[3251]: User root not allowed because listed in DenyUsers
122   -  [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]
123   -  [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]
124   -  Apr 23 07:03:53 machinename sshd[29961]: User root from 12.3.4.5
125   not allowed because not listed in AllowUsers
126   -  sshd[9815]: scanned from 127.0.0.1 with SSH-1.99-AKASSH_Version_Mapper1.  Don't panic.
127   -  Sep  4 23:58:33 junction sshd[9351]: fatal: Write failed: Broken pipe
128   -  Sep 18 14:58:47 ix sshd[11816]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
129   -  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)
130   -  Aug 10 08:38:40 junction sshd[20013]: error: connect_to 192.168.179 port 8080: failed
131   -  Jun  9 00:00:01 ix sshd[9815]: scanned from 127.0.0.1 with SSH-1.99-AKASSH_Version_Mapper1.  Don't panic.
132   -  Jan 26 11:57:26 ix sshd[14879]: error: connect to ix.example.com port 7777 failed: Connection refused
133   -  Oct  8 10:07:27 y sshd[7644]: debug1: attempt 2 failures 2
134   -  Oct  8 08:58:37 y sshd[6956]: fatal: PAM: pam_setcred(): Authentication service cannot retrieve user credentials
135   -  Oct  8 08:48:33 y sshd[6856]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
136   -  Oct  8 11:18:26 172.16.51.132 sshd[7618]: error: PAM: Module is unknown for ddp from 172.16.51.1
137   -  Jun 19 20:56:00 tiny sshd[11605]: fatal: Write failed: Host is down
138   -  Jun 11 06:32:17 gorilla sshd[28293]: fatal: buffer_get_bignum2: buffer error
139   -  Jun 11 06:32:17 gorilla sshd[28293]: error: buffer_get_bignum2_ret: negative numbers not supported
140   -  Apr 14 19:28:21 gorilla sshd[31274]: Connection closed by 192.168.1.33
141   -  Jun 22 12:01:13 junction sshd[11283]: Received disconnect from 212.14.228.46: 11: Bye Bye
142   -  Nov  9 07:40:25 ginaz sshd[5973]: error: setsockopt SO_KEEPALIVE: Connection reset by peer
143   -  Nov  2 12:08:27 192.168.17.7 sshd[9665]: fatal: Cannot bind any address.
144   -  Nov  2 12:11:40 192.168.17.7 sshd[9814]: pam_loginuid(sshd:session): set_loginuid failed opening loginuid
145   -  Nov  6 09:53:38 hagal sshd[697]: error: accept: Software caused connection abort
146   -  Nov  9 11:36:55 ecaz sshd[26967]: pam_succeed_if(sshd:auth): error retrieving information about user _z9xxbBW
147   -->
148
149 <decoder name="sshd">
150   <program_name>^sshd</program_name>
151 </decoder>
152
153 <decoder name="sshd-success">
154   <parent>sshd</parent>
155   <prematch>^Accepted</prematch>
156   <regex offset="after_prematch">^ \S+ for (\S+) from (\S+) port </regex>
157   <order>user, srcip</order>
158   <fts>name, user, location</fts>
159 </decoder>
160
161 <decoder name="ssh-denied">
162   <parent>sshd</parent>
163   <prematch>^User \S+ from </prematch>
164   <regex offset="after_parent">^User (\S+) from (\S+) </regex>
165   <order>user, srcip</order>
166 </decoder>
167
168 <decoder name="sshd-success-solaris">
169   <parent>sshd</parent>
170   <prematch>^User </prematch>
171   <regex offset="after_prematch">^(\S+), coming from (\S+), </regex>
172   <order>user, srcip</order>
173   <fts>name, user, location</fts>
174 </decoder>
175
176 <decoder name="ssh-kbd">
177   <parent>sshd</parent>
178   <prematch offset="after_parent">^Postponed keyboard-interactive|^Failed keyboard-interactive</prematch>
179   <regex offset="after_prematch"> user (\S+) from (\S+) port (\d+) </regex>
180   <order>user, srcip, srcport</order>
181 </decoder>
182
183 <decoder name="ssh-invfailed">
184   <parent>sshd</parent>
185   <prematch>^Failed \S+ for invalid user|^Failed \S+ for illegal user</prematch>
186   <regex offset="after_prematch">from (\S+) port \d+ \w+$</regex>
187   <order>srcip</order>
188 </decoder>
189
190 <decoder name="ssh-failed">
191   <parent>sshd</parent>
192   <prematch>^Failed \S+ </prematch>
193   <regex offset="after_prematch">^for (\S+) from (\S+) port \d+</regex>
194   <order>user, srcip</order>
195 </decoder>
196
197 <decoder name="ssh-error">
198   <parent>sshd</parent>
199   <prematch>^error: PAM: Authentication \w+ </prematch>
200   <regex offset="after_prematch">^for (\S+) from (\S+)$</regex>
201   <order>user, srcip</order>
202 </decoder>
203
204 <decoder name="ssh-pam-error">
205   <parent>sshd</parent>
206   <prematch>^error: PAM: </prematch>
207   <regex offset="after_prematch">user (\S+) from (\S+)</regex>
208   <order>user, srcip</order>
209 </decoder>
210
211 <decoder name="ssh-reverse-mapping">
212   <parent>sshd</parent>
213   <prematch>^reverse mapping checking </prematch>
214   <regex offset="after_prematch">^\w+ for \S+ [(\S+)] |^\w+ for (\S+) </regex>
215   <order>srcip</order>
216 </decoder>
217
218 <decoder name="ssh-invalid-user">
219   <parent>sshd</parent>
220   <prematch>^Invalid user|^Illegal user</prematch>
221   <regex offset="after_prematch"> from (\S+)</regex>
222   <order>srcip</order>
223 </decoder>
224
225 <decoder name="ssh-scan">
226   <parent>sshd</parent>
227   <prematch>^scanned from</prematch>
228   <regex offset="after_prematch"> (\S+) </regex>
229   <order>srcip</order>
230 </decoder>
231
232 <decoder name="ssh-received">
233   <parent>sshd</parent>
234   <prematch>^Received disconnect </prematch>
235   <regex offset="after_prematch">^from (\S+): |^from (\S+) </regex>
236   <order>srcip</order>
237 </decoder>
238
239 <decoder name="ssh-disconnected">
240   <parent>sshd</parent>
241   <prematch>^Disconnected from invalid user</prematch>
242   <regex offset="after_prematch">\S+ (\S+) </regex>
243   <order>srcip</order>
244 </decoder>
245
246 <decoder name="ssh-connection">
247   <parent>sshd</parent>
248   <prematch>^Connection closed by </prematch>
249   <regex offset="after_prematch">user (\S+) (\S+) </regex>
250   <order>user, srcip</order>
251 </decoder>
252
253 <decoder name="ssh-negotiate">
254   <parent>sshd</parent>
255   <prematch>^Unable to negotiate with </prematch>
256   <regex offset="after_prematch">^(\S+) port (\d+)</regex>
257   <order>srcip, srcport</order>
258 </decoder>
259
260 <decoder name="ssh-protocol">
261   <parent>sshd</parent>
262   <prematch>^Protocol major versions differ for </prematch>
263   <regex offset="after_prematch">^(\S+)</regex>
264   <order>srcip</order>
265 </decoder>
266
267 <!--
268 Jul 12 16:10:26 cloud sshd[14486]: Bad protocol version identification 'GET http://m.search.yahoo.com/ HTTP/1.1' from 112.98.69.104 port 3533
269 Jul 12 16:10:41 cloud sshd[14530]: Bad protocol version identification 'GET http://check2.zennolab.com/proxy.php HTTP/1.1' from 46.182.129.46 port 60866
270 Jul 12 16:11:31 cloud sshd[14582]: Bad protocol version identification 'GET http://www.msftncsi.com/ncsi.txt HTTP/1.1' from 88.244.115.169 port 62240
271 Jul 12 16:12:15 cloud sshd[14662]: Bad protocol version identification 'GET http://m.search.yahoo.com/ HTTP/1.1' from 118.76.116.187 port 54513
272 e.g. OpenSSH > 7.2:
273 Sep  4 21:13:05 example sshd[12853]: Did not receive identification string from 192.168.0.1 port 33021
274 e.g. OpenSSH <= 7.2:
275 Sep  4 21:14:25 example sshd[18368]: Did not receive identification string from 192.168.0.1
276 -->
277
278 <decoder name="ssh-scan2">
279   <parent>sshd</parent>
280   <prematch>^Did not receive identification |^Bad protocol version </prematch>
281   <regex offset="after_prematch"> from (\S+)$| from (\S+) port (\d+)$</regex>
282   <order>srcip,srcport</order>
283 </decoder>
284
285 <decoder name="ssh-osx-refuse">
286   <parent>sshd</parent>
287   <prematch>^refused connect </prematch>
288   <regex offset="after_prematch">^from (\S+)$|^from \S+ \((\S+\w+)\)$|^from \S+ \((\S+::)\)$</regex>
289   <order>srcip</order>
290 </decoder>
291
292 <decoder name="ssh-closed">
293   <parent>sshd</parent>
294   <prematch>^Connection closed </prematch>
295   <regex offset="after_prematch">^by (\S+)$</regex>
296   <order>srcip</order>
297 </decoder>
298
299 <decoder name="ssh-disconnect">
300   <parent>sshd</parent>
301   <prematch>^Received disconnect </prematch>
302   <regex offset="after_prematch">^from (\S+):</regex>
303   <order>srcip</order>
304 </decoder>
305
306 <!--XXX
307 <decoder name="ssh-pam">
308   <parent>sshd</parent>
309   <prematch>PAM: Module</prematch>
310   <regex>for (\S+) from (\S+)$</regex>
311   <order>user, srcip</order>
312 </decoder>
313
314 <decoder name="ssh-connect-to">
315   <parent>sshd</parent>
316   <prematch>connect_to</prematch>
317   <regex>connect_to: (\S+) port (\d+):</regex>
318   <order>dstip,dstport</order>
319 </decoder>
320 -->
321
322 <decoder name="sshd-ldap">
323   <parent>sshd</parent>
324   <prematch>^pam_ldap: </prematch>
325   <regex>user "uid=(\S+),ou=\w+,dc=\w+,dc=\w+"</regex>
326   <order>user</order>
327 </decoder>
328
329 <decoder name="sshd-negotiate">
330   <parent>sshd</parent>
331   <prematch offset="after_parent">fatal: Unable to negotiate with </prematch>
332   <regex offset="after_prematch">^(\S+) port (\d+): |^(\S+): </regex>
333   <order>srcip, srcport</order>
334 </decoder>
335
336 <decoder name="sshd-pam-host-user">
337   <parent>sshd</parent>
338   <prematch>rhost=\S+\s+user=\S+</prematch>
339   <regex>rhost=(\S+)\s+user=(\S+)</regex>
340   <order>srcip, user</order>
341 </decoder>
342
343 <!--
344 <decoder name="sshd-invalid">
345   <parent>sshd</parent>
346   <prematch>^input_user_auth_request: </prematch>
347   <regex offset="after_prematch"> user (\S+)</regex>
348   <order>user</order>
349 </decoder>
350 -->
351
352 <decoder name="sshd-exceed">
353   <parent>sshd</parent>
354   <prematch> exceeded for </prematch>
355   <regex offset="after_prematch">(\S+) from (\S+) port (\d+) </regex>
356   <order>user, srcip, srcport</order>
357 </decoder>
358
359
360 <!-- Dropbear rules -->
361 <decoder name="dropbear">
362   <program_name>^dropbear</program_name>
363 </decoder>
364
365 <!--
366 Jan  8 16:39:33 tp.lan dropbear[14824]: Bad password attempt for 'root' from 193.219.28.149:48629
367 -->
368
369 <decoder name="dropbear-bad-password">
370   <parent>dropbear</parent>
371   <prematch>password</prematch>
372   <regex offset="after_prematch">for '(\S+)' from (\S+):\d+$</regex>
373   <order>dstuser, srcip</order>
374 </decoder>
375
376 <!--
377 Jan  8 19:54:12 tp.lan dropbear[15197]: Login attempt for nonexistent user from 182.72.89.122:4328
378 -->
379
380 <decoder name="dropbear-nonexist">
381   <parent>dropbear</parent>
382   <prematch>nonexistent</prematch>
383   <regex offset="after_prematch">from (\S+):\d+$</regex>
384   <order>srcip</order>
385 </decoder>
386
387 <!--
388 Jan  8 19:32:41 tp.lan dropbear[15165]: Pubkey auth succeeded for 'root' with key md5 78:d6:41:ca:78:37:80:88:1d:15:0a:68:91:d1:4e:ad from 10.10.10.241:51737
389 -->
390
391 <decoder name="dropbear-from">
392   <parent>dropbear</parent>
393   <regex>(\S+) for '(\S+)' with key \S+ (\S+) from (\S+):\d+$</regex>
394   <order>status,dstuser,extra_data,srcip</order>
395 </decoder>
396
397 <!--
398  - Telnet decoder
399  - Will extract the srcip
400  - Examples:
401  - May 31 12:33:44 queen telnetd[9876]: warning: can't verify hostname:
402    gethostbyname(131.1.satis-tl.ru) failed
403  - May 29 21:12:18 queen telnetd[6474]: refused connect from 81.215.42.27
404  - Jun  1 23:02:07 queen telnetd[62948]: connect from external.example.net
405  - Jun  1 23:02:07 queen telnetd[62948]: ttloop:  read: A connection with a remote socket was reset by that socket.
406  - Jun  2 09:54:28 valhalla in.telnetd[19723]: [ID 927837 local2.info] connect from external.example.net
407  - Jun  2 09:54:28 valhalla telnetd[19723]: [ID 485252 daemon.info] ttloop:  peer died: Error 0
408  -->
409 <decoder name="telnetd">
410   <program_name>^telnetd|^in.telnetd</program_name>
411 </decoder>
412
413 <decoder name="telnetd-ip">
414   <parent>telnetd</parent>
415   <regex>from (\S+)$</regex>
416   <order>srcip</order>
417 </decoder>
418
419
420
421 <!--
422  - rshd decoder
423  - Example message:
424  - Dec 17 10:49:23 hostname rshd[347339]: Connection from 10.217.223.31 on illegal port
425  -->
426 <decoder name="rshd">
427   <program_name>^rshd$</program_name>
428 </decoder>
429
430 <decoder name="rshd-illegal-connection">
431   <parent>rshd</parent>
432   <regex>^Connection from (\S+) on illegal port$</regex>
433   <order>srcip</order>
434 </decoder>
435
436
437
438 <!--
439  - cimserver decoder
440  - Example messages:
441  - Dec 18 18:06:28 hostname cimserver[18575]: PGS17200: Authentication failed for user jones_b.
442  - Dec 18 18:06:29 hostname cimserver[18575]: PGS17200: Authentication failed for user domain\jones_b.
443  -->
444 <decoder name="cimserver">
445   <program_name>^cimserver$</program_name>
446 </decoder>
447
448 <decoder name="cimserver-failed-authentication">
449   <parent>cimserver</parent>
450   <prematch>^\w+: Authentication failed for user </prematch>
451   <regex offset="after_prematch">^(\S+).$</regex>
452   <order>user</order>
453 </decoder>
454
455
456
457 <!--
458  - Samba decoder.
459  - Will extract the username/srcip
460  - Examples:
461  - smbd[832]: Denied connection from (192.168.3.23)
462  - smbd[832]: Connection denied from 0.0.0.0
463  - smbd[17535]: Permission denied\-\- user not allowed to delete,
464    pause, or resume print job. User name: ahmet. Printer name: prnq1.
465   -->
466
467 <decoder name="smbd">
468   <program_name>^smbd</program_name>
469 </decoder>
470
471 <decoder name="smbd-user">
472   <parent>smbd</parent>
473   <prematch>User name:</prematch>
474   <regex offset="after_prematch">^ (\S+).</regex>
475   <order>user</order>
476 </decoder>
477
478 <decoder name="smbd-ip">
479   <parent>smbd</parent>
480   <regex> from \((\S+)\)</regex>
481   <order>srcip</order>
482 </decoder>
483
484 <decoder name="smbd-from">
485   <parent>smbd</parent>
486   <prematch> from (\S+)$</prematch>
487   <regex> from (\S+)$</regex>
488   <order>srcip</order>
489 </decoder>
490
491 <decoder name="smbd-client">
492   <parent>smbd</parent>
493   <prematch>to client \S+.</prematch>
494   <regex>to client (\S+). </regex>
495   <order>srcip</order>
496 </decoder>
497
498 <decoder name="nmbd">
499   <program_name>^nmbd</program_name>
500 </decoder>
501
502
503 <!-- Sudo decoder.
504   -  Will extract the username
505   -  Examples:
506   -  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
507   -  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
508   -  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
509   -  Apr 19 14:52:02 enigma sudo:     dcid : TTY=ttyp3 ; PWD=/var/www/alex ; USER=root ; COMMAND=/sbin/chown dcid.dcid .
510   -  Dec 30 19:36:11 rheltest sudo: cplummer : TTY=pts/2 ; PWD=/home/cplummer1 ; USER=root ; TSID=0000UM ; COMMAND=/bin/bash
511   -->
512 <decoder name="sudo">
513   <program_name>^sudo</program_name>
514   <regex>^\s*(\S+)\s:\sTTY=\S+\s;\sPWD=(\S+)\s;\sUSER=(\S+)\s;\sCOMMAND=(\.+)$|</regex>
515   <regex>^\s*(\S+)\s:\sTTY=\S+\s;\sPWD=(\S+)\s;\sUSER=(\S+)\s;\sTSID=\S+\s;\sCOMMAND=(\.+)$</regex>
516   <order>dstuser,url,srcuser,status</order>
517   <fts>name,dstuser,location</fts>
518   <ftscomment>First time user executed the sudo command</ftscomment>
519 </decoder>
520
521 <!-- Su decoder.
522   -  Will extract the username.
523   -  Examples:
524   -  su[2921936]: failed: ttyq4 changing from ldap to root
525   -  su[234]: BAD SU ger to fwmaster on /dev/ttyp0
526   -  su(pam_unix)[23164]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost=  user=osaudit
527   -  su(pam_unix)[2298]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost=  user=root
528   -  Jul  5 12:17:38 lili su[2702]: - pts/5 ab-dc-root
529   -  Jul  5 12:13:15 lili su[2614]: - pts/6 dcid-root
530   -  su[29149]: + pts/5 dcid:root
531   -  SU 07/23 01:24 + pts/4 lcid-root
532   -  Apr 22 17:51:51 enigma su: dcid to root on /dev/ttyp1
533   - 'su root' failed for chapman on /dev/pts/1
534   -->
535 <decoder name="su">
536   <program_name>^su$</program_name>
537 </decoder>
538
539 <decoder name="su-detail">
540   <parent>su</parent>
541   <prematch>^'su </prematch>
542   <regex>^'su (\S+)' \S+ for (\S+) on \S+$</regex>
543   <order>dstuser, srcuser</order>
544   <fts>name, srcuser, location</fts>
545 </decoder>
546
547 <decoder name="su-ldap">
548   <parent>su</parent>
549   <prematch>pam_ldap</prematch>
550   <regex>user "uid=(\S+),</regex>
551   <order>user</order>
552 </decoder>
553
554 <decoder name="su">
555   <prematch>^SU \S+ \S+ </prematch>
556   <regex offset="after_prematch">^\S \S+ (\S+)-(\S+)$</regex>
557   <order>srcuser, dstuser</order>
558   <fts>name, srcuser, location</fts>
559 </decoder>
560
561 <decoder name="su-failed">
562   <parent>su</parent>
563   <prematch>^FAILED SU </prematch>
564   <regex offset="after_prematch">^\(to (\S+) (\S+) on</regex>
565   <order>dstuser, srcuser</order>
566 </decoder>
567
568 <decoder name="su-detail2">
569   <parent>su</parent>
570   <prematch> </prematch>
571   <regex>^BAD SU (\S+) to (\S+) on|</regex>
572   <regex>^failed: \S+ changing from (\S+) to (\S+)|</regex>
573   <regex>^\S \S+ (\S+)\p(\S+)$|^(\S+) to (\S+) on </regex>
574   <order>srcuser, dstuser</order>
575   <fts>name, srcuser, location</fts>
576 </decoder>
577
578
579
580 <!-- ProFTPD decoder.
581   - Will extract the username/srcip
582   - Examples:
583   - proftpd[26916]: hayaletgemi (85.101.218.135[85.101.218.135]) - ANON anonymous: Login successful.
584   - proftpd[12564]: juf01 (pD9EE35B1.dip.t-dialin.net[217.238.53.177]) - USER jufu: Login successful
585   - proftpd[30362] xx.yy.zz (aa.bb.cc[aa.bb.vv.dd]): USER backup: Login successful.
586   - proftpd[2344]: refused connect from 192.168.1.2 (192.168.1.2)
587   - 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.
588   - proftpd[26169] server.example.net: Fatal: unable to open incoming connection: Der Socket ist nicht verbunden
589   -->
590 <decoder name="proftpd">
591   <program_name>^proftpd</program_name>
592 </decoder>
593
594 <decoder name="proftpd-success">
595   <parent>proftpd</parent>
596   <prematch>: Login successful</prematch>
597   <regex>^\S+ \(\S+[(\S+)]\)\s*\S \w+ (\S+): </regex>
598   <regex>Login successful</regex>
599   <order>srcip, user</order>
600   <fts>name, user, srcip, location</fts>
601 </decoder>
602
603 <decoder name="proftpd-ip">
604   <parent>proftpd</parent>
605   <regex>^\S+ \(\S+[(\S+)]\)</regex>
606   <order>srcip</order>
607 </decoder>
608
609
610
611 <!-- Pure-FTPd decoder.
612   - Will extract the username/srcip whenever possible.
613   - Samples by Peter Ahlert <peter@ifup.de> (thanks!)
614   - Examples:
615   - pure-ftpd-wrapper[926]: connect from 1.1.0.1 (1.1.0.1)
616   - pure-ftpd: (?@1.1.0.1) [INFO] New connection from 1.1.0.1
617   - pure-ftpd: (abcde@1.1.0.1) [INFO] Can't change directory to /.test: Permission denied
618   - pure-ftpd: (abcde@1.1.0.1) [INFO] Logout.
619   - pure-ftpd: (?@59.150.14.54) [WARNING] Authentication failed for user [newuser]
620   -->
621 <decoder name="pure-ftpd">
622   <program_name>^pure-ftpd</program_name>
623 </decoder>
624
625 <decoder name="pure-ftpd-login">
626   <parent>pure-ftpd</parent>
627   <prematch>^\S+ [INFO] \S+ is now logged in</prematch>
628   <regex>^\(?@(\S+)\) [INFO] (\S+) is now logged in</regex>
629   <order>srcip, user</order>
630   <fts>name, user, srcip, location</fts>
631 </decoder>
632
633 <decoder name="pure-ftpd-generic">
634   <parent>pure-ftpd</parent>
635   <regex>^\((\S+)@(\S+)\) [</regex>
636   <order>user,srcip</order>
637 </decoder>
638
639 <!-- Pure-FTPd transfer log decoder
640   - Examples from ossec-list:
641   - example.com - user1 [11/Mar/2013:12:10:23 -0000] "PUT /ftpdrive/user1/FinalBackup.zip" 200 25268220
642   - example.com - user1 [11/Mar/2013:12:24:57 -0000] "GET /ftpdrive/user1/FinalBackup.zip" 200 25268220
643   -->
644
645 <decoder name="pure-transfer">
646   <prematch>^\S+ - \S+ [\d\d/\S\S\S/\d\d\d\d:\d\d:\d\d:\d\d \S\d\d\d\d] "\w+ \S+" </prematch>
647   <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>
648   <order>extra_data,dstuser,action,url,status</order>
649 </decoder>
650
651
652
653
654 <!-- vsftpd decoder.
655   - Will extract the srcip.
656   - Examples:
657   - Sun Jun  4 22:08:04 2006 [pid 21612] CONNECT: Client "192.168.2.10"
658   - Sun Jun  4 22:08:39 2006 [pid 21611] [dcid] OK LOGIN: Client "192.168.2.10"
659   - Sun Jun  4 22:09:22 2006 [pid 21622] CONNECT: Client "192.168.2.10"
660   - Sun Jun  4 22:09:24 2006 [pid 21621] [lalal] FAIL LOGIN: Client "192.168.2.10"
661   - Sat Jun  3 07:51:42 2006 [pid 25073] [Administrator] FAIL LOGIN: Client "211.100.27.101"
662   - Sun Aug 27 16:28:20 2006 [pid 13962] [xx] OK UPLOAD: Client "1.2.3.4", "/a.php", 8338 bytes, 18.77Kbyte/sec
663   - Jul 13 12:31:20 www vsftpd: Sun Jul 13 10:31:20 2008 [pid 27528] [anonymous] FAIL LOGIN: Client "84.140.234.76"
664   - Sun Aug 16 15:48:02 2015 [pid 4832] [ftpuser] OK DELETE: Client "172.28.5.129", "/index.php"
665   - Sun Aug 16 16:26:06 2015 [pid 4976] [ftpuser] OK CHMOD: Client "172.28.5.129", "/index.php 777"
666   - Sun Aug 16 16:26:21 2015 [pid 4976] [ftpuser] OK RENAME: Client "172.28.5.129", "/index.php /4444index.php"
667   
668 <decoder name="vsftpd">
669   <prematch>^\w\w\w \w\w\w\s+\d+ \S+ \d+ [pid \d+] </prematch>
670   <regex offset="after_prematch">Client "(\S+)"$</regex>
671   <order>srcip</order>
672 </decoder>
673
674 <decoder name="vsftpd">
675   <program_name>^vsftpd</program_name>
676   <prematch>^\w\w\w \w\w\w\s+\d+ \S+ \d+ [pid \d+] </prematch>
677   <regex offset="after_prematch">Client "(\S+)"$</regex>
678   <order>srcip</order>
679 </decoder>
680 -->
681
682 <!-- #####################################################
683      Add by Omar MEZRAG - 0xFFFFFF
684      ##################################################### -->
685
686 <decoder name="vsftpd">
687   <prematch>^\w\w\w \w\w\w\s+\d+ \S+ \d+ [pid \d+] </prematch>
688 </decoder>
689
690 <decoder name="vsftpd">
691   <program_name>^vsftpd</program_name>
692   <prematch>^\w\w\w \w\w\w\s+\d+ \S+ \d+ [pid \d+] </prematch>
693 </decoder>
694
695 <decoder name="vsftpd_login">
696   <parent>vsftpd</parent>
697   <prematch offset="after_parent"> LOGIN:</prematch>
698   <regex offset="after_parent">[(\S+)] (\S+ LOGIN): Client "(\S+\w)"$</regex>
699   <order>user,status,srcip</order>
700 </decoder>
701
702 <decoder name="vsftpd_connect">
703   <parent>vsftpd</parent>
704   <prematch offset="after_parent">^CONNECT:</prematch>
705   <regex offset="after_parent">(CONNECT): Client "(\S+\w+)"$</regex>
706   <order>action,srcip</order>
707 </decoder>
708
709 <decoder name="vsftpd_cmd">
710   <parent>vsftpd</parent>
711   <regex offset="after_parent">[(\S+)] (OK \S+): Client "(\S+)", "(\.+)"\.*</regex>
712   <order>user,status,srcip,url</order>
713 </decoder>
714
715 <decoder name="vsftpd_default">
716   <parent>vsftpd</parent>
717   <regex offset="after_parent">Client "(\S+\w)"$</regex>
718   <order>srcip</order>
719 </decoder>
720
721
722 <!-- FTPD decoder - Solaris, MacOS and Wu-ftpd).
723   - Examples:
724   - ftpd[811166]: refused connect from 88.225.42.182
725   - in.ftpd[18561]: [ID 484914 daemon.notice] gethostbyaddr: nameservices.net. != 216.117.134.168
726   - ftpd[31918]: FTPD: EXPORT file local , remote
727   - Dec 21 12:21:20 hostname ftpd[323115]: login jones_b from client.example.org failed.
728   -->
729 <decoder name="ftpd">
730   <program_name>^ftpd|^in.ftpd</program_name>
731 </decoder>
732
733 <decoder name="ftpd-mac-failure">
734   <parent>ftpd</parent>
735   <prematch>^Failed authentication from: \S+ |</prematch>
736   <prematch>^repeated login failures from </prematch>
737   <!--<regex offset="after_prematch">(\S+)</regex>-->
738   <regex offset="after_prematch">^\S+ [(\S+)]$|^(\S+)</regex>
739   <order>srcip</order>
740 </decoder>
741
742 <decoder name="ftpd-refused">
743   <parent>ftpd</parent>
744   <prematch>^FTP LOGIN REFUSED </prematch>
745   <regex offset="after_prematch">[(\S+)]$</regex>
746   <order>srcip</order>
747 </decoder>
748
749 <decoder name="ftpd-ip">
750   <parent>ftpd</parent>
751   <regex>from (\S+)$</regex>
752   <order>srcip</order>
753 </decoder>
754
755 <decoder name="ftpd-tru64">
756   <parent>ftpd</parent>
757   <prematch>^login \S+ from \S+ failed.</prematch>
758   <regex>^login (\S+) from (\S+) failed.$</regex>
759   <order>user, srcip</order>
760 </decoder>
761
762
763
764 <!-- Arpwatch decoder.
765   - Will extract srcip/mac for "new station" messages.
766   - Examples:
767   - arpwatch: new station 192.168.1.103 0:11:43:5e:5d:80 eth0
768   - arpwatch: bogon 172.16.150.149 0:2:b3:d6:e5:68 eth0
769   - arpwatch: new station 192.168.2.10 0:c0:4f:78:32:be
770   - arpwatch: pcap open re0: /dev/bpf0: Permission denied
771   - arpwatch: reused old ethernet address 192.168.17.248 0:e:3b:a:cb:67 (0:1e:8c:72:b0:d0)
772   -->
773 <decoder name="arpwatch">
774   <program_name>^arpwatch</program_name>
775 </decoder>
776
777 <decoder name="arpwatch-new">
778   <parent>arpwatch</parent>
779   <prematch>^new station |^bogon </prematch>
780   <regex offset="after_prematch">^(\S+) (\S+)</regex>
781   <order>srcip, extra_data</order>
782   <fts>name, srcip, extra_data</fts>
783 </decoder>
784
785
786
787 <!-- MySQL decoder.
788   - Examples:
789   - MySQL log: 060516 22:38:46 mysqld started
790   - MySQL log: 060516 22:38:46 mysqld ended
791   - 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'
792   - 070824 11:33:51       6 Connect     Access denied for user 'roota'@'localhost' (using password: YES)
793   -->
794 <decoder name="mysql_log">
795   <prematch>^MySQL log:</prematch>
796 </decoder>
797
798
799
800 <!-- PostgreSQL decoder.
801   - Examples:
802   - [2007-08-31 18:37:09.454 ADT] 192.168.2.99: LOG:  connection authorized: user=ossec_user database=ossecdb
803   - [2007-08-31 18:37:15.525 ADT] 192.168.2.99: ERROR:  relation "alert2" does not exist
804   -->
805 <decoder name="postgresql_log">
806   <prematch>^[\d\d\d\d-\d\d-\d\d \S+ \w+] </prematch>
807   <regex offset="after_prematch">^\S+ (\w+): </regex>
808   <order>status</order>
809 </decoder>
810
811
812
813 <!-- Imapd decoder.
814   - Will extract the username/srcip
815   - Examples:
816   - imapd[26888]: Login failed user=babadosfashion auth=babadosfashion host=bahiana.resenet.com.br [200.255.5.8]
817   - imapd[21040]: Login failed user=root domain=(null) auth=root host=host29-141.poo
818     l8249.interbusiness.it [82.49.141.29]
819   - imapd[27113]: Authenticated user=badyy host=a.resenet.com.br [1.2.3.4]
820   - imapd[27113]: Logout user=badyy host=a.resenet.com.br [1.2.3.4]
821   -->
822 <decoder name="imapd">
823   <program_name>^imapd</program_name>
824   <regex offset="after_prematch">user=(\S+) \.+ [(\S+)]$</regex>    
825   <order>user,srcip</order>
826 </decoder>
827
828
829
830 <!-- Vpopmail decoder. (by Ceg Ryan <cegryan ( at ) gmail.com>)
831   - Examples:
832   - vpopmail[32485]: vchkpw-pop3: password fail abc@example.com:x.x.x.x
833   - vpopmail[32485]: vchkpw-2110 password fail abc@example.com:x.x.x.x
834   -                  vchkpw-pop3: password fail (pass: 'test') user@my_domain:1.2.3.4
835   - vpopmail[2100]: vchkpw-pop3: vpopmail user not found abc@example.com:x.x.x.x
836   - vpopmail[4162]: vchkpw-pop3: vpopmail user not found support@:69.3.64.3
837   -->
838 <decoder name="vpopmail">
839   <program_name>^vpopmail</program_name>
840 </decoder>
841
842 <decoder name="vpopmail-fail">
843   <parent>vpopmail</parent>
844   <prematch>^vchkpw-\S+: password fail</prematch>
845   <regex offset="after_prematch"> (\S+)@\S+:(\S+)$</regex>
846   <order>user, srcip</order>
847 </decoder>
848
849 <decoder name="vpopmail-notfound">
850   <parent>vpopmail</parent>
851   <prematch>^vchkpw-\S+: vpopmail user not </prematch>
852   <regex offset="after_prematch">^found (\S+):(\S+)$</regex>
853   <order>user, srcip</order>
854 </decoder>
855
856 <decoder name="vpopmail-empty">
857   <parent>vpopmail</parent>
858   <prematch>^vchkpw-\S+: null password </prematch>
859   <regex offset="after_prematch">^given (\S+):(\S+)$</regex>
860   <order>user, srcip</order>
861 </decoder>
862
863 <decoder name="vpopmail-success">
864   <parent>vpopmail</parent>
865   <prematch>^vchkpw-\S+: \(\S+\) login </prematch>
866   <regex offset="after_prematch">^success (\S+):(\S+)$</regex>
867   <order>user, srcip</order>
868 </decoder>
869
870
871
872 <!-- VM-POP3 - Virtual Mail Pop3
873   - Examples:
874   -->
875 <decoder name="vm-pop3d">
876   <program_name>^vm-pop3d</program_name>
877 </decoder>
878
879 <decoder name="vm-pop3d-fail">
880   <parent>vm-pop3d</parent>
881   <prematch>^User '</prematch>
882   <regex offset="after_prematch">^(\S+)' - \w+ auth, </regex>
883   <regex>from=(\S+)$</regex>
884   <order>user, srcip</order>
885 </decoder>
886
887
888
889 <!-- Courier decoder
890   - Examples:
891   - pop3d-ssl: LOGIN FAILED, ip=[::ffff:192.168.0.200]
892   - courierpop3login: LOGIN, user=web10_mauricio, ip=[::ffff:192.168.0.100]
893   - courierpop3login: LOGIN FAILED, ip=[::ffff:192.168.0.188]
894   - imaplogin: DISCONNECTED, ip=[::ffff:127.0.0.1], time=0
895   - Nov 24 18:18:28 gandalf pop3d: LOGIN FAILED, ip=[::ffff:1.2.3.4]
896   -->
897 <decoder name="courier">
898   <program_name>^pop3d|^courierpop3login|^imaplogin|^courier-pop3|^courier-imap</program_name>
899 </decoder>
900
901 <decoder name="courier-login">
902   <parent>courier</parent>
903   <prematch>^LOGIN, </prematch>
904   <regex offset="after_prematch">^user=(\S+), ip=[(\S+)]$</regex>
905   <order>user, srcip</order>
906 </decoder>
907
908 <decoder name="courier-generic">
909   <parent>courier</parent>
910   <regex>, ip=[(\S+)]$</regex>
911   <order>srcip</order>
912 </decoder>
913
914
915
916 <!-- Dovecot Decoder
917   - Will extract username, srcip and dstip when available.
918   - Jun 17 10:15:24 hostname dovecot: Dovecot v1.2.rc3 starting up (core dumps disabled)
919   - Jun 17 10:15:24 hostname dovecot: Fatal: auth(default): Support not compiled in for passdb driver 'ldap'
920   - Jun 17 10:15:24 hostname dovecot: Fatal: Auth process died too early - shutting down
921   - 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:
922   - Jan 11 03:42:09 hostname dovecot: auth-worker(default): sql(user@example.com,1.2.3.4): Password mismatch
923   - dovecot: Jan 07 14:46:28 Warn: auth(default): userdb(username,::ffff:127.0.0.1): user not found from userdb
924   - 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
925   - dovecot: Mar 13 15:25:07 Info: auth(default): passwd-file(user@example.com,::ffff:1.2.3.4): unknown user
926   - Jan 11 03:45:09 hostname dovecot: auth-worker(default): sql(username,1.2.3.4): unknown user
927   - 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
928   - Jul  4 17:30:51 hostname dovecot[2992]: pop3-login: Disconnected: rip=1.2.3.4, lip=1.2.3.5
929   - dovecot: Jun 23 15:04:06 Info: IMAP(username): Disconnected: Logged out bytes=59/566
930   - 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
931   - 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
932   - Dec 19 17:40:57 ny dovecot: pop3-login: Disconnected (auth failed, 3 attempts in 51 secs): user=<thousands>, method=PLAIN, rip=109.201.200.201, lip=67.205.141.203, session=<tlMSaQZE/JttycjJ>
933   - Dec 19 17:30:39 ny dovecot: imap-login: Disconnected: Inactivity (auth failed, 7 attempts in 176 secs): user=<32>, method=PLAIN, rip=109.201.200.201, lip=67.205.141.203,session=<7QTLPAZEXrhtycjJ>
934   - Dec 19 17:38:54 ny dovecot: pop3-login: Disconnected: Inactivity during authentication (auth failed, 13 attempts in 179 secs): user=<thousands>, method=PLAIN, rip=109.201.200.201, lip=67.205.141.203, session=<feETWgZEzJltycjJ>
935   - Dec 19 17:20:08 ny dovecot: imap-login: Aborted login (auth failed, 2 attempts in 18 secs): user=<test>, method=PLAIN, rip=109.201.200.201, lip=67.205.141.203, session=<i8uMIAZEDrdtycjJ>
936 -->
937
938 <decoder name="dovecot">
939   <program_name>^dovecot</program_name>
940 </decoder>
941
942 <decoder name="dovecot-success">
943   <parent>dovecot</parent>
944   <prematch offset="after_parent">^\w\w\w\w-login: Login: </prematch>
945   <regex offset="after_prematch">^user=\p(\S+)\p, method=\S+, rip=(\S+), lip=(\S+), mpid=\S+, (\S*)$</regex>
946   <order>user, srcip, dstip, protocol</order>
947 </decoder>
948
949 <decoder name="dovecot-aborted">
950   <parent>dovecot</parent>
951   <prematch offset="after_parent">^\w\w\w\w-login: Aborted login</prematch>
952   <regex offset="after_prematch">: user=\p(\S+)\p, method=\S+, rip=(\S+), lip=(\S+), (\S*)$</regex>
953   <order>user, srcip, dstip, protocol</order>
954 </decoder> 
955
956 <decoder name="dovecot-fail">
957   <parent>dovecot</parent>
958   <prematch offset="after_parent">^auth\(default\)|auth-worker\(default\)</prematch>
959   <regex offset="after_prematch">^: \S+\((\S+),(\S+)\)</regex>
960   <order>user, srcip</order>
961 </decoder>
962
963 <decoder name="dovecot-authfailed">
964   <parent>dovecot</parent>
965   <prematch offset="after_parent">^\w\w\w\w-login:</prematch>
966   <regex offset="after_prematch">\(auth failed, \d+ attempts in \d+ secs\): user=\p(\S+)\p, method=\w+, rip=(\S+), lip=(\S+)</regex>
967   <order>user,srcip,dstip</order>
968 </decoder>
969
970 <decoder name="dovecot-disconnect">
971   <parent>dovecot</parent>
972   <prematch offset="after_parent">^\w\w\w\w-login: Disconnected: </prematch>
973   <regex offset="after_prematch">^rip=(\S+), lip=(\S+)</regex>
974   <order>srcip, dstip</order>
975 </decoder>
976
977 <decoder name="dovecot-info">
978   <program_name>^Info$|^Warn$</program_name>
979 </decoder>
980
981 <decoder name="imap-login-login">
982   <parent>dovecot-info</parent>
983   <prematch>imap-login</prematch>
984   <regex offset="after_parent">Login: user=(\S+), method=\.+, rip=(\S+), lip=(\S+) </regex>
985   <order>user, srcip, dstip</order>
986 </decoder>
987
988 <decoder name="dovecot-info-auth">
989   <parent>dovecot-info</parent>
990   <regex offset="after_parent">auth\(\.+\): \S+\((\S+),(\S+)\):</regex>
991   <order>user, srcip</order>
992 </decoder>
993
994
995 <!-- Named decoder.
996   - Will extract the srcip
997   - Examples:
998   -  valhalla named[7885]: client 192.168.1.231#1142: update 'hayaletgemi.edu/IN' denied
999   - named[12637]: client 1.2.3.4#32769: query (cache) 'somedomain.com/MX/IN' denied
1000   -  Oct 22 10:12:33 junction named[31687]: /etc/blocked.slave:9892: syntax error near ';'
1001   -  Oct 22 10:12:33 junction named[31687]: reloading configuration failed: unexpected token
1002  -->
1003 <decoder name="named">
1004   <program_name>^named</program_name>
1005 </decoder>
1006
1007 <decoder name="named-query">
1008   <parent>named</parent>
1009   <prematch>: query </prematch>
1010   <regex>client (\S+)#\d+\s*\S*: </regex>
1011   <order>srcip,url</order>
1012 </decoder>
1013
1014 <decoder name="named-query">
1015   <parent>named</parent>
1016   <regex>query: (\S+) IN|query \S+ '(\S+)/</regex>
1017   <order>url</order>
1018 </decoder>
1019
1020 <decoder name="named_client">
1021   <parent>named</parent>
1022   <prematch>^client </prematch>
1023   <regex offset="after_prematch">^(\S+)#</regex>
1024   <order>srcip</order>
1025 </decoder>
1026
1027 <decoder name="named_from">
1028   <parent>named</parent>  
1029   <regex offset="after_parent"> from [(\S+)]</regex>
1030   <order>srcip</order>
1031 </decoder>
1032
1033 <decoder name="named-master">
1034   <parent>named</parent>
1035   <prematch> for master</prematch>
1036   <regex>for master (\S+):(\d+) \S+ \(source (\S+)#d+\)$</regex>
1037   <order>dstip,dstport,srcip</order>
1038 </decoder>
1039
1040
1041 <!-- Postfix  decoder.
1042   - Will extract the srcip
1043   - Examples:
1044   - postfix/smtpd[32297]: NOQUEUE: reject: RCPT from unknown[213.255.237.245]: 554
1045     <ce101@ce.metu.edu.tr>: Relay access denied; from=<kryonomm@yahoo.com>
1046     to=<e10445@jubiipost.dk> proto=SMTP helo=<SM01.net>
1047   - postfix/smtpd[27712]: NOQUEUE: reject: MAIL from localhost[127.0.0.1]: 452 Insufficient system storage
1048  -->
1049
1050 <decoder name="postfix">
1051   <program_name>^postfix</program_name>
1052 </decoder>
1053
1054 <decoder name="postfix-reject">
1055   <use_own_name>true</use_own_name>
1056   <parent>postfix</parent>
1057   <prematch>^NOQUEUE: reject: \w\w\w\w from </prematch>
1058   <regex offset="after_prematch">[(\S+)]:\d+: (\d+) |[(\S+)]:(\d+): |[(\S+)]: (\d+) |[(\S+)]:(\d+): </regex>
1059   <order>srcip,id</order>
1060 </decoder>
1061
1062 <decoder name="postfix-sasl">
1063   <parent>postfix</parent>
1064   <prematch>^warning: \S+: SASL </prematch>
1065   <regex>^warning: \S+[(\S+)]:</regex>
1066   <order>srcip</order>
1067 </decoder>
1068
1069
1070 <!-- Sendmail decoder.
1071   - Will extract the srcip
1072   - Examples:
1073   - sendmail[15806618]: k1SN9pkK15806618: ruleset=check_mail, arg1=<rtreter@qffff.com>,
1074   - relay=dsl.static81215198185.ttnet.net.tr [81.215.198.185] (may be forged), reject=553 5.1.8
1075   - <rtreter@qffff.com>... Domain of sender address rtreter@qffff.com does not exist
1076   - 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]
1077   - 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/
1078   - sm-mta[23868]: k9BEQK0c023868: rejecting commands
1079   from [200.121.73.169] [200.121.73.169] due to pre-greeting traffic
1080   - sendmail[7818]: j6KKHo2d007818: rejecting commands from sv.e103gng.com [66.62.19.10] due to pre-greeting traffic
1081  -->
1082 <decoder name="sendmail-reject">
1083   <program_name>^sendmail|^sm-mta|^sm-msp-queue</program_name>
1084 </decoder>
1085
1086 <decoder name="sendmail-pre-greeting">
1087   <parent>sendmail-reject</parent>
1088   <prematch>^\S+: rejecting commands from</prematch>
1089   <regex offset="after_prematch">^ \S+ [(\S+)]</regex>
1090   <order>srcip</order>
1091 </decoder>
1092
1093 <decoder name="sendmail-reject-nodns">
1094   <parent>sendmail-reject</parent>
1095   <prematch>relay=[</prematch>
1096   <regex offset="after_prematch">^(\S+)]</regex>
1097   <order>srcip</order>
1098 </decoder>
1099
1100 <decoder name="sendmail-reject-dns">
1101   <parent>sendmail-reject</parent>
1102   <prematch>relay=\S+ [</prematch>
1103   <regex offset="after_prematch">^(\S+)]</regex>
1104   <order>srcip</order>
1105 </decoder>
1106
1107
1108
1109
1110 <!-- SMF-SAV Sendmail Milter decoder.
1111   - Will extract the srcip
1112   - Examples:
1113   - smf-sav[513]: [ID 987462 mail.notice] sender check failed: <xkyjywqvophshu@mypersonalemail.com>, 125.133.22.112, [125.133.22.112], [00:00:01]
1114   - smf-sav[513]: [ID 407019 mail.info] sender check succeeded (cached): <asterisk-users-bounces@lists.digium.com>, 216.207.245.17, lists.digium.com
1115   - smf-sav[513]: [ID 987894 mail.notice] sender check tempfailed: <31363****-org@targetedpages.com>, 69.8.190.101, smtp101.tramailer.info, [00:00:05]
1116   - smf-sav[1883]: sender check tempfailed (cached): <k@vooC7b>, 87.103.236.97, [87.103.236.97]
1117   - smf-sav[1883]: sender check failed (cached): <clahaiclahai@email.iis.com.br
1118    >, 91.146.176.140, pool176-140.cable.tolna.net
1119   -->
1120 <decoder name="smf-sav-reject">
1121   <program_name>^smf-sav</program_name>
1122   <prematch>^sender check failed|</prematch>
1123   <prematch>^sender check tempfailed</prematch>
1124   <regex offset="after_prematch">^ \(cached\): \S+, (\S+),|</regex>
1125   <regex>^: \S+, (\S+),</regex>
1126   <order>srcip</order>
1127 </decoder>
1128
1129
1130
1131 <!-- Mail scanner
1132   - Will extract the srcip/action
1133   - Examples:
1134   - MailScanner[24112]: Message k7B9Mc6b015925 from
1135   68.171.145.34 (nilsenator@hotmail.com) to yyyyy.no is spam, SpamAssassin
1136   - May  3 16:28:40 jarjar MailScanner[4732]: Message k436SX2M005191 from
1137   111.222.111.222 (david@our.domain.org) to our.domain.org is spam
1138   , SpamAssassin
1139   - MailScanner[5317]: Message k436dCIW005370 from
1140   111.222.111.222 (david@our.domain.org) to another.domain.org is not s
1141   pam, SpamAssassin
1142   - MailScanner[29107]: Message j0EMandY027564 from xxx.xxx.xxx.xxx(xxxxx@xxxxx.ie) to xxxxx.ie is not spam
1143   -->
1144 <decoder name="mailscanner">
1145   <program_name>^MailScanner</program_name>
1146 </decoder>
1147
1148 <decoder name="mailscanner-ip">
1149   <parent>mailscanner</parent>
1150   <prematch>^Message \S+ from </prematch>
1151   <regex offset="after_prematch">^(\S+) \S+ to \S+ is (\w+)</regex>
1152   <order>srcip, action</order>
1153 </decoder>
1154
1155
1156 <!-- OpenBSD smtpd decoders -->
1157
1158 <decoder name="smtpd">
1159   <program_name>^smtpd</program_name>
1160 </decoder>
1161
1162 <decoder name="smtpd-client">
1163   <parent>smtpd</parent>
1164   <prematch offset="after_parent">^client</prematch>
1165   <regex>^client (\S+) </regex>
1166   <order>srcip</order>
1167 </decoder>
1168
1169 <decoder name="smtpd-relay">
1170   <parent>smtpd</parent>
1171   <prematch>relay=</prematch>
1172   <regex>relay=\S+ [(\S+)], </regex>
1173   <order>srcip</order>
1174 </decoder>
1175
1176 <decoder name="smtpd-in">
1177   <parent>smtpd</parent>
1178   <prematch offset="after_parent">^smtp-in: </prematch>
1179   <regex offset="after_prematch">^(\S+) </regex>
1180   <order>status</order>
1181 </decoder>
1182
1183 <decoder name="smtpd-in">
1184   <parent>smtpd</parent>
1185   <regex> => (\d+) </regex>
1186   <order>action</order>
1187 </decoder>
1188
1189
1190 <!-- Iptables decoder.
1191   - Will extract the srcip, dstip, srcport, dstport, protocol
1192   - Examples:
1193   - kernel: FIREWALL_OUT IN= OUT=eth0
1194     SRC=192.168.6.57 DST=216.161.248.225 LEN=40 TOS=0x00 PREC=0x00 TTL=64
1195     ID=18547 DF PROTO=TCP SPT=46388 DPT=37628 WINDOW=6930 RES=0x00 ACK RST
1196     URGn=0
1197   - kernel: IPTABLE IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:03:93:db:2e:b4:08:00
1198     SRC=10.4.11.40 DST=255.255.255.255 LEN=180 TOS=0x00 PREC=0x00 TTL=64
1199     ID=4753 PROTO=UDP SPT=49320 DPT=2222 LEN=160
1200   - kernel: [4475569.016000] IN= OUT=lo SRC=192.168.2.11 DST=192.168.2.11
1201     LEN=52 TOS=0x10 PREC=0x00 TTL=64 ID=49546 DF PROTO=TCP SPT=43068
1202     DPT=22 WINDOW=8192 RES=0x00 ACK URGP=0
1203   - 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
1204   -->
1205 <decoder name="iptables">
1206    <program_name>^kernel</program_name>
1207 </decoder>
1208
1209 <decoder name="iptables-1">
1210    <parent>iptables</parent>
1211    <type>firewall</type>
1212    <prematch>^[\d+.\d+] \S+ IN=</prematch>
1213
1214    <regex>^[\d+.\d+] (\S+) \.+ SRC=(\S+) DST=(\S+)</regex>
1215    <regex> \.+ PROTO=(\w+) </regex>
1216    <order>action,srcip,dstip,protocol</order>
1217 </decoder>
1218
1219 <decoder name="iptables-1">
1220    <parent>iptables</parent>
1221    <type>firewall</type>
1222    <regex offset="after_regex">^SPT=(\d+) DPT=(\d+) </regex>
1223    <order>srcport,dstport</order>
1224 </decoder>
1225
1226 <decoder name="iptables-2">
1227    <parent>iptables</parent>
1228    <type>firewall</type>
1229    <prematch>^\S+ IN=</prematch>
1230
1231    <regex>^(\S+) \.+ SRC=(\S+) DST=(\S+) \.+ </regex>
1232    <regex>PROTO=(\w+) </regex>
1233    <order>action,srcip,dstip,protocol</order>
1234 </decoder>
1235
1236 <decoder name="iptables-2">
1237    <parent>iptables</parent>
1238    <type>firewall</type>
1239    <regex offset="after_regex">^SPT=(\d+) DPT=(\d+) </regex>
1240    <order>srcport,dstport</order>
1241 </decoder>
1242
1243 <decoder name="iptables-shorewall">
1244    <parent>iptables</parent>
1245    <type>firewall</type>
1246    <prematch>^Shorewall:\S+:</prematch>
1247
1248    <regex offset="after_prematch">^(\S+):\.+ SRC=(\S+) DST=(\S+) \.+ </regex>
1249    <regex>PROTO=(\w+) </regex>
1250    <order>action,srcip,dstip,protocol</order>
1251 </decoder>
1252
1253 <decoder name="iptables-shorewall">
1254    <parent>iptables</parent>
1255    <type>firewall</type>
1256    <regex offset="after_regex">^SPT=(\d+) DPT=(\d+) </regex>
1257    <order>srcport,dstport</order>
1258 </decoder>
1259
1260 <decoder name="iptables-shorewall2">
1261   <parent>iptables</parent>
1262   <type>firewall</type>
1263   <prematch>^\p\S+\p Shorewall:\S+:</prematch>
1264   <regex offset="after_prematch">^(\S+):\.+ SRC=(\S+) DST=(\S+) \.+ </regex>
1265   <regex>PROTO=(\w+) </regex>
1266   <order>action,srcip,dstip,protocol</order>
1267 </decoder>
1268
1269
1270 <!-- Solaris IPFilter decoder.
1271   - Will extract the action, srcip, srcport, dstip, dstport
1272   - Examples:
1273   - ipmon[11523]: [ID 702911 local0.warning] 09:30:39.300795 3x ce0 @0:1
1274     b 10.4.0.25,43873 -> 10.4.122.243,22 PR tcp len 20 100 -AP IN
1275   - ipmon[11523]: [ID 702911 local0.warning] 09:31:53.285032 hme0 @0:1
1276     b 10.4.122.243,138 -> 255.255.255.255,138 PR udp len 20 229 IN mbcast
1277   - ipmon[11523]: [ID 702911 local0.notice] 09:30:40.398290 ce0 @0:14
1278     p 10.4.122.243,123 -> 10.4.122.16,123 PR udp len 20 76 K-S OUT
1279   -->
1280 <decoder name="ipfilter">
1281    <type>firewall</type>
1282    <program_name>^ipmon</program_name>
1283    <regex> (\w) (\S+),(\d+) -> </regex>
1284    <regex>(\S+),(\d+) PR (\w+) </regex>
1285    <order>action,srcip,srcport,dstip,dstport,protocol</order>
1286 </decoder>
1287
1288
1289 <!-- AIX IPSec decoder.
1290   - Will extract the action,srcip,dstip,protocol,srcport,dstport
1291   - Examples:
1292   - ipsec_logd: #:3 R:p  I:10.0.0.99 S:10.0.0.82 D:10.0.0.99
1293     P:tcp/ack SP:50349 DP:22 R:l I:en0 F:n T:0 L:88
1294   - ipsec_logd: #:1 R:p  O:10.0.0.99. S:10.0.0.99 D:10.0.0.25
1295     P:udp SP:2063 DP:53 R:l I:en0 F:n T:0 L:81
1296  -->
1297 <decoder name="aix-ipsec">
1298    <type>firewall</type>
1299    <program_name>^ipsec_logd</program_name>
1300    <regex> R:(\w)  \w:\S+ S:(\S+) </regex>
1301    <regex>D:(\S+) P:(\S+) SP:(\d+) DP:(\d+) </regex>
1302    <order>action,srcip,dstip,protocol,srcport,dstport</order>
1303 </decoder>
1304
1305
1306
1307 <!-- OpenBSD pf decoder (as a plugin - compiled).
1308   - Will extract the action,srcip,dstip,protocol,srcport,dstport
1309   - Examples:
1310   - 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)
1311   - 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]
1312   - 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
1313   - 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
1314
1315   -->
1316 <decoder name="pf">
1317    <type>firewall</type>
1318    <program_name>^pf$</program_name>
1319    <plugin_decoder>PF_Decoder</plugin_decoder>
1320 </decoder>
1321
1322
1323
1324 <!-- SonicWall decoder.
1325   - Will extract action, srcip, dstip, protocol, srcport and dstport
1326   - Examples:
1327   - 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
1328   - 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
1329   - id=firewall sn=00301E0526B1 time="2004-04-01 10:39:35"
1330   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
1331   -->
1332 <decoder name="sonicwall">
1333   <type>firewall</type>
1334   <prematch>^id=\w+ sn=\w+ time=\S+ \S+ fw=\S+ pri=\d </prematch>
1335   <plugin_decoder>SonicWall_Decoder</plugin_decoder>
1336 </decoder>
1337
1338
1339
1340 <!-- Netscreen Firewall decoder.
1341   - Will extract the action,srcip,dstip,protocol,srcport,dstport
1342   - Examples:
1343   - 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
1344   - <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
1345   - 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)
1346   -  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)
1347   -
1348   - ** Program name for netscreen is empty, since it is the hostname.
1349   -->
1350 <decoder name="netscreenfw">
1351   <program_name />
1352   <prematch>^NetScreen device_id</prematch>
1353 </decoder>
1354
1355 <decoder name="netscreenfw-traffic">
1356   <parent>netscreenfw</parent>
1357   <type>firewall</type>
1358
1359   <prematch offset="after_parent">system-notification-00257</prematch>
1360   <prematch>\(traffic\): </prematch>
1361
1362   <regex offset="after_prematch"> proto=(\w+) \.+action=(\w+) </regex>
1363   <regex>\.+src=(\S+) dst=(\S+) src_port=(\d+) dst_port=(\d+)</regex>
1364   <order>protocol, action, srcip, dstip, srcport, dstport</order>
1365 </decoder>
1366
1367 <decoder name="netscreenfw-critical">
1368   <parent>netscreenfw</parent>
1369   <prematch offset="after_parent">system-critical-\.+ from |</prematch>
1370   <prematch>system-alert-\.+ from |</prematch>
1371   <prematch>system-emergency-\.+ From </prematch>
1372
1373   <regex offset="after_parent">system-(\w+)-(\d+): \.+ </regex>
1374   <regex>from\.+(\S+)</regex>
1375   <order>action, id, srcip</order>
1376 </decoder>
1377
1378 <decoder name="netscreenfw-admin">
1379   <parent>netscreenfw</parent>
1380   <regex offset="after_parent">system-(\w+)-(\d+):</regex>
1381   <order>action, id</order>
1382 </decoder>
1383
1384
1385 <!-- Pix decoder.
1386   - Will extract the srcip, srcport, dstip and dstport whenever possible.
1387   - Examples:
1388   - %PIX-6-106015: Deny TCP (no connection) from 161.58.238.151/110 to a.b.c.d/3782 flags RST ACK
1389   - %PIX-2-106001: Inbound TCP connection denied from 165.139.46.7/3854 to 165.189.27.70/139 flags
1390   - %PIX-3-106010: Deny inbound tcp src outside:213.98.79.233/2620 dst dmz:213.98.254.145/135
1391   - %PIX-3-106011: Deny inbound (No xlate) udp src outside:192.168.2.1/137
1392   dst outside:192.168.2.14/137
1393   - %PIX-3-106011: Deny inbound (No xlate) tcp src inside:10.100.7.43/80 dst
1394   inside:10.100.4.71/2285
1395   - %PIX-3-710003: TCP access denied by ACL from 216.39.220.130/54065 to outside:62.192.113.98/ssh
1396   - %PIX-7-710001: TCP access requested from X.X.X.X/1292 to outside:Y.Y.Y.Y/ssh
1397   - %PIX-7-710002: UDP access permitted from 33.33.33.4/943 to inside:33.33.33.15/snmp
1398   - %PIX-7-710005: UDP request discarded from <public IP of 525>/4500 to outside:192.168.69.137/4500
1399   - %PIX-2-106002   protocol Connection denied by outbound list acl_ID src inside_address dest outside_address
1400   - %PIX-2-106002: udp connection denied by outbound list 30 src 216.53.120.62 138 dest 169.132.10.82 138
1401   -  %PIX-4-106023: Deny tcp src inside:111.11.11.1/2143 dst YYY:172.11.1.11/139 by access-group "inside_inbound"
1402   - %PIX-4-400013 IDS:2003 ICMP redirect from 10.4.1.2 to 10.2.1.1 on interface dmz
1403   - %PIX-2-106006: Deny inbound UDP from ***/20031 to ***/20031 on
1404   interface vpn
1405   - %PIX-7-710002: TCP access permitted from 10.0.0.1/60749 to db:10.0.0.2/ssh
1406   - %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.
1407   - %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)
1408   - %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)
1409   - %PIX-6-605005: Login permitted from 192.168.1.2/2953 to inside:192.168.1.1/telnet for user ""
1410   - %PIX-6-605004: Login denied from 192.168.2.10/32597 to outside:192.168.2.14/ssh for user "root"
1411   - %PIX-6-305011: Built dynamic UDP translation from inside:192.168.1.2/1026 to outside:192.168.2.14/1163
1412   - %PIX-6-305011: Built dynamic TCP translation from inside:192.168.1.3/54946 to outside:192.168.2.14/1033
1413   - %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)
1414   -->
1415 <decoder name="pix">
1416   <prematch>^%PIX-|^\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %PIX-|</prematch>
1417   <prematch>^%ASA-|^\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %ASA-|</prematch>
1418   <prematch>^%FWSM-|^\w\w\w \d\d \d\d\d\d \d\d:\d\d:\d\d: %FWSM-</prematch>
1419 </decoder>
1420
1421 <decoder name="pix-fw1">
1422   <parent>pix</parent>
1423   <type>firewall</type>
1424   <prematch offset="after_parent">^2-106001</prematch>
1425   <regex offset="after_parent">^(\S+): \w+ (\w+) \S+ (\S+) from </regex>
1426   <regex>(\S+)/(\S+) to (\S+)/(\S+)</regex>
1427   <order>id, protocol, action, srcip, srcport, dstip, dstport</order>
1428 </decoder>
1429
1430 <decoder name="pix-fw2">
1431   <parent>pix</parent>
1432   <type>firewall</type>
1433   <prematch offset="after_parent">^3-710003|^7-710002|^7-710005</prematch>
1434   <regex offset="after_parent">^(\S+): (\S+) \w+ (\w+) \.+from </regex>
1435   <regex>(\S+)/(\S+) to \w+:(\S+)/(\S+)</regex>
1436   <order>id, protocol, action, srcip, srcport, dstip, dstport</order>
1437 </decoder>
1438
1439 <decoder name="pix-fw3">
1440   <parent>pix</parent>
1441   <type>firewall</type>
1442   <prematch offset="after_parent">^4-106023</prematch>
1443   <regex offset="after_parent">^(\S+): (\w+) (\w+) src \w+:</regex>
1444   <regex>(\S+)/(\S+) dst \w+:(\S+)/(\S+)</regex>
1445   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1446 </decoder>
1447
1448 <decoder name="pix-fw4">
1449   <parent>pix</parent>
1450   <type>firewall</type>
1451   <prematch offset="after_parent">^4-106019</prematch>
1452   <regex offset="after_parent">^(\S+): IP packet from (\S+) to </regex>
1453   <regex>(\S+), protocol (\w+) (\w+) </regex>
1454   <order>id, srcip, dstip, protocol, action</order>
1455 </decoder>
1456
1457 <decoder name="pix-fw5">
1458   <parent>pix</parent>
1459   <type>firewall</type>
1460   <prematch offset="after_parent">^2-106006|^2-106007</prematch>
1461   <regex offset="after_parent">^(\S+): (\w+) \S+ (\w+) from </regex>
1462   <regex>(\S+)/(\d+) to (\S+)/(\d+) </regex>
1463   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1464 </decoder>
1465
1466 <decoder name="pix-fw6">
1467   <parent>pix</parent>
1468   <type>firewall</type>
1469   <prematch offset="after_parent">^6-106015</prematch>
1470   <regex offset="after_parent">^(\S+): (\w+) (\w+) \S+ \S+ (\S+) from </regex>
1471   <regex>(\S+)/(\S+) to (\S+)/(\S+)</regex>
1472   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1473 </decoder>
1474
1475 <decoder name="pix-fw7">
1476   <parent>pix</parent>
1477   <type>firewall</type>
1478   <prematch offset="after_parent">^6-305012</prematch>
1479   <regex offset="after_parent">^(\S+): (\w+) \w+ (\w+) translation </regex>
1480   <regex>from \w+:(\S+)/(\d+) to \w+:(\S+)/(\d+) </regex>
1481   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1482 </decoder>
1483
1484 <decoder name="pix-fw8">
1485   <parent>pix</parent>
1486   <type>firewall</type>
1487   <prematch offset="after_parent">^3-106011|^3-106010</prematch>
1488   <regex offset="after_parent">^(\S+): (\w+) \.+ (\w+) src </regex>
1489   <regex>\w+:(\S+)/(\d+) dst \w+:(\S+)/(\d+)</regex>
1490   <order>id, action, protocol, srcip, srcport, dstip, dstport</order>
1491 </decoder>
1492
1493 <decoder name="pix-url-success">
1494   <parent>pix</parent>
1495   <prematch offset="after_parent">^5-304001: </prematch>
1496   <regex offset="after_parent">^(\S+): (\S+) Accessed URL </regex>
1497   <regex>(\S+):(http\w*://\.+)|</regex>
1498   <regex>^(\S+): (\S+) Accessed URL (\S+):</regex>
1499   <order>id, srcip, dstip, url</order>
1500 </decoder>
1501
1502 <decoder name="pix-url-deny">
1503   <parent>pix</parent>
1504   <prematch offset="after_parent">^5-304002: </prematch>
1505   <regex offset="after_parent">^(\S+): Access (denied) URL (http\w*://\.+) </regex>
1506   <regex>SRC (\S+) DEST (\S+) on interface</regex>  
1507   <order>id, action, url, srcip, dstip</order>
1508 </decoder>
1509
1510 <decoder name="pix-attacks">
1511   <parent>pix</parent>
1512   <prematch offset="after_parent">^2-106012: |^2-106017: |</prematch>
1513   <prematch>^2-106020|^1-106021|^1-106022|</prematch>
1514   <prematch>^4-4000</prematch>
1515   <regex offset="after_parent">^(\S+): \.+ from (\S+) </regex>
1516   <order>id, srcip</order>
1517 </decoder>
1518
1519 <decoder name="pix-srcip">
1520   <parent>pix</parent>
1521   <prematch offset="after_parent">^6-308001</prematch>
1522   <regex offset="after_parent">^(\S+): \.+ (\S+)</regex>
1523   <order>id, srcip</order>
1524 </decoder>
1525
1526 <decoder name="pix-srcip-port">
1527   <parent>pix</parent>
1528   <prematch offset="after_parent">^6-605004|^6-605005</prematch>
1529   <regex offset="after_parent">^(\S+): Login (\S+) from (\S+)/(\d+) \.+user "(\w+)"</regex>
1530   <order>id, action, srcip, srcport, user</order>
1531 </decoder>
1532
1533 <decoder name="pix-generic">
1534   <parent>pix</parent>
1535   <regex offset="after_parent">^(\S+): </regex>
1536   <order>id</order>
1537 </decoder>
1538
1539
1540
1541 <!-- Cisco VPN Concentrator
1542   - Will extract srcip and username.
1543   - Examples:
1544   -
1545   - 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>
1546   11504 01/08/2007 09:10:37.780 SEV=3
1547   -->
1548 <decoder name="cisco-vpn-concentrator">
1549   <prematch>^\d+ \d\d/\d\d/\d\d\d\d \S+ SEV=\d </prematch>
1550   <regex offset="after_prematch">^(\S+) RPT=\d+ (\S+) </regex>
1551   <order>id, srcip</order>
1552 </decoder>
1553
1554
1555
1556 <!-- Snort decoder.
1557   - Will extract the id, srcip and dstip
1558   - Examples:
1559   - snort: [1:469:3] ICMP PING NMAP [Classification: Attempted Information
1560     Leak] [Priority: 2]: {ICMP} 10.4.12.26 -> 10.4.10.231
1561   - snort: [1:1420:11] SNMP trap tcp [Classification: Attempted Information
1562     Leak] [Priority: 2]: {TCP} 10.4.12.26:37020 -> 10.4.10.231:162
1563   - [**] [1:1054:7] WEB-MISC weblogic/tomcat .jsp view source attempt [**]
1564     [Classification: Web Application Attack]
1565     [Priority: 1]  10.4.12.26:34041 -> 66.179.53.37:80
1566   - [**] [1:1421:11] SNMP AgentX/tcp request [**]
1567     [Classification: Attempted Information Leak] [Priority: 2]
1568     10.4.3.20:626 -> 10.4.10.161:705
1569   - [**] [1:1882:10] ATTACK-RESPONSES id check returned userid [**]
1570     [Classification: Potentially Bad Traffic] [Priority: 2]
1571     {UDP} 192.168.20.32 -> 192.168.20.2
1572   -->
1573
1574 <decoder name="snort">
1575   <program_name>^snort</program_name>
1576 </decoder>
1577
1578 <decoder name="snort">
1579   <type>ids</type>
1580   <prematch>^[**] [\d+:\d+:\d+] </prematch>
1581 </decoder>
1582
1583 <decoder name="snort2">
1584    <parent>snort</parent>
1585    <type>ids</type>
1586    <prematch>^[**] |^[\d+:\d+:\d+] </prematch>
1587    <regex>^[**] [(\d+:\d+:\d+)] \.+ (\S+)\p*\d* -> </regex>
1588    <regex>(\S+)|^[(\d+:\d+:\d+)] \.+ </regex>
1589    <regex>(\S+)\p*\d* -> (\S+)</regex>
1590    <order>id,srcip,dstip</order>
1591    <fts>name,id,srcip,dstip</fts>
1592 </decoder>
1593
1594 <decoder name="snort3">
1595    <parent>snort</parent>
1596    <type>ids</type>
1597    <prematch>^[Drop] [**] |^[\d+:\d+:\d+] </prematch>
1598    <regex>^[Drop] [**] [(\d+:\d+:\d+)] \.+ (\S+)\p*\d* -> </regex>
1599    <regex>(\S+)|^[(\d+:\d+:\d+)] \.+ </regex>
1600    <regex>(\S+)\p*\d* -> (\S+)</regex>
1601    <order>id,srcip,dstip</order>
1602    <fts>name,id,srcip,dstip</fts>
1603 </decoder>
1604
1605
1606 <!-- OpenBSD isakmpd decoders -->
1607
1608 <decoder name="isakmpd">
1609   <program_name>^isakmpd</program_name>
1610 </decoder>
1611
1612 <decoder name="isakmpd-from">
1613   <parent>isakmpd</parent>
1614   <prematch>message from </prematch>
1615   <regex>from (\S+) port (\d+)</regex>
1616   <order>srcip,srcport</order>
1617 </decoder>
1618
1619 <decoder name="isakmpd-peer">
1620   <parent>isakmpd</parent>
1621   <prematch>from peer</prematch>
1622   <regex>from peer (\S+):(\d+)$</regex>
1623   <order>srcip,srcport</order>
1624 </decoder>
1625
1626
1627
1628 <!-- Suhosin decoder.
1629   - Will extract the attack name and srcip.
1630   - Examples:
1631   - suhosin[76366]: ALERT - canary mismatch on efree() - heap overflow detected (attacker '200.139.164.149', file 'xyz')
1632   - 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')
1633   - 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')
1634   -->
1635 <decoder name="suhosin">
1636   <program_name>^suhosin</program_name>
1637   <type>ids</type>
1638   <regex>^ALERT - (\.+) \(attacker '(\S+)', </regex>
1639   <order>id, srcip</order>
1640   <fts>name, location, id</fts>
1641 </decoder>
1642
1643
1644
1645 <!-- Dragon Decoder
1646   - Will extract srcip, dstip and id
1647   - Examples:
1648   - 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
1649   -
1650   -->
1651 <decoder name="dragon-nids">
1652    <type>ids</type>
1653    <prematch>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\|</prematch>
1654    <regex offset="after_prematch">^\S+\|(\S+)\|</regex>
1655    <regex>(\S+)\|(\S+)\|</regex>
1656    <order>id, srcip, dstip</order>
1657    <fts>name, id, srcip, dstip</fts>
1658 </decoder>
1659
1660
1661
1662 <!-- Horde decoder
1663   - Will extract: username and srcip.
1664   - Examples:
1665   - [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"]
1666   - [error] [imp] FAILED LOGIN 210.179.154.213 to xxx:143[imap] as mala1
1667   -->
1668 <decoder name="horde_imp">
1669   <prematch>^[\w+] [imp] |^[\w+] [horde] </prematch>
1670 </decoder>
1671
1672 <decoder name="horde_imp_success">
1673   <parent>horde_imp</parent>
1674   <prematch offset="after_parent">^Login success </prematch>
1675   <regex offset="after_prematch">^for (\S+) [(\S+)] </regex>
1676   <order>user, srcip</order>
1677 </decoder>
1678
1679 <decoder name="horde_imp_failed">
1680   <parent>horde_imp</parent>
1681   <prematch offset="after_parent">^FAILED LOGIN</prematch>
1682   <regex offset="after_prematch">^ (\S+) to \S+ as (\S+) </regex>
1683   <order>srcip, user</order> 
1684 </decoder>
1685
1686
1687
1688 <!-- Wordpress decoder.
1689   -  It needs the WPsyslog2 plugin.
1690   - Examples:
1691   - WPsyslog[14382]: [127.0.0.1 na] Info: User authentication failed. User name: lala
1692   - WPsyslog[14382]: [127.0.0.1 na] Info: User logged in. User name: admin (admin).
1693   - wpcore[14554]: [127.0.0.1 na] http://megasite.com/wordpress Info: User authentication failed. User name: qwe.
1694   -->
1695 <decoder name="wordpress">
1696   <program_name>^WPsyslog|^wpcore</program_name>
1697   <prematch>^[</prematch>
1698   <regex offset="after_prematch">^(\S+) </regex>
1699   <order>srcip</order>
1700 </decoder>
1701
1702
1703
1704 <!-- Roundcube decoder
1705  - Will extract username and src IP from the logs, when available.
1706
1707    Examples syslog: (older and newer versions of roundcube)
1708  - Apr 10 22:45:20 hostname roundcube: [10-Apr-2009 22:45:20 -0500] IMAP Error: Authentication for username failed (LOGIN): "a001 NO Authentication failed." (POST /roundcube/?_task=&_action=login)
1709  - Apr 10 23:01:23 hostname roundcube: [10-Apr-2009 23:01:23 -0500]: Successful login for username (id 1) from 127.0.0.1
1710  - Oct 28 19:31:08 hostname roundcube: <isj89gtf> IMAP Error: Login failed for username from 127.0.0.1. AUTHENTICATE PLAIN: Authentication failed. in /var/www/html/roundcube/program/lib/Roundcube/rcube_imap.php on line 193 (POST /roundcube/?_task=login&_action=login)
1711
1712    Example from roundcube internal logfile (/path/to/roundcube/logs/errors):
1713  - [04-Oct-2017 17:03:30 +0200]: <jkgnfe79> IMAP Error: Login failed for username from 127.0.0.1. AUTHENTICATE PLAIN: Authentication failed. in /var/www/html/roundcube/program/lib/Roundcube/rcube_imap.php on line 193 (POST /roundcube/?_task=login&_action=login)
1714
1715    Examples if log_logins is enabled (/path/to/roundcube/logs/userlogins):
1716  - [04-Oct-2017 16:08:01 +0200]: <lrpo6s0r> Failed login for test from 127.0.0.1 in session abcdefg (error: 0)
1717  - [04-Oct-2017 16:09:17 +0200]: <4bd4jqqc> Successful login for test (ID: 6) from 127.0.0.1 in session abcdefg
1718 -->
1719
1720 <decoder name="roundcube">
1721   <program_name>^roundcube</program_name>
1722 </decoder>
1723
1724 <decoder name="roundcube">
1725   <prematch>^[\d\d-\w\w\w-\d\d\d\d \d\d:\d\d:\d\d \S+]</prematch>
1726 </decoder>
1727
1728 <decoder name="roundcube-success">
1729   <parent>roundcube</parent>
1730   <prematch> Successful login for </prematch>
1731   <regex offset="after_prematch">^(\S+) \(id \d+\) from (\S+)$|^(\S+) \(ID: \d+\) from (\S+)</regex>
1732   <order>user, srcip</order>
1733 </decoder>
1734
1735 <decoder name="roundcube-denied-old">
1736   <parent>roundcube</parent>
1737   <prematch>] \w+ Error: Authentication </prematch>
1738   <regex offset="after_prematch">^for (\S+) failed</regex>
1739   <order>user</order>
1740 </decoder>
1741
1742 <decoder name="roundcube-denied-new">
1743   <parent>roundcube</parent>
1744   <prematch>> \w+ Error: Login failed |> Failed login </prematch>
1745   <regex offset="after_prematch">^for (\S+) from (\S+)\. |^for (\S+) from (\S+) in session </regex>
1746   <order>user, srcip</order>
1747 </decoder>
1748
1749
1750
1751 <!-- Apache decoder.
1752   - Updated by jesus@wazuh.com. 2016/02/17
1753   - Will extract the srcip
1754   - Examples:
1755   - Without ID: Will extract the srcip and srcport (when it is available)
1756       - [error] [client 80.230.208.105] Directory index forbidden by rule: /home/
1757       - [error] [client 64.94.163.159] Client sent malformed Host header
1758       - [error] [client 66.31.142.16] File does not exist: /var/www/html/default.ida
1759       - [Sun Nov 23 18:49:01.713508 2014] [:error] [pid 15816] [client 141.8.147.9:51507] PHP Notice:  A non well formed numeric value encountered in /path/to/file.php on line 123
1760       - Feb 17 18:00:00 myhost httpd[18660]: [error] [client 12.34.56.78] File does not exist: /usr/local/htdocs/cache
1761       - Feb 17 18:00:00 myhost httpd[23745]: [error] [client 12.34.56.78] PHP Notice:
1762   - With IP + ID: Will extract the srcip, id, and srcport (when it is available)
1763       - [Tue Sep 30 11:30:13.262255 2014] [core:error] [pid 20101] [client 99.47.227.95:34567] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/awstats/icon/mime/document.png
1764       - [Tue Sep 30 12:24:22.891366 2014] [proxy:warn] [pid 2331] [client 77.127.180.111:54082] AH01136: Unescaped URL path matched ProxyPass; ignoring unsafe nocanon, referer: http://www.easylinker.co.il/he/links.aspx?user=bguyb
1765       - [Tue Sep 30 14:25:44.895897 2014] [authz_core:error] [pid 31858] [client 99.47.227.95:38870] AH01630: client denied by server configuration: /var/www/example.com/docroot/
1766       - [Thu Oct 23 15:17:55.926067 2014] [ssl:info] [pid 18838] [client 36.226.119.49:2359] AH02008: SSL library error 1 in handshake (server www.example.com:443)
1767       - ModSecurity
1768         - [Tue Feb 16 04:02:21.018764 2016] [:error] [pid 3223] [client 10.10.10.10] ModSecurity: Access denied with code 403 (phase 2). Text...
1769         - [Tue Feb 16 04:02:21.018764 2016] [:error] [pid 3223] [client 10.10.10.10:5555] ModSecurity: Access denied with code 403 (phase 2). Text...
1770   - Others
1771       - [notice] Apache configured
1772       - [Thu Oct 23 15:17:55.926123 2014] [ssl:info] [pid 18838] SSL Library Error: error:1407609B:SSL routines:SSL23_GET_CLIENT_HELLO:https proxy request -- speaking HTTP to HTTPS port!?
1773       - [Tue Sep 30 12:11:21.258612 2014] [ssl:error] [pid 30473] AH02032: Hostname www.example.com provided via SNI and hostname ssl://www.example.com provided via HTTP are different
1774 -->
1775
1776 <decoder name="apache-errorlog">
1777     <program_name>^httpd</program_name>
1778 </decoder>
1779
1780 <decoder name="apache-errorlog">
1781     <prematch>^[warn] |^[notice] |^[error] </prematch>
1782 </decoder>
1783
1784 <decoder name="apache-errorlog">
1785     <prematch>^[\w+ \w+ \d+ \d+:\d+:\d+.\d+ \d+] [\S+:warn] |^[\w+ \w+ \d+ \d+:\d+:\d+.\d+ \d+] [\S+:notice] |^[\w+ \w+ \d+ \d+:\d+:\d+.\d+ \d+] [\S*:error] |^[\w+ \w+ \d+ \d+:\d+:\d+.\d+ \d+] [\S+:info] </prematch>
1786 </decoder>
1787
1788
1789 <decoder name="apache24-errorlog-ip-port">
1790     <parent>apache-errorlog</parent>
1791     <prematch offset="after_parent">[client \S+:\d+] \S+:</prematch>
1792     <regex offset="after_parent">[client (\S+):(\d+)] (\S+): </regex>
1793     <order>srcip,srcport,id</order>
1794 </decoder>
1795
1796 <decoder name="apache24-errorlog-ip">
1797     <parent>apache-errorlog</parent>
1798     <prematch offset="after_parent">[client \S+] \S+:</prematch>
1799     <regex offset="after_parent">[client (\S+)] (\S+): </regex>
1800     <order>srcip,id</order>
1801 </decoder>
1802
1803
1804 <decoder name="apache-errorlog-ip">
1805     <parent>apache-errorlog</parent>
1806     <prematch offset="after_parent">[client</prematch>
1807     <regex offset="after_prematch">^ (\S+):(\d+)] |^ (\S+)] </regex>
1808     <order>srcip,srcport</order>
1809 </decoder>
1810
1811
1812
1813 <!-- Nginx error log decoder.
1814   - Will extract the srcip.
1815   - Examples:
1816   - 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"
1817   - 2009/09/15 19:51:07 [error] 37992#0: accept() failed (53: Software caused connection abort)
1818   -->
1819 <decoder name="nginx-errorlog">
1820   <prematch>^20\d\d/\d\d/\d\d \d\d:\d\d:\d\d [</prematch>
1821 </decoder>
1822
1823 <decoder name="nginx-errorlog-ip">
1824   <parent>nginx-errorlog</parent>
1825   <prematch offset="after_parent">, client: \S+, server: \S+, request: "\S+ </prematch>
1826   <regex offset="after_parent">, client: (\S+), </regex> 
1827   <order>srcip</order>
1828 </decoder>
1829
1830
1831
1832
1833 <!-- NCSA common log decoder (used by apache, Lotus Domino and IIS NCSA).
1834   -  Will extract the srcip, url and id.
1835   -  Every web access log must use "web-log" as their
1836   -  type if they want to be matched against the web rules.
1837   - Examples:
1838   -  63.91.167.39 - - [03/Aug/2001:21:56:18 -0700] "GET /default.ida?NNNN
1839   -  206.78.62.16 - - [06/Aug/2001:08:57:08 -0700] "GET /default.ida?XX
1840   -  5.211.112.6 - - [04/Feb/2003:16:17:30 -0500] "GET /mod_ssl:error:
1841   -  192.168.2.190 - - [18/Jan/2006:13:10:06 -0500] "GET /xxx.html HTTP/1.1"
1842      200 1732
1843   -  1.1.1.1 - username [18/Jan/2006:13:10:06 -0500] "GET /xxx.html HTTP/1.1"
1844   -  123.4.5.6 aa.xx.com - [05/Nov/2006:00:46:56 -0500] "GET / HTTP/1.1" 302 -
1845   - ::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)"
1846   -->
1847 <decoder name="web-accesslog">
1848   <type>web-log</type>
1849   <prematch>^\S+ \S+ \S+ [\S+ \S\d+] "\w+ \S+ HTTP\S+" </prematch>
1850   <regex>^(\S+) \S+ (\S+) [\S+ \S\d+] </regex>
1851   <regex>"(\w+) (\S+) HTTP\S+" (\d+) </regex>
1852   <order>srcip, srcuser, action, url, id</order>
1853 </decoder>
1854
1855
1856 <!-- Windows date format.
1857   -  Pre match for windows date format. Used on Windows firewall,
1858   -  IIS, etc.
1859   -  Examples:
1860   -  2006-07-23 04:40:02 xxx
1861   -->
1862 <decoder name="windows-date-format">
1863   <prematch>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d </prematch>
1864 </decoder>
1865
1866
1867
1868 <!-- Windows firewall decoder.
1869   - Will extract action, protocol, srcip, dstip, srcport and dstport.
1870   - Examples:
1871   - 2006-09-18 22:25:30 OPEN TCP 11.12.72.10 12.252.71.6 3311 445 - - - - - - - - -
1872   - 2006-09-18 22:26:23 DROP UDP 11.152.183.14 239.255.255.250 65299 1900 310 - - - - - - - RECEIVE
1873   - 2006-09-18 22:26:23 DROP UDP 11.152.183.14 239.255.255.250 65299 1900 310 - - - - - - - RECEIVE
1874   - 2006-09-18 22:26:23 DROP UDP 11.152.183.14 239.255.255.250 65298 1900 319 - - - - - - - RECEIVE
1875   -->
1876 <decoder name="windows-firewall">
1877   <parent>windows-date-format</parent>
1878   <type>firewall</type>
1879   <use_own_name>true</use_own_name>
1880   <prematch offset="after_parent">^OPEN|^CLOSE|^DROP</prematch>
1881   <regex offset="after_parent">^(\w+) (\w+) </regex>
1882   <regex>(\S+) (\S+) (\d+) (\d+) </regex>
1883   <order>action, protocol, srcip, dstip, srcport, dstport</order>
1884 </decoder>
1885
1886
1887 <!-- IIS 5 WWW W3C log format.
1888   - #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)
1889   - Examples:
1890   - 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) -
1891   -->
1892 <decoder name="web-accesslog-iis5">
1893   <parent>windows-date-format</parent>
1894   <type>web-log</type>
1895   <use_own_name>true</use_own_name>
1896   <prematch offset="after_parent">^\S+ \S+ W3SVC</prematch>
1897   <regex offset="after_parent">^(\S+) \S+ \S+ \S+ \S+ </regex>
1898   <regex>\d+ \S+ (\S+ \S+) (\d+) </regex>
1899   <order>srcip,url,id</order>
1900 </decoder>
1901
1902
1903 <!-- IIS6 WWW W3C log format.
1904   - #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem
1905   cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent)
1906   cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status
1907   sc-bytes cs-bytes time-taken
1908   - Examples:
1909   - 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
1910   -->
1911 <decoder name="web-accesslog-iis6">
1912   <parent>windows-date-format</parent>
1913   <type>web-log</type>
1914   <use_own_name>true</use_own_name>
1915   <prematch offset="after_parent">^W3SVC\d+ \S+ \S+ \S+ </prematch>
1916   <regex offset="after_prematch">^(\S+ \S+) \d+ \S+ (\S+) </regex>
1917   <regex>\S+ \S+ \S+ \S+ \S+ (\d+) </regex>
1918   <order>url, srcip, id</order>
1919 </decoder>
1920
1921 <!-- Windows IIS decoder for default settings
1922   -  Tested with IIS 7.5 and IIS 8.5 (Windows 2008R2 and Windows 2012R2)
1923   -  Will extract URL, Source IP, and HTTP response code
1924   -  Examples:
1925   -  IIS 7.5
1926   -  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
1927   -  IIS 8.5
1928   -  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
1929   -  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
1930   -  2015-03-11 22:01:58 1.2.3.4 GET /IISADMPWD/aexp.htr - 80 - 31.3.3.7 - - 404 0 2 0
1931 -->
1932
1933 <decoder name="web-accesslog-iis-default">
1934   <parent>windows-date-format</parent>
1935   <type>web-log</type>
1936   <use_own_name>true</use_own_name>
1937   <prematch offset="after_parent">^\S+ GET |^\S+ POST </prematch>
1938   <regex offset="after_prematch">(\S+ \S*) \.* (\S+) \S*\.* (\d\d\d) \S+ \S+ \S+</regex>
1939   <order>url,srcip,id</order>
1940 </decoder>
1941
1942
1943 <!-- IIS 5 W3C FTP log format.
1944   - Examples:
1945   - #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)
1946   - 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 - - - -
1947   - 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 - - - -
1948   -->
1949 <decoder name="msftp">
1950   <parent>windows-date-format</parent>
1951   <use_own_name>true</use_own_name>
1952   <prematch offset="after_parent">^\S+ \S+ MSFTPSVC</prematch>
1953   <regex offset="after_parent">^(\S+) (\S+) \S+ \S+ \S+ </regex>
1954   <regex>\d+ [\d+](\S+) \S+ \S+ (\d+) </regex>
1955   <order>srcip,user,action,id</order>
1956 </decoder>
1957
1958
1959
1960 <!-- IIS 5 W3C SMTP log format (Exchange).
1961   - Examples:
1962   - #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)
1963   - 2006-10-09 14:04:46 69.217.186.117 - SMTPSVC1 MEE-PDC 192.168.X.X 0 xxxx -
1964   > +hupylaw.hupy.local 500 0 32 23 0 SMTP - - - -
1965   -->
1966 <decoder name="msexchange">
1967   <parent>windows-date-format</parent>
1968   <use_own_name>true</use_own_name>
1969   <prematch offset="after_parent">^\S+ \S+ SMTPSVC</prematch>
1970   <regex offset="after_parent">^(\S+) \S+ \S+ \S+ \S+ </regex>
1971   <regex>\d+ (\S+) \S+ \S+ (\d+) </regex>
1972   <order>srcip, action, id</order>
1973 </decoder>
1974
1975
1976
1977 <!-- Racoon VPN.
1978   - Extract id (error or info) and ip address whenever possible.
1979   - 2006-08-08 01:42:09: ERROR: couldn't find the pskey for 222.155.15.88.
1980   -
1981   -->
1982 <decoder name="racoon">
1983   <prematch>^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d: </prematch>
1984 </decoder>
1985
1986 <decoder name="racoon-failed">
1987   <parent>racoon</parent>
1988   <use_own_name>true</use_own_name>
1989
1990   <prematch offset="after_parent">^ERROR: couldn't find the pskey </prematch>
1991   <regex offset="after_prematch">^for (\S+)</regex>
1992   <order>srcip</order>
1993 </decoder>
1994
1995 <decoder name="racoon-action">
1996   <parent>racoon</parent>
1997   <regex offset="after_parent">^(\w+): </regex>
1998   <order>action</order>
1999 </decoder>
2000
2001
2002
2003 <!-- Windows decoder
2004   - Will extract extra_data (as win source),action (as win category), id,
2005   - username and computer name (as system_name).
2006   - Examples:
2007   - WinEvtLog: Application: INFORMATION(0x00000064): ESENT:
2008     (no user)(no domain):
2009   - WinEvtLog: Security: AUDIT_FAILURE(0x000002A9): Security:
2010     SYSTEM: NT AUTHORITY: The logon to account: xyz    by:
2011     MICROSOFT_AUTHENTICATION_PACKAGE_V1_0    from workstation: la    failed.
2012     The error code was: 3221225572
2013   - WinEvtLog: Security: AUDIT_FAILURE(0x00000211): Security:
2014     SYSTEM: NT AUTHORITY: Logon Failure:      Reason:     Unknown user
2015     name or bad password       User Name:  ab      Domain:     cd
2016     Logon Type: 2       Logon Process:  User32          Authentication
2017     Package: Negotiate       Workstation Name:   ad
2018   - 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
2019   - 2013 Oct 09 17:09:04 WinEvtLog: Application: INFORMATION(1): My Script: (no user): no domain: demo1.foo.example.com: test
2020   -->
2021 <decoder name="windows">
2022   <type>windows</type>
2023   <program_name>^WinEvtLog</program_name>
2024 </decoder>
2025
2026 <decoder name="windows1">
2027   <type>windows</type>
2028   <parent>windows</parent>
2029   <regex offset="after_parent">^\.+: (\w+)\((\d+)\): (\.+): </regex>
2030   <regex>(\.+): \.+: (\S+): </regex>
2031   <order>status, id, extra_data, user, system_name</order>
2032   <fts>name, location, system_name</fts>
2033 </decoder>
2034
2035 <decoder name="windows1">
2036   <type>windows</type>
2037   <parent>windows</parent>
2038   <regex> Source Network Address: (\S+)</regex>
2039   <order>srcip</order>
2040 </decoder>
2041
2042 <decoder name="windows1">
2043   <type>windows</type>
2044   <parent>windows</parent>
2045   <regex> Account Name:\s+(\w+\.+)\s+Account</regex>
2046   <order>user</order>
2047 </decoder>
2048
2049 <decoder name="windows1">
2050   <type>windows</type>
2051   <parent>windows</parent>
2052   <regex>Account Domain:\s\s+(\w\.+)\s\s+Logon ID:</regex>
2053   <order>extra_data</order>
2054 </decoder>
2055
2056
2057 <!-- Windows decoder -NTsyslog format
2058   - Will extract extra_data (as win source),action (as win category), id,
2059   - username and computer name (as url).
2060   - Examples:
2061   - 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
2062   - 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}
2063   -->
2064 <decoder name="windows-ntsyslog">
2065   <type>windows</type>
2066   <prematch>^security[\w+] \d+ </prematch>
2067   <regex>^(\w+)[(\w+)] (\d+) </regex>
2068   <order>extra_data, status, id</order>
2069 </decoder>
2070
2071
2072 <!-- Windows decoder - Snare format.
2073   - Will extract extra_data (as win source), action (as category), id,
2074   - username and computer name (as system_name).
2075   -
2076   - These logs must be tab-separated (as specified in the Snare format)
2077   -
2078   - Examples:
2079   - Aug 11 11:11:11 xx.org MSWinEventLog  1       System 59221    Thu Aug 11 01:11:11 2006        17      Windows Update Agent    Unknown User
2080   - Jan 16 05:52:15 hostname.xx.org MSWinEventLog 1
2081   Security        13049   Tue Jan 16 05:52:15 2007        680     Security
2082   SYSTEM  User    Success Audit   ACTUATE Account Logon
2083   Account Used for Logon by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
2084   Account Name:     IUSR_HOSTNAME    Workstation:      ACTUATE
2085   12653
2086   - Jan 16 13:02:24 hostname.yy.org MSWinEventLog 1
2087   Application     14539   Tue Jan 16 13:02:24 2007        1704    SceCli
2088   Unknown User    N/A     Information     ACTUATE None      Security
2089   policy in the Group policy objects are applied successfully.    67
2090   - Jan 16 15:41:37 hostname.zz.org MSWinEventLog 1       System
2091   15059   Tue Jan 16 15:41:37 2007        10      Print   username User
2092   Information     HOSTNAME None            Document 76,
2093   /directory/directory/directory/directory/directory/date/Afilename owned
2094   by username was printed on hostname_duplex via port hostname_duplex.
2095   Size in bytes: 19543296; pages printed: 162        361
2096   -->
2097 <decoder name="windows-snare">
2098   <type>windows</type>
2099   <prematch>^MSWinEventLog\t\d\t\.+\t\d+\t\w\w\S+ \w\w\w \d\d \d\d</prematch>
2100   <regex offset="after_prematch">^:\d\d:\d\d \d\d\d\d\t(\d+)\t(\.+)</regex>
2101   <regex>\t(\.+)\t\.+\t(\.+)\t(\.+)\t</regex>
2102   <order>id, extra_data, user, status, system_name</order>
2103   <fts>name, id, location, user, system_name</fts>
2104 </decoder>
2105
2106
2107 <!-- Symantec AV decoder.
2108   - Source: http://www.ossec.net/wiki/index.php/Symantec_Antivirus
2109   - Examples:
2110   - 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
2111   - 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
2112   - 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
2113   -->
2114 <decoder name="symantec-av">
2115   <prematch>^\w\w\w\w\w\w\w\w\w\w\w\w,</prematch>
2116   <regex offset="after_prematch">^(\d+),\d+,\d+,(\S+),(\.+),</regex>
2117   <order>id, system_name, extra_data</order>
2118   <fts>name, location, id, system_name, extra_data</fts>
2119 </decoder>
2120
2121
2122 <!-- Symantec Web Security.
2123   - Source: http://www.ossec.net/wiki/index.php/Symantec_Websecurity
2124   - Examples:
2125   - 20070717,30517,1=3,41=SWS-3.0.1.86/vendor-config,100=Version 3.0.6,3=7,2=29
2126   - 20070717,73556,1=5,100=Logoff due to timeout.,11=1.2.3.4,10=usera,3=1,2=2
2127     20070717,73559,1=5,11=2.3.4.5,10=userb,3=2,2=1
2128   -->
2129 <decoder name="symantec-websecurity">
2130   <prematch>^\d\d\d\d\d\d\d\d,\d\d\d+,</prematch>
2131   <plugin_decoder>SymantecWS_Decoder</plugin_decoder>
2132 </decoder>
2133
2134
2135
2136 <!-- Trend Micro OSCE (Office Scan) decoder.
2137   - 20090716<;>948<;>TROJ_Generic.DIT<;>25<;>3<;>0<;>C:\Documents and Settings\Administrator\Desktop\HyperSnap 6.02.01_EN\HprSnap6Man.chm<;>
2138   - 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<;>
2139   - 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<;>
2140   - Date<;>Time<;>Virus name<;>Scan result<;>Scan type<;>Seen<;>Filename<;>
2141   - We are only extracting the scan result right now.
2142   -->
2143 <decoder name="trend-osce">
2144   <prematch>^20\d\d\d\d\d\d\<;></prematch>
2145   <regex offset="after_prematch">^\d+\<;>\S+\<;>(\d+)\<;</regex>
2146   <order>id</order>
2147 </decoder>
2148
2149
2150
2151 <!-- ossec decoder.
2152   - Deals with ossec internal messages.
2153   -->
2154 <decoder name="ossec">
2155   <prematch>^ossec: </prematch>
2156   <type>ossec</type>
2157 </decoder>
2158
2159 <decoder name="ossec-logcollector">
2160   <type>ossec</type>
2161   <prematch>^\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d ossec-logcollector</prematch>
2162   <regex offset="after_prematch">^\(\d+\): (\.)</regex>
2163   <order>extra_data</order>
2164 </decoder>
2165
2166 <decoder name="ossec-agent">
2167   <parent>ossec</parent>
2168   <type>ossec</type>
2169   <prematch offset="after_parent">^Agent started:</prematch>
2170   <regex offset="after_prematch">^ '(\S+\S)'</regex>
2171   <order>extra_data</order>
2172   <fts>name, location, extra_data</fts>
2173 </decoder>
2174
2175 <decoder name="ossec-alert1">
2176    <parent>ossec</parent>
2177    <prematch>^ossec: Alert Level:</prematch>
2178    <plugin_decoder>OSSECAlert_Decoder</plugin_decoder>
2179 </decoder>
2180
2181 <decoder name="ossec-alert">
2182   <program_name>^ossec$</program_name>
2183   <plugin_decoder>OSSECAlert_Decoder</plugin_decoder>
2184 </decoder>
2185
2186 <!-- decoder for active responses as logged by an OSSEC agent or server
2187
2188 - Examples
2189 Sat May  7 03:17:27 CDT 2011 /var/ossec/active-response/bin/host-deny.sh add - 172.16.0.1 1304756247.60385 31151
2190 Sat May  7 03:17:27 CDT 2011 /var/ossec/active-response/bin/firewall-drop.sh add - 172.16.0.1 1304756247.60385 31151
2191 Sat May  7 03:27:57 CDT 2011 /var/ossec/active-response/bin/host-deny.sh delete - 172.16.0.1 1304756247.60385 31151
2192 Sat May  7 03:27:57 CDT 2011 /var/ossec/active-response/bin/firewall-drop.sh delete - 172.16.0.1 1304756247.60385 31151
2193 -->
2194
2195 <decoder name="ar_log">
2196   <prematch>^\w\w\w \w+\s+\d+ \d\d:\d\d:\d\d \w+ \d+ /\S+/active-response</prematch>
2197   <regex offset="after_prematch">/bin/(\S+) (\S+) - (\S+) (\d+.\d+) (\d+)</regex>
2198   <order>action, status, srcip, id, extra_data</order>
2199 </decoder>
2200
2201 <!-- Zeus decoder.
2202   - Will extract the severity and the srcip/username when available.
2203   - Examples:
2204   - [08/Aug/2006:22:32:12 +0100] WARN:admin:Authentication failure, url=/index.cgi, host=xx.yy.com, user=admin
2205   - [10/Dec/2006:16:59:26 +0000] INFO:Zeus Admin Server running
2206   -->
2207 <decoder name="zeus">
2208   <prematch>^[\d\d/\w\w\w/\d\d\d\d:\d\d:\d\d:\d\d \S+] </prematch>
2209   <regex offset="after_prematch"> host=(\S+), </regex>
2210   <order>srcip</order>
2211 </decoder>
2212
2213
2214
2215 <!-- Vmware ESX logs.
2216   - Will extract the severity and username/ip when available.
2217   - Examples:
2218   - [2008-03-09 22:43:35.924 'ha-eventmgr' 84503472 info] Event 2053 : User root@127.0.0.1 logged in
2219   - [2008-02-05 02:13:18.112 'ha-eventmgr' 95833272 info] Event xyz : User m@1.2.3.4 logged in
2220   -  [2008-08-26 11:06:16.359 'ha-eventmgr' 20532144 info] Event 285 : Failed login attempt for root@127.0.0.1
2221   - Aug 25 06:01:10 hostname vmware-hostd[1863]: Accepted password for user root from 127.0.0.1
2222   - Aug  7 11:05:34 localhost vmware-authd[9709]: login from 172.16.129.78 as 523b717c-4542-f5fc-c006-1644eb8f4330
2223   - Aug 26 11:42:29 localhost vmware-hostd[1863]: Rejected password for user blablabla from 127.0.0.1
2224   -->
2225 <decoder name="vmware">
2226   <prematch>^[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d.\d\d\d '\S+' \d+ </prematch>
2227 </decoder>
2228
2229 <decoder name="vmware-extra">
2230   <parent>vmware</parent>
2231   <regex offset="after_parent">^(\w+)] \S+ \S+ </regex>
2232   <order>status</order>
2233 </decoder>
2234
2235 <decoder name="vmware-extra">
2236   <parent>vmware</parent>
2237   <regex offset="after_regex">^: User (\w+)@(\S+)</regex>
2238   <regex> logged |^: Failed login \w+ for (\w+)@(\S+)</regex>
2239   <order>user, srcip</order>
2240 </decoder>
2241
2242 <decoder name="vmware-syslog">
2243   <program_name>vmware</program_name>
2244 </decoder>
2245
2246 <decoder name="vmware-success">
2247   <parent>vmware-syslog</parent>
2248   <prematch>^Accepted|^Rejected</prematch>
2249   <regex offset="after_prematch">^ \S+ for user (\S+) from (\S+)$</regex>
2250   <order>user, srcip</order>
2251 </decoder>
2252
2253 <decoder name="vmware-login">
2254   <parent>vmware-syslog</parent>
2255   <prematch>^login from </prematch>
2256   <regex offset="after_prematch">^(\S+) as</regex>
2257   <order>srcip</order>
2258 </decoder>
2259
2260
2261
2262 <!-- Solaris BSM
2263   - Examples:
2264   - Nov 21 15:12:56 unknown audit: [ID 905220 audit.notice] system booted
2265     text booting kernel
2266   - Nov 21 15:16:22 unknown audit: [ID 984917 audit.notice] login - telnet
2267     failed session 2740580090 by root as root:root from 1.254.168.192
2268   - failed session 2740580090 by root as root:root from 1.254.168.192
2269   - ok session 347344759 by 500959152 as root:root from 3.11.8.4 obj
2270   -->
2271 <decoder name="solaris_bsm">
2272   <program_name>^audit$</program_name>
2273 </decoder>
2274
2275 <decoder name="solaris_bsm_session">
2276   <parent>solaris_bsm</parent>
2277   <prematch> \w+ session \d+ by </prematch>
2278   <regex> (\w+) session \d+ by</regex>
2279   <order>status</order>
2280 </decoder>
2281
2282 <decoder name="solaris_bsm_session">
2283   <parent>solaris_bsm</parent>
2284   <regex offset="after_regex">^ \S+ as \S+:\S+ from (\S+)</regex>
2285   <order>srcip</order>
2286 </decoder>
2287
2288
2289
2290 <!-- Asterisk logs
2291   - Examples:
2292   - Dec 16 18:02:04 asterisk1 asterisk[31774]: NOTICE[31787]:
2293   chan_sip.c:11242 in handle_request_register: Registration from
2294   '"503"<sip:503@192.168.1.107>' failed for '192.168.1.137' - Wrong
2295   password
2296   -->
2297 <decoder name="asterisk">
2298   <program_name>^asterisk</program_name>
2299 </decoder>
2300
2301 <decoder name="asterisk-hijacking">
2302   <parent>asterisk</parent>
2303   <prematch>^WARNING[\d+]: \S+ in \S+: Don't know </prematch>
2304   <regex offset="after_prematch">^\S+ how to respond via '(\w+/\d.\d/\w+)'</regex>
2305   <order>user</order>
2306 </decoder>
2307
2308 <decoder name="asterisk-denied">
2309   <parent>asterisk</parent>
2310   <prematch>^NOTICE[\d+]: \S+ in \S+: Registration from </prematch>
2311   <regex offset="after_prematch">^'\.+' failed for '(\S+):(\d+)'|^'\.+' failed for '(\S+)'</regex>
2312   <order>srcip,srcport</order>
2313 </decoder>
2314
2315 <decoder name="asterisk-denied2">
2316   <parent>asterisk</parent>
2317   <prematch>Registration from </prematch>
2318   <regex offset="after_prematch">failed for '(\S+):(\d+)'|failed for '(\S+)'</regex>
2319   <order>srcip,srcport</order>
2320 </decoder>
2321
2322 <decoder name="asterisk-denied3">
2323   <parent>asterisk</parent>
2324   <prematch>^NOTICE[\d+][\w+]: \S+ in \S+: Call from </prematch>
2325   <regex offset="after_prematch">^'\S*' \((\S+):(\d+)\) to extension '(\S+)' rejected because extension not found in context '(\S+)'.$</regex>
2326   <order>srcip, srcport, extra_data, extra_data</order>
2327 </decoder>
2328
2329 <decoder name="asterisk-iax-authentication-denied">
2330   <parent>asterisk</parent>
2331   <prematch>^NOTICE[\d+]: \S+ in \S+: Host </prematch>
2332   <regex offset="after_prematch">^(\S+) failed MD5 authentication for (\S+)</regex>
2333   <order>srcip, user</order>
2334 </decoder>
2335
2336 <!-- Cisco IOS
2337   - Group for Cisco IOS messages.
2338   - We would need to support multiple formats, but currently we require
2339   - no service time stamp and no sequence-numbers.
2340   -
2341   - 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
2342   - Aug 20 11:33:41 RouterName 696: %SYS-5-CONFIG_I: Configured from
2343   console by admin on vty0 (210.x.x.12)
2344   - 681: Aug 17 17:41:24.776 AEST: %SEC-6-IPACCESSLOGS:
2345   - 1348: .Jun 12 18:22:22 UTC: %SYS-5-CONFIG_I:
2346   - 1348: *Jun 12 18:22:22 UTC: %SYS-5-CONFIG_I:
2347   - 23: May  3 05:15:25.217 UTC: %SEC-6-IPACCESSLOGP:
2348   - Possible regex:
2349   "^%\w+-\d-\w+: |^\S\w\w+ \.\d \d\d:\S+ \w+: %\w+-\d-\w+:"
2350   -->
2351 <decoder name="cisco-ios">
2352   <prematch>^%\w+-\d-\w+: </prematch>
2353 </decoder>
2354
2355 <decoder name="cisco-ios">
2356   <program_name />
2357   <prematch>^%\w+-\d-\w+: </prematch>
2358 </decoder>
2359
2360
2361 <!-- Cisco IOS
2362   - Will extract the action, srcip, srcport, dstip and dstport
2363   - Samples:
2364   -
2365   - %SEC-6-IPACCESSLOGP: list 102 denied tcp 10.0.6.56(3067) -> 172.36.4.7(139), 1 packet
2366   - %SEC-6-IPACCESSLOGP: list 199 denied tcp 10.0.61.108(1477) -> 10.0.127.20(445), 1 packet
2367   -->
2368 <decoder name="cisco-ios-acl">
2369   <parent>cisco-ios</parent>
2370   <type>firewall</type>
2371   <prematch>^%SEC-6-IPACCESSLOGP: </prematch>
2372   <regex offset="after_prematch">^list \S+ (\w+) (\w+) </regex>
2373   <regex>(\S+)\((\d+)\) -> (\S+)\((\d+)\),</regex>
2374   <order>action, protocol, srcip, srcport, dstip, dstport</order>
2375 </decoder>
2376
2377
2378 <!-- Cisco IOS IDS/IPS module
2379   - Will extract the id, srcip, srcport, dstip and dstport
2380   - 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]
2381   - 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]
2382   - 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]
2383   -->
2384 <decoder name="cisco-ios-ids">
2385   <parent>cisco-ios</parent>
2386   <type>ids</type>
2387   <prematch>^%IPS-4-SIGNATURE: </prematch>
2388   <regex offset="after_prematch">^Sig:(\d+) \.+[(\S+):(\d+) -> </regex>
2389   <regex>(\S+):(\d+)]</regex>
2390   <order>id, srcip, srcport, dstip, dstport</order>
2391   <fts>name, id, srcip, dstip</fts>
2392   <ftscomment>First time Cisco IOS IDS/IPS module rule fired.</ftscomment>
2393 </decoder>
2394
2395
2396 <!-- Cisco IOS
2397   - Extracts the ID of cisco ios messages.
2398   -->
2399 <decoder name="cisco-ios-generic">
2400   <parent>cisco-ios</parent>
2401   <regex>^(%\w+-\d-\w+): </regex>
2402   <order>id</order>
2403 </decoder>
2404
2405
2406
2407 <!-- Checkpoint via syslog decoder.
2408   - Does not currently handle all types of Checkpoint events.
2409   - Checkpoint NG(X)/FW-1 logs via (Linux) syslog
2410   - Ex. fw log -ftnp fw.log | logger -t Checkpoint
2411   -
2412   - fw log :
2413   -         -f select current log file
2414   -         -t tail file
2415   -         -n use ip instead of name
2416   -         -p use port number instead of name
2417   -
2418   -         -l add date before timestamp
2419   -            Use of -l changes log format slightly
2420   -
2421   -         -g without : and ; delimiters
2422   -            use of -g significantly changes log format
2423   -            this decoder is incompatible with -g
2424   -
2425   - logger :
2426   -         -t <tag> prepends "tag: " to log entry
2427   -        the tag here must match "program name" in the decoder
2428   -
2429   - Examples:
2430   -
2431   - Checkpoint: 21Aug2007 12:00:00 accept 10.10.10.2 >eth0 rule: 100; rule_uid:
2432 {00000000-0000-0000-0000-000000000000}; service_id: nbdatagram; src:
2433 10.10.10.3; dst: 10.10.10.255; proto: udp; product: VPN-1 & FireWall-1;
2434 service: 138; s_port: 138;
2435   -
2436   - Checkpoint: 13:00:00 accept 10.10.10.2 >eth0 rule: 101; rule_uid:
2437 {00000000-0000-0000-0000-000000000000}; service_id: http; src: 10.10.10.3; dst:
2438 10.1.2.3; proto: tcp; product: VPN-1 & FireWall-1; service: 80; s_port: 1111;
2439   -
2440   - Checkpoint: 21Aug2007 14:49:26 drop   10.10.10.1 >eth4 rule: 102; rule_uid:
2441 {00000000-0000-0000-0000-000000000000}; ICMP: Echo Request; src: 10.10.10.2;
2442 dst: 10.10.10.3; proto: icmp; ICMP Type: 8; ICMP Code: 0; product: VPN-1 &
2443 FireWall-1;
2444   -
2445   - Checkpoint:  3Apr2008 15:02:15 monitor 10.10.10.3 >eth2 Attack Info: Line
2446 in HTTP request too long; attack: Malformed HTTP; src: 10.10.10.4; dst:
2447 10.10.10.5; proto: tcp; product: SmartDefense; service: 111; s_port: 222;
2448   -->
2449
2450 <!-- \s+\S+ \d\d:\d\d:\d\d (\w+) \S+ \p\S+ rule: -->
2451 <decoder name="checkpoint-syslog">
2452   <program_name>^Checkpoint</program_name>
2453   <prematch>^\s+\S+ \d\d:\d\d:\d\d </prematch>
2454 </decoder>
2455
2456 <decoder name="checkpoint-syslog-fw">
2457   <parent>checkpoint-syslog</parent>
2458   <type>firewall</type>
2459   <prematch offset="after_parent">^drop|^accept|^reject</prematch>
2460   <regex offset="after_parent">^(\w+)\s+\S+ \p\S+ rule:\.+</regex>
2461   <regex>src: (\S+); dst: (\S+); proto: (\S+);</regex>
2462   <order>action,srcip,dstip,protocol</order>
2463 </decoder>
2464
2465 <decoder name="checkpoint-syslog-fw">
2466   <parent>checkpoint-syslog</parent>
2467   <type>firewall</type>
2468   <regex offset="after_regex">service: (\d+); s_port: (\d+);</regex>
2469   <order>dstport,srcport</order>
2470 </decoder>
2471
2472 <decoder name="checkpoint-syslog-ids">
2473   <parent>checkpoint-syslog</parent>
2474   <type>ids</type>
2475   <prematch offset="after_parent">^monitor|^drop</prematch>
2476   <regex offset="after_prematch">attack: (\.+); </regex>
2477   <regex>src: (\S+); dst: (\S+); </regex>
2478   <regex>proto: (\S+);</regex>
2479   <order>extra_data, srcip, dstip, protocol</order>
2480   <fts>name, extra_data, srcip, dstip</fts>
2481   <ftscomment>First time Checkpoint rule fired.</ftscomment>
2482 </decoder>
2483
2484
2485
2486 <!-- Microsoft Windows 2003 ipv4, 2008 ipv4/ipv6 DHCP decoder for OSSEC
2487   -  Author: phishphreek@gmail.com
2488   -->
2489
2490 <!--
2491   -  Server 2008 DHCP IPv4 Decoder (must go first)
2492   -  ID,Date,Time,Description,IP Address,Host Name,MAC Address,User Name, TransactionID, QResult,Probationtime, CorrelationID.
2493   -  24,3/10/2009,0:00:46,Database Cleanup Begin,,,,
2494   -  0,3/10/2009,0:00:46,DNS Update Request,201.10.168.192,OPS03W034.,,
2495 -->
2496
2497 <decoder name="ms-dhcp-ipv4">
2498   <prematch>^\d\d,\d+/\d+/\d\d\d\d,\d+:\d+:\d+,|</prematch>
2499   <prematch>^\d\d,\d+/\d+/\d\d,\d+:\d+:\d+,</prematch>
2500   <regex>^(\d\d),\d+/\d+/\d\d\d*,\d+:\d+:\d+,(\w+),(\S+)</regex>
2501   <order>id,extra_data,srcip</order>
2502 </decoder>
2503
2504 <!--
2505   -  Server 2008 DHCP IPv6 Decoder (must go second)
2506   -  ID,Date,Time,Description,IPV6 Address,Host Name,Error Code, Duid Length, Duid Bytes(Hex),User Name.
2507 -->
2508 <decoder name="ms-dhcp-ipv6">
2509   <prematch>^\d\d\d\d\d,\d\d/\d\d/\d\d,\d\d:\d\d:\d\d,</prematch>
2510   <regex>^(\d\d\d\d\d),</regex>
2511   <order>id</order>
2512 </decoder>
2513
2514
2515 <!-- OpenBSD kernel messages -->
2516 <decoder name="bsd_kernel">
2517   <program_name>^/bsd</program_name>
2518 </decoder>
2519
2520 <decoder name="bsd_arp">
2521   <parent>bsd_kernel</parent>
2522   <prematch offset="after_parent">^arp </prematch>
2523   <regex offset="after_prematch"> for (\S+) by (\S+) on \S+</regex>
2524   <order>dstip, extra_data</order>
2525 </decoder>
2526
2527 <!-- OpenBSD deluser
2528   -  2014-02-21T10:22:55.134355-05:00 arrakis userdel[23023]: user removed: name=dac
2529 -->
2530
2531 <decoder name="open-userdel">
2532   <program_name>userdel</program_name>
2533   <regex>user removed: name=(\S+)$</regex>
2534   <order>srcuser</order>
2535 </decoder>
2536
2537
2538
2539 <!-- OpenBSD mountd decoder
2540 - Apr 11 20:01:02 ix mountd[11618]: Refused mount RPC from host 192.168.17.10 port 45659
2541 -->
2542
2543 <decoder name="mountd">
2544   <program_name>^mountd</program_name>
2545 </decoder>
2546
2547 <decoder name="mountd-host">
2548   <parent>mountd</parent>
2549   <prematch>from host </prematch>
2550   <regex offset="after_prematch">(\S+) port \d+$</regex>
2551   <order>srcip</order>
2552 </decoder>
2553
2554
2555 <!-- nss ldap decoders
2556 - Jun 26 08:19:25 servername sh: nss_ldap: reconnecting to LDAP server (sleeping 32 seconds)...
2557 - Aug 16 10:58:12 client nscd: nss_ldap: failed to bind to LDAP server ldap://ldap.example.com: Can't contact LDAP server
2558 -->
2559 <!--
2560 <decoder name="nss-ldap">
2561   <program_name>^sh$|^nscd$</program_name>
2562   <prematch>^nss_ldap</prematch>
2563 </decoder>
2564
2565 <decoder name="ldap-server">
2566   <parent>nss-ldap</parent>
2567   <prematch> server </prematch>
2568   <regex offset="after_prematch">ldap://(\S+):</regex>
2569   <order>system_name</order>
2570 </decoder>
2571 -->
2572
2573
2574
2575 <!-- OpenBSD groupdel
2576   - May 28 09:15:43 ix groupdel[25984]: group deleted: name=_dbus
2577 -->
2578 <decoder name="groupdel">
2579   <program_name>groupdel</program_name>
2580   <regex>^group deleted: name=(\S+)$</regex>
2581   <order>extra_data</order>
2582 </decoder>
2583
2584
2585 <!-- Portsentry -->
2586 <decoder name="portsentry">
2587   <program_name>^portsentry</program_name>
2588 </decoder>
2589
2590 <decoder name="portsentry-attackalert">
2591   <parent>portsentry</parent>
2592   <prematch>attackalert: Connect from host: </prematch>
2593   <regex offset="after_prematch">(\S+)/\S+ to (\S+) port: (\d+)$</regex>
2594   <order>srcip,protocol,dstport</order>
2595 </decoder>
2596
2597 <decoder name="portsentry-blocked">
2598   <parent>portsentry</parent>
2599   <prematch>is already blocked. Ignoring$</prematch>
2600   <regex>Host: (\S+) is</regex>
2601   <order>srcip</order>
2602 </decoder>
2603
2604
2605 <!-- Clamav and Freshclam decoder
2606   -  Nov  5 22:59:19 ix freshclam[32349]: Incremental update failed, trying to download daily.cvd
2607 -->
2608 <decoder name="clamd">
2609   <program_name>^clamd</program_name>
2610 </decoder>
2611
2612 <decoder name="freshclam">
2613   <program_name>^freshclam</program_name>
2614 </decoder>
2615
2616
2617 <!-- OpenLDAP decoder.
2618   - Jan 11 09:26:57 hostname slapd[20872]: conn=999999 fd=64 ACCEPT from IP=10.10.248.27:33957 (IP=10.10.241.77:389)
2619   - Jan 11 09:26:57 hostname slapd[20872]: conn=999999 op=0 BIND dn="uid=example,ou=People,dc=example,dc=com" method=128
2620   - Jan 11 09:26:57 hostname slapd[20872]: conn=999999 op=0 RESULT tag=97 err=49 text=
2621         ^- Login Failed
2622   - Jan 11 09:26:57 hostname slapd[20872]: conn=999999 op=1 BIND dn="uid=example,ou=People,dc=example,dc=com" method=128
2623         ^- Login Retried
2624   - Jan 11 09:26:57 hostname slapd[20872]: conn=999999 op=1 RESULT tag=97 err=0 text=
2625         ^- Login Successful
2626   - Jan 11 09:26:57 hostname slapd[20872]: conn=999999 op=2 UNBIND
2627   - Jan 11 09:26:57 hostname slapd[20872]: conn=999999 fd=64
2628         ^- Connection closed
2629
2630   -->
2631 <decoder name="openldap">
2632     <program_name>^slapd</program_name>
2633     <accumulate/>
2634 </decoder>
2635
2636 <decoder name="openldap-connect">
2637     <parent>openldap</parent>
2638     <prematch>ACCEPT</prematch>
2639     <regex>^conn=(\d+) fd=\d+ ACCEPT from IP=(\S+):</regex>
2640     <order>id, srcip</order>
2641     <accumulate/>
2642 </decoder>
2643
2644 <decoder name="openldap-bind">
2645     <parent>openldap</parent>
2646     <prematch>BIND </prematch>
2647     <regex>^conn=(\d+) op=\d+ BIND dn="\w+=(\w+),</regex>
2648     <order>id, dstuser</order>
2649     <accumulate/>
2650 </decoder>
2651
2652 <decoder name="openldap-result">
2653     <accumulate/>
2654     <parent>openldap</parent>
2655     <prematch> RESULT </prematch>
2656     <regex>^conn=(\d+) op=\d+ RESULT </regex>
2657     <order>id</order>
2658 </decoder>
2659
2660 <!-- NTP decoder
2661   - gorilla ntpd[27379]: bad sensor nmea0
2662   - tiny ntpd[25875]: bad peer 192.168.1.233 (192.168.1.233)
2663   - gorilla ntpd[29719]: bind on 192.168.1.233 failed, skipping: Can't assign requested address
2664   - ix ntpd[8392]: bind on 192.168.17.9 failed, skipping: Address already in use
2665   - ix ntpd[11685]: bad peer from pool pool.ntp.org (64.73.32.135)
2666   - richese ntpd[3465]: bad peer ix (192.168.17.9)
2667   - ix ntpd[11685]: bad peer from pool pool.ntp.org (69.50.219.51)
2668   - ix ntpd[7045]: recvmsg 192.168.17.17: Connection refused
2669   - ix ntpd[29411]: 2 out of 3 peers valid
2670   - bridge ntpd[5877]: logconfig: illegal argument  - ignored
2671   - bridge ntpd[5902]: offset 0.000000 sec freq 0.000 ppm error 0.000011 poll 6
2672 -->
2673 <decoder name="ntpd">
2674   <program_name>^ntpd</program_name>
2675 </decoder>
2676
2677 <decoder name="ntpd-bad-peer">
2678   <parent>ntpd</parent>
2679   <prematch offset="after_parent">^bad peer </prematch>
2680   <regex>^bad peer \S+ \p(\S+)\p$|^bad peer from pool \S+ \p(\S+)\p$</regex>
2681   <order>srcip</order>
2682 </decoder>
2683
2684
2685 <!-- Auditd
2686 163
2687 164   - Will extract action, id, status, extra_data, srcip
2688 165   - Author and (c): Michael Starks, 2011
2689 166   - Future enhancements should ensure that all log samples regress properly due to the complexity of these decoders
2690 167   - Examples:
2691
2692 <!-- CentOS 5.5 -->
2693 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)'
2694 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)'
2695 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
2696 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)'
2697 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)'
2698 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)'
2699 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)'
2700 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)'
2701
2702 <!-- Unknown source -->
2703 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)'
2704
2705 <!-- Ubuntu 10.04 LTS -->
2706 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"
2707 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)
2708 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"
2709 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)'
2710 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
2711
2712 <!-- Will not decode due to null name, that's OK -->
2713 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
2714
2715 -->
2716
2717 <decoder name="auditd">
2718   <prematch>^type=</prematch>
2719 </decoder>
2720
2721 <!-- SELinux -->
2722 <decoder name="auditd-selinux">
2723   <parent>auditd</parent>
2724   <prematch offset="after_parent">^AVC </prematch>
2725   <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>
2726   <order>action,id,status,extra_data</order>
2727 </decoder>
2728
2729 <!-- syscall -->
2730 <decoder name="auditd-syscall">
2731   <parent>auditd</parent>
2732   <prematch offset="after_parent">^SYSCALL </prematch>
2733   <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>
2734   <order>action,id,status,extra_data</order>
2735 </decoder>
2736
2737 <!-- config -->
2738 <decoder name="auditd-config">
2739   <parent>auditd</parent>
2740   <prematch offset="after_parent">^CONFIG_CHANGE </prematch>
2741   <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>
2742   <order>action,id,extra_data</order>
2743 </decoder>
2744
2745 <!-- path (will only decode if name is not null)-->
2746 <decoder name="auditd-path">
2747   <parent>auditd</parent>
2748   <prematch offset="after_parent">^PATH </prematch>
2749   <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>
2750   <order>action,id,extra_data</order>
2751 </decoder>
2752
2753 <!-- user-related -->
2754 <decoder name="auditd-user">
2755   <parent>auditd</parent>
2756   <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>
2757   <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>
2758   <order>action,id</order>
2759 </decoder>
2760
2761 <decoder name="auditd-user">
2762   <parent>auditd</parent>
2763   <regex offset="after_regex"> acct="(\.+)" : exe="(\.+)" \(hostname=\S+, addr=(\S+), terminal=\S+$</regex>
2764   <order>user,extra_data,srcip</order>
2765 </decoder>
2766
2767 <decoder name="auditd-user">
2768   <parent>auditd</parent>
2769   <regex offset="after_regex"> ses=\d+ subj=\S+ msg='\.+ acct="(\.+)" exe="(\.+)" hostname=\S+ addr=(\S+) terminal=\S+ res=(\S+)$</regex>
2770   <order>user,extra_data,srcip,status</order>
2771 </decoder>
2772
2773 <decoder name="auditd-user">
2774   <parent>auditd</parent>
2775   <regex offset="after_regex"> subj=\S+ msg='\.+ acct="(\.+)" \p*\s*exe="(\.+)" \(hostname=\S+, addr=(\S+), terminal=\S+ res=(\S+)\)'$</regex>
2776   <order>user,extra_data,srcip,status</order>
2777 </decoder>
2778
2779 <decoder name="auditd-user">
2780   <parent>auditd</parent>
2781   <regex offset="after_regex"> subj=\S+ msg='\.+ exe="(\.+)" \(hostname=\S+, addr=(\S+), terminal=\S+ res=(\S+)\)'$</regex>
2782   <order>extra_data,srcip,status</order>
2783 </decoder>
2784
2785 <!--
2786 mptscsih \ mptbase decoder
2787
2788 Description: module for SCSI controllers.
2789
2790 Examples:
2791 [ 5008.286061] mptscsih: ioc0: task abort: FAILED (rv=2003) (sc=ffff88007a8a9f00)
2792
2793 [ 6498.769248] mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 1 id=8
2794 [ 6498.769252] mptbase: ioc0:   PhysDisk is now failed, out of sync
2795
2796 [ 6498.775783] mptbase: ioc0: RAID STATUS CHANGE for VolumeID 0
2797 [ 6498.775788] mptbase: ioc0:   volume is now degraded, enabled
2798 -->
2799 <decoder name="mptscsih-1">
2800   <parent>iptables</parent>
2801   <prematch>^[\s\d+.\d+] mptscsih: </prematch>
2802   <regex>^[\s\d+.\d+] (\w+): (\w+): task abort: (\w+)</regex>
2803   <order>id,data,status</order>
2804 </decoder>
2805
2806 <decoder name="mptbase-1">
2807   <parent>iptables</parent>
2808   <prematch>^[\s\d+.\d+] mptbase: </prematch>
2809   <regex>^[\s\d+.\d+] (\w+): (\w+):\s+\w+ is now (\w+)\p\s(\D+)$</regex>
2810   <order>id,data,action,status</order>
2811 </decoder>
2812
2813 <!-- Grandstream HT502 VoIP gateway decoder
2814 Author and (c): Michael Starks, 2014 -->
2815
2816 <!-- HT502: [00:0B:82:14:5B:94] Transport error (-1) for transaction 2677 -->
2817
2818 <decoder name="grandstream-ata">
2819  <prematch>^HT286: [\w\w:\w\w:\w\w:\w\w:\w\w:\w\w]\p*\.+\p* |</prematch>
2820  <prematch>^HT502: [\w\w:\w\w:\w\w:\w\w:\w\w:\w\w]\p*\.+\p* |</prematch>
2821  <prematch>^HT503: [\w\w:\w\w:\w\w:\w\w:\w\w:\w\w]\p*\.+\p* </prematch>
2822 </decoder>
2823
2824 <decoder name="grandstream-registration">
2825  <parent>grandstream-ata</parent>
2826  <prematch>Received </prematch>
2827  <regex offset="after_prematch">^(\d+) response for transaction (\d+)\((\w+)\)$</regex>
2828  <order>status, id, action</order>
2829 </decoder>
2830
2831 <decoder name="grandstream-fts-registered">
2832  <parent>grandstream-ata</parent>
2833  <prematch>Account </prematch>
2834  <regex offset="after_prematch">^(\d+) (registered), tried \d+; Next registration in \d+ seconds \(\d+/\d+\) on (\.+)$</regex>
2835  <order>id, status, extra_data</order>
2836  <fts>name, location, extra_data</fts>
2837 </decoder>
2838
2839 <decoder name="grandstream-incoming-cid">
2840  <parent>grandstream-ata</parent>
2841  <prematch>Vinetic::</prematch>
2842  <regex offset="after_prematch">^(startRing) with CID, Attempting to deliver CID (\d+) on port \d+$</regex>
2843  <order>action, id</order>
2844 </decoder>
2845
2846 <decoder name="grandstream-outgoing-call">
2847  <parent>grandstream-ata</parent>
2848  <regex offset="after_parent">^(Dialing) (\d+)$</regex>
2849  <order>action, id</order>
2850 </decoder>
2851
2852
2853 <!-- apparmor
2854   - Jun 24 10:35:29 hostname kernel: [49787.970285] audit: type=1400 audit(1403598929.839:88986): apparmor="ALLOWED" operation="getattr" profile="/usr/sbin/dovecot//null-1//null-2//null-4a6" name="/home/admin/mails/new/" pid=19973 comm="imap" requested_mask="r" denied_mask="r" fsuid=1003 ouid=1003
2855   - Jul 14 11:03:47 hostname kernel: [ 8665.951930] type=1400 audit(1405328627.702:54): apparmor="DENIED" operation="open" profile="/usr/bin/evince" name="/etc/xfce4/defaults.list" pid=16418 comm="evince" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
2856   - Jun 16 17:37:39 hostname kernel: [891880.587623] audit: type=1400 audit(1402933059.038:1681857): apparmor="ALLOWED" operation="exec" profile="/usr/sbin/dovecot//null-1fde//null-1fdf" name="/usr/lib/dovecot/pop3-login" pid=13903 comm="dovecot" requested_mask="x" denied_mask="x" fsuid=0 ouid=0 target="/usr/sbin/dovecot//null-1fde//null-1fdf//null-6b18"
2857   - Jun 16 17:37:39 hostname kernel: [891880.587957] audit: type=1400 audit(1402933059.038:1681858): apparmor="ALLOWED" operation="open" profile="/usr/sbin/dovecot//null-1fde//null-1fdf//null-6b18" name="/usr/lib/dovecot/libdovecot-login.so.0.0.0" pid=13903 comm="pop3-login" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
2858   - Jun 16 17:37:39 hostname kernel: [891880.587976] audit: type=1400 audit(1402933059.038:1681859): apparmor="ALLOWED" operation="getattr" profile="/usr/sbin/dovecot//null-1fde//null-1fdf//null-6b18" name="/usr/lib/dovecot/libdovecot-login.so.0.0.0" pid=13903 comm="pop3-login" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
2859   - Jun 16 17:37:39 hostname kernel: [891880.587989] audit: type=1400 audit(1402933059.038:1681860): apparmor="ALLOWED" operation="file_mmap" profile="/usr/sbin/dovecot//null-1fde//null-1fdf//null-6b18" name="/usr/lib/dovecot/libdovecot-login.so.0.0.0" pid=13903 comm="pop3-login" requested_mask="mr" denied_mask="mr" fsuid=0 ouid=0
2860   - Jun 23 20:46:15 hostname kernel: [   11.103248] audit: type=1400 audit(1403549175.177:2): apparmor="STATUS" operation="profile_load" name="/sbin/klogd" pid=2185 comm="apparmor_parser"
2861   - Jun 16 17:37:39 hostname kernel: [891880.587989] audit: type=1400 audit(1314853822.672:33649): apparmor="DENIED" operation="mknod" parent=27250 profile="/usr/lib/apache2/mpm-prefork/apache2//example.com" name="/usr/share/wordpress/1114140474e5f13bea68a4.tmp" pid=27289 comm="apache2" requested_mask="c" denied_mask="c" fsuid=33 ouid=33
2862   - Jun 16 17:37:39 hostname kernel: [891880.587989] audit: type=1400 audit(1315353795.331:33657): apparmor="DENIED" operation="exec" parent=14952 profile="/usr/lib/apache2/mpm-prefork/apache2//example.com" name="/usr/lib/sm.bin/sendmail" pid=14953 comm="sh" requested_mask="x" denied_mask="x" fsuid=33 ouid=0
2863 -->
2864
2865 <decoder name="apparmor">
2866   <parent>iptables</parent>
2867   <prematch> apparmor=</prematch>
2868   <regex> apparmor="(\S+)" operation="(\S+)"</regex>
2869   <order>status, extra_data</order>
2870 </decoder>
2871
2872 <!-- unix_chkpwd
2873   - Jul 21 07:40:29 localhost unix_chkpwd[15804]: password check failed for user (username)
2874 -->
2875 <decoder name="unix_chkpwd">
2876   <program_name>^unix_chkpwd</program_name>
2877 </decoder>
2878
2879 <!--Jul 21 07:40:29 localhost unix_chkpwd[15804]: password check failed for user (username)-->
2880 <decoder name="chkpwd-user">
2881   <parent>unix_chkpwd</parent>
2882   <regex offset="after_parent">user \((\w+)\)$</regex>
2883   <order>srcuser</order>
2884 </decoder>
2885
2886 <!-- Barracuda S&VF Email Logs
2887 Examples:
2888 May 14 03:31:21 mx1.example.org inbound/pass1: mail-88-66.reachmail.net[216.55.88.66] 1400074281-06f4a338c037a90001-TkCAQV 1400074281 1400074283 RECV errors@mail-88-68.reachmail.net eteixeira@example.net 2 12 -
2889 May 15 14:09:17 mx1.example.org inbound/pass1: host.limitless-servers.com[192.208.186.41] 1400198954-06f4a338c062640001-BkZagu 1400198954 1400198958 SCAN - heartattackbreakthrough@ridchanceofhrtattk.us en@example.org - 2 74 ridchanceofhrtattk.us SZ:2557 SUBJ:THE #1 Trick to Prevent Heart-Attacks Revealed???
2890 May 16 10:12:29 mx1.example.org inbound/pass1: kumarafoundation.hestoe.com[208.123.118.114] 1400271149-06f4a338c07a210001-QwTJwG 1400271149 1400271151 SCAN - EzekielMack@kumarafoundation.hestoe.com ctakesue@example.org - 2 74 hestoe.com SZ:1917 SUBJ:Bad Economy, Bad Rates - Get An Auto Insurance Quotes Today
2891 May 13 01:20:44 mx1.example.org scan: salmon.emxp002.net[174.123.35.182] 1399980039-06f4a338c019db0001-ZAPlzU 1399980040 1399980045 SCAN - errors@mermaid.emxp002.net PTAUA@HINGYCA.ORG 1.636 0 0 - SZ:86808 SUBJ:ATTN PASILA: URGENT FUNDING AVAILABLE
2892 May 14 09:39:30 mx1.example.org scan: mc.eau.lormaneducation.com[64.198.99.4] 1400096370-06f4a338c040390001-vQoliC 1400096370 1400096372 SCAN - bounce-201405143661297864@mc.eau.lormaneducation.com tmoriyasu@dod.hawaii.gov 0.401 0 0 - SZ:22001 SUBJ:Contractor's Dilemma of Dealing With Bad Plans and Specs - OnDemand Webinar
2893 May 16 10:56:04 mx1.example.org scan: smtp133.elabs13.com[74.116.235.133] 1400273757-06f4a338c07b490001-CBNzJg 1400273757 1400273765 SCAN - newsletter@email.cnbc.com tcolwell@example.net 0.402 0 0 - SZ:26609 SUBJ:=?utf-8?Q?"Failure=20to=20Recall:=20Investigating=20GM"=20Premier?==?utf-8?Q?es=20Sunday=2010p=20ET/PT?=
2894 Jul 26 10:39:36 mx1.example.org outbound/smtp: 127.0.0.1 1406407176-06f4a35b4d10f2c0001-EGYtgK 0 0 SEND - 3 A90EBA1F1BA connect to dnvrco-pub-iedge-vip.email.rr.com[107.14.73.70]: server refused mail service
2895 Jul 26 13:38:16 mx1.example.org outbound/smtp: 127.0.0.1 1406248798-06f4a35b4de6bd0001-3QeedR 0 0 SEND - 3 68EC0A1F1A3 Name service error for name=conference.preventchildabusetexas.org type=MX: Host not found, try again
2896 Jul 26 13:57:56 mx1.example.org outbound/smtp: 127.0.0.1 1406297159-06f4a35b4df2000001-PDxQZ2 0 0 SEND - 3 A194BA1F1AC connect to qw.eau.lormanwebinars.com[63.232.201.60]: Connection refused
2897 -->
2898
2899 <decoder name="barracuda-svf-email">
2900   <program_name>^inbound/pass|^scan|^outbound/smtp</program_name>
2901 </decoder>
2902
2903 <decoder name="barracuda-svf1">
2904   <parent>barracuda-svf-email</parent>
2905   <prematch>^\S+[\S+]|</prematch>
2906   <prematch>^\S+</prematch>
2907   <regex>^\S+[(\S+)] (\d+-\w+-\w+) \d+ \d+ |</regex>
2908   <regex>^(\S+) (\d+-\w+-\w+) \d+ \d+ </regex>
2909   <order>srcip, id</order>
2910 </decoder>
2911
2912 <!-- Info section - SCAN -->
2913 <decoder name="barracuda-svf1">
2914   <parent>barracuda-svf-email</parent>
2915   <regex offset="after_regex">(SCAN) (\S+ \S+ \S+ \S+ \d+ \d+ \.+ SUBJ:\.+)$</regex>
2916   <order>action, extra_data</order>
2917 </decoder>
2918
2919 <!-- Info section RECV -->
2920 <decoder name="barracuda-svf1">
2921   <parent>barracuda-svf-email</parent>
2922   <regex offset="after_regex">(RECV) (\S+ \S+ \d+ \d+ \.+)$</regex>
2923   <order>action, extra_data</order>
2924 </decoder>
2925
2926 <!-- Info section SEND -->
2927 <decoder name="barracuda-svf1">
2928   <parent>barracuda-svf-email</parent>
2929   <regex offset="after_regex">(SEND) (\S+ \d+ \S+ \.+)$</regex>
2930   <order>action, extra_data</order>
2931 </decoder>
2932
2933 <!-- Barracuda S&VF Administration-->
2934
2935 <decoder name="barracuda-svf-admin">
2936   <program_name>^web</program_name>
2937 </decoder>
2938
2939 <decoder name="barracuda-svf-admin-change">
2940   <parent>barracuda-svf-admin</parent>
2941   <prematch>^[\S+] global[] CHANGE</prematch>
2942   <regex offset="after_parent">^[(\S+)] global[] (CHANGE) (\S+ \(\S*)\)$</regex>
2943   <order>srcip,action,extra_data</order>
2944 </decoder>
2945
2946 <decoder name="barracuda-svf-admin-auth">
2947   <parent>barracuda-svf-admin</parent>
2948   <prematch>^[\S+] LOGIN|</prematch>
2949   <prematch>^[\S+] FAILED_LOGIN|</prematch>
2950   <prematch>^[\S+] LOGOUT</prematch>
2951   <regex offset="after_parent">^[(\S+)] (\S+) \((\S+)\)\p*$</regex>
2952   <order>srcip,action,user</order>
2953 </decoder>
2954
2955
2956 <!-- 
2957   - Decoder for Sysmon Event ID 1: Process Created
2958   - Maintained by Josh Brower, Josh@DefensiveDepth.com 
2959   -
2960   -  OSSEC to Sysmon Fields Mapping:
2961   -  user = User
2962   -  status = Image
2963   -  url = Hash
2964   -  extra_data = ParentImage
2965   
2966   - Examples:
2967   - 2014 Dec 20 14:29:48 (HME-TEST-01) 10.0.15.14->WinEvtLog 2014 Dec 20 09:29:47 WinEvtLog: Microsoft-Windows-Sysmon/Operational: INFORMATION(1): Microsoft-Windows-Sysmon: SYSTEM: NT AUTHORITY: WIN-U93G48C7BOP: Process Create:  UtcTime: 12/20/2014 2:29 PM  ProcessGuid: {00000000-87DB-5495-0000-001045F25A00}  ProcessId: 3048  Image: C:\Windows\system32\svchost.exe  CommandLine: "C:\Windows\system32\NOTEPAD.EXE" C:\Users\Administrator\Desktop\ossec.log  User: WIN-U93G48C7BOP\Administrator  LogonGuid: {00000000-84B8-5494-0000-0020CB330200}  LogonId: 0x233CB  TerminalSessionId: 1  IntegrityLevel: High  HashType: SHA1  Hash: 9FEF303BEDF8430403915951564E0D9888F6F365  ParentProcessGuid: {00000000-84B9-5494-0000-0010BE4A0200}  ParentProcessId: 848  ParentImage: C:\Windows\Explorer.EXE  ParentCommandLine: C:\Windows\Explorer.EXE 
2968 -->
2969
2970 <decoder name="Sysmon-EventID#1">
2971 <type>windows</type>
2972 <prematch>INFORMATION\(1\)</prematch>
2973 <regex offset="after_prematch">Image: (\.*) \s*CommandLine: \.* \s*User: (\.*) \s*LogonGuid: \S* \s*LogonId: \S* \s*TerminalSessionId: \S* \s*IntegrityLevel: \.*HashType: \S* \s*Hash: (\S*) \s*ParentProcessGuid: \S* \s*ParentProcessID: \S* \s*ParentImage: (\.*) \s*ParentCommandLine:</regex>
2974 <order>status,user,url,data</order>
2975 </decoder>
2976
2977 <!-- Squid access log decoder.
2978   - Will extract the srcip.
2979   - Author: Ahmet Ozturk
2980   - Examples:
2981   - 1140701044.525   1231 192.168.1.201 TCP_DENIED/400 1536
2982     GET ahmet - NONE/- text/html
2983   - 1140701230.827    781 192.168.1.210 TCP_DENIED/407 1785
2984     GET http://www.ossec.net oahmet NONE/- text/html
2985   -->
2986 <decoder name="squid-accesslog">
2987   <type>squid</type>
2988   <prematch>^\d+ \S+ </prematch>
2989   <regex>^\d+ (\S+) (\w+)/(\d+) \d+ \w+ (\S+) </regex>
2990   <order>srcip,action,id,url</order>
2991 </decoder>
2992
2993 <!-- unbound
2994   - 2014-05-20T09:01:07.283219-04:00 arrakis unbound: [9405:0] notice: sendto failed: Can't assign requested address
2995   - 2014-07-14T14:00:02.814490-04:00 arrakis unbound: [2541:0] info: 127.0.0.1 talkgadget.google.com. A IN
2996   - 2014-07-14T14:00:05.507848-04:00 arrakis unbound: [2541:0] info: server stats for thread 0: 3 queries, 2 answers from cache, 1 recursions, 0 prefetch
2997   - 2014-07-14T14:00:05.507955-04:00 arrakis unbound: [2541:0] info: server stats for thread 0: requestlist max 0 avg 0 exceeded 0 jostled 0
2998   - 2014-07-14T14:00:05.508075-04:00 arrakis unbound: [2541:0] info: average recursion processing time 0.038814 sec
2999   - 2014-07-14T14:00:05.508166-04:00 arrakis unbound: [2541:0] info: histogram of recursion processing times
3000   - 2014-07-14T14:00:05.508248-04:00 arrakis unbound: [2541:0] info: [25%]=0 median[50%]=0 [75%]=0
3001   - 2014-07-14T14:00:05.508333-04:00 arrakis unbound: [2541:0] info: lower(secs) upper(secs) recursions
3002   - 2014-07-14T14:00:05.508414-04:00 arrakis unbound: [2541:0] info:    0.032768    0.065536 1
3003   - 2014-07-14T15:05:07.520229-04:00 arrakis unbound: [2541:0] info: 127.0.0.1 github.com. AAAA IN
3004 -->
3005
3006
3007 <decoder name="unbound">
3008   <program_name>^unbound</program_name>
3009 </decoder>
3010
3011 <decoder name="unbound-a">
3012   <parent>unbound</parent>
3013   <regex> info: (\S+) (\S+). A IN$| info: (\S+) (\S+) AAAA IN$</regex>
3014   <order>srcip,url</order>
3015 </decoder>
3016
3017 <!-- OpenBSD doas -->
3018 <decoder name="doas">
3019   <program_name>^doas</program_name>
3020 </decoder>
3021
3022 <decoder name="doas-user">
3023   <parent>doas</parent>
3024   <regex>^(\S+) ran| for (\S+):</regex>
3025   <order>srcuser</order>
3026 </decoder>
3027
3028 <decoder name="doas-user">
3029   <parent>doas</parent>
3030   <regex offset="after_parent"> as (\S+): </regex>
3031   <order>dstuser</order>
3032 </decoder>
3033
3034 <!-- Exim
3035   - Examples:
3036   - 2017-01-23 03:44:14 dovecot_login authenticator failed for (hydra) [10.101.1.18]:35686: 535 Incorrect authentication data (set_id=user)
3037   - 2017-01-24 05:22:29 dovecot_plain authenticator failed for (test) [::1]:39454: 535 Incorrect authentication data (set_id=test)
3038   - 2017-01-24 03:09:46 SMTP connection from [10.101.1.10]:55010 (TCP/IP connection count = 1)
3039   - 2017-01-24 02:53:13 SMTP connection from (hydra) [10.101.1.10]:53682 lost
3040   - 2017-01-24 05:36:23 SMTP call from (000000) [::1]:39480 dropped: too many syntax or protocol errors (last command was "123")
3041 -->
3042
3043 <decoder name="exim-authfailed">
3044   <parent>windows-date-format</parent>
3045   <prematch offset="after_parent">authenticator failed</prematch>
3046   <regex offset="after_prematch">[(\S+)]:\d+: \d+ Incorrect authentication data \(set_id=(\w+)\)</regex>
3047   <order>srcip,user</order>
3048 </decoder>
3049
3050 <decoder name="exim-connect">
3051   <parent>windows-date-format</parent>
3052   <prematch offset="after_parent">^SMTP connection from </prematch>
3053   <regex offset="after_prematch">[(\S+)]:\d+ \(TCP/IP connection count</regex>
3054   <order>srcip</order>
3055 </decoder>
3056
3057 <decoder name="exim-disconnect">
3058   <parent>windows-date-format</parent>
3059   <prematch offset="after_parent">^SMTP connection from </prematch>
3060   <regex offset="after_prematch">[(\S+)]:\d+ lost</regex>
3061   <order>srcip</order>
3062 </decoder>
3063
3064 <decoder name="exim-syntax-errors">
3065   <parent>windows-date-format</parent>
3066   <prematch offset="after_parent">^SMTP call from </prematch>
3067   <regex offset="after_prematch">[(\S+)]:\d+ dropped: too many syntax or protocol errors</regex>
3068   <order>srcip</order>
3069 </decoder>
3070
3071 <!-- NSD
3072    - Aug 11 13:21:46 ix nsd[16565]: server initialization failed, nsd could not be started
3073    - Aug 11 13:22:14 ix nsd[13816]: blocked.hosts:2: syntax error
3074    - Aug 11 13:22:14 ix nsd[13816]: blocked.hosts:2: unrecognized RR type 'name:'
3075    - Aug 12 09:01:00 junction.example.com nsd[7405]: NSTATS 1439384460 1439314258 A=1 AAAA=1
3076    - Aug 12 09:01:00 junction.example.com nsd[7405]: XSTATS 1439384460 1439314258 RR=0 RNXD=0 RFwdR=0 RDupR=0 RFail=0 RFErr=0 RErr=0 RAXFR=0 RLame=0 ROpts=0 SSysQ=0 SAn
3077 s=2 SFwdQ=0 SDupQ=0 SErr=0 RQ=2 RIQ=0 RFwdQ=0 RDupQ=0 RTCP=0 SFwdR=0 SFail=0 SFErr=0 SNaAns=0 SNXD=0 RUQ=0 RURQ=0 RUXFR=0 RUUpd=0
3078    - Dec 16 12:51:17 pine nsd[90235]: xfrd: zone example.com received error code NOT IMPL from 192.168.17.9@153
3079 -->
3080
3081 <decoder name="nsd">
3082   <program_name>^nsd</program_name>
3083 </decoder>
3084
3085 <decoder name="nsd-from">
3086   <parent>nsd</parent>
3087   <regex> from (\S+)@| from (\S+)</regex>
3088   <order>srcip</order>
3089 </decoder>
3090
3091 <!-- ownCloud
3092    - Examples owncloud.log (Note that the syntax of failed login logs differs between oler and newer ownCloud versions):
3093    - {"reqId":"Jrd4fkwIcXhVjtP8qODR","level":2,"time":"2017-09-20T15:44:23+02:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"POST","url":"\/login","message":"Login failed: 'admin' (Remote IP: '127.0.0.1')"}
3094    - {"reqId":"wlioIFa6pOvt6DIAoeHE","remoteAddr":"127.0.0.1","app":"core","message":"Login failed: 'admin' (Remote IP: '127.0.0.1')","level":2,"time":"2016-04-12T22:28:20+02:00","method":"POST","url":"\/","user":"--"}
3095    - {"reqId":"prLlx9+QIfl1jHtz9C5o","remoteAddr":"127.0.0.1","app":"core","message":"Login failed: 'admin' (Remote IP: '127.0.0.1')","level":2,"time":"2015-07-08T12:12:41+02:00"}
3096    - {"reqId":"wLP7a3MdzTo8wgCWret9","remoteAddr":"127.0.0.1","app":"core","message":"Login failed: 'admin' (Remote IP: '127.0.0.1')","level":2,"time":"2015-07-15T09:40:35+02:00","method":"POST","url":"\/"}
3097    - {"reqId":"prLlx9+QIfl1jHtz9C5o","remoteAddr":"127.0.0.1","app":"core","message":"Login failed: 'admin' (Remote IP: '127.0.0.1)","level":2,"time":"2015-07-08T12:12:41+02:00"}
3098    - {"reqId":"wLP7a3MdzTo8wgCWret9","remoteAddr":"127.0.0.1","app":"core","message":"Login failed: 'admin' (Remote IP: '127.0.0.1)","level":2,"time":"2015-07-15T09:40:35+02:00","method":"POST","url":"\/"}
3099    - {"reqId":"f7906a8355f496e3a1947d7839c4a2c3","remoteAddr":"127.0.0.1","app":"core","message":"Login failed: 'admin' (Remote IP: '127.0.0.1', X-Forwarded-For: '')","level":2,"time":"2015-06-09T08:17:43+00:00"}
3100    - {"reqId":"9f8edc5558b2b4f8628663d83a092a7f","remoteAddr":"127.0.0.1","app":"core","message":"Login failed: 'admin' (Remote IP: '127.0.0.1', X-Forwarded-For: '')","level":2,"time":"2015-06-09T08:19:02   - +00:00","method":"POST","url":"\/cloud\/index.php"}
3101    - {"app":"core","message":"Login failed: 'admin' (Remote IP: '127.0.0.1', X-Forwarded-For: '')","level":2,"time":"2015-06-09T08:16:29+00:00"}
3102    - {"reqId":"5576a04643d8e","app":"core","message":"Login failed: 'admin' (Remote IP: '127.0.0.1', X-Forwarded-For: '')","level":2,"time":"2015-06-09T08:13:58+00:00","method":"POST","url":"\/owncloud\/index.php"}
3103    - {"app":"core","message":"Login failed: user 'admin' , wrong password, IP:127.0.0.1","level":2,"time":"2015-06-09T08:10:29+00:00"}
3104    - {"reqId":"55769fcacd1e0","app":"core","message":"Login failed: user 'admin' , wrong password, IP:127.0.0.1","level":2,"time":"2015-06-09T08:11:54+00:00","method":"POST","url":"\/owncloud\/index.php"}
3105    - {"reqId":"BaW6nfA5rHBoihjDtQVm","remoteAddr":"127.0.0.1","app":"core-preview","message":"Passed filename is not valid, might be malicious (file:\"test\";ip:\"127.0.0.1\")","level":2,"time":"2017-09-01T22:11:25+02:00","method":"POST","url":"\/login","user":"--"}
3106    - {"reqId":"4ETnKW0UyDBNmL4z\/umV","remoteAddr":"127.0.0.1","app":"PHP","message":"Redis::connect(): connect() failed: No such file or directory at \/var\/www\/owncloud\/lib\/private\/RedisFactory.php#60","level":3,"time":"2017-08-21T16:00:34+02:00","method":"PROPFIND","url":"\/remote.php\/dav\/addressbooks\/users\/admin\/example\/","user":"admin"}
3107    - {"reqId":"4j2DKpvOh0OezXVwfuLO","remoteAddr":"127.0.0.1","app":"PHP","message":"fopen(\/var\/www\/owncloud\/data\/user 1\/thumbnails\/1234\/32-32.png): failed to open stream: No such file or directory at \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Local.php#278","level":3,"time":"2017-07-15T23:59:20+02:00","method":"GET","url":"\/core\/preview.png?file=%2Fexample.txt&c=123&x=32&y=32&forceIcon=0","user":"user 1"}
3108
3109    - Examples syslog:
3110    - Sep  1 20:16:09 foo ownCloud[15463]: {core} Login failed: 'test' (Remote IP: '127.0.0.1')
3111    - Sep  1 22:16:33 foo ownCloud[15467]: {core-preview} Passed filename is not valid, might be malicious (file:"test";ip:"127.0.0.1")
3112 -->
3113
3114 <decoder name="owncloud">
3115   <prematch>^{"reqId":"\S+","message":"\.+","level":\d,"time":"\.+"}$|^{"app":"\S+","message":"\.+","level":\d,"time":"\.+"}$|^{"reqId":"\S+","level":\d,"time":"\S+","message":"\.+"}$</prematch>
3116 </decoder>
3117
3118 <!-- Note: This defaults to "ownCloud" but users can change the syslog tag: https://github.com/owncloud/core/blob/v10.0.2/config/config.sample.php#L608-L614 -->
3119 <decoder name="owncloud">
3120   <program_name>^ownCloud</program_name>
3121 </decoder>
3122
3123 <decoder name="owncloud-failed1">
3124   <parent>owncloud</parent>
3125   <prematch>Login failed: user </prematch>
3126   <regex offset="after_prematch">^'(\w+)' , wrong password, IP:(\d+.\d+.\d+.\d+)</regex>
3127   <order>user, srcip</order>
3128 </decoder>
3129
3130 <decoder name="owncloud-failed2">
3131   <parent>owncloud</parent>
3132   <prematch>Login failed: </prematch>
3133   <regex offset="after_prematch">^'(\w+)' \(Remote IP: '(\d+.\d+.\d+.\d+)</regex>
3134   <order>user, srcip</order>
3135 </decoder>
3136
3137 <decoder name="owncloud-malicious">
3138   <parent>owncloud</parent>
3139   <prematch>Passed filename is not valid, might be malicious </prematch>
3140   <regex offset="after_prematch">;ip:"(\d+.\d+.\d+.\d+)|;ip:\\"(\d+.\d+.\d+.\d+)</regex>
3141   <order>srcip</order>
3142 </decoder>
3143
3144 <decoder name="owncloud-loglevel">
3145   <parent>owncloud</parent>
3146   <prematch>","level":</prematch>
3147   <regex offset="after_prematch">^(\d),"</regex>
3148   <order>status</order>
3149 </decoder>
3150
3151 <!-- psad
3152   - Examples: (Note: IPv6 untested)
3153   - Sep  8 22:52:30 sni psad: scan detected (Nmap -sT or -sS scan): 212.83.152.232 -> 1.2.3.4 tcp: [21943] flags: SYN tcp pkts: 3 DL: 3
3154   - Sep  9 08:36:30 sni psad: src: 62.210.167.199 signature match: "BACKDOOR DoomJuice file upload attempt" (sid: 2375) tcp port: 3180
3155   - Sep  9 08:36:30 sni psad: scan detected (Masscan SYN scan): 62.210.167.199 -> 1.2.3.4 tcp: [3320-62210] flags: SYN tcp pkts: 10 DL: 3
3156   - Sep  3 14:18:52 sni psad: scan detected ( -sU scan): 192.168.1.42 -> 239.255.255.250 udp: [1900] udp pkts: 16 DL: 3
3157   - Sep  4 11:33:23 sni psad: src: 46.17.46.8 signature match: "MISC Microsoft PPTP communication attempt" (sid: 100082) tcp port: 1723
3158   - Sep  4 11:33:23 sni psad: src: 46.17.46.8 signature match: "DOS iParty DOS attempt" (sid: 1605) tcp port: 6004
3159   - Sep  4 11:33:23 sni psad: src: 46.17.46.8 signature match: "DOS Real Audio Server communication attempt" (sid: 100112) tcp port: 7070
3160   - Sep  4 11:33:23 sni psad: src: 46.17.46.8 signature match: "BACKDOOR DoomJuice file upload attempt" (sid: 2375) tcp port: 3129
3161   - Aug  9 16:46:32 dsc psad: message repeated 2 times: [ scan detected (Nmap -sT or -sS scan): 10.1.0.15 -> 192.168.1.18 tcp: [80] flags: SYN tcp pkts: 3 DL: 3]example logs: 
3162 -->
3163
3164 <decoder name="psad">
3165   <program_name>psad</program_name>
3166 </decoder>
3167
3168 <decoder name="psad-scan">
3169   <parent>psad</parent>
3170   <prematch>^scan detected </prematch>
3171   <regex offset="after_prematch"> (\S+) -> (\S+) \.+ DL: (\d)</regex>
3172   <order>srcip,dstip,status</order>
3173 </decoder>
3174
3175 <decoder name="psad-repeated">
3176   <parent>psad</parent>
3177   <prematch>^message repeated</prematch>
3178   <regex offset="after_prematch"> (\S+) -> (\S+) \.+ DL: (\d)</regex>
3179   <order>srcip,dstip,status</order>
3180 </decoder>
3181
3182 <decoder name="psad-signature">
3183   <parent>psad</parent>
3184   <prematch>signature match: </prematch>
3185   <regex offset="after_parent">src: (\S+) signature match: \.+ port: (\d+)</regex>
3186   <order>srcip,dstport</order>
3187 </decoder>
3188
3189 <!-- Proxmox Virtual Environment (Proxmox VE)
3190    - Examples syslog:
3191    - Sep 10 22:12:41 example pvedaemon[6427]: authentication failure; rhost=192.168.0.1 user=root@pam msg=Authentication failure
3192    - Sep 10 22:12:49 example pvedaemon[6428]: authentication failure; rhost=192.168.0.1 user=root@pve msg=no such user ('root@pve')
3193    - Sep 10 22:12:54 example pvedaemon[6428]: <root@pam> successful auth for user 'root@pam'
3194    - Sep 10 22:13:44 example pvedaemon[6427]: <root@pam> starting task UPID:example:00000000:11111111:22222222:vzstart:100:root@pam:
3195    - Sep 10 22:13:44 example pvedaemon[13735]: starting CT 100: UPID:example:00000000:11111111:22222222:vzstart:100:root@pam:
3196    - Sep 10 22:13:46 example pvedaemon[6427]: <root@pam> end task UPID:example:00000000:11111111:22222222:vzstart:100:root@pam: OK
3197    - Sep 10 22:13:47 example pvestatd[1892]: modified cpu set for lxc/100: 4
3198    - Sep 10 06:25:44 example pveproxy[15342]: received signal TERM
3199    - Sep 10 06:25:44 example pveproxy[15342]: server closing
3200    - Sep 10 06:25:44 example pveproxy[15345]: worker exit
3201    - Sep 10 06:25:44 example pveproxy[15344]: worker exit
3202    - Sep 10 06:25:44 example pveproxy[15343]: worker exit
3203    - Sep 10 06:25:44 example pveproxy[15342]: worker 15343 finished
3204    - Sep 10 06:25:44 example pveproxy[15342]: worker 15344 finished
3205    - Sep 10 06:25:44 example pveproxy[15342]: worker 15345 finished
3206    - Sep 10 06:25:44 example pveproxy[15342]: server stopped
3207    - Sep 10 06:25:45 example pveproxy[22375]: Using '/etc/pve/local/pveproxy-ssl.pem' as certificate for the web interface.
3208    - Sep 10 06:25:45 example pveproxy[22413]: starting server
3209    - Sep 10 06:25:45 example pveproxy[22413]: starting 3 worker(s)
3210    - Sep 10 06:25:45 example pveproxy[22413]: worker 22414 started
3211    - Sep 10 06:25:45 example pveproxy[22413]: worker 22415 started
3212    - Sep 10 06:25:45 example pveproxy[22413]: worker 22416 started
3213    - Sep 10 06:25:47 example pvepw-logger[15428]: received terminate request (signal)
3214    - Sep 10 06:25:47 example pvepw-logger[15428]: stopping pvefw logger
3215    - Sep 10 06:25:48 example pvepw-logger[22551]: starting pvefw logger
3216 -->
3217
3218 <decoder name="pvedaemon">
3219   <program_name>^pvedaemon</program_name>
3220 </decoder>
3221
3222 <decoder name="pvestatd">
3223   <program_name>^pvestatd</program_name>
3224 </decoder>
3225
3226 <decoder name="pveproxy">
3227   <program_name>^pveproxy</program_name>
3228 </decoder>
3229
3230 <decoder name="pvepw-logger">
3231   <program_name>^pvepw-logger</program_name>
3232 </decoder>
3233
3234 <decoder name="pvedaemon-auth-failed">
3235   <parent>pvedaemon</parent>
3236   <prematch>authentication failure; </prematch>
3237   <regex offset="after_prematch">^rhost=(\S+) user=(\S+)@pam msg=|^rhost=(\S+) user=(\S+)@pve msg=</regex>
3238   <order>srcip, user</order>
3239 </decoder>
3240
3241 <decoder name="pvedaemon-auth-success">
3242   <parent>pvedaemon</parent>
3243   <prematch>successful auth for user '</prematch>
3244   <regex offset="after_prematch">^(\S+)@pam'$|^(\S+)@pve'$</regex>
3245   <order>user</order>
3246 </decoder>
3247
3248 <decoder name="dhcpd">
3249   <program_name>^dhcpd$</program_name>
3250 </decoder>
3251
3252 <decoder name="dhcpd-data">
3253   <parent>dhcpd</parent>
3254   <regex offset="after_parent">^(\S+) \S+ (\S+) \S+ (\S+) via (\S+)$</regex>
3255   <order>action, srcip, extra_data, extra_data</order>
3256 </decoder>
3257
3258 <decoder name="dhcpd-ack">
3259   <parent>dhcpd</parent>
3260   <prematch> acking </prematch>
3261   <regex offset="after_parent">already acking lease (\S+)</regex>
3262   <order>srcip</order>
3263 </decoder>
3264
3265 <decoder name="dhcpd-release">
3266   <parent>dhcpd</parent>
3267   <prematch>^IP address</prematch>
3268   <regex offset="after_parent">^IP address (\S+) </regex>
3269   <order>srcip</order>
3270 </decoder>
3271
3272 <!-- OpenBSD httpd -->
3273 <decoder name="openbsd-httpd">
3274   <prematch> [\d+/\w+/\d+:\d+:\d+:\d+ -\d+] "</prematch>
3275   <regex>^(\S+) (\S+) \S+ \S+ [\d+/\w+/\d+:\d+:\d+:\d+ -\d+] "(\S+) (\S+) HTTP/\d.\d" (\d+) \d$</regex>
3276   <order>url, srcip, protocol, url, status</order>
3277   <type>web-log</type>
3278 </decoder>
3279
3280 <!-- dnsmasq -->
3281 <decoder name="dnsmasq">
3282   <!--<program_name>^dnsmasq</program_name>-->
3283   <prematch>^dnsmasq</prematch>
3284 </decoder>
3285
3286 <decoder name="dnsmasq2">
3287   <parent>dnsmasq</parent>
3288   <regex offset="after_parent">^[\d+]: \d+ (\S+)/\d+ (\S+) (\S+) to (\S+)|</regex>
3289   <regex>^[\d+]: \d+ (\S+)/\d+ (\S+) (\S+) from (\S+)|</regex>
3290   <regex>^[\d+]: \d+ (\S+)/\d+ (\S+) (\S+) is (\S+)</regex>
3291   <order>srcip, action, url, extra_data</order>
3292 </decoder>
3293
3294 <!-- Kaspersky Endpoint Security 10 for Linux -->
3295 <!-- Kesl example Logs -->
3296 <!-- Nov  5 00:11:21 hostname kesl: {"EventType": "AVBasesAreTotallyOutOfDate","EventId": "27336","TaskName": "Update","TaskId": "6","AVBasesDate": "2018-10-17 09:49:00"} -->
3297 <!-- Oct 25 13:11:21 hostname kesl: {"EventType": "AVBasesAreOutOfDate","EventId": "27311","TaskName": "Update","TaskId": "6","AVBasesDate": "2018-10-17 09:49:00"} -->
3298 <!-- Nov 10 13:19:27 hostname kesl: {"EventType": "UpdateError","EventId": "27381","TaskType": "Update","TaskName": "Update","TaskId": "6","RuntimeTaskId": "120"} -->
3299 <!-- Nov 10 13:22:09 hostname kesl: {"EventType": "ThreatDetected","EventId": "27384","DetectName": "EICAR-Test-File","DetectType": "Virware","DetectCertainty": "Sure","DetectSource": "Local","FileName": "/home/userlogin/eicar.com","ObjectName": "File","TaskId": "1","RuntimeTaskId": "20","TaskName": "File_Monitoring","TaskType": "OAS","AccessUser": "root","AccessUserId": "0","FileOwner": "root","FileOwnerId": "0"} -->
3300 <!-- Nov 14 13:50:01 hostname kesl: {"EventType": "ObjectSavedToBackup","EventId": "27448","FileName": "/home/userlogin/eicar.com","ObjectName": "File","TaskId": "1","RuntimeTaskId": "126","TaskName": "File_Monitoring","TaskType": "OAS","AccessUser": "userlogin","AccessUserId": "1000","FileOwner": "root","FileOwnerId": "0"} -->
3301 <!-- Nov 14 13:50:01 hostname kesl: {"EventType": "ObjectNotDisinfected","EventId": "27449","ObjectNotDisinfectedReason": "NonCurable","FileName": "/home/userlogin/eicar.com","ObjectName": "File","TaskId": "1","RuntimeTaskId": "126","TaskName": "File_Monitoring","TaskType": "OAS","AccessUser": "userlogin","AccessUserId": "1000","FileOwner": "root","FileOwnerId": "0"} -->
3302 <!-- Nov 14 13:50:01 hostname kesl: {"EventType": "ObjectDeleted","EventId": "27450","FileName": "/home/userlogin/eicar.com","ObjectName": "File","TaskId": "1","RuntimeTaskId": "126","TaskName": "File_Monitoring","TaskType": "OAS","AccessUser": "userlogin","AccessUserId": "1000","FileOwner": "root","FileOwnerId": "0"} -->
3303 <!-- Nov 14 12:44:04 hostname kesl: {"EventType": "TaskStateChanged","EventId": "27438","TaskName": "Update","TaskType": "Update","TaskId": "6","TaskState": "Starting","PrevTaskState": "Stopped","TaskRequestInitiator": "User","RuntimeTaskId": "127"} -->
3304 <!-- Nov 14 12:44:04 hostname kesl: {"EventType": "TaskStateChanged","EventId": "27439","TaskName": "Update","TaskType": "Update","TaskId": "6","TaskState": "Started","PrevTaskState": "Starting","TaskRequestInitiator": "User","RuntimeTaskId": "127"} -->
3305
3306 <decoder name="kesl">
3307   <program_name>^kesl</program_name>
3308 </decoder>
3309
3310 <decoder name="kesl-avbases-old">
3311   <parent>kesl</parent>
3312   <prematch>^\p\pEventType\p: \p\S+\p,\pEventId\p: \p\d+\p,\pTaskName\p: \p\S+\p,\pTaskId\p: \p\d+\p,\pAVBasesDate\p: \p\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\p\p</prematch>
3313   <regex offset="after_parent">^\p\pEventType\p: \p(\S+)\p,\pEventId\p: \p(\d+)\p,\pTaskName\p: \p(\S+)\p,\pTaskId\p: \p\d+\p,\pAVBasesDate\p: \p(\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d)\p\p</regex>
3314   <order>status, id, action, extra_data</order> 
3315 </decoder>
3316
3317 <decoder name="kesl-threat-detected">
3318   <parent>kesl</parent>
3319   <prematch>^\p\pEventType\p: \p\S+\p,\pEventID\p: \p\d+\p,\pDetectName\p: \p\S+\p,\pDetectType\p: \p\S+\p,\pDetectCertainty\p: \p\S+\p,\pDetectSource\p: \p\S+\p,\pFileName\p: \p\S+,\pObjectName\p: \p\S+\p,\pTaskId\p: \p\d+\p,\pRuntimeTaskId\p: \p\d+\p,\pTaskName\p: \p\S+\p,\pTaskType\p: \p\S+\p,\pAccessUser\p: \p\S+\p,\pAccessUserId\p: \p\d+\p,\pFileOwner\p: \p\S+\p,\pFileOwnerId\p: \p\d+\p\p</prematch>
3320   <regex offset="after_parent">^\p\pEventType\p: \p(\S+)\p,\pEventID\p: \p(\d+)\p,\pDetectName\p: \p\S+\p,\pDetectType\p: \p\S+\p,\pDetectCertainty\p: \p(\S+)\p,\pDetectSource\p: \p\S+\p,\pFileName\p: \S+,\pObjectName\p: \p\S+\p,\pTaskId\p: \p\d+\p,\pRuntimeTaskId\p: \p\d+\p,\pTaskName\p: \p\S+\p,\pTaskType\p: \p(\S+)\p,\pAccessUser\p: \p\S+\p,\pAccessUserId\p: \p\d+\p,\pFileOwner\p: \p\S+\p,\pFileOwnerId\p: \p\d+\p\p</regex>
3321   <order>status, id, extra_data, action</order>
3322 </decoder>
3323
3324 <decoder name="kesl-taskstatechange">
3325   <parent>kesl</parent>
3326   <prematch>^\p\pEventType\p: \p\S+\p,\pEventId\p: \p\d+\p,\pTaskName\p: \p\S+\p,\pTaskType\p: \p\S+\p,\pTaskId\p: \p\d+\p,\pTaskState\p: \p\S+\p,\pPrevTaskState\p: \p\S+\p,\pTaskRequestInitiator\p: \p\S+\p,\pRuntimeTaskId\p: \p\d+\p\p</prematch>
3327   <regex offset="after_parent">^\p\pEventType\p: \p(\S+)\p,\pEventId\p: \p(\d+)\p,\pTaskName\p: \p\S+\p,\pTaskType\p: \p(\S+)\p,\pTaskId\p: \p\d+\p,\pTaskState\p: \p(\S+)\p,\pPrevTaskState\p: \p\S+\p,\pTaskRequestInitiator\p: \p(\S+)\p,\pRuntimeTaskId\p: \p\d+\p\p</regex>
3328   <order>action, id, extra_data, status, srcuser</order>
3329 </decoder>
3330
3331 <!-- MHN - Json log decoder - Dionaea -->
3332 <!-- include /var/log/mhn/mhn-json.log to ossec.conf -->
3333 <!-- {"direction": "inbound", "protocol": "ip", "ids_type": "network", "timestamp": "2018-09-14T11:02:54.215411", "dionaea_action": "reject", "type": "dionaea.connections", "app": "dionaea", "src_ip": "16.10.10.10", "vendor_product": "Dionaea", "dest_port": 365, "signature": "Connection to Honeypot", "src_port": 45302, "dest_ip": "16.10.10.11", "sensor": "5e7031cf-b74d-22f9-57e0-254166752457", "transport": "tcp", "severity": "high"} -->
3334 <decoder name="dionaea">
3335   <prematch>dionaea.connections</prematch>
3336   <regex>^{\pdirection\p: \p(\S+)\p, \pprotocol\p: \p(\S+)\p, \pids_type\p: \p\S+\p, \ptimestamp\p: \p\d\d\d\d-\d\d-\d\d\w\d\d:\d\d:\d\d\.\d+\p, \pdionaea_action\p: \p(\S+)\p, \ptype\p: \pdionaea.connections\p, \papp\p: \pdionaea\p, \psrc_ip\p: "(\S+)", \pvendor_product\p: \pDionaea\p, \pdest_port\p: (\d+), \psignature\p: \p\.+\p, \psrc_port\p: (\d+), \pdest_ip\p: "(\S+)", \psensor\p: \S+, \ptransport\p: \p\S+\p, \pseverity\p: \p\S+\p}</regex>
3337   <order>extra_data, protocol, action, srcip, dstport, srcport, dstip</order>
3338 </decoder>
3339
3340 <!-- MHN - Json log decoder - Cowrie -->
3341 <!-- include /var/log/mhn/mhn-json.log to ossec.conf -->
3342 <!-- {"direction": "inbound", "protocol": "ip", "ids_type": "network", "ssh_username": "admin", "app": "cowrie", "transport": "tcp", "dest_port": 22, "src_port": 45302, "severity": "high", "timestamp": "2018-10-23T11:22:36.597864", "vendor_product": "Cowrie", "sensor": "5e7031cf-b74d-22f9-57e0-254166752457", "src_ip": "16.10.10.10", "ssh_password": "password", "signature": "SSH login attempted on cowrie honeypot", "ssh_version": "'SSH-2.0-Sun_SSH_1.1.4'", "type": "cowrie.sessions", "dest_ip": "16.10.10.11"} -->
3343 <!-- {"direction": "inbound", "protocol": "ip", "ids_type": "network", "timestamp": "2018-10-23T07:45:56.937787", "vendor_product": "Cowrie", "type": "cowrie.sessions", "app": "cowrie", "src_ip": "16.10.10.10", "dest_port": 22, "signature": "SSH session on cowrie honeypot", "ssh_version": "'SSH-2.0-Sun_SSH_1.1.4'", "src_port": 45302, "dest_ip": "16.10.10.11", "sensor": "5e7031cf-b74d-22f9-57e0-254166752457", "transport": "tcp", "severity": "high"} -->
3344 <!-- {"direction": "inbound", "protocol": "ip", "ids_type": "network", "timestamp": "2018-11-14T10:32:38.686578", "app": "cowrie", "transport": "tcp", "dest_port": 22, "src_port": 45302, "severity": "high", "vendor_product": "Cowrie", "sensor": "5e7031cf-b74d-22f9-57e0-254166752457", "src_ip": "16.10.10.10", "command": "whoami", "signature": "command attempted on cowrie honeypot", "ssh_version": "'SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u4'", "type": "cowrie.sessions", "dest_ip": "16.10.10.11"} -->
3345
3346 <decoder name="cowrie">
3347   <prematch>cowrie.sessions</prematch>
3348 </decoder>
3349
3350 <decoder name="cowrie-attempt">
3351   <parent>cowrie</parent>
3352   <prematch>"SSH login attempted</prematch>
3353   <regex>^{\pdirection\p: \p\S+\p, \pprotocol\p: \p(\S+)\p, \pids_type\p: \p(\S+)\p, \pssh_username\p: \p(\S+)\p, \papp\p: \pcowrie\p, \ptransport\p: \p\S+\p, \pdest_port\p: (\d+), \psrc_port\p: (\d+), \pseverity\p: \p\S+\p, \ptimestamp\p: \p\d\d\d\d-\d\d-\d\d\w\d\d:\d\d:\d\d.\d+\p, \pvendor_product\p: \pCowrie\p, \psensor\p: \S+, \psrc_ip\p: "(\S+)", \pssh_password\p: \p\S+\p, \psignature\p: \p(\.+)\p, \pssh_version\p: \.+, \ptype\p: \pcowrie.sessions\p, \pdest_ip\p: "(\S+)"}</regex>
3354   <order>protocol, extra_data, user, dstport, srcport, srcip, action, dstip</order>
3355 </decoder>
3356
3357 <decoder name="cowrie-session">
3358   <parent>cowrie</parent>
3359   <prematch>"SSH session on cowrie honeypot</prematch>
3360   <regex>^{\pdirection\p: \p\S+\p, \pprotocol\p: \p(\S+)\p, \pids_type\p: \p(\S+)\p, \ptimestamp\p: \p\d\d\d\d-\d\d-\d\d\w\d\d:\d\d:\d\d.\d+\p, \pvendor_product\p: \pCowrie\p, \ptype\p: \pcowrie.sessions\p, \papp\p: \pcowrie\p, \psrc_ip\p: "(\S+)", \pdest_port\p: (\d+), \psignature\p: \p(\.+)\p, \pssh_version\p: \.+, \psrc_port\p: (\d+), \pdest_ip\p: "(\S+)", \psensor\p: \S+, \ptransport\p: \p\S+\p, \pseverity\p: \p\S+\p}</regex>
3361   <order>protocol, extra_data, srcip, dstport, action, srcport, dstip</order>
3362 </decoder>
3363
3364 <decoder name="cowrie-command">
3365   <parent>cowrie</parent>
3366   <prematch>"command attempted on cowrie honeypot</prematch>
3367   <regex>^{\pdirection\p: \p\S+\p, \pprotocol\p: \p(\S+)\p, \pids_type\p: \p(\S+)\p, \ptimestamp\p: \p\d\d\d\d-\d\d-\d\d\w\d\d:\d\d:\d\d.\d+\p, \papp\p: \pcowrie\p, \ptransport\p: \p\S+\p, \pdest_port\p: (\d+), \psrc_port\p: (\d+), \pseverity\p: \p\S+\p, \pvendor_product\p: \pCowrie\p, \psensor\p: \S+, \psrc_ip\p: "(\S+)", \pcommand\p: \p\S+\p, \psignature\p: \p(\.+)\p, \pssh_version\p: \.+, \ptype\p: \pcowrie.sessions\p, \pdest_ip\p: "(\S+)"}</regex>
3368   <order>protocol, extra_data, dstport, srcport, srcip, action, dstip</order>
3369 </decoder>
3370
3371 <!-- EOF -->