-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathdecoder.xml
3359 lines (2842 loc) · 149 KB
/
decoder.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- @(#) $Id: decoder.xml,v 1.166 2010/06/15 12:52:01 dcid Exp $
- OSSEC log decoder.
- Author: Daniel B. Cid
- License: http://www.ossec.net/en/licensing.html
-->
<!--
- Allowed fields:
- location - where the log came from (only on FTS)
- srcuser - extracts the source username
- dstuser - extracts the destination (target) username
- user - an alias to dstuser (only one of the two can be used)
- srcip - source ip
- dstip - dst ip
- srcport - source port
- dstport - destination port
- protocol - protocol
- id - event id
- url - url of the event
- action - event action (deny, drop, accept, etc)
- status - event status (success, failure, etc)
- extra_data - Any extra data
-->
<!-- Pam decoder.
- Will extract username and srcip whenever is possible.
- Examples:
- su(pam_unix)[23164]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost= user=osaudit
- su(pam_unix)[2298]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost= user=root
- vsftpd(pam_unix)[25073]: authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=211.100.27.101
- vsftpd(pam_unix)[25073]: check pass; user unknown
- sshd(pam_unix)[16660]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=202.110.184.100 user=root
- su(pam_unix)[14592]: session opened for user news by (uid=0)
- su(pam_unix)[14592]: session closed for user news
- sshd(pam_unix)[13025]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=210.70.129.207 user=nobody
- 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
- sshd(pam_unix)[17365]: session opened for user test by (uid=508)
- sshd(pam_unix)[1345]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=222.237.79.237 user=root
- sshd(pam_unix)[15794]: 2 more authentication failures; logname= uid=0
euid=0 tty=ssh ruser= rhost=10.0.3.1 user=root
- Nov 17 21:41:22 localhost su[8060]: (pam_unix) session opened for user root by (uid=0)
- 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
- Sep 28 15:28:58 server login: pam_unix(login:session): session opened for user carl by LOGIN(uid=0)
- Sep 28 15:35:18 server sshd[123]: pam_unix(sshd:session): session opened for user carl by (uid=0)
- Mar 29 00:42:09 server saslauthd[1230]: pam_succeed_if(smtp:auth): error retrieving information about user demo
-->
<decoder name="pam">
<program_name_pcre2>\(pam_unix\)$</program_name_pcre2>
</decoder>
<decoder name="pam">
<program_name_pcre2></program_name_pcre2>
<prematch_pcre2>^pam_unix|^\(pam_unix\)|^pam_succeed_if</prematch_pcre2>
</decoder>
<decoder name="pam-user">
<parent>pam</parent>
<prematch_pcre2>^session \w+ </prematch_pcre2>
<pcre2 offset="after_prematch">^for user (\S+)</pcre2>
<order>user</order>
</decoder>
<!--XXXX<decoder name="pam-user2">
<parent>pam</parent>
<prematch_pcre2>^session \S+ </prematch_pcre2>
<pcre2>for user (\S+)</pcre2>
<order>user</order>
</decoder>
-->
<decoder name="pam-host-user">
<parent>pam</parent>
<prematch_pcre2>rhost=\S+[ ]+user=\S+</prematch_pcre2>
<pcre2>rhost=(\S+)[ ]+?user=(\S+)</pcre2>
<order>srcip, user</order>
</decoder>
<decoder name="pam-ruser">
<parent>pam</parent>
<prematch_pcre2> ruser</prematch_pcre2>
<pcre2 offset="after_prematch">^=(\S+) </pcre2>
<order>user</order>
</decoder>
<decoder name="pam-ruser">
<parent>pam</parent>
<pcre2> rhost=(\S+)</pcre2>
<order>srcip</order>
</decoder>
<decoder name="pam-host">
<parent>pam</parent>
<prematch_pcre2> rhost</prematch_pcre2>
<pcre2 offset="after_prematch">^=(\S+)</pcre2>
<order>srcip</order>
</decoder>
<!-- SSH decoder.
- Will extract username and srcip from the logs.
- Only add to the FTS if the login was successful
- If the login failed, just extract the username/srcip for correlation
- Examples:
- sshd[8813]: Accepted password for root from 192.168.10.1 port 1066 ssh2
- sshd[2404]: Accepted password for root from 192.168.11.1 port 2011 ssh2
- sshd[21405]: Accepted password for root from 192.1.1.1 port 6023 ssh2
- sshd[21487]: Failed password for root from 192.168.1.1 port 1045 ssh2
- sshd[8813]: Failed none for root from 192.168.10.161 port 1066 ssh2
- sshd[12675]: Failed password for invalid user lala11 from x.x.x.x ..
- sshd[12914]: Failed password for invalid user lala6 from ...
- sshd[8267]: Failed password for illegal user test from 62.67.45.4 port 39141 ssh2
- sshd[11259]: Invalid user abc from 127.0.0.1
- "" Failed keyboard-interactive for root from 192.1.1.1 port 1066 ssh2
- sshd[23857]: [ID 702911 auth.notice] User xxx, coming from zzzz,
- authenticated.
- sshd[23578]: reverse mapping checking getaddrinfo for pib4.catv-bauer.at failed - POSSIBLE BREAKIN ATTEMPT!
- sshd[61834]: reverse mapping checking getaddrinfo for sv.tvcm.ch
- failed - POSSIBLE BREAKIN ATTEMPT!
- sshd[3251]: User root not allowed because listed in DenyUsers
- [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]
- [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]
- Apr 23 07:03:53 machinename sshd[29961]: User root from 12.3.4.5
not allowed because not listed in AllowUsers
- sshd[9815]: scanned from 127.0.0.1 with SSH-1.99-AKASSH_Version_Mapper1. Don't panic.
- Sep 4 23:58:33 junction sshd[9351]: fatal: Write failed: Broken pipe
- Sep 18 14:58:47 ix sshd[11816]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
- 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)
- Aug 10 08:38:40 junction sshd[20013]: error: connect_to 192.168.179 port 8080: failed
- Jun 9 00:00:01 ix sshd[9815]: scanned from 127.0.0.1 with SSH-1.99-AKASSH_Version_Mapper1. Don't panic.
- Jan 26 11:57:26 ix sshd[14879]: error: connect to ix.example.com port 7777 failed: Connection refused
- Oct 8 10:07:27 y sshd[7644]: debug1: attempt 2 failures 2
- Oct 8 08:58:37 y sshd[6956]: fatal: PAM: pam_setcred(): Authentication service cannot retrieve user credentials
- Oct 8 08:48:33 y sshd[6856]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
- Oct 8 11:18:26 172.16.51.132 sshd[7618]: error: PAM: Module is unknown for ddp from 172.16.51.1
- Jun 19 20:56:00 tiny sshd[11605]: fatal: Write failed: Host is down
- Jun 11 06:32:17 gorilla sshd[28293]: fatal: buffer_get_bignum2: buffer error
- Jun 11 06:32:17 gorilla sshd[28293]: error: buffer_get_bignum2_ret: negative numbers not supported
- Apr 14 19:28:21 gorilla sshd[31274]: Connection closed by 192.168.1.33
- Jun 22 12:01:13 junction sshd[11283]: Received disconnect from 212.14.228.46: 11: Bye Bye
- Nov 9 07:40:25 ginaz sshd[5973]: error: setsockopt SO_KEEPALIVE: Connection reset by peer
- Nov 2 12:08:27 192.168.17.7 sshd[9665]: fatal: Cannot bind any address.
- Nov 2 12:11:40 192.168.17.7 sshd[9814]: pam_loginuid(sshd:session): set_loginuid failed opening loginuid
- Nov 6 09:53:38 hagal sshd[697]: error: accept: Software caused connection abort
- Nov 9 11:36:55 ecaz sshd[26967]: pam_succeed_if(sshd:auth): error retrieving information about user _z9xxbBW
-->
<decoder name="sshd">
<program_name_pcre2>^sshd</program_name_pcre2>
</decoder>
<decoder name="sshd-success">
<parent>sshd</parent>
<prematch_pcre2>^Accepted</prematch_pcre2>
<pcre2 offset="after_prematch">^ \S+ for (\S+) from (\S+) port </pcre2>
<order>user, srcip</order>
<fts>name, user, location</fts>
</decoder>
<decoder name="ssh-denied">
<parent>sshd</parent>
<prematch_pcre2>^User \S+ from </prematch_pcre2>
<pcre2 offset="after_parent">^User (\S+) from (\S+) </pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="sshd-success-solaris">
<parent>sshd</parent>
<prematch_pcre2>^User </prematch_pcre2>
<pcre2 offset="after_prematch">^(\S+), coming from (\S+), </pcre2>
<order>user, srcip</order>
<fts>name, user, location</fts>
</decoder>
<decoder name="ssh-kbd">
<parent>sshd</parent>
<prematch_pcre2 offset="after_parent">^Postponed keyboard-interactive|^Failed keyboard-interactive</prematch_pcre2>
<pcre2 offset="after_prematch"> user (\S+) from (\S+) port (\d+) </pcre2>
<order>user, srcip, srcport</order>
</decoder>
<decoder name="ssh-invfailed">
<parent>sshd</parent>
<prematch_pcre2>^Failed \S+ for invalid user|^Failed \S+ for illegal user</prematch_pcre2>
<pcre2 offset="after_prematch">from (\S+) port \d+ \w+$</pcre2>
<order>srcip</order>
</decoder>
<decoder name="ssh-failed">
<parent>sshd</parent>
<prematch_pcre2>^Failed \S+ </prematch_pcre2>
<pcre2 offset="after_prematch">^for (\S+) from (\S+) port \d+</pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="ssh-error">
<parent>sshd</parent>
<prematch_pcre2>^error: PAM: Authentication \w+ </prematch_pcre2>
<pcre2 offset="after_prematch">^for (\S+) from (\S+)$</pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="ssh-pam-error">
<parent>sshd</parent>
<prematch_pcre2>^error: PAM: </prematch_pcre2>
<pcre2 offset="after_prematch">user (\S+) from (\S+)</pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="ssh-reverse-mapping">
<parent>sshd</parent>
<prematch_pcre2>^reverse mapping checking </prematch_pcre2>
<pcre2 offset="after_prematch">^\w+ for \S+ \[(\S+)\] |^\w+ for (\S+) </pcre2>
<order>srcip</order>
</decoder>
<decoder name="ssh-invalid-user">
<parent>sshd</parent>
<prematch_pcre2>^Invalid user|^Illegal user</prematch_pcre2>
<pcre2 offset="after_prematch"> from (\S+)</pcre2>
<order>srcip</order>
</decoder>
<decoder name="ssh-scan">
<parent>sshd</parent>
<prematch_pcre2>^scanned from</prematch_pcre2>
<pcre2 offset="after_prematch"> (\S+) </pcre2>
<order>srcip</order>
</decoder>
<decoder name="ssh-received">
<parent>sshd</parent>
<prematch_pcre2>^Received disconnect </prematch_pcre2>
<pcre2 offset="after_prematch">^from (\S+): |^from (\S+) </pcre2>
<order>srcip</order>
</decoder>
<decoder name="ssh-disconnected">
<parent>sshd</parent>
<prematch_pcre2>^Disconnected from invalid user</prematch_pcre2>
<pcre2 offset="after_prematch">\S+ (\S+) </pcre2>
<order>srcip</order>
</decoder>
<decoder name="ssh-connection">
<parent>sshd</parent>
<prematch_pcre2>^Connection closed by </prematch_pcre2>
<pcre2 offset="after_prematch">user (\S+) (\S+) </pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="ssh-negotiate">
<parent>sshd</parent>
<prematch_pcre2>^Unable to negotiate with </prematch_pcre2>
<pcre2 offset="after_prematch">^(\S+) port (\d+)</pcre2>
<order>srcip, srcport</order>
</decoder>
<decoder name="ssh-protocol">
<parent>sshd</parent>
<prematch_pcre2>^Protocol major versions differ for </prematch_pcre2>
<pcre2 offset="after_prematch">^(\S+)</pcre2>
<order>srcip</order>
</decoder>
<!--
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
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
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
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
e.g. OpenSSH > 7.2:
Sep 4 21:13:05 example sshd[12853]: Did not receive identification string from 192.168.0.1 port 33021
e.g. OpenSSH <= 7.2:
Sep 4 21:14:25 example sshd[18368]: Did not receive identification string from 192.168.0.1
-->
<decoder name="ssh-scan2">
<parent>sshd</parent>
<prematch_pcre2>^Did not receive identification |^Bad protocol version </prematch_pcre2>
<pcre2 offset="after_prematch"> from (\S+)$| from (\S+) port (\d+?)$</pcre2>
<order>srcip,srcport</order>
</decoder>
<decoder name="ssh-osx-refuse">
<parent>sshd</parent>
<prematch_pcre2>^refused connect </prematch_pcre2>
<pcre2 offset="after_prematch">^from (\S+)$|^from \S+ \((\S+[A-Za-z0-9@_-]+?)\)$|^from \S+ \((\S+::)\)$</pcre2>
<order>srcip</order>
</decoder>
<decoder name="ssh-closed">
<parent>sshd</parent>
<prematch_pcre2>^Connection closed </prematch_pcre2>
<pcre2 offset="after_prematch">^by (\S+)$</pcre2>
<order>srcip</order>
</decoder>
<decoder name="ssh-disconnect">
<parent>sshd</parent>
<prematch_pcre2>^Received disconnect </prematch_pcre2>
<pcre2 offset="after_prematch">^from (\S+):</pcre2>
<order>srcip</order>
</decoder>
<!--XXX
<decoder name="ssh-pam">
<parent>sshd</parent>
<prematch_pcre2>PAM: Module</prematch_pcre2>
<pcre2>for (\S+) from (\S+)$</pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="ssh-connect-to">
<parent>sshd</parent>
<prematch_pcre2>connect_to</prematch_pcre2>
<pcre2>connect_to: (\S+) port (\d+?):</pcre2>
<order>dstip,dstport</order>
</decoder>
-->
<decoder name="sshd-ldap">
<parent>sshd</parent>
<prematch_pcre2>^pam_ldap: </prematch_pcre2>
<pcre2>user "uid=(\S+),ou=[A-Za-z0-9@_-]+?,dc=[A-Za-z0-9@_-]+?,dc=[A-Za-z0-9@_-]+"</pcre2>
<order>user</order>
</decoder>
<decoder name="sshd-negotiate">
<parent>sshd</parent>
<prematch_pcre2 offset="after_parent">fatal: Unable to negotiate with </prematch_pcre2>
<pcre2 offset="after_prematch">^(\S+) port (\d+?): |^(\S+): </pcre2>
<order>srcip, srcport</order>
</decoder>
<decoder name="sshd-pam-host-user">
<parent>sshd</parent>
<prematch_pcre2>rhost=\S+[ ]+?user=\S+</prematch_pcre2>
<pcre2>rhost=(\S+)[ ]+?user=(\S+)</pcre2>
<order>srcip, user</order>
</decoder>
<!--
<decoder name="sshd-invalid">
<parent>sshd</parent>
<prematch_pcre2>^input_user_auth_request: </prematch_pcre2>
<pcre2 offset="after_prematch"> user (\S+)</pcre2>
<order>user</order>
</decoder>
-->
<decoder name="sshd-exceed">
<parent>sshd</parent>
<prematch_pcre2> exceeded for </prematch_pcre2>
<pcre2 offset="after_prematch">(\S+) from (\S+) port (\d+) </pcre2>
<order>user, srcip, srcport</order>
</decoder>
<!-- Dropbear rules -->
<decoder name="dropbear">
<program_name_pcre2>^dropbear</program_name_pcre2>
</decoder>
<!--
Jan 8 16:39:33 tp.lan dropbear[14824]: Bad password attempt for 'root' from 193.219.28.149:48629
-->
<decoder name="dropbear-bad-password">
<parent>dropbear</parent>
<prematch_pcre2>password</prematch_pcre2>
<pcre2 offset="after_prematch">for '(\S+)' from (\S+):\d+$</pcre2>
<order>dstuser, srcip</order>
</decoder>
<!--
Jan 8 19:54:12 tp.lan dropbear[15197]: Login attempt for nonexistent user from 182.72.89.122:4328
-->
<decoder name="dropbear-nonexist">
<parent>dropbear</parent>
<prematch_pcre2>nonexistent</prematch_pcre2>
<pcre2 offset="after_prematch">from (\S+):\d+$</pcre2>
<order>srcip</order>
</decoder>
<!--
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
-->
<decoder name="dropbear-from">
<parent>dropbear</parent>
<pcre2>(\S+) for '(\S+)' with key \S+ (\S+) from (\S+):\d+$</pcre2>
<order>status,dstuser,extra_data,srcip</order>
</decoder>
<!--
- Telnet decoder
- Will extract the srcip
- Examples:
- May 31 12:33:44 queen telnetd[9876]: warning: can't verify hostname:
gethostbyname(131.1.satis-tl.ru) failed
- May 29 21:12:18 queen telnetd[6474]: refused connect from 81.215.42.27
- Jun 1 23:02:07 queen telnetd[62948]: connect from external.example.net
- Jun 1 23:02:07 queen telnetd[62948]: ttloop: read: A connection with a remote socket was reset by that socket.
- Jun 2 09:54:28 valhalla in.telnetd[19723]: [ID 927837 local2.info] connect from external.example.net
- Jun 2 09:54:28 valhalla telnetd[19723]: [ID 485252 daemon.info] ttloop: peer died: Error 0
-->
<decoder name="telnetd">
<program_name_pcre2>^telnetd|^in\.telnetd</program_name_pcre2>
</decoder>
<decoder name="telnetd-ip">
<parent>telnetd</parent>
<pcre2>from (\S+)$</pcre2>
<order>srcip</order>
</decoder>
<!--
- rshd decoder
- Example message:
- Dec 17 10:49:23 hostname rshd[347339]: Connection from 10.217.223.31 on illegal port
-->
<decoder name="rshd">
<program_name_pcre2>^rshd$</program_name_pcre2>
</decoder>
<decoder name="rshd-illegal-connection">
<parent>rshd</parent>
<pcre2>^Connection from (\S+) on illegal port$</pcre2>
<order>srcip</order>
</decoder>
<!--
- cimserver decoder
- Example messages:
- Dec 18 18:06:28 hostname cimserver[18575]: PGS17200: Authentication failed for user jones_b.
- Dec 18 18:06:29 hostname cimserver[18575]: PGS17200: Authentication failed for user domain\jones_b.
-->
<decoder name="cimserver">
<program_name_pcre2>^cimserver$</program_name_pcre2>
</decoder>
<decoder name="cimserver-failed-authentication">
<parent>cimserver</parent>
<prematch_pcre2>^[A-Za-z0-9@_-]+: Authentication failed for user </prematch_pcre2>
<pcre2 offset="after_prematch">^(\S+)\.$</pcre2>
<order>user</order>
</decoder>
<!--
- Samba decoder.
- Will extract the username/srcip
- Examples:
- smbd[832]: Denied connection from (192.168.3.23)
- smbd[832]: Connection denied from 0.0.0.0
- smbd[17535]: Permission denied\-\- user not allowed to delete,
pause, or resume print job. User name: ahmet. Printer name: prnq1.
-->
<decoder name="smbd">
<program_name_pcre2>^smbd</program_name_pcre2>
</decoder>
<decoder name="smbd-user">
<parent>smbd</parent>
<prematch_pcre2>User name:</prematch_pcre2>
<pcre2 offset="after_prematch">^ (\S+)\.</pcre2>
<order>user</order>
</decoder>
<decoder name="smbd-ip">
<parent>smbd</parent>
<pcre2> from \((\S+)\)</pcre2>
<order>srcip</order>
</decoder>
<decoder name="smbd-from">
<parent>smbd</parent>
<prematch_pcre2> from (\S+)$</prematch_pcre2>
<pcre2> from (\S+)$</pcre2>
<order>srcip</order>
</decoder>
<decoder name="smbd-client">
<parent>smbd</parent>
<prematch_pcre2>to client \S+\.</prematch_pcre2>
<pcre2>to client (\S+)\. </pcre2>
<order>srcip</order>
</decoder>
<decoder name="nmbd">
<program_name_pcre2>^nmbd</program_name_pcre2>
</decoder>
<!-- Sudo decoder.
- Will extract the username
- Examples:
- 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
- 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
- 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
- Apr 19 14:52:02 enigma sudo: dcid : TTY=ttyp3 ; PWD=/var/www/alex ; USER=root ; COMMAND=/sbin/chown dcid.dcid .
- Dec 30 19:36:11 rheltest sudo: cplummer : TTY=pts/2 ; PWD=/home/cplummer1 ; USER=root ; TSID=0000UM ; COMMAND=/bin/bash
-->
<decoder name="sudo">
<program_name_pcre2>^sudo</program_name_pcre2>
<pcre2>^[ ]*?(\S+)[ ]:[ ]TTY=\S+[ ];[ ]PWD=(\S+)[ ];[ ]USER=(\S+)[ ];[ ]COMMAND=(.+)$|</pcre2>
<pcre2>^[ ]*?(\S+)[ ]:[ ]TTY=\S+[ ];[ ]PWD=(\S+)[ ];[ ]USER=(\S+)[ ];[ ]TSID=\S+[ ];[ ]COMMAND=(.+)$</pcre2>
<order>dstuser,url,srcuser,status</order>
<fts>name,dstuser,location</fts>
<ftscomment>First time user executed the sudo command</ftscomment>
</decoder>
<!-- Su decoder.
- Will extract the username.
- Examples:
- su[2921936]: failed: ttyq4 changing from ldap to root
- su[234]: BAD SU ger to fwmaster on /dev/ttyp0
- su(pam_unix)[23164]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost= user=osaudit
- su(pam_unix)[2298]: authentication failure; logname= uid=1342 euid=0 tty= ruser=dcid rhost= user=root
- Jul 5 12:17:38 lili su[2702]: - pts/5 ab-dc-root
- Jul 5 12:13:15 lili su[2614]: - pts/6 dcid-root
- su[29149]: + pts/5 dcid:root
- SU 07/23 01:24 + pts/4 lcid-root
- Apr 22 17:51:51 enigma su: dcid to root on /dev/ttyp1
- 'su root' failed for chapman on /dev/pts/1
-->
<decoder name="su">
<program_name_pcre2>^su$</program_name_pcre2>
</decoder>
<decoder name="su-detail">
<parent>su</parent>
<prematch_pcre2>^'su </prematch_pcre2>
<pcre2>^'su (\S+)' \S+ for (\S+) on \S+$</pcre2>
<order>dstuser, srcuser</order>
<fts>name, srcuser, location</fts>
</decoder>
<decoder name="su-ldap">
<parent>su</parent>
<prematch_pcre2>pam_ldap</prematch_pcre2>
<pcre2>user "uid=(\S+),</pcre2>
<order>user</order>
</decoder>
<decoder name="su">
<prematch_pcre2>^SU \S+ \S+ </prematch_pcre2>
<pcre2 offset="after_prematch">^\S \S+ (\S+)-(\S+)$</pcre2>
<order>srcuser, dstuser</order>
<fts>name, srcuser, location</fts>
</decoder>
<decoder name="su-failed">
<parent>su</parent>
<prematch_pcre2>^FAILED SU </prematch_pcre2>
<pcre2 offset="after_prematch">^\(to (\S+) (\S+) on</pcre2>
<order>dstuser, srcuser</order>
</decoder>
<decoder name="su-detail2">
<parent>su</parent>
<prematch_pcre2> </prematch_pcre2>
<pcre2>^BAD SU (\S+) to (\S+) on|</pcre2>
<pcre2>^failed: \S+ changing from (\S+) to (\S+)|</pcre2>
<pcre2>^\S \S+ (\S+)[()*+,.:;\<=>?\[\]!"'#%&$|{}-](\S+)$|^(\S+) to (\S+) on </pcre2>
<order>srcuser, dstuser</order>
<fts>name, srcuser, location</fts>
</decoder>
<!-- ProFTPD decoder.
- Will extract the username/srcip
- Examples:
- proftpd[26916]: hayaletgemi (85.101.218.135[85.101.218.135]) - ANON anonymous: Login successful.
- proftpd[12564]: juf01 (pD9EE35B1.dip.t-dialin.net[217.238.53.177]) - USER jufu: Login successful
- proftpd[30362] xx.yy.zz (aa.bb.cc[aa.bb.vv.dd]): USER backup: Login successful.
- proftpd[2344]: refused connect from 192.168.1.2 (192.168.1.2)
- 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.
- proftpd[26169] server.example.net: Fatal: unable to open incoming connection: Der Socket ist nicht verbunden
-->
<decoder name="proftpd">
<program_name_pcre2>^proftpd</program_name_pcre2>
</decoder>
<decoder name="proftpd-success">
<parent>proftpd</parent>
<prematch_pcre2>: Login successful</prematch_pcre2>
<pcre2>^\S+ \(\S+\[(\S+)\]\)[ ]*?\S [A-Za-z0-9@_-]+? (\S+): </pcre2>
<pcre2>Login successful</pcre2>
<order>srcip, user</order>
<fts>name, user, srcip, location</fts>
</decoder>
<decoder name="proftpd-ip">
<parent>proftpd</parent>
<pcre2>^\S+ \(\S+\[(\S+)\]\)</pcre2>
<order>srcip</order>
</decoder>
<!-- Pure-FTPd decoder.
- Will extract the username/srcip whenever possible.
- Samples by Peter Ahlert <[email protected]> (thanks!)
- Examples:
- pure-ftpd-wrapper[926]: connect from 1.1.0.1 (1.1.0.1)
- pure-ftpd: ([email protected]) [INFO] New connection from 1.1.0.1
- pure-ftpd: ([email protected]) [INFO] Can't change directory to /.test: Permission denied
- pure-ftpd: ([email protected]) [INFO] Logout.
- pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [newuser]
-->
<decoder name="pure-ftpd">
<program_name_pcre2>^pure-ftpd</program_name_pcre2>
</decoder>
<decoder name="pure-ftpd-login">
<parent>pure-ftpd</parent>
<prematch_pcre2>^\S+ \[INFO\] \S+ is now logged in</prematch_pcre2>
<pcre2>^\(\?@(\S+)\) \[INFO\] (\S+) is now logged in</pcre2>
<order>srcip, user</order>
<fts>name, user, srcip, location</fts>
</decoder>
<decoder name="pure-ftpd-generic">
<parent>pure-ftpd</parent>
<pcre2>^\((\S+)@(\S+)\) \[</pcre2>
<order>user,srcip</order>
</decoder>
<!-- Pure-FTPd transfer log decoder
- Examples from ossec-list:
- example.com - user1 [11/Mar/2013:12:10:23 -0000] "PUT /ftpdrive/user1/FinalBackup.zip" 200 25268220
- example.com - user1 [11/Mar/2013:12:24:57 -0000] "GET /ftpdrive/user1/FinalBackup.zip" 200 25268220
-->
<decoder name="pure-transfer">
<prematch_pcre2>^\S+ - \S+ \[\d{2}/\S{3}/\d{4}:\d{2}:\d{2}:\d{2} \S\d{4}\] "[A-Za-z0-9@_-]+? \S+" </prematch_pcre2>
<pcre2>^(\S+) - (\S+) \[\d{2}/\S{3}/\d{4}:\d{2}:\d{2}:\d{2} -\d{4}\] "(\S+) (.+) (\d+) \d+$</pcre2>
<order>extra_data,dstuser,action,url,status</order>
</decoder>
<!-- vsftpd decoder.
- Will extract the srcip.
- Examples:
- Sun Jun 4 22:08:04 2006 [pid 21612] CONNECT: Client "192.168.2.10"
- Sun Jun 4 22:08:39 2006 [pid 21611] [dcid] OK LOGIN: Client "192.168.2.10"
- Sun Jun 4 22:09:22 2006 [pid 21622] CONNECT: Client "192.168.2.10"
- Sun Jun 4 22:09:24 2006 [pid 21621] [lalal] FAIL LOGIN: Client "192.168.2.10"
- Sat Jun 3 07:51:42 2006 [pid 25073] [Administrator] FAIL LOGIN: Client "211.100.27.101"
- Sun Aug 27 16:28:20 2006 [pid 13962] [xx] OK UPLOAD: Client "1.2.3.4", "/a.php", 8338 bytes, 18.77Kbyte/sec
- Jul 13 12:31:20 www vsftpd: Sun Jul 13 10:31:20 2008 [pid 27528] [anonymous] FAIL LOGIN: Client "84.140.234.76"
- Sun Aug 16 15:48:02 2015 [pid 4832] [ftpuser] OK DELETE: Client "172.28.5.129", "/index.php"
- Sun Aug 16 16:26:06 2015 [pid 4976] [ftpuser] OK CHMOD: Client "172.28.5.129", "/index.php 777"
- Sun Aug 16 16:26:21 2015 [pid 4976] [ftpuser] OK RENAME: Client "172.28.5.129", "/index.php /4444index.php"
<decoder name="vsftpd">
<prematch_pcre2>^[A-Za-z0-9@_-][A-Za-z0-9@_-][A-Za-z0-9@_-] [A-Za-z0-9@_-][A-Za-z0-9@_-][A-Za-z0-9@_-][ ]+?\d+? \S+ \d+? \[pid \d+?\] </prematch_pcre2>
<pcre2 offset="after_prematch">Client "(\S+)"$</pcre2>
<order>srcip</order>
</decoder>
<decoder name="vsftpd">
<program_name_pcre2>^vsftpd</program_name_pcre2>
<prematch_pcre2>^[A-Za-z0-9@_-][A-Za-z0-9@_-][A-Za-z0-9@_-] [A-Za-z0-9@_-][A-Za-z0-9@_-][A-Za-z0-9@_-][ ]+?\d+? \S+ \d+? \[pid \d+?\] </prematch_pcre2>
<pcre2 offset="after_prematch">Client "(\S+)"$</pcre2>
<order>srcip</order>
</decoder>
-->
<!-- #####################################################
Add by Omar MEZRAG - 0xFFFFFF
##################################################### -->
<decoder name="vsftpd">
<prematch_pcre2>^[A-Za-z0-9@_-]{3} [A-Za-z0-9@_-]{3}[ ]+?\d+? \S+ \d+? \[pid \d+?\] </prematch_pcre2>
</decoder>
<decoder name="vsftpd">
<program_name_pcre2>^vsftpd</program_name_pcre2>
<prematch_pcre2>^[A-Za-z0-9@_-]{3} [A-Za-z0-9@_-]{3}[ ]+?\d+? \S+ \d+? \[pid \d+?\] </prematch_pcre2>
</decoder>
<decoder name="vsftpd_login">
<parent>vsftpd</parent>
<prematch_pcre2 offset="after_parent"> LOGIN:</prematch_pcre2>
<pcre2 offset="after_parent">\[(\S+)\] (\S+ LOGIN): Client "(\S+[A-Za-z0-9@_-])"$</pcre2>
<order>user,status,srcip</order>
</decoder>
<decoder name="vsftpd_connect">
<parent>vsftpd</parent>
<prematch_pcre2 offset="after_parent">^CONNECT:</prematch_pcre2>
<pcre2 offset="after_parent">(CONNECT): Client "(\S+[A-Za-z0-9@_-]+?)"$</pcre2>
<order>action,srcip</order>
</decoder>
<decoder name="vsftpd_cmd">
<parent>vsftpd</parent>
<pcre2 offset="after_parent">\[(\S+)\] (OK \S+): Client "(\S+)", "(.+)".*</pcre2>
<order>user,status,srcip,url</order>
</decoder>
<decoder name="vsftpd_default">
<parent>vsftpd</parent>
<pcre2 offset="after_parent">Client "(\S+[A-Za-z0-9@_-])"$</pcre2>
<order>srcip</order>
</decoder>
<!-- FTPD decoder - Solaris, MacOS and Wu-ftpd).
- Examples:
- ftpd[811166]: refused connect from 88.225.42.182
- in.ftpd[18561]: [ID 484914 daemon.notice] gethostbyaddr: nameservices.net. != 216.117.134.168
- ftpd[31918]: FTPD: EXPORT file local , remote
- Dec 21 12:21:20 hostname ftpd[323115]: login jones_b from client.example.org failed.
-->
<decoder name="ftpd">
<program_name_pcre2>^ftpd|^in\.ftpd</program_name_pcre2>
</decoder>
<decoder name="ftpd-mac-failure">
<parent>ftpd</parent>
<prematch_pcre2>^Failed authentication from: \S+ |</prematch_pcre2>
<prematch_pcre2>^repeated login failures from </prematch_pcre2>
<!--<regex offset="after_prematch">(\S+)</regex>-->
<pcre2 offset="after_prematch">^\S+ \[(\S+)\]$|^(\S+)</pcre2>
<order>srcip</order>
</decoder>
<decoder name="ftpd-refused">
<parent>ftpd</parent>
<prematch_pcre2>^FTP LOGIN REFUSED </prematch_pcre2>
<pcre2 offset="after_prematch">\[(\S+)\]$</pcre2>
<order>srcip</order>
</decoder>
<decoder name="ftpd-ip">
<parent>ftpd</parent>
<pcre2>from (\S+)$</pcre2>
<order>srcip</order>
</decoder>
<decoder name="ftpd-tru64">
<parent>ftpd</parent>
<prematch_pcre2>^login \S+ from \S+ failed\.</prematch_pcre2>
<pcre2>^login (\S+) from (\S+) failed\.$</pcre2>
<order>user, srcip</order>
</decoder>
<!-- Arpwatch decoder.
- Will extract srcip/mac for "new station" messages.
- Examples:
- arpwatch: new station 192.168.1.103 0:11:43:5e:5d:80 eth0
- arpwatch: bogon 172.16.150.149 0:2:b3:d6:e5:68 eth0
- arpwatch: new station 192.168.2.10 0:c0:4f:78:32:be
- arpwatch: pcap open re0: /dev/bpf0: Permission denied
- arpwatch: reused old ethernet address 192.168.17.248 0:e:3b:a:cb:67 (0:1e:8c:72:b0:d0)
-->
<decoder name="arpwatch">
<program_name_pcre2>^arpwatch</program_name_pcre2>
</decoder>
<decoder name="arpwatch-new">
<parent>arpwatch</parent>
<prematch_pcre2>^new station |^bogon </prematch_pcre2>
<pcre2 offset="after_prematch">^(\S+) (\S+)</pcre2>
<order>srcip, extra_data</order>
<fts>name, srcip, extra_data</fts>
</decoder>
<!-- MySQL decoder.
- Examples:
- MySQL log: 060516 22:38:46 mysqld started
- MySQL log: 060516 22:38:46 mysqld ended
- 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'
- 070824 11:33:51 6 Connect Access denied for user 'roota'@'localhost' (using password: YES)
-->
<decoder name="mysql_log">
<prematch_pcre2>^MySQL log:</prematch_pcre2>
</decoder>
<!-- PostgreSQL decoder.
- Examples:
- [2007-08-31 18:37:09.454 ADT] 192.168.2.99: LOG: connection authorized: user=ossec_user database=ossecdb
- [2007-08-31 18:37:15.525 ADT] 192.168.2.99: ERROR: relation "alert2" does not exist
-->
<decoder name="postgresql_log">
<prematch_pcre2>^\[\d{4}-\d{2}-\d{2} \S+ [A-Za-z0-9@_-]+?\] </prematch_pcre2>
<pcre2 offset="after_prematch">^\S+ ([A-Za-z0-9@_-]+?): </pcre2>
<order>status</order>
</decoder>
<!-- Imapd decoder.
- Will extract the username/srcip
- Examples:
- imapd[26888]: Login failed user=babadosfashion auth=babadosfashion host=bahiana.resenet.com.br [200.255.5.8]
- imapd[21040]: Login failed user=root domain=(null) auth=root host=host29-141.poo
l8249.interbusiness.it [82.49.141.29]
- imapd[27113]: Authenticated user=badyy host=a.resenet.com.br [1.2.3.4]
- imapd[27113]: Logout user=badyy host=a.resenet.com.br [1.2.3.4]
-->
<decoder name="imapd">
<program_name_pcre2>^imapd</program_name_pcre2>
<pcre2 offset="after_prematch">user=(\S+) .+ \[(\S+)\]$</pcre2>
<order>user,srcip</order>
</decoder>
<!-- Vpopmail decoder. (by Ceg Ryan <cegryan ( at ) gmail.com>)
- Examples:
- vpopmail[32485]: vchkpw-pop3: password fail [email protected]:x.x.x.x
- vpopmail[32485]: vchkpw-2110 password fail [email protected]:x.x.x.x
- vchkpw-pop3: password fail (pass: 'test') user@my_domain:1.2.3.4
- vpopmail[2100]: vchkpw-pop3: vpopmail user not found [email protected]:x.x.x.x
- vpopmail[4162]: vchkpw-pop3: vpopmail user not found support@:69.3.64.3
-->
<decoder name="vpopmail">
<program_name_pcre2>^vpopmail</program_name_pcre2>
</decoder>
<decoder name="vpopmail-fail">
<parent>vpopmail</parent>
<prematch_pcre2>^vchkpw-\S+: password fail</prematch_pcre2>
<pcre2 offset="after_prematch"> (\S+)@\S+:(\S+)$</pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="vpopmail-notfound">
<parent>vpopmail</parent>
<prematch_pcre2>^vchkpw-\S+: vpopmail user not </prematch_pcre2>
<pcre2 offset="after_prematch">^found (\S+):(\S+)$</pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="vpopmail-empty">
<parent>vpopmail</parent>
<prematch_pcre2>^vchkpw-\S+: null password </prematch_pcre2>
<pcre2 offset="after_prematch">^given (\S+):(\S+)$</pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="vpopmail-success">
<parent>vpopmail</parent>
<prematch_pcre2>^vchkpw-\S+: \(\S+\) login </prematch_pcre2>
<pcre2 offset="after_prematch">^success (\S+):(\S+)$</pcre2>
<order>user, srcip</order>
</decoder>
<!-- VM-POP3 - Virtual Mail Pop3
- Examples:
-->
<decoder name="vm-pop3d">
<program_name_pcre2>^vm-pop3d</program_name_pcre2>
</decoder>
<decoder name="vm-pop3d-fail">
<parent>vm-pop3d</parent>
<prematch_pcre2>^User '</prematch_pcre2>
<pcre2 offset="after_prematch">^(\S+)' - [A-Za-z0-9@_-]+? auth, </pcre2>
<pcre2>from=(\S+)$</pcre2>
<order>user, srcip</order>
</decoder>
<!-- Courier decoder
- Examples:
- pop3d-ssl: LOGIN FAILED, ip=[::ffff:192.168.0.200]
- courierpop3login: LOGIN, user=web10_mauricio, ip=[::ffff:192.168.0.100]
- courierpop3login: LOGIN FAILED, ip=[::ffff:192.168.0.188]
- imaplogin: DISCONNECTED, ip=[::ffff:127.0.0.1], time=0
- Nov 24 18:18:28 gandalf pop3d: LOGIN FAILED, ip=[::ffff:1.2.3.4]
-->
<decoder name="courier">
<program_name_pcre2>^pop3d|^courierpop3login|^imaplogin|^courier-pop3|^courier-imap</program_name_pcre2>
</decoder>
<decoder name="courier-login">
<parent>courier</parent>
<prematch_pcre2>^LOGIN, </prematch_pcre2>
<pcre2 offset="after_prematch">^user=(\S+), ip=\[(\S+)\]$</pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="courier-generic">
<parent>courier</parent>
<pcre2>, ip=\[(\S+)\]$</pcre2>
<order>srcip</order>
</decoder>
<!-- Dovecot Decoder
- Will extract username, srcip and dstip when available.
- Jun 17 10:15:24 hostname dovecot: Dovecot v1.2.rc3 starting up (core dumps disabled)
- Jun 17 10:15:24 hostname dovecot: Fatal: auth(default): Support not compiled in for passdb driver 'ldap'
- Jun 17 10:15:24 hostname dovecot: Fatal: Auth process died too early - shutting down
- 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:
- Jan 11 03:42:09 hostname dovecot: auth-worker(default): sql([email protected],1.2.3.4): Password mismatch
- dovecot: Jan 07 14:46:28 Warn: auth(default): userdb(username,::ffff:127.0.0.1): user not found from userdb
- dovecot: Mar 13 15:25:07 Info: auth(default): pam([email protected],::ffff:1.2.3.4): pam_authenticate() failed: User not known to the underlying authentication module
- dovecot: Mar 13 15:25:07 Info: auth(default): passwd-file([email protected],::ffff:1.2.3.4): unknown user
- Jan 11 03:45:09 hostname dovecot: auth-worker(default): sql(username,1.2.3.4): unknown user
- Jan 11 03:42:09 hostname dovecot: auth(default): pam([email protected],1.2.3.4): pam_authenticate() failed: User not known to the underlying authentication module
- Jul 4 17:30:51 hostname dovecot[2992]: pop3-login: Disconnected: rip=1.2.3.4, lip=1.2.3.5
- dovecot: Jun 23 15:04:06 Info: IMAP(username): Disconnected: Logged out bytes=59/566
- 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
- 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
- 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>
- 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>
- 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>
- 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>
-->
<decoder name="dovecot">
<program_name_pcre2>^dovecot</program_name_pcre2>
</decoder>
<decoder name="dovecot-success">
<parent>dovecot</parent>
<prematch_pcre2 offset="after_parent">^\w{4}-login: Login: </prematch_pcre2>
<pcre2 offset="after_prematch">^user=\<(\S+)\>, method=\S+, rip=(\S+), lip=(\S+), mpid=\S+, (\S*?)$</pcre2>
<order>user, srcip, dstip, protocol</order>
</decoder>
<decoder name="dovecot-aborted">
<parent>dovecot</parent>
<prematch_pcre2 offset="after_parent">^\w{4}-login: Aborted login</prematch_pcre2>
<pcre2 offset="after_prematch">: user=\<(\S+)\>, method=\S+, rip=(\S+), lip=(\S+), (\S*)$</pcre2>
<order>user, srcip, dstip, protocol</order>
</decoder>
<decoder name="dovecot-fail">
<parent>dovecot</parent>
<prematch_pcre2 offset="after_parent">^auth\(default\)|auth-worker\(default\)</prematch_pcre2>
<pcre2 offset="after_prematch">^: \S+\((\S+),(\S+)\)</pcre2>
<order>user, srcip</order>
</decoder>
<decoder name="dovecot-authfailed">
<parent>dovecot</parent>
<prematch_pcre2 offset="after_parent">^\w{4}-login:</prematch_pcre2>
<pcre2 offset="after_prematch">\(auth failed, \d+? attempts in \d+? secs\): user=\<(\S+)\>, method=\S+, rip=(\S+), lip=(\S+)</pcre2>
<order>user,srcip,dstip</order>
</decoder>
<decoder name="dovecot-disconnect">
<parent>dovecot</parent>
<prematch_pcre2 offset="after_parent">^\w{4}-login: Disconnected: </prematch_pcre2>
<pcre2 offset="after_prematch">^rip=(\S+), lip=(\S+)</pcre2>
<order>srcip, dstip</order>
</decoder>
<decoder name="dovecot-info">
<program_name_pcre2>^Info$|^Warn$</program_name_pcre2>
</decoder>
<decoder name="imap-login-login">
<parent>dovecot-info</parent>
<prematch_pcre2>imap-login</prematch_pcre2>
<pcre2 offset="after_parent">Login: user=(\S+), method=.+, rip=(\S+), lip=(\S+) </pcre2>
<order>user, srcip, dstip</order>
</decoder>
<decoder name="dovecot-info-auth">
<parent>dovecot-info</parent>
<pcre2 offset="after_parent">auth\(.+\): \S+\((\S+),(\S+)\):</pcre2>
<order>user, srcip</order>
</decoder>
<!-- Named decoder.
- Will extract the srcip
- Examples:
- valhalla named[7885]: client 192.168.1.231#1142: update 'hayaletgemi.edu/IN' denied
- named[12637]: client 1.2.3.4#32769: query (cache) 'somedomain.com/MX/IN' denied
- Oct 22 10:12:33 junction named[31687]: /etc/blocked.slave:9892: syntax error near ';'