【发布时间】:2015-08-25 05:36:50
【问题描述】:
我刚刚遇到了规则981173 的问题
[msg "Restricted SQL Character Anomaly Detection Alert - Total] 用于将一些 youtube ID 发送到数据库。有些 ID 有特殊字符,如 -,我猜这是引发警告的原因
我一直试图从规则中排除$_POST 键video[391][],其中391 是产品ID,因此它不是修复键。可以是video[500][] 或类似名称。
我试过了
SecRuleUpdateTargetById 981173 !ARGS:video[*][]
但它不起作用。关于如何从规则中排除此动态 $_POST 键的任何想法?
Message: Access denied with code 403 (phase 2).
Pattern match "([\\~\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\-\\+\\=\\{\\}\\[\\]\\|\\:\\;\"\\'\\\xc2\xb4\\\xe2\x80\x99\\\xe2\x80\x98\\`\\<\\>].*?){4,}"
at ARGS_NAMES:video[391][]. [file "/etc/httpd/crs-tecmint/owasp-modsecurity-crs/base_rules/modsecurity_crs_41_sql_injection_attacks.conf"]
[line "159"] [id "981173"] [rev "2"]
[msg "Restricted SQL Character Anomaly Detection Alert - Total # of special characters exceeded"]
[data "Matched Data: ] found within ARGS_NAMES:video[391][]: video[391][]"] [ver "OWASP_CRS/2.2.9"] [maturity "9"]
[accuracy "8"] [tag "OWASP_CRS/WEB_ATTACK/SQL_INJECTION"]
【问题讨论】:
-
我几乎是对的。有 ARGS 而不是 ARGS_NAMES ,您可以从错误中看到 ARG_NAMES 是它正在标记的内容。现在已更正,我在 ModSecurity v2.9 上对此进行了测试。
标签: apache owasp mod-security mod-security2