为宝塔Nginx免费防火墙添加User-Agent屏蔽规则

在宝塔中有付费的Nginx防火墙,也有Nginx免费防火墙,我们可以使用User-Agent屏蔽掉很多没必要的蜘蛛爬虫,并防止SQL注入或菜刀一句话的入侵。

在免费版本的nginx防火墙规则并没有那么充分与多样,所以我们分享一下来自收费版本中的规则,可以手动逐条写入免费版本的防火墙中,可惜的是没有导入功能。

为宝塔Nginx免费防火墙添加User-Agent屏蔽规则-第1张图片

关键词过滤1

(WPScan|HTTrack|antSword|harvest|audit|dirbuster|pangolin|nmap|sqln|hydra|Parser|libwww|BBBike|sqlmap|w3af|owasp|Nikto|fimap|havij|zmeu|BabyKrokodil|netsparker|httperf| SF/)

一句话*屏蔽的关键字*过滤2

(?:define|eval|file_get_contents|include|require_once|shell_exec|phpinfo|system|passthru|chr|char|preg_\w+|execute|echo|print|print_r|var_dump|(fp)open|alert|showmodaldialog|file_put_contents|fopen|urldecode|scandir)\(

一句话*屏蔽的关键字*过滤3

\$_(GET|post|cookie|files|session|env|phplib|GLOBALS|SERVER)

SQL注入过滤2

select\s+.+(from|limit)\s+

SQL注入过滤3

(?:(union(.*?)select))

SQL注入过滤6

benchmark\((.*)\,(.*)\)

SQL注入过滤7

(?:from\W+information_schema\W)

SQL注入过滤8

(?:(?:current_)user|database|schema|connection_id)\s*\(

SQL报错注入过滤01

(extractvalue\(|concat\(0x|user\(\)|substring\(|count\(\*\)|substring\(hex\(|updatexml\()

SQL报错注入过滤02

(@@version|load_file\(|NAME_CONST\(|exp\(\~|floor\(rand\(|geometrycollection\(|multipoint\(|polygon\(|multipolygon\(|linestring\(|multilinestring\()

SQL注入过滤10

(substr\()

SQL注入过滤1

(ORD\(|MID\(|IFNULL\(|CAST\(|CHAR\))

SQL注入过滤1

(EXISTS\(|SELECT\#|\(SELECT)

菜刀流量过滤

(array_map\("ass)

SQL报错注入过滤01

(bin\(|ascii\(|benchmark\(|concat_ws\(|group_concat\(|strcmp\(|left\(|datadir\(|greatest\()
本站所有内容仅限用于学习和研究目的,程序仅供本地断网测试,转载请说明出处!
站群SEO » 为宝塔Nginx免费防火墙添加User-Agent屏蔽规则

发表评论

欢迎 访客 发表评论

聚合全网站群程序及推送工具!

联系站长 联系客服