Monday, March 9, 2009

Another Odd SQL Injection Attack

In my last post, I talked about a large SQL injection attacked launched against a site I help run. Well, last night it happened again.

On 3/8/09 from 10:56 GMT to 11:40 GMT, the website I help run received over 3100 SQL injection attacks from close to 2 dozen IP addresses. The query received this time was:


The User-Agent this time was Mozilla/5.0.

There are a couple interesting things to note on this attack. First is the use of the double-dashes at the end of the SQL injection. Double-dashes are used in MySQL and SQL Server queries to comment out and ignore the rest of the line.

Next, if we assume that the hex values decode into the attack then the database being attacked must decode them somehow. Since the SQL does not use a CAST operator, which SQL Server requires to convert hex into characters, and only has the hex values, then we can infer the database being attacked is MySQL. (Note that I'm basing some of this on my knowledge and previous use of SQL injection attacks from my job - I could very well be wrong on this.)

The hex encoded values are interesting. If we decode them from hex into ASCII characters, we get the following query:


I'll admit that this has me stumped. Due to the pattern, the hex appears to be decoded correctly. However, I cannot make heads or tails of what is being attempted here. Interestingly, googling for "::xeQ-1-ted::" brings up a number of entries which look like an attack similiar to this one may have succeeded on other sites.

So, anyone have any ideas for this one?


Jorge Oliveira said...

With that sql, an atacker can easily identify which query has been successfully executed (after executing many incrementing the number of parameters), by simply look at the result page and searching for those strange names. They are indeed strange because they need to be easily noticed on that result page.

Security Shoggoth said...

Wow...great point! In the Google searches I found that is exactly what it looks like.

Scott White said...

Lately there has been some discussion at SecureState around these approach was using game theory, and less technical analysis...with that being said, I'm fairly confident that we can point this to bot nets, and here is why:

Assume "::xeQ-1-ted::" to be a variation of a handle or screen name...

With that, do some google searches:


and reveal lots of info like:


As far as the attacks being successful or not is a different story, but I think the source may be a little more understood.


Security Shoggoth said...


I'm also convinced its from a botnet, if nothing else from the sheer number of hits I got. I didn't post it but we got hit with another. I attempted to block the hosts via IPTables, but as soon as I'd block 10, 10 more would hit us. Definitely a botnet.

It was definitely not successful on our site, but as you can see from various Google searches it did work on others.

Json said...

I found your post while attempting to decipher my own attacks and was wondering if you could help me by pointing me towards a converter that can help me decipher the input, for example: 0x27,0x7c,0x5f,0x7c ?

Any help would be appreciated.


Scott White said...

It is just hex represenation of ascii characters...

See for several conversion options...