PDA

View Full Version : Possible security issue with a mod, hack attempt?


viper357
04-19-2012, 06:42 AM
Hi everyone

I got some strange database errors this morning which seemed to emanate from the vbimagehosting mod. I'm not sure if it is anything to be concerned about as I've got no idea what it all means, but maybe someone has found a security flaw in the mod? These are a few of the errors I was receiving, take note of the end of the url's.

http://*****.com/vbimghost.php?do=userlist&pp=20&page=/etc/passwdhttp://*****.com/vbimghost.php?do=userlist&pp=20&page=/../../../../../../../../../../etc/passwdhttp://*****.com/vbimghost.php?do=userlist&pp=20&page=/etc/passwd%00
http://*****.com/vbimghost.php?do=userlist&pp=20&page=/proc/self/environ%00
Should I be worried? To me it looks like someone is trying to access passwords or something?

Thanks.

kh99
04-19-2012, 12:12 PM
Yes, it looks like someone was trying to use a security hole to read files from your system. But trying doesn't mean they were successful (or that the "hole" they were trying actually exists in your forum). You said you saw database errors? What did they look like? (BTW, I tried it once myself so that latest error was just me).

The latest code for that mod looks like it treats the 'page' parameter correctly, but maybe older versions (of the mod or of vb) had a problem.

viper357
04-19-2012, 02:33 PM
Hi, thanks for the reply, this is one of the database errors, I got about 10, some with different URL's that they were obviously trying.
Database error in vBulletin 3.8.5:

Invalid SQL:
select user.username, img.userid,count(*) imgcnt FROM vbimghost as img LEFT JOIN user as user ON img.userid = user.userid where imgprivate =0 group by user.username LIMIT -20,20;

MySQL Error : 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 '-20,20' at line 1
Error Number : 1064
Request Date : Thursday, April 19th 2012 @ 08:16:39 AM
Error Date : Thursday, April 19th 2012 @ 08:16:39 AM
Script : http://www.marineaquariumsa.com/vbimghost.php?do=userlist&pp=20&page=/../../../../../../../../../../etc/passwd
Referrer :
IP Address : removed
Username : Unregistered
Classname : vB_Database
MySQL Version :

ForceHSS
04-19-2012, 03:41 PM
ban the ips trying to hack and update to 3.8.7 Patch Level 2

kh99
04-19-2012, 04:56 PM
There's a slight issue in that mod, in that if you pass a string as the 'page' parameter it becomes page 0 and generates a starting LIMIT in the query of -20 which is invalid (first page is 1 so 0 is invalid). But that doesn't create a security issue, and even if it did allow you to modify the sql, putting a file name there wouldn't read the file. So I don't think you have anything to worry about.

BTW, the ip address in the above error is mine, so please everybody don't start banning me. :)

viper357
04-19-2012, 04:56 PM
ban the ips trying to hackYip, I've done that in the admin panel, thanks.and update to 3.8.7 Patch Level 2Yeah I need to do that one day, it's just I've got so many manually edited templates, lol.

--------------- Added 1334858362 at 1334858362 ---------------

There's a slight issue in that mod, in that if you pass a string as the 'page' parameter it becomes page 0 and generates a starting LIMIT in the query of -20 which is invalid (first page is 1 so 0 is invalid). But that doesn't create a security issue, and even if it did allow you to modify the sql, putting a file name there wouldn't read the file. So I don't think you have anything to worry about.

BTW, the ip address in the above error is mine, so please everybody don't start banning me. :)Ok, thanks for the help. Sorry about the IP address :p, I've removed it from my post.