Hello,
I have used modsecurity rule list for cpanel and installed OWASP vendor through WHM. There are rules which we can turn OFF and ON. I have turned all rules ON. My question is how to turn ON brute force attack prevention mode because I do not see it in OWASP vendor rules for cpanel (https://documentation.cpanel.net/display/CKB/OWASP ModSecurity CRS)?
In one post I saw we can remove hash ('#') tag from /usr/local/apache/conf/modsec_vendor_configs/OWASP/modsecurity_crs_10_setup.conf and put login page name there.
I have tried it but it didn't work. Below is what I did.
replaced following
with
restarted apache
I have used modsecurity rule list for cpanel and installed OWASP vendor through WHM. There are rules which we can turn OFF and ON. I have turned all rules ON. My question is how to turn ON brute force attack prevention mode because I do not see it in OWASP vendor rules for cpanel (https://documentation.cpanel.net/display/CKB/OWASP ModSecurity CRS)?
In one post I saw we can remove hash ('#') tag from /usr/local/apache/conf/modsec_vendor_configs/OWASP/modsecurity_crs_10_setup.conf and put login page name there.
Code:
#
# -- [[ Brute Force Protection ]] ---------------------------------------------------------
#
# If you are using the Brute Force Protection rule set, then uncomment the following
# lines and set the following variables:
# - Protected URLs: resources to protect (e.g. login pages) - set to your login page
# - Burst Time Slice Interval: time interval window to monitor for bursts
# - Request Threshold: request # threshold to trigger a burst
# - Block Period: temporary block timeout
#
#SecAction "id:'900014', phase:request, nolog, pass, t:none, setvar:'tx.brute_force_protected_urls=#/login.jsp# #/partner_login.php#', setvar:'tx.brute_force_burst_time_slice=60', setvar:'tx.brute_force_counter_threshold=10', setvar:'tx.brute_force_block_timeout=300'"
- Go to https://github.com/SpiderLabs/owasp-modsecurity-crs/tree/master/experimental_rules and copy modsecurity_crs_11_brute_force.conf to /usr/local/apache/conf/modsec_vendor_configs/OWASP/rules/
- Load the file in /usr/local/apache/conf/modsec2.cpanel.conf
- open following file and edit
Code:
# vi /usr/local/apache/conf/modsec_vendor_configs/OWASP/modsecurity_crs_10_setup.conf
Code:
SecAction "id:'900014', phase:request, nolog, pass, t:none, setvar:'tx.brute_force_protected_urls=#/login.jsp# #/partner_login.php#'', setvar:'tx.brute_force_burst_time_slice=60', setvar:'tx.brute_force_counter_threshold=10', setvar:'tx.brute_force_block_timeout=300'"
Code:
SecAction "id:'900014', phase:request, nolog, pass, t:none, setvar:'tx.brute_force_protected_urls=#/wp-login.php# #/administrator/index.php#'', setvar:'tx.brute_force_burst_time_slice=60', setvar:'tx.brute_force_counter_threshold=5', setvar:'tx.brute_force_block_timeout=300'"