I was reading an article on "Protocol-Level Evasion of Web Application Firewalls" and the article insist on writing application specific rules in this manner:
<Location /index.php>
SecDefaultAction phase:2,t:none,log,deny
# Validate parameter names
SecRule ARGS_NAMES "!^(articleid)$" \
"msg:'Unknown parameter: %{MATCHED_VAR_NAME}'"
# Expecting articleid only once
SecRule &ARGS:articleid "!@eq 1" \
"msg:'Parameter articleid seen more than once'"
# Validate parameter articleid
SecRule ARGS:articleid "!^[0-9]{1,10}$" \
"msg:'Invalid parameter articleid'"
</Location>
The idea is to enumerate all the parameters against the web resource and filter them as shown in the rules above. My question is what other sort of application specific tuning is further required for WAF rules.

