mirror of https://github.com/midoks/mdserver-web
parent
875395ad4c
commit
5a52ed41ad
@ -1,4 +1,4 @@ |
||||
lua_shared_dict limit 10m; |
||||
lua_package_path "{$WAF_PATH}/?.lua"; |
||||
init_by_lua_file {$WAF_PATH}/init.lua; |
||||
access_by_lua_file {$WAF_PATH}/waf.lua; |
||||
lua_package_path "{$WAF_PATH}/lua/?.lua"; |
||||
init_by_lua_file {$WAF_PATH}/lua/init.lua; |
||||
access_by_lua_file {$WAF_PATH}/lua/waf.lua; |
||||
|
@ -1,13 +0,0 @@ |
||||
RulePath = "{$WAF_PATH}/wafconf" |
||||
attacklog = "on" |
||||
logdir = "{$ROOT_PATH}/wwwlogs/waf/" |
||||
UrlDeny="on" |
||||
Redirect="on" |
||||
CookieMatch="off" |
||||
postMatch="off" |
||||
whiteModule="on" |
||||
black_fileExt={"php","jsp"} |
||||
ipWhitelist={"127.0.0.2"} |
||||
ipBlocklist={"1.0.0.1"} |
||||
CCDeny="off" |
||||
CCrate="300/60" |
@ -1,3 +1,19 @@ |
||||
RulePath = "{$WAF_PATH}/wafconf" |
||||
attacklog = "on" |
||||
logdir = "{$ROOT_PATH}/wwwlogs/waf/" |
||||
UrlDeny="on" |
||||
Redirect="on" |
||||
CookieMatch="off" |
||||
postMatch="off" |
||||
whiteModule="on" |
||||
black_fileExt={"php","jsp"} |
||||
ipWhitelist={"127.0.0.2"} |
||||
ipBlocklist={"1.0.0.1"} |
||||
CCDeny="off" |
||||
CCrate="300/60" |
||||
|
||||
|
||||
|
||||
require 'config' |
||||
local match = string.match |
||||
local ngxmatch=ngx.re.find |
@ -0,0 +1,158 @@ |
||||
[[ |
||||
[ |
||||
1, |
||||
"\\.\\./\\.\\./", |
||||
"目录保护1", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"/\\*", |
||||
"目录保护2", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(?:etc\\/\\W*passwd)", |
||||
"目录保护3", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(gopher|doc|php|glob|file|phar|zlib|ftp|ldap|dict|ogg|data)\\:\\/", |
||||
"PHP流协议过滤1", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"\\:\\$", |
||||
"一句话木马过滤1", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"\\$\\{", |
||||
"一句话木马过滤2", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"base64_decode\\(", |
||||
"一句话木马过滤3", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(?:define|eval|file_get_contents|include|require|require_once|shell_exec|phpinfo|system|passthru|char|chr|preg_\\w+|execute|echo|print|print_r|var_dump|(fp)open|alert|showmodaldialog)\\(", |
||||
"一句话木马过滤4", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"\\$_(GET|post|cookie|files|session|env|phplib|GLOBALS|SERVER)\\[", |
||||
"一句话木马过滤5", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"\\s+(or|xor|and)\\s+.*(=|<|>|'|\")", |
||||
"SQL注入过滤1", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"select.+(from|limit)", |
||||
"SQL注入过滤2", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(?:(union(.*?)select))", |
||||
"SQL注入过滤3", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"sleep\\((\\s*)(\\d*)(\\s*)\\)", |
||||
"SQL注入过滤5", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"benchmark\\((.*)\\,(.*)\\)", |
||||
"SQL注入过滤6", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(?:from\\W+information_schema\\W)", |
||||
"SQL注入过滤7", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(?:(?:current_)user|database|schema|connection_id)\\s*\\(", |
||||
"SQL注入过滤8", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"into(\\s+)+(?:dump|out)file\\s*", |
||||
"SQL注入过滤9", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"group\\s+by.+\\(", |
||||
"SQL注入过滤10", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"\\<(iframe|script|body|img|layer|div|meta|style|base|object|input)", |
||||
"XSS过滤1", |
||||
0 |
||||
], |
||||
[ |
||||
0, |
||||
"(onmouseover|onerror|onload)\\=", |
||||
"XSS过滤2", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(invokefunction|call_user_func_array|\\\\think\\\\)", |
||||
"ThinkPHP payload封堵", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"^url_array\\[.*\\]$", |
||||
"Metinfo6.x XSS漏洞", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(extractvalue\\(|concat\\(0x|user\\(\\)|substring\\(|count\\(\\*\\)|substring\\(hex\\(|updatexml\\()", |
||||
"SQL报错注入过滤01", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(@@version|load_file\\(|NAME_CONST\\(|exp\\(\\~|floor\\(rand\\(|geometrycollection\\(|multipoint\\(|polygon\\(|multipolygon\\(|linestring\\(|multilinestring\\()", |
||||
"SQL报错注入过滤02", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"(substr\\()", |
||||
"SQL注入过滤10", |
||||
0 |
||||
], |
||||
[ |
||||
1, |
||||
"\\|+\\s+[\\w\\W]+=[\\w\\W]+", |
||||
"SQL注入过滤1", |
||||
0 |
||||
] |
||||
]] |
@ -1 +1 @@ |
||||
{"www.khxs.org": {"scan": true, "cc": {"limit": 120, "endtime": 300, "open": true, "cycle": 60}, "disable_php_path": [], "cdn": false, "cc_uri_white": [], "open": true, "retry": 6, "log": true, "disable_ext": [], "user-agent": true, "disable_upload_ext": ["php", "jsp"], "body_character_string": [], "get": true, "drop_abroad": false, "retry_cycle": 60, "url_tell": [], "cdn_header": ["x-forwarded-for", "x-real-ip"], "url_rule": [], "cookie": true, "retry_time": 180, "post": true, "url_white": [], "disable_rule": {"url": [], "post": [], "args": [], "cookie": [], "user_agent": []}, "project": "", "disable_path": []}, "gae.cachecha.com": {"scan": true, "cc": {"limit": 120, "endtime": 300, "open": true, "cycle": 60}, "disable_php_path": [], "cdn": false, "cc_uri_white": [], "open": true, "retry": 6, "log": true, "disable_ext": [], "user-agent": true, "disable_upload_ext": ["php", "jsp"], "body_character_string": [], "get": true, "drop_abroad": false, "retry_cycle": 60, "url_tell": [], "cdn_header": ["x-forwarded-for", "x-real-ip"], "url_rule": [], "cookie": true, "retry_time": 180, "post": true, "url_white": [], "disable_rule": {"url": [], "post": [], "args": [], "cookie": [], "user_agent": []}, "project": "", "disable_path": []}} |
||||
{{"www.khxs.org": {"scan": true, "cc": {"limit": 120, "endtime": 300, "open": true, "cycle": 60}, "disable_php_path": [], "cdn": false, "cc_uri_white": [], "open": true, "retry": 6, "log": true, "disable_ext": [], "user-agent": true, "disable_upload_ext": ["php", "jsp"], "body_character_string": [], "get": true, "drop_abroad": false, "retry_cycle": 60, "url_tell": [], "cdn_header": ["x-forwarded-for", "x-real-ip"], "url_rule": [], "cookie": true, "retry_time": 180, "post": true, "url_white": [], "disable_rule": {"url": [], "post": [], "args": [], "cookie": [], "user_agent": []}, "project": "", "disable_path": []}, "gae.cachecha.com": {"scan": true, "cc": {"limit": 120, "endtime": 300, "open": true, "cycle": 60}, "disable_php_path": [], "cdn": false, "cc_uri_white": [], "open": true, "retry": 6, "log": true, "disable_ext": [], "user-agent": true, "disable_upload_ext": ["php", "jsp"], "body_character_string": [], "get": true, "drop_abroad": false, "retry_cycle": 60, "url_tell": [], "cdn_header": ["x-forwarded-for", "x-real-ip"], "url_rule": [], "cookie": true, "retry_time": 180, "post": true, "url_white": [], "disable_rule": {"url": [], "post": [], "args": [], "cookie": [], "user_agent": []}, "project": "", "disable_path": []}}} |
Loading…
Reference in new issue