2017-09-21 16 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 : 나는 해결책 아래에 발견

 
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

:

설치 파일은 Nginx에 사용하지 않기 때문에 규칙이 Nginx에 명시 적으로 파일을로드 할 필요가 말한다 사전 순로드 순서. Apache Include 양식 * .conf를 사용하여 Nginx가 규칙이 트리거되기 전에 Anomaly Score를 평가하게되었습니다. (-> 949 파일이 942 파일보다 먼저로드되었습니다).

은 다음과 같이 그것들을로드하고 확인해야합니다 :

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