正文:
宝塔中提供了付费版和免费版的Nginx防火墙。我们可以利用 User-Agent 来屏蔽掉许多无关紧要的蜘蛛爬虫,并且防止 SQL 注入和菜刀一句话的入侵。
然而,免费版的 nginx 防火墙规则相对较少,种类也不够多样化。因此,我们将分享一些来自付费版的规则,您可以手动逐条添加到免费版的防火墙中。遗憾的是,免费版没有导入功能。
关键词过滤 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\()
转载请注明:汇站网 » 增强宝塔 Nginx 免费防火墙的功能添加 User-Agent 屏蔽规则