SecRuleARGS_GET_NAMES"^(#.*)$""id:193,log,deny,msg:'Block ARGS Name with hash GET'"SecRuleARGS_POST_NAMES"^(#.*)$""id:192,log,deny,msg:'Block ARGS Name with hash POST',logdata:'%{tx.httpbl_msg}',setvar:tx.httpbl_msg=$"SecRuleREQUEST_COOKIES_NAMES"^(#.*)$""id:194,log,deny,msg:'Block ARGS Name with hash COOKIE'"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Working on a rule to block traffic based on the starting character of ARGS_NAMES either cookie, get or post
Example allow
name=Joe
Example block
Test rule that is not working
SecRule ARGS_NAMES "^(#.*)$" "phase:1,id:199,log,deny,msg:'Block Argname with hash'"
Last edit: Joseph Jozwik 2018-03-29
I see what you're going for. Check out the regex the OWASP Core Rule Set
twitter (https://twitter.com/CoreRuleSet) just suggested:
SecRule ARGS_NAMES|REQUEST_COOKIES_NAMES "@rx ^#|[(?:\'|\")?#.*]"
"id:123,phase:2,deny,status:403,t:urldecodeuni,msg:'SA-CORE-2018-002'"
On Thu, Mar 29, 2018 at 10:10 AM, Joseph Jozwik jjozwik@users.sourceforge.net wrote:
--
Chaim Sanders
http://www.ChaimSanders.com
Yes that is it :-)
Last edit: Joseph Jozwik 2018-03-29
These rules seems to work