Skip to main content

Several ModSecurity rules, what do You think about these?

Comments

3 comments

  • cPanelMichael
    Hello :) You may also want to seek user-feedback from the Mod_Security users mailing list on these custom rules: mod-security-users Info Page Thank you.
    0
  • quizknows
    Directory traversal (do NOT worked for me, almost any URL request got banned) SecRule REQUEST_URI "@streq ../" \ "t:urlDecode,deny"

    I will look at others later if I have time but this one is broken because a single dot serves as a wildcard for any single character unless escaped by a backslash. You want this:
    SecRule REQUEST_URI "@streq \.\./" \ "t:urlDecode,deny"
    0
  • quizknows
    Rules that use ../../ can be very easily evaded by padding in extra slashes. you should use /../ so that things like ..//..// will also match. For example: SecRule QUERY_STRING "/\.\./" "t:urlDecode,deny" You can also use a transformation like "normalisePath" to strip extra slashes from requests before processing.
    0

Please sign in to leave a comment.