2013-10-30 13:02:59 +00:00
|
|
|
# Fail2Ban filter to block web requests for scripts (on non scripted websites)
|
2006-10-17 19:05:27 +00:00
|
|
|
#
|
2014-01-09 20:34:01 +00:00
|
|
|
# This matches many types of scripts that don't exist. This could generate a
|
|
|
|
# lot of false positive matches in cases like wikis and forums where users
|
|
|
|
# no affiliated with the website can insert links to missing files/scripts into
|
|
|
|
# pages and cause non-malicious browsers of the site to trigger against this
|
|
|
|
# filter.
|
|
|
|
#
|
|
|
|
# If you'd like to match specific URLs that don't exist see the
|
|
|
|
# apache-botsearch filter.
|
2006-10-17 19:05:27 +00:00
|
|
|
#
|
|
|
|
|
2013-06-11 18:56:25 +00:00
|
|
|
[INCLUDES]
|
|
|
|
|
2013-10-30 13:02:59 +00:00
|
|
|
# overwrite with apache-common.local if _apache_error_client is incorrect.
|
2013-06-11 18:56:25 +00:00
|
|
|
before = apache-common.conf
|
|
|
|
|
2006-10-17 19:05:27 +00:00
|
|
|
[Definition]
|
|
|
|
|
2018-03-19 12:18:55 +00:00
|
|
|
script = /\S*(?:php(?:[45]|[.-]cgi)?|\.asp|\.exe|\.pl)
|
|
|
|
|
2018-03-19 13:38:47 +00:00
|
|
|
prefregex = ^%(_apache_error_client)s <F-CONTENT>(?:(?:AH0(?:01(?:28|30)|1(?:264|071)): )|(?:(?:[Ff]ile|script|[Gg]ot) )).+</F-CONTENT>$
|
2018-03-19 12:18:55 +00:00
|
|
|
|
2018-03-19 13:38:47 +00:00
|
|
|
failregex = ^(?:(?:AH001(?:28|30): )?[Ff]ile does not exist|(AH01264: )?script not found or unable to stat): <script>\b
|
2018-03-19 12:18:55 +00:00
|
|
|
^script '<script>\S*' not found or unable to stat
|
2018-03-19 13:38:47 +00:00
|
|
|
^(?:AH01071: )?[Gg]ot error '[Pp]rimary script unknown\\n'
|
2006-11-12 14:52:36 +00:00
|
|
|
|
2006-11-15 18:44:28 +00:00
|
|
|
ignoreregex =
|
2013-10-30 13:02:59 +00:00
|
|
|
|
|
|
|
|
2013-11-10 23:49:11 +00:00
|
|
|
# DEV Notes:
|
|
|
|
#
|
|
|
|
# https://wiki.apache.org/httpd/ListOfErrors for apache error IDs
|
|
|
|
#
|
2014-01-09 21:35:37 +00:00
|
|
|
# Second regex, script '/\S*(\.php|\.asp|\.exe|\.pl)\S*' not found or unable to stat\s*$ is in httpd-2.2
|
2013-11-10 23:49:11 +00:00
|
|
|
#
|
2013-10-30 13:02:59 +00:00
|
|
|
# Author: Cyril Jaquier
|