我是 ModSecurity 的新手,并試圖在我的本地環境中對其進行評估:
- CentOS 7
- 阿帕奇 2.4.6
- 國防部安全 2.9.3
- CRS 3.3.2
對于我們的 404 錯誤頁面,我收到以下 ModSec 誤報,這是一個非常基本的頁面,僅包含少量文本和影像“/assets/warning.png”。
Wed Apr 20 11:24:36.137728 2022] [:error] [pid 19154] [client xxx.xxx.xxx.xxx:61967] [client xxx.xxx.xxx.xxx] ModSecurity: Rule 55dfceb2c9b0 [id "-"][file "/etc/httpd/coreruleset-3.3.2/rules/RESPONSE-951-DATA-LEAKAGES-SQL.conf"][line "92"] - Execution error - PCRE limits exceeded (-8): (null). [hostname "mydomain.com"] [uri "/404"]
這似乎是導致問題的影像,如果我洗掉它,我不會收到 modsec 警報。
我不知道如何為這種誤報創建排除項,我嘗試了以下方法(在 /etc/httpd/coreruleset-3.3.2/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf 中) ,但沒有運氣:
SecRuleUpdateTargetById 951120 "!ARGS_NAMES:/warning.png/"
uj5u.com熱心網友回復:
OWASP ModSecurity 核心規則集 dev-on-duty 在這里。你幾乎是對的,但并不完全正確。
問題其實不是很嚴重。它只是告訴您已達到 PCRE 限制。這對您的日志來說很煩人,但 WAF 會繼續按預期作業。
您的規則排除的問題是您不知道是哪個引數導致了問題。警報不會告訴你。我建議您對 951120 使用基于路徑的規則排除。查看 netnea.com/cms/apache-tutorials/ 上的教程以了解如何執行此操作。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/465403.html
