mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Adds script to download and configure benchmark script to use owasp v[3,2]
This commit is contained in:
parent
f23908f145
commit
ed13cab9f4
18
test/benchmark/download-owasp-v2-rules.sh
Executable file
18
test/benchmark/download-owasp-v2-rules.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
git clone https://github.com/SpiderLabs/owasp-modsecurity-crs.git owasp-v2
|
||||
|
||||
|
||||
echo 'Include "owasp-v2/base_rules/*.conf"' >> basic_rules.conf
|
||||
|
||||
|
||||
cat owasp-v2/base_rules/modsecurity_crs_20_protocol_violations.conf | sed 's/SecRule WEBSERVER_ERROR_LOG/#SecRule WEBSERVER_ERROR_LOG/g' > owasp-v2/base_rules/modsecurity_crs_20_protocol_violations.conf.tmp
|
||||
mv owasp-v2/base_rules/modsecurity_crs_20_protocol_violations.conf.tmp owasp-v2/base_rules/modsecurity_crs_20_protocol_violations.conf
|
||||
|
||||
cat owasp-v2/base_rules/modsecurity_crs_40_generic_attacks.conf | sed "s/SecRule REQUEST_HEADERS:'\/(Content-Length\|Transfer-Encoding/#SecRule REQUEST_HEADERS:'\/(Content-Length|Transfer-Encoding/g" > owasp-v2/base_rules/modsecurity_crs_40_generic_attacks.conf.tmp
|
||||
mv owasp-v2/base_rules/modsecurity_crs_40_generic_attacks.conf.tmp owasp-v2/base_rules/modsecurity_crs_40_generic_attacks.conf
|
||||
|
||||
echo "Done."
|
||||
|
18
test/benchmark/download-owasp-v3-rules.sh
Executable file
18
test/benchmark/download-owasp-v3-rules.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
git clone https://github.com/SpiderLabs/owasp-modsecurity-crs.git owasp-v3
|
||||
cd owasp-v3
|
||||
git checkout v3.0.0-rc1
|
||||
cd -
|
||||
|
||||
echo 'Include "owasp-v3/modsecurity_crs_10_setup.conf.example"' >> basic_rules.conf
|
||||
echo 'Include "owasp-v3/rules/*.conf"' >> basic_rules.conf
|
||||
|
||||
|
||||
# removes WEBSERVER_ERROR_LOG
|
||||
cat owasp-v3/rules/REQUEST-20-PROTOCOL-ENFORCEMENT.conf | sed 's/SecRule WEBSERVER_ERROR_LOG/#SecRule WEBSERVER_ERROR_LOG/g' > owasp-v3/rules/REQUEST-20-PROTOCOL-ENFORCEMENT.conf.tmp
|
||||
mv owasp-v3/rules/REQUEST-20-PROTOCOL-ENFORCEMENT.conf.tmp owasp-v3/rules/REQUEST-20-PROTOCOL-ENFORCEMENT.conf
|
||||
|
||||
echo "Done."
|
||||
|
Loading…
x
Reference in New Issue
Block a user