2017-09-21 13 views
0

Nginx 1.10.3をModSecurityとowasp-modsecurity-crsでビルドし、カールでテストしました。 nginxログからはすでにルールで検出されているので動作しますが、クライアントは403のような拒否レスポンスではなく、http応答の成功を得ます。owasp-modsecurity-crsが要求を検出したが拒否していない

助けてもらえますか?追加の設定が必要ですか?

 
[[email protected] ~]$ curl -H "User-Agent: Nikto" http://15.116.78.110 
... 
Welcome to nginx! 
... 

nginxのののerror.log:

INSTALLファイルnginxのは使用されませんので、あなたがnginxのために明示的にルールファイルをロードする必要があると述べている:

 
2017/09/20 20:11:14 [error] 20545#0: [client 15.116.79.38] ModSecurity: Warning. Matched phrase "nikto" at REQUEST_HEADERS:User-Agent. [file "/etc/nginx/owasp-modsecurity-crs/rules/REQUEST-913-SCANNER-DETECTION.conf"] [line "60"] [id "913100"] [rev "2"] [msg "Found User-Agent associated with security scanner"] [data "Matched Data: nikto found within REQUEST_HEADERS:User-Agent: nikto"] [severity "CRITICAL"] [ver "OWASP_CRS/3.0.0"] [maturity "9"] [accuracy "9"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-reputation-scanner"] [tag "OWASP_CRS/AUTOMATION/SECURITY_SCANNER"] [tag "WASCTC/WASC-21"] [tag "OWASP_TOP_10/A7"] [tag "PCI/6.5.10"] [hostname ""] [uri "/"] [unique_id "AcAcAcdcAcAcscAcRcAclc8T"] 

答えて

0

は、以下のソリューションが私を発見しましたアルファベット順のロード順です。 Apache Includeフォーム* .confを使用したため、ルールがトリガーされる前にNginxがAnomaly Scoreを評価しました。 ( - > 949ファイルが942ファイルの前にロードされました)。

次のようにそれらをロードし、[OK]を次のようになります。

include owasp-modsecurity-crs/crs-setup.conf 
include owasp-modsecurity-crs/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf 
... 
include owasp-modsecurity-crs/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf 
関連する問題