From 5b4bc2aafda544dcd606dc68c1706247be6992f0 Mon Sep 17 00:00:00 2001 From: Pavel Mihadyuk Date: Tue, 22 Aug 2017 18:19:55 +0300 Subject: [PATCH 01/25] Added filter for phpMyAdmin+syslog (>=4.7.0). Closes #1713 --- ChangeLog | 1 + config/filter.d/phpmyadmin-syslog.conf | 17 +++++++++++++++++ .../tests/files/logs/phpmyadmin-syslog.conf | 2 ++ 3 files changed, 20 insertions(+) create mode 100644 config/filter.d/phpmyadmin-syslog.conf create mode 100644 fail2ban/tests/files/logs/phpmyadmin-syslog.conf diff --git a/ChangeLog b/ChangeLog index 5aa24b51..4b1e5e61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,7 @@ releases. ### Enhancements * action.d/cloudflare.conf - Cloudflare API v4 implementation (gh-1651) * filter.d/kerio.conf - filter extended with new rules (see gh-1455) +* filter.d/phpmyadmin-syslog.conf - new filter for phpMyAdmin using syslog for auth logging ver. 0.9.7 (2017/05/11) - awaiting-victory diff --git a/config/filter.d/phpmyadmin-syslog.conf b/config/filter.d/phpmyadmin-syslog.conf new file mode 100644 index 00000000..79eac71a --- /dev/null +++ b/config/filter.d/phpmyadmin-syslog.conf @@ -0,0 +1,17 @@ +# Fail2Ban fitler for the phpMyAdmin-syslog +# + +[INCLUDES] + +before = common.conf + +[Definition] + +_daemon = phpMyAdmin + +failregex = ^%(__prefix_line)suser denied: .* \(mysql-denied\) from \s*$ + +ignoreregex = + + +# Author: Pavel Mihadyuk diff --git a/fail2ban/tests/files/logs/phpmyadmin-syslog.conf b/fail2ban/tests/files/logs/phpmyadmin-syslog.conf new file mode 100644 index 00000000..eef6e3b2 --- /dev/null +++ b/fail2ban/tests/files/logs/phpmyadmin-syslog.conf @@ -0,0 +1,2 @@ +# failJSON: { "time": "2017-08-22T14:50:22", "match": true , "host": "81.62.21.201" } +Aug 22 14:50:22 eurostream phpMyAdmin[16358]: user denied: root (mysql-denied) from 81.62.21.201 From 41994fcb5609bc36ea5f137b65d5e797ea27cefc Mon Sep 17 00:00:00 2001 From: Pavel Mihadyuk Date: Tue, 22 Aug 2017 18:46:33 +0300 Subject: [PATCH 02/25] Added filter for phpMyAdmin+syslog (>=4.7.0) --- fail2ban/tests/files/logs/phpmyadmin-syslog | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fail2ban/tests/files/logs/phpmyadmin-syslog diff --git a/fail2ban/tests/files/logs/phpmyadmin-syslog b/fail2ban/tests/files/logs/phpmyadmin-syslog new file mode 100644 index 00000000..eef6e3b2 --- /dev/null +++ b/fail2ban/tests/files/logs/phpmyadmin-syslog @@ -0,0 +1,2 @@ +# failJSON: { "time": "2017-08-22T14:50:22", "match": true , "host": "81.62.21.201" } +Aug 22 14:50:22 eurostream phpMyAdmin[16358]: user denied: root (mysql-denied) from 81.62.21.201 From d09304b897e4499fbf8095344e9818a71a2ba6fd Mon Sep 17 00:00:00 2001 From: Pavel Mihadyuk Date: Tue, 22 Aug 2017 19:00:48 +0300 Subject: [PATCH 03/25] phpmyadmin-syslog: added default jail config --- config/jail.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/jail.conf b/config/jail.conf index 9296b6af..cf652fe2 100644 --- a/config/jail.conf +++ b/config/jail.conf @@ -860,3 +860,9 @@ logpath = /var/log/slapd.log port = smtp,ssmtp filter = domino-smtp logpath = /home/domino01/data/IBM_TECHNICAL_SUPPORT/console.log + +[phpmyadmin-syslog] +port = http,https +filter = phpmyadmin-syslog +logpath = %(syslog_authpriv)s +backend = %(syslog_backend)s From 4c1abe1cbf08005f20aae01eea735feeed251a8e Mon Sep 17 00:00:00 2001 From: Pavel Mihadyuk Date: Wed, 23 Aug 2017 16:55:16 +0300 Subject: [PATCH 04/25] phpmyadmin-syslog: removed excess file, fixed test, updated failregex --- config/filter.d/phpmyadmin-syslog.conf | 3 ++- fail2ban/tests/files/logs/phpmyadmin-syslog | 4 ++-- fail2ban/tests/files/logs/phpmyadmin-syslog.conf | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 fail2ban/tests/files/logs/phpmyadmin-syslog.conf diff --git a/config/filter.d/phpmyadmin-syslog.conf b/config/filter.d/phpmyadmin-syslog.conf index 79eac71a..5b0862bb 100644 --- a/config/filter.d/phpmyadmin-syslog.conf +++ b/config/filter.d/phpmyadmin-syslog.conf @@ -9,9 +9,10 @@ before = common.conf _daemon = phpMyAdmin -failregex = ^%(__prefix_line)suser denied: .* \(mysql-denied\) from \s*$ +failregex = ^%(__prefix_line)suser denied: (?:\S+|.*?) \(mysql-denied\) from \s*$ ignoreregex = # Author: Pavel Mihadyuk +# Regex fixes: Serg G. Brester diff --git a/fail2ban/tests/files/logs/phpmyadmin-syslog b/fail2ban/tests/files/logs/phpmyadmin-syslog index eef6e3b2..f32a2476 100644 --- a/fail2ban/tests/files/logs/phpmyadmin-syslog +++ b/fail2ban/tests/files/logs/phpmyadmin-syslog @@ -1,2 +1,2 @@ -# failJSON: { "time": "2017-08-22T14:50:22", "match": true , "host": "81.62.21.201" } -Aug 22 14:50:22 eurostream phpMyAdmin[16358]: user denied: root (mysql-denied) from 81.62.21.201 +# failJSON: { "time": "2004-08-22T14:50:22", "match": true , "host": "192.0.2.1" } +Aug 22 14:50:22 eurostream phpMyAdmin[16358]: user denied: root (mysql-denied) from 192.0.2.1 diff --git a/fail2ban/tests/files/logs/phpmyadmin-syslog.conf b/fail2ban/tests/files/logs/phpmyadmin-syslog.conf deleted file mode 100644 index eef6e3b2..00000000 --- a/fail2ban/tests/files/logs/phpmyadmin-syslog.conf +++ /dev/null @@ -1,2 +0,0 @@ -# failJSON: { "time": "2017-08-22T14:50:22", "match": true , "host": "81.62.21.201" } -Aug 22 14:50:22 eurostream phpMyAdmin[16358]: user denied: root (mysql-denied) from 81.62.21.201 From c312962029bdae1d3908c04fe86b7717c6938a34 Mon Sep 17 00:00:00 2001 From: sebres Date: Fri, 1 Sep 2017 10:57:41 +0200 Subject: [PATCH 05/25] filter.d/dovecot.conf: partially cherry-pick to 0.9 PR #1880 from sebres/0.10-fix-dovecot-regex (d926e11a5c0d5a0d3a724f04f7b4540c6d873b4b) fixed failregex (without new mode aggressive) --- config/filter.d/dovecot.conf | 13 ++++++++----- fail2ban/tests/files/logs/dovecot | 3 +++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/config/filter.d/dovecot.conf b/config/filter.d/dovecot.conf index d4b49576..cf217bcb 100644 --- a/config/filter.d/dovecot.conf +++ b/config/filter.d/dovecot.conf @@ -7,12 +7,15 @@ before = common.conf [Definition] -_daemon = (auth|dovecot(-auth)?|auth-worker) +_auth_worker = (?:dovecot: )?auth(?:-worker)? +_daemon = (?:dovecot(?:-auth)?|auth) -failregex = ^%(__prefix_line)s(?:%(__pam_auth)s(?:\(dovecot:auth\))?:)?\s+authentication failure; logname=\S* uid=\S* euid=\S* tty=dovecot ruser=\S* rhost=(?:\s+user=\S*)?\s*$ - ^%(__prefix_line)s(?:pop3|imap)-login: (?:Info: )?(?:Aborted login|Disconnected)(?::(?: [^ \(]+)+)? \((?:auth failed, \d+ attempts( in \d+ secs)?|tried to use (disabled|disallowed) \S+ auth)\):( user=<[^>]*>,)?( method=\S+,)? rip=(?:, lip=\S+)?(?:, TLS(?: handshaking(?:: SSL_accept\(\) failed: error:[\dA-F]+:SSL routines:[TLS\d]+_GET_CLIENT_HELLO:unknown protocol)?)?(: Disconnected)?)?(, session=<\S+>)?\s*$ - ^%(__prefix_line)s(?:Info|dovecot: auth\(default\)|auth-worker\(\d+\)): pam\(\S+,\): pam_authenticate\(\) failed: (User not known to the underlying authentication module: \d+ Time\(s\)|Authentication failure \(password mismatch\?\))\s*$ - ^%(__prefix_line)s(?:auth|auth-worker\(\d+\)): (?:Info: )?[a-z\-]{3,15}\(\S*,(?:,\S*)?\): (?:unknown user|invalid credentials)\s*$ +__prefregex = ^%(__prefix_line)s(?:%(_auth_worker)s(?:\([^\)]+\))?: )?(?:%(__pam_auth)s(?:\(dovecot:auth\))?: |(?:pop3|imap)-login: )?(?:Info: )? + +failregex = ^%(__prefregex)sauthentication failure; logname=\S* uid=\S* euid=\S* tty=dovecot ruser=\S* rhost=(?:\s+user=\S*)?\s*$ + ^%(__prefregex)s(?:Aborted login|Disconnected)(?::(?: [^ \(]+)+)? \((?:auth failed, \d+ attempts(?: in \d+ secs)?|tried to use (?:disabled|disallowed) \S+ auth)\):(?: user=<[^>]*>,)?(?: method=\S+,)? rip=(?:[^>]*(?:, session=<\S+>)?)\s*$ + ^%(__prefregex)spam\(\S+,\): pam_authenticate\(\) failed: (?:User not known to the underlying authentication module: \d+ Time\(s\)|Authentication failure \(password mismatch\?\))\s*$ + ^%(__prefregex)s[a-z\-]{3,15}\(\S*,(?:,\S*)?\): (?:unknown user|invalid credentials)\s*$ ignoreregex = diff --git a/fail2ban/tests/files/logs/dovecot b/fail2ban/tests/files/logs/dovecot index 1614ff8c..f564b76e 100644 --- a/fail2ban/tests/files/logs/dovecot +++ b/fail2ban/tests/files/logs/dovecot @@ -81,3 +81,6 @@ Mar 23 06:10:52 auth: Info: ldap(dog,52.37.139.121,): invalid credentials Jul 26 11:11:21 hostname dovecot: imap-login: Disconnected: Too many invalid commands (tried to use disallowed plaintext auth): user=, rip=192.0.2.1, lip=192.168.1.1, session= # failJSON: { "time": "2005-07-26T11:12:19", "match": true , "host": "192.0.2.2" } Jul 26 11:12:19 hostname dovecot: imap-login: Disconnected: Too many invalid commands (auth failed, 1 attempts in 17 secs): user=, method=PLAIN, rip=192.0.2.2, lip=192.168.1.1, TLS, session= + +# failJSON: { "time": "2004-08-28T06:38:51", "match": true , "host": "192.0.2.3" } +Aug 28 06:38:51 s166-62-100-187 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 9 secs): user=, method=PLAIN, rip=192.0.2.3, lip=192.168.1.2, TLS: Disconnected, TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits) From a90f6c4ae817873c2e3090a0dd24c457636b2e6e Mon Sep 17 00:00:00 2001 From: john Date: Tue, 29 Mar 2016 21:25:25 +1100 Subject: [PATCH 06/25] added zoneminder jail and filter # Conflicts: # config/jail.conf --- config/jail.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/jail.conf b/config/jail.conf index cf652fe2..870d7f43 100644 --- a/config/jail.conf +++ b/config/jail.conf @@ -866,3 +866,14 @@ port = http,https filter = phpmyadmin-syslog logpath = %(syslog_authpriv)s backend = %(syslog_backend)s + + +[zoneminder] +# Zoneminder HTTP/HTTPS web interface auth +# Logs auth failures to apache2 error log +enabled = false +port = http,https +filter = zoneminder +logpath = /var/log/apache*/*error.log +maxretry = 3 + From 08878d22dda512b2d01d0649a1cf0e86023d9b2d Mon Sep 17 00:00:00 2001 From: john Date: Tue, 29 Mar 2016 21:31:26 +1100 Subject: [PATCH 07/25] added zoneminder.conf filter --- config/filter.d/zoneminder.conf | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 config/filter.d/zoneminder.conf diff --git a/config/filter.d/zoneminder.conf b/config/filter.d/zoneminder.conf new file mode 100644 index 00000000..00da76d9 --- /dev/null +++ b/config/filter.d/zoneminder.conf @@ -0,0 +1,23 @@ +# Fail2Ban filter for Zoneminder login failures +# + +[Definition] + +# patern : [client 10.1.1.1:38022] WAR [Login denied for user "test"], referer: https://zoneminderurl/ +# +# +# Option: failregex +# Notes.: regex to match the password failure messages in the logfile. The +# host must be matched by a group named "host". The tag "" can +# be used for standard IP/hostname matching and is only an alias for +# (?:::f{4,6}:)?(?P[\w\-.^_]+) + + +failregex = [[]client :\d\d\d\d\d] WAR [[]Login denied for user + +ignoreregex = + +# Notes: +# Tested on Zoneminder 1.29.0 +# +# Author: John Marzella From 44c4496e49a0a37995ba452e52f42f957c2422dc Mon Sep 17 00:00:00 2001 From: john Date: Tue, 29 Mar 2016 21:43:36 +1100 Subject: [PATCH 08/25] added sample log files --- fail2ban/tests/files/logs/zoneminder | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 fail2ban/tests/files/logs/zoneminder diff --git a/fail2ban/tests/files/logs/zoneminder b/fail2ban/tests/files/logs/zoneminder new file mode 100644 index 00000000..c27a0c7b --- /dev/null +++ b/fail2ban/tests/files/logs/zoneminder @@ -0,0 +1,6 @@ +[Mon Mar 28 10:51:24.201977 2016] [:error] [pid 29646] [client 10.1.1.2:46454] INF [Login successful for user "gooduser1"] +[Mon Mar 28 16:50:45.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ +[Mon Mar 28 16:50:46.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ +[Mon Mar 28 16:50:47.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ +[Mon Mar 28 16:50:48.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ +[Mon Mar 28 16:50:49.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ From 4d8ba7b668de0e3cbf82c7986d60fc6dcfa70d90 Mon Sep 17 00:00:00 2001 From: john Date: Wed, 30 Mar 2016 15:36:48 +1100 Subject: [PATCH 09/25] fixed test log file --- fail2ban/tests/files/logs/zoneminder | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fail2ban/tests/files/logs/zoneminder b/fail2ban/tests/files/logs/zoneminder index c27a0c7b..63d8bbd4 100644 --- a/fail2ban/tests/files/logs/zoneminder +++ b/fail2ban/tests/files/logs/zoneminder @@ -1,6 +1,2 @@ -[Mon Mar 28 10:51:24.201977 2016] [:error] [pid 29646] [client 10.1.1.2:46454] INF [Login successful for user "gooduser1"] -[Mon Mar 28 16:50:45.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ -[Mon Mar 28 16:50:46.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ -[Mon Mar 28 16:50:47.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ -[Mon Mar 28 16:50:48.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ -[Mon Mar 28 16:50:49.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "baduser1"], referer: https://zoneminder/ +# failJSON { "time": "2016-03-28T16:50:49", "match": true , "host": "10.1.1.1" } +[Mon Mar 28 16:50:49.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "username1"], referer: https://zoneminder/ From 776d463e9299283318e53145eceded5256bc2703 Mon Sep 17 00:00:00 2001 From: john Date: Wed, 30 Mar 2016 15:46:37 +1100 Subject: [PATCH 10/25] added missing colon to failJSON --- fail2ban/tests/files/logs/zoneminder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fail2ban/tests/files/logs/zoneminder b/fail2ban/tests/files/logs/zoneminder index 63d8bbd4..abd49869 100644 --- a/fail2ban/tests/files/logs/zoneminder +++ b/fail2ban/tests/files/logs/zoneminder @@ -1,2 +1,2 @@ -# failJSON { "time": "2016-03-28T16:50:49", "match": true , "host": "10.1.1.1" } +# failJSON: { "time": "2016-03-28T16:50:49", "match": true , "host": "10.1.1.1" } [Mon Mar 28 16:50:49.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "username1"], referer: https://zoneminder/ From 3d45fd2713b32c423d1f499fb5509f6be9c10a0b Mon Sep 17 00:00:00 2001 From: john Date: Fri, 1 Apr 2016 22:16:30 +1100 Subject: [PATCH 11/25] implemented yarikoptic's suggestions in fail2ban pull request #1376 --- config/filter.d/zoneminder.conf | 4 ++-- config/jail.conf | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config/filter.d/zoneminder.conf b/config/filter.d/zoneminder.conf index 00da76d9..83b1463a 100644 --- a/config/filter.d/zoneminder.conf +++ b/config/filter.d/zoneminder.conf @@ -3,7 +3,7 @@ [Definition] -# patern : [client 10.1.1.1:38022] WAR [Login denied for user "test"], referer: https://zoneminderurl/ +# pattern: [client 10.1.1.1:38022] WAR [Login denied for user "test"], referer: https://zoneminderurl/ # # # Option: failregex @@ -13,7 +13,7 @@ # (?:::f{4,6}:)?(?P[\w\-.^_]+) -failregex = [[]client :\d\d\d\d\d] WAR [[]Login denied for user +failregex = ^[[]client :\d\d\d\d\d] WAR [[]Login denied for user \S*], referer: \S*$ ignoreregex = diff --git a/config/jail.conf b/config/jail.conf index 870d7f43..83a41c51 100644 --- a/config/jail.conf +++ b/config/jail.conf @@ -873,7 +873,6 @@ backend = %(syslog_backend)s # Logs auth failures to apache2 error log enabled = false port = http,https -filter = zoneminder -logpath = /var/log/apache*/*error.log +logpath = %(apache_error_log)s maxretry = 3 From 5c3a666380d8591976b757c53a17c374d17f30dd Mon Sep 17 00:00:00 2001 From: john Date: Fri, 1 Apr 2016 22:30:41 +1100 Subject: [PATCH 12/25] fixed incomplete regex after adding anchors --- config/filter.d/zoneminder.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/filter.d/zoneminder.conf b/config/filter.d/zoneminder.conf index 83b1463a..c804626e 100644 --- a/config/filter.d/zoneminder.conf +++ b/config/filter.d/zoneminder.conf @@ -13,7 +13,7 @@ # (?:::f{4,6}:)?(?P[\w\-.^_]+) -failregex = ^[[]client :\d\d\d\d\d] WAR [[]Login denied for user \S*], referer: \S*$ +failregex = ^.*? [[]client :\d\d\d\d\d] WAR [[]Login denied for user \S*], referer: \S*$ ignoreregex = From 7013729a1f86de4f38da5297cfb5eae2c4b4abf3 Mon Sep 17 00:00:00 2001 From: john Date: Thu, 28 Apr 2016 14:19:29 +1000 Subject: [PATCH 13/25] removed redundant options for zoneminder from jail.conf --- config/jail.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/jail.conf b/config/jail.conf index 83a41c51..29ad4c96 100644 --- a/config/jail.conf +++ b/config/jail.conf @@ -871,8 +871,6 @@ backend = %(syslog_backend)s [zoneminder] # Zoneminder HTTP/HTTPS web interface auth # Logs auth failures to apache2 error log -enabled = false port = http,https logpath = %(apache_error_log)s -maxretry = 3 From ac95449bbb9c46e879b33540885e7d77ecd01814 Mon Sep 17 00:00:00 2001 From: john Date: Sat, 30 Apr 2016 15:26:36 +1000 Subject: [PATCH 14/25] changed zoneminder regex as per Sebres and yarikoptic recommendations --- config/filter.d/zoneminder.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/filter.d/zoneminder.conf b/config/filter.d/zoneminder.conf index c804626e..aa3b4e6d 100644 --- a/config/filter.d/zoneminder.conf +++ b/config/filter.d/zoneminder.conf @@ -3,7 +3,7 @@ [Definition] -# pattern: [client 10.1.1.1:38022] WAR [Login denied for user "test"], referer: https://zoneminderurl/ +# pattern: [Wed Apr 27 23:12:07.736196 2016] [:error] [pid 2460] [client 10.1.1.1:47296] WAR [Login denied for user "test"], referer: https://zoneminderurl/index.php # # # Option: failregex @@ -13,7 +13,7 @@ # (?:::f{4,6}:)?(?P[\w\-.^_]+) -failregex = ^.*? [[]client :\d\d\d\d\d] WAR [[]Login denied for user \S*], referer: \S*$ +failregex = ^\[\](?: \[:error\])?(?: \[pid \d+\])? \[client :\d+\] WAR \[Login denied for user "[^"]*"\] ignoreregex = From 4163f329688e89c3d551423a0e3d9be02adb9897 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 4 Sep 2017 11:48:01 +0200 Subject: [PATCH 15/25] small review, prefix replaced with `%(_apache_error_client)s` from apache-common.conf include --- config/filter.d/zoneminder.conf | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/config/filter.d/zoneminder.conf b/config/filter.d/zoneminder.conf index aa3b4e6d..cc82755a 100644 --- a/config/filter.d/zoneminder.conf +++ b/config/filter.d/zoneminder.conf @@ -1,5 +1,7 @@ # Fail2Ban filter for Zoneminder login failures -# + +[INCLUDES] +before = apache-common.conf [Definition] @@ -7,13 +9,9 @@ # # # Option: failregex -# Notes.: regex to match the password failure messages in the logfile. The -# host must be matched by a group named "host". The tag "" can -# be used for standard IP/hostname matching and is only an alias for -# (?:::f{4,6}:)?(?P[\w\-.^_]+) +# Notes.: regex to match the password failure messages in the logfile. - -failregex = ^\[\](?: \[:error\])?(?: \[pid \d+\])? \[client :\d+\] WAR \[Login denied for user "[^"]*"\] +failregex = ^%(_apache_error_client)s WAR \[Login denied for user "[^"]*"\] ignoreregex = From fafefc029393bd33d6d593d4adbdea957a86e3d8 Mon Sep 17 00:00:00 2001 From: Vladimir Chumak Date: Sun, 3 Sep 2017 14:07:55 +0300 Subject: [PATCH 16/25] Add Jorgee Vulnerability Scanner protect Details for Jorgee Vulnerability Scanner: https://www.symantec.com/security_response/attacksignatures/detail.jsp?asid=30164 --- config/filter.d/apache-badbots.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/filter.d/apache-badbots.conf b/config/filter.d/apache-badbots.conf index 48b30666..c00852c4 100644 --- a/config/filter.d/apache-badbots.conf +++ b/config/filter.d/apache-badbots.conf @@ -7,7 +7,7 @@ [Definition] -badbotscustom = EmailCollector|WebEMailExtrac|TrackBack/1\.02|sogou music spider +badbotscustom = EmailCollector|WebEMailExtrac|TrackBack/1\.02|sogou music spider|Jorgee|Mozilla/5\.0 Jorgee badbots = Atomic_Email_Hunter/4\.0|atSpider/1\.0|autoemailspider|bwh3_user_agent|China Local Browse 2\.6|ContactBot/0\.2|ContentSmartz|DataCha0s/2\.0|DBrowse 1\.4b|DBrowse 1\.4d|Demo Bot DOT 16b|Demo Bot Z 16b|DSurf15a 01|DSurf15a 71|DSurf15a 81|DSurf15a VA|EBrowse 1\.4b|Educate Search VxB|EmailSiphon|EmailSpider|EmailWolf 1\.00|ESurf15a 15|ExtractorPro|Franklin Locator 1\.8|FSurf15a 01|Full Web Bot 0416B|Full Web Bot 0516B|Full Web Bot 2816B|Guestbook Auto Submitter|Industry Program 1\.0\.x|ISC Systems iRc Search 2\.1|IUPUI Research Bot v 1\.9a|LARBIN-EXPERIMENTAL \(efp@gmx\.net\)|LetsCrawl\.com/1\.0 \+http\://letscrawl\.com/|Lincoln State Web Browser|LMQueueBot/0\.2|LWP\:\:Simple/5\.803|Mac Finder 1\.0\.xx|MFC Foundation Class Library 4\.0|Microsoft URL Control - 6\.00\.8xxx|Missauga Locate 1\.0\.0|Missigua Locator 1\.9|Missouri College Browse|Mizzu Labs 2\.2|Mo College 1\.9|MVAClient|Mozilla/2\.0 \(compatible; NEWT ActiveX; Win32\)|Mozilla/3\.0 \(compatible; Indy Library\)|Mozilla/3\.0 \(compatible; scan4mail \(advanced version\) http\://www\.peterspages\.net/?scan4mail\)|Mozilla/4\.0 \(compatible; Advanced Email Extractor v2\.xx\)|Mozilla/4\.0 \(compatible; Iplexx Spider/1\.0 http\://www\.iplexx\.at\)|Mozilla/4\.0 \(compatible; MSIE 5\.0; Windows NT; DigExt; DTS Agent|Mozilla/4\.0 efp@gmx\.net|Mozilla/5\.0 \(Version\: xxxx Type\:xx\)|NameOfAgent \(CMS Spider\)|NASA Search 1\.0|Nsauditor/1\.x|PBrowse 1\.4b|PEval 1\.4b|Poirot|Port Huron Labs|Production Bot 0116B|Production Bot 2016B|Production Bot DOT 3016B|Program Shareware 1\.0\.2|PSurf15a 11|PSurf15a 51|PSurf15a VA|psycheclone|RSurf15a 41|RSurf15a 51|RSurf15a 81|searchbot admin@google\.com|ShablastBot 1\.0|snap\.com beta crawler v0|Snapbot/1\.0|Snapbot/1\.0 \(Snap Shots, \+http\://www\.snap\.com\)|sogou develop spider|Sogou Orion spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sogou spider|Sogou web spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sohu agent|SSurf15a 11 |TSurf15a 11|Under the Rainbow 2\.2|User-Agent\: Mozilla/4\.0 \(compatible; MSIE 6\.0; Windows NT 5\.1\)|VadixBot|WebVulnCrawl\.unknown/1\.0 libwww-perl/5\.803|Wells Search II|WEP Search 00 failregex = ^ -.*"(GET|POST|HEAD).*HTTP.*"(?:%(badbots)s|%(badbotscustom)s)"$ From 4bc226a692b06eb61e9a54146cd70ca91e0bf9ea Mon Sep 17 00:00:00 2001 From: sebres Date: Tue, 5 Sep 2017 10:59:16 +0200 Subject: [PATCH 17/25] optimized regex --- config/filter.d/apache-badbots.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/filter.d/apache-badbots.conf b/config/filter.d/apache-badbots.conf index c00852c4..cc7e6549 100644 --- a/config/filter.d/apache-badbots.conf +++ b/config/filter.d/apache-badbots.conf @@ -7,7 +7,7 @@ [Definition] -badbotscustom = EmailCollector|WebEMailExtrac|TrackBack/1\.02|sogou music spider|Jorgee|Mozilla/5\.0 Jorgee +badbotscustom = EmailCollector|WebEMailExtrac|TrackBack/1\.02|sogou music spider|(?:Mozilla/\d+\.\d+ )?Jorgee badbots = Atomic_Email_Hunter/4\.0|atSpider/1\.0|autoemailspider|bwh3_user_agent|China Local Browse 2\.6|ContactBot/0\.2|ContentSmartz|DataCha0s/2\.0|DBrowse 1\.4b|DBrowse 1\.4d|Demo Bot DOT 16b|Demo Bot Z 16b|DSurf15a 01|DSurf15a 71|DSurf15a 81|DSurf15a VA|EBrowse 1\.4b|Educate Search VxB|EmailSiphon|EmailSpider|EmailWolf 1\.00|ESurf15a 15|ExtractorPro|Franklin Locator 1\.8|FSurf15a 01|Full Web Bot 0416B|Full Web Bot 0516B|Full Web Bot 2816B|Guestbook Auto Submitter|Industry Program 1\.0\.x|ISC Systems iRc Search 2\.1|IUPUI Research Bot v 1\.9a|LARBIN-EXPERIMENTAL \(efp@gmx\.net\)|LetsCrawl\.com/1\.0 \+http\://letscrawl\.com/|Lincoln State Web Browser|LMQueueBot/0\.2|LWP\:\:Simple/5\.803|Mac Finder 1\.0\.xx|MFC Foundation Class Library 4\.0|Microsoft URL Control - 6\.00\.8xxx|Missauga Locate 1\.0\.0|Missigua Locator 1\.9|Missouri College Browse|Mizzu Labs 2\.2|Mo College 1\.9|MVAClient|Mozilla/2\.0 \(compatible; NEWT ActiveX; Win32\)|Mozilla/3\.0 \(compatible; Indy Library\)|Mozilla/3\.0 \(compatible; scan4mail \(advanced version\) http\://www\.peterspages\.net/?scan4mail\)|Mozilla/4\.0 \(compatible; Advanced Email Extractor v2\.xx\)|Mozilla/4\.0 \(compatible; Iplexx Spider/1\.0 http\://www\.iplexx\.at\)|Mozilla/4\.0 \(compatible; MSIE 5\.0; Windows NT; DigExt; DTS Agent|Mozilla/4\.0 efp@gmx\.net|Mozilla/5\.0 \(Version\: xxxx Type\:xx\)|NameOfAgent \(CMS Spider\)|NASA Search 1\.0|Nsauditor/1\.x|PBrowse 1\.4b|PEval 1\.4b|Poirot|Port Huron Labs|Production Bot 0116B|Production Bot 2016B|Production Bot DOT 3016B|Program Shareware 1\.0\.2|PSurf15a 11|PSurf15a 51|PSurf15a VA|psycheclone|RSurf15a 41|RSurf15a 51|RSurf15a 81|searchbot admin@google\.com|ShablastBot 1\.0|snap\.com beta crawler v0|Snapbot/1\.0|Snapbot/1\.0 \(Snap Shots, \+http\://www\.snap\.com\)|sogou develop spider|Sogou Orion spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sogou spider|Sogou web spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sohu agent|SSurf15a 11 |TSurf15a 11|Under the Rainbow 2\.2|User-Agent\: Mozilla/4\.0 \(compatible; MSIE 6\.0; Windows NT 5\.1\)|VadixBot|WebVulnCrawl\.unknown/1\.0 libwww-perl/5\.803|Wells Search II|WEP Search 00 failregex = ^ -.*"(GET|POST|HEAD).*HTTP.*"(?:%(badbots)s|%(badbotscustom)s)"$ From 2cd02b731b3e79b9fd052cc348416124cc57f785 Mon Sep 17 00:00:00 2001 From: "Serg G. Brester" Date: Thu, 7 Sep 2017 15:28:46 +0200 Subject: [PATCH 18/25] filter.d/exim.conf: fixed failregex for case of `D=0s` Closes gh-1886 --- config/filter.d/exim.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/filter.d/exim.conf b/config/filter.d/exim.conf index 7848fe00..eb56feff 100644 --- a/config/filter.d/exim.conf +++ b/config/filter.d/exim.conf @@ -19,7 +19,7 @@ failregex = ^%(pid)s %(host_info)ssender verify fail for <\S+>: (?:Unknown user| ^%(pid)s SMTP protocol synchronization error \([^)]*\): rejected (?:connection from|"\S+") %(host_info)s(?:next )?input=".*"\s*$ ^%(pid)s SMTP call from \S+ %(host_info)sdropped: too many nonmail commands \(last was "\S+"\)\s*$ ^%(pid)s SMTP protocol error in "AUTH \S*(?: \S*)?" %(host_info)sAUTH command used when not advertised\s*$ - ^%(pid)s no MAIL in SMTP connection from (?:[^\[\( ]* )?(?:\(\S*\) )?%(host_info)sD=\d\S+s(?: C=\S*)?\s*$ + ^%(pid)s no MAIL in SMTP connection from (?:[^\[\( ]* )?(?:\(\S*\) )?%(host_info)sD=\d\S*s(?: C=\S*)?\s*$ ^%(pid)s (?:[\w\-]+ )?SMTP connection from (?:[^\[\( ]* )?(?:\(\S*\) )?%(host_info)sclosed by DROP in ACL\s*$ ignoreregex = From db121a6f8577c1fb348d8ed7b0f6c1a999c6a28c Mon Sep 17 00:00:00 2001 From: "Serg G. Brester" Date: Thu, 7 Sep 2017 15:32:35 +0200 Subject: [PATCH 19/25] Update exim Test case covers flood attempts with `D=0s` --- fail2ban/tests/files/logs/exim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fail2ban/tests/files/logs/exim b/fail2ban/tests/files/logs/exim index 8f3ac1bb..f87d393b 100644 --- a/fail2ban/tests/files/logs/exim +++ b/fail2ban/tests/files/logs/exim @@ -53,7 +53,7 @@ # failJSON: { "time": "2016-03-21T06:38:05", "match": true , "host": "49.212.207.15" } 2016-03-21 06:38:05 [5718] no MAIL in SMTP connection from www3005.sakura.ne.jp [49.212.207.15]:28890 I=[172.89.0.6]:25 D=21s C=EHLO,STARTTLS # failJSON: { "time": "2016-03-21T06:57:36", "match": true , "host": "122.165.71.116" } -2016-03-21 06:57:36 [5908] no MAIL in SMTP connection from [122.165.71.116]:2056 I=[172.89.0.6]:25 D=10s +2016-03-21 06:57:36 [5908] no MAIL in SMTP connection from [122.165.71.116]:2056 I=[172.89.0.6]:25 D=0s # failJSON: { "time": "2016-03-21T06:57:36", "match": true , "host": "122.165.71.116" } 2016-03-21 06:57:36 [5908] no MAIL in SMTP connection from [122.165.71.116] I=[172.89.0.6]:25 D=10s # failJSON: { "time": "2016-03-21T04:07:49", "match": true , "host": "174.137.147.204" } From fd83260bd8973e704f6056dca86e9360b3a876bb Mon Sep 17 00:00:00 2001 From: "Serg G. Brester" Date: Thu, 7 Sep 2017 18:51:08 +0200 Subject: [PATCH 20/25] jail "pass2allow-ftp" should supply blocktype to action closes gh-1884 --- config/jail.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/config/jail.conf b/config/jail.conf index e3e89ff0..7c696176 100644 --- a/config/jail.conf +++ b/config/jail.conf @@ -840,6 +840,7 @@ filter = apache-pass[knocking_url="%(knocking_url)s"] logpath = %(apache_access_log)s blocktype = RETURN returntype = DROP +action = %(action_)s[blocktype=%(blocktype)s, returntype=%(returntype)s] bantime = 1h maxretry = 1 findtime = 1 From b698a749029af2c216268aa29a1228f21e87bfb7 Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 7 Sep 2017 19:07:06 +0200 Subject: [PATCH 21/25] introduces new command-line options `--dp`, `--dump-pretty` to dump the configuration using more human readable representation; allow dump of configuration, also if log-file is not available (warning only) --- fail2ban/client/configurator.py | 4 ++-- fail2ban/client/fail2bancmdline.py | 26 +++++++++++++++++------- fail2ban/client/jailreader.py | 9 +++++--- fail2ban/tests/fail2banclienttestcase.py | 6 +++++- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/fail2ban/client/configurator.py b/fail2ban/client/configurator.py index e8472ac1..fe735251 100644 --- a/fail2ban/client/configurator.py +++ b/fail2ban/client/configurator.py @@ -76,9 +76,9 @@ class Configurator: self.__fail2ban.getOptions(updateMainOpt) return self.__jails.getOptions(jail, ignoreWrong=ignoreWrong) - def convertToProtocol(self): + def convertToProtocol(self, allow_no_files=False): self.__streams["general"] = self.__fail2ban.convert() - self.__streams["jails"] = self.__jails.convert() + self.__streams["jails"] = self.__jails.convert(allow_no_files=allow_no_files) def getConfigStream(self): cmds = list() diff --git a/fail2ban/client/fail2bancmdline.py b/fail2ban/client/fail2bancmdline.py index f213d037..401aa9b6 100644 --- a/fail2ban/client/fail2bancmdline.py +++ b/fail2ban/client/fail2bancmdline.py @@ -102,6 +102,7 @@ class Fail2banCmdLine(): output(" --logtarget |STDOUT|STDERR|SYSLOG") output(" --syslogsocket auto|") output(" -d dump configuration. For debugging") + output(" --dp, --dump-pretty dump the configuration using more human readable representation") output(" -t, --test test configuration (can be also specified with start parameters)") output(" -i interactive mode") output(" -v increase verbosity") @@ -137,8 +138,8 @@ class Fail2banCmdLine(): self._conf["pidfile"] = opt[1] elif o.startswith("--log") or o.startswith("--sys"): self._conf[ o[2:] ] = opt[1] - elif o == "-d": - self._conf["dump"] = True + elif o in ["-d", "--dp", "--dump-pretty"]: + self._conf["dump"] = True if o == "-d" else 2 elif o == "-t" or o == "--test": self.cleanConfOnly = True self._conf["test"] = True @@ -184,7 +185,8 @@ class Fail2banCmdLine(): # Reads the command line options. try: cmdOpts = 'hc:s:p:xfbdtviqV' - cmdLongOpts = ['loglevel=', 'logtarget=', 'syslogsocket=', 'test', 'async', 'timeout=', 'str2sec=', 'help', 'version'] + cmdLongOpts = ['loglevel=', 'logtarget=', 'syslogsocket=', 'test', 'async', + 'timeout=', 'str2sec=', 'help', 'version', 'dp', '--dump-pretty'] optList, self._args = getopt.getopt(self._argv[1:], cmdOpts, cmdLongOpts) except getopt.GetoptError: self.dispUsage() @@ -240,7 +242,10 @@ class Fail2banCmdLine(): if readcfg: ret, stream = self.readConfig() readcfg = False - self.dumpConfig(stream) + if stream is not None: + self.dumpConfig(stream, self._conf["dump"] == 2) + else: # pragma: no cover + output("ERROR: The configuration stream failed because of the invalid syntax.") if not self._conf.get("test", False): return ret @@ -275,7 +280,8 @@ class Fail2banCmdLine(): self.configurator.readAll() ret = self.configurator.getOptions(jail, self._conf, ignoreWrong=not self.cleanConfOnly) - self.configurator.convertToProtocol() + self.configurator.convertToProtocol( + allow_no_files=self._conf.get("dump", False)) stream = self.configurator.getConfigStream() except Exception as e: logSys.error("Failed during configuration: %s" % e) @@ -283,9 +289,15 @@ class Fail2banCmdLine(): return ret, stream @staticmethod - def dumpConfig(cmd): + def dumpConfig(cmd, pretty=False): + if pretty: + from pprint import pformat + def _output(s): + output(pformat(s, width=1000, indent=2)) + else: + _output = output for c in cmd: - output(c) + _output(c) return True # diff --git a/fail2ban/client/jailreader.py b/fail2ban/client/jailreader.py index ce0ed3b6..ffc28752 100644 --- a/fail2ban/client/jailreader.py +++ b/fail2ban/client/jailreader.py @@ -235,9 +235,12 @@ class JailReader(ConfigReader): found_files += 1 stream.append( ["set", self.__name, "addlogpath", p, tail]) - if not (found_files or allow_no_files): - raise ValueError( - "Have not found any log file for %s jail" % self.__name) + if not found_files: + msg = "Have not found any log file for %s jail" % self.__name + if not allow_no_files: + raise ValueError(msg) + logSys.warning(msg) + elif opt == "logencoding": stream.append(["set", self.__name, "logencoding", value]) elif opt == "backend": diff --git a/fail2ban/tests/fail2banclienttestcase.py b/fail2ban/tests/fail2banclienttestcase.py index caacf63c..083ce815 100644 --- a/fail2ban/tests/fail2banclienttestcase.py +++ b/fail2ban/tests/fail2banclienttestcase.py @@ -426,7 +426,11 @@ class Fail2banClientTest(Fail2banClientServerBase): startparams = _start_params(tmp, True) self.execSuccess(startparams, "-vvd") self.assertLogged("Loading files") - self.assertLogged("logtarget") + self.assertLogged("['set', 'logtarget',") + self.pruneLog() + # pretty dump: + self.execSuccess(startparams, "--dp") + self.assertLogged("['set', 'logtarget',") @with_tmpdir @with_kill_srv From e20f6204d325273eadd724e8a15401379b634d5c Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 7 Sep 2017 19:09:18 +0200 Subject: [PATCH 22/25] don't put parameters starting with `known/` to the ready stream (intermediate options only), makes streams and dumps of configuration shorter and better readable --- fail2ban/client/actionreader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fail2ban/client/actionreader.py b/fail2ban/client/actionreader.py index 559705bc..d7bba61f 100644 --- a/fail2ban/client/actionreader.py +++ b/fail2ban/client/actionreader.py @@ -88,11 +88,11 @@ class ActionReader(DefinitionInitConfigReader): stream.append(head + ["addaction", self._name]) multi = [] for opt, optval in opts.iteritems(): - if opt in self._configOpts: + if opt in self._configOpts and not opt.startswith('known/'): multi.append([opt, optval]) if self._initOpts: for opt, optval in self._initOpts.iteritems(): - if opt not in self._configOpts: + if opt not in self._configOpts and not opt.startswith('known/'): multi.append([opt, optval]) if len(multi) > 1: stream.append(["multi-set", self._jailName, "action", self._name, multi]) From 462b534469dcdd852e6c551ad71ea0549e63ecc2 Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 7 Sep 2017 19:21:45 +0200 Subject: [PATCH 23/25] restrict saving of previous known values to section-related (don't overwrite with the values of other sections, especially like "INCLUDES", etc.) --- fail2ban/client/configparserinc.py | 9 ++++----- fail2ban/client/configreader.py | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fail2ban/client/configparserinc.py b/fail2ban/client/configparserinc.py index b626be9b..d220ed44 100644 --- a/fail2ban/client/configparserinc.py +++ b/fail2ban/client/configparserinc.py @@ -20,8 +20,8 @@ # Author: Yaroslav Halchenko # Modified: Cyril Jaquier -__author__ = 'Yaroslav Halhenko' -__copyright__ = 'Copyright (c) 2007 Yaroslav Halchenko' +__author__ = 'Yaroslav Halhenko, Serg G. Brester (aka sebres)' +__copyright__ = 'Copyright (c) 2007 Yaroslav Halchenko, 2015 Serg G. Brester (aka sebres)' __license__ = 'GPL' import os @@ -150,7 +150,7 @@ after = 1.conf if seclwr == 'known': # try get raw value from known options: try: - v = self._sections['KNOWN'][opt] + v = self._sections['KNOWN/'+section][opt] except KeyError: # fallback to default: try: @@ -297,7 +297,6 @@ after = 1.conf # merge defaults and all sections to self: alld.update(cfg.get_defaults()) for n, s in cfg.get_sections().iteritems(): - curalls = alls # conditional sections cond = SafeConfigParserWithIncludes.CONDITIONAL_RE.match(n) if cond: @@ -313,7 +312,7 @@ after = 1.conf s2 = alls.get(n) if isinstance(s2, dict): # save previous known values, for possible using in local interpolations later: - self.merge_section('KNOWN', s2, '') + self.merge_section('KNOWN/'+n, s2, '') # merge section s2.update(s) else: diff --git a/fail2ban/client/configreader.py b/fail2ban/client/configreader.py index 381af759..577a5a16 100644 --- a/fail2ban/client/configreader.py +++ b/fail2ban/client/configreader.py @@ -20,8 +20,8 @@ # Author: Cyril Jaquier # Modified by: Yaroslav Halchenko (SafeConfigParserWithIncludes) -__author__ = "Cyril Jaquier" -__copyright__ = "Copyright (c) 2004 Cyril Jaquier" +__author__ = "Cyril Jaquier, Yaroslav Halchenko, Serg G. Brester (aka sebres)" +__copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2007 Yaroslav Halchenko, 2015 Serg G. Brester (aka sebres)" __license__ = "GPL" import glob @@ -110,7 +110,7 @@ class ConfigReader(): def sections(self): try: - return (n for n in self._cfg.sections() if n != 'KNOWN') + return (n for n in self._cfg.sections() if not n.startswith('KNOWN/')) except AttributeError: return [] From 983b128c5439cacfbc560c600266051b4bf6de6e Mon Sep 17 00:00:00 2001 From: "Serg G. Brester" Date: Fri, 8 Sep 2017 11:07:48 +0200 Subject: [PATCH 24/25] Update ChangeLog several fixes of 0.9th branch --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 32b8999d..ae7d51c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,7 +25,10 @@ releases. * filter.d/apache-overflows.conf: - Fixes resources greedy expression (see gh-1790); - Rewritten without end-anchor ($), because of potential vulnerability on very long URLs. +* filter.d/apache-badbots.conf - extended to recognize Jorgee Vulnerability Scanner (gh-1882) * filter.d/asterisk.conf - fixed failregex AMI Asterisk authentification failed (see gh-1302) +* filter.d/dovecot.conf - fixed failregex, see gh-1879 (partially cherry-picked from gh-1880) +* filter.d/exim.conf - fixed failregex for case of flood attempts with `D=0s` (gh-1887) ### New Features @@ -33,6 +36,7 @@ releases. * action.d/cloudflare.conf - Cloudflare API v4 implementation (gh-1651) * filter.d/kerio.conf - filter extended with new rules (see gh-1455) * filter.d/phpmyadmin-syslog.conf - new filter for phpMyAdmin using syslog for auth logging +* filter.d/zoneminder.conf - new filter for ZoneMinder (gh-1376) ver. 0.9.7 (2017/05/11) - awaiting-victory From 8be4569d51350728446e7a92c8027f73e116afc8 Mon Sep 17 00:00:00 2001 From: "Serg G. Brester" Date: Fri, 8 Sep 2017 11:32:08 +0200 Subject: [PATCH 25/25] Update ChangeLog several fixes of 0.10th branch --- ChangeLog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5bdb9be4..c56ca6ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,10 +35,25 @@ ver. 0.10.1-dev-1 (2016/??/??) - development edition ----------- ### Fixes +* jail "pass2allow-ftp" supply blocktype and returntype parameters to the action (gh-1884) +* avoid using "ANSI_X3.4-1968" as preferred encoding (if missing environment variables + 'LANGUAGE', 'LC_ALL', 'LC_CTYPE', and 'LANG', see gh-1587). +* action.d/pf.conf: several fixes for pf-action like anchoring, etc. (see gh-1866, gh-1867); +* fixed ignorself issue "Retrieving own IPs of localhost failed: inet_pton() argument 2 must be string, not int" (see gh-1865); +* fixed tags `` and ``, could be used without ticket (a. g. in `actionstart` etc., gh-1859). + +* setup.py: fixed several setup facilities (gh-1874): + - don't check return code by dry-run: returns 256 on some python/setuptool versions; + - `files/fail2ban.service` renamed as template to `files/fail2ban.service.in`; + - setup process generates `build/fail2ban.service` from `files/fail2ban.service.in` using distribution related bin-path; + - bug-fixing by running setup with option `--dry-run`; ### New Features +* introduced new command-line options `--dp`, `--dump-pretty` to dump the configuration using more + human readable representation (opposite to `-d`); ### Enhancements +* filter.d/dovecot.conf: introduced mode `aggressive` for cases like "disconnected before auth was ready" (gh-1880) ver. 0.10.0 (2017/08/09) - long-awaited 0.10th version