1 Oct 16:07
Re: SeRule ARGS:
Ryan Barnett <Ryan.Barnett <at> Breach.com>
2007-10-01 14:07:45 GMT
2007-10-01 14:07:45 GMT
> -----Original Message----- > From: mod-security-users-bounces <at> lists.sourceforge.net [mailto:mod- > security-users-bounces <at> lists.sourceforge.net] On Behalf Of Achim Hoffmann > Sent: Monday, October 01, 2007 9:19 AM > To: mod-security-users <at> lists.sourceforge.net > Subject: [mod-security-users] SeRule ARGS: > > how do we destinguish GET from POST variables in > SecRule ARGS:dirty getme > SecRule ATGS:dirty postme > > (assuming that dirty is in the QUERY_STRING *and* the HTTP body) > [Ryan Barnett] Yeah, this is a bit quirky to try and enforce these ARGS to be only in either a QUERY_STRING or POST_PAYLOAD. You essentially have to check both locations. This is how REMO rules accomplish this issue. If you want to enforce only allowing the "dirty" argument to be allowed in the POST payload, then you can use a rule similar to this - <Location /cgi-bin/foo.php> SecRule QUERY_STRING "^dirty[=&]|^dirty$" "phase:2,t:none,deny,id:1,status:501,severity:3,msg:'Postparameter dirty is present in query string. This is illegal.'" SecRule ARGS:dirty "^postme$" "phase:2,t:none,deny,id:1,status:501,severity:3,msg:'Postparameter dirty matched.'" </Location> Conversely, if you want to only allow the "dirty" argument to be allowed(Continue reading)
RSS Feed