recently i noticed that the default rule from cpanel's modsecurity rules is blocking firefox and probably other browser which is using Indonesian language. here is the rule that give false alarm:
the rule blocks because the regex "telnet|uname|echo|id" match with firefox browser's user agent header:Code:SecRule ARGS|ARGS_NAMES|REQUEST_HEADERS "(?:\b(?:(?:n(?:et(?:\b\W+?\blocalgroup|\.exe)|(?:map|c)\.exe)|t(?:racer(?:oute|t)|elnet\.exe|clsh8?|ftp)|(?:w(?:guest|sh)|rcmd|ftp)\.exe|echo\b\W*?\by+)\b|c(?:md(?:(?:32)?\.exe\b|\b\W*?\/c)|d(?:\b\W*?[\\\/]|\W*?\.\.)|hmod.{0,40}?\+.{0,3}x))|[\;\|\`]\W*?\b(?:(?:c(?:h(?:grp|mod|own|sh)|md|pp|c)|p(?:asswd|ython|erl|ing|s)|n(?:asm|map|c)|f(?:inger|tp)|(?:kil|mai)l|(?:xte)?rm|ls(?:of)?|telnet|uname|echo|id)\b|g(?:\+\+|cc\b))|\/(?:c(?:h(?:grp|mod|own|sh)|pp|c)|p(?:asswd|ython|erl|ing|s)|n(?:asm|map|c)|f(?:inger|tp)|(?:kil|mai)l|g(?:\+\+|cc)|(?:xte)?rm|ls(?:of)?|telnet|uname|echo|id )(?:[\'\"\|\;\`\-\s]|$))" \ "capture,ctl:auditLogParts=+E,deny,log,auditlog,msg:'System Command Injection. Matched signature <%{TX.0}>',id:'950006',severity:'2'"
i wanted to create modsecurity rule to allow browser with Indonesian language but got confused with modsecurity rule, can someone help me modifying the rule to accept the browser which have Indonesian language?Code:Mozilla/5.0 (Windows; U; Windows NT 5.1; id; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5 Mozilla/5.0 (Windows; U; Windows NT 5.1; id; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 Mozilla/5.0 (Windows; U; Windows NT 5.1; id; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
thank you



LinkBack URL
About LinkBacks
Reply With Quote








