Skip to main content

how to use OWASP ModSecurity Core Rule Set

Comments

4 comments

  • cPanelMichael
    Hello :) I don't believe the rules provided by OWASP are intended to be copy/pasted into a Mod_Security configuration without first fine tuning them. I will leave this thread open for input from other users who may have implemented the OWASP rules. Thank you.
    0
  • quizknows
    Using the OWASP rules is somewhat advanced and you should read the included documentation very carefully. The rules are split into several files. Usually what you do is have a directory for the rules files you want to use. Some rules (protocol anomolies especially) are more prone to false positives than others. Normally if you deploy the entire core rule set you should be prepared to troubleshoot false positives for a while until you get it tuned for your own use. You need a basic modsec2.user.conf to call your own setup config as well as the rules you want to use. My modsec2.user.conf when I used to use the owasp rules looked like this: SecUploadDir /tmp SecTmpDir /tmp SecDataDir /tmp SecRequestBodyAccess On Include "/usr/local/apache/conf/OWASP/10_setup.conf" Include "/usr/local/apache/conf/OWASP/activated_rules/*.conf Include "/usr/local/apache/conf/OWASP/custom.conf" Include "/usr/local/apache/conf/OWASP/exclude.conf"
    Inside the /usr/local/apache/conf/OWASP/activated_rules/ directory were symlinks to the actual OWASP rules files I wanted to use. Custom.conf was for my own rules, and exclude.conf was used for whitelisting problematic rules.
    0
  • dilstar
    [quote="quizknows, post: 1512342">Using the OWASP rules is somewhat advanced and you should read the included documentation very carefully. The rules are split into several files. Usually what you do is have a directory for the rules files you want to use. Some rules (protocol anomolies especially) are more prone to false positives than others. Normally if you deploy the entire core rule set you should be prepared to troubleshoot false positives for a while until you get it tuned for your own use. You need a basic modsec2.user.conf to call your own setup config as well as the rules you want to use. My modsec2.user.conf when I used to use the owasp rules looked like this: SecUploadDir /tmp SecTmpDir /tmp SecDataDir /tmp SecRequestBodyAccess On Include "/usr/local/apache/conf/OWASP/10_setup.conf" Include "/usr/local/apache/conf/OWASP/activated_rules/*.conf Include "/usr/local/apache/conf/OWASP/custom.conf" Include "/usr/local/apache/conf/OWASP/exclude.conf"
    Inside the /usr/local/apache/conf/OWASP/activated_rules/ directory were symlinks to the actual OWASP rules files I wanted to use. Custom.conf was for my own rules, and exclude.conf was used for whitelisting problematic rules.
    i dont know much about it, but i like mod_Security i have to secure wordpress comrpomise and joomla compromise, i dont know what to do, which rules can do that, it will be really easy if i will use copy paste rules
    0
  • quizknows
    The atomicorp rules were great for protecting most common CMSes, but the free delayed rules are no longer available. You might consider atomicorp's paid rule set.
    0

Please sign in to leave a comment.