> You was right I saw this in my alerts.log. Actually I know
> what is the problem happens when I query for huge data for simple few
> hundred data its fine. So why this behaviour trigger this event?
>
> ** Alert 1386438523.563: - web,accesslog,attack,
> 2013 Dec 08 01:48:43 localhost->/var/log/httpd/access_log
> Rule: 31106 (level 6) -> 'A web attack returned code 200 (success).'
> Src IP: 10.212.134.200
> 10.212.134.200 - - [08/Dec/2013:01:48:42 +0800] "GET
> /*****/get.php?db1=****&****=****&sql_query=SELE******&show_query=1&token=*****
> HTTP/1.1" 200 78927
> "http://******/*****/*****.php?****=********=*****&token=**********"
> "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/31.0.1650.63 Safari/537.36"
>
I'm going to assume the "*"s in the above log message are bad attempts
at obfuscating the log message. Hopefully they aren't important in
tracking this down.
So I explained how to figure things out in my last message, but you
don't pay much attention. So I'll break it down for anyone who does
care.
Rule 31103 has the following match parameters:
<url>=select%20|select+|insert%20|%20from%20|%20where%20|union%20|</url>
<url>union+|where+|null,null|xp_cmdshell</url>
Each item (separated by the "|") is a different possible match. It's
hard to tell for sure (again, the obfuscation is horrendous), but I
think "sql_query=SELE******" from the log message may be a "SELECT[
+]" This matches the <url> above (the first option being "select " and
the second being "select+"). Without any other evidence I'll say
that's a match. At a quick glance, 3110[45] don't look like they'll
match this log message.
So to keep this from happening in the future, I'd probably write a
custom rule that looks for:
if_sid 31103
srcip IP_BEING_BANNED
url get.php