0

I'm trying to modify owasp crs 3.0 rule number 920440:

[id "920440"] [rev "2"] [msg "URL file extension is restricted by policy"] [data ".com"] [severity "CRITICAL"] [ver "OWASP_CRS/3.0.0"] [maturity "9"] [accuracy "9"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-protocol"] [tag "OWASP_CRS/POLICY/EXT_RESTRICTED"] [tag "WASCTC/WASC-15"] [tag "OWASP_TOP_10/A7"] [tag "PCI/6.5.10"] Warning. String match within ".asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx/" at TX:extension.

I'm trying to disable the check for .com:

SecRuleUpdateTargetById 920440 !REQUEST_BASENAME:.com

Tried multiple variations of it:

SecRuleUpdateTargetById 920440 !REQUEST_BASENAME:'.com/' SecRuleUpdateTargetById 920440 !REQUEST_BASENAME:.com/ SecRuleUpdateTargetById 920440 !REQUEST_BASENAME:'.com' SecRuleUpdateTargetById 920440 !REQUEST_BASENAME:.com

No joy, any idea why?

1 Answers1

1

Just remove .com from the config in your crs-setup.conf file.

This is the one file you are supposed to edit rather than override.

Barry Pollard
  • 4,461
  • 14
  • 26