Need rule to block requests with ARGS_NAMES that begin with specific character
Brought to you by:
victorhora,
zimmerletw
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