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:
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?
thank you
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)?|[B]telnet|uname|echo|id[/B])\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)?|[B]telnet|uname|echo|id[/B] )(?:[\'\"\|\;\`\-\s]|$))" \
"capture,ctl:auditLogParts=+E,deny,log,auditlog,msg:'System Command Injection. Matched signature <%{TX.0}>',id:'950006',severity:'2'"
Code:
Mozilla/5.0 (Windows; U; Windows NT 5.1; [B]id;[/B] rv:1.9b5) Gecko/2008032620 Firefox/3.0b5
Mozilla/5.0 (Windows; U; Windows NT 5.1; [B]id;[/B] rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Mozilla/5.0 (Windows; U; Windows NT 5.1; [B]id;[/B] rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
thank you
Last edited: