 | |  | |
February 2nd, 2012, 02:19 PM
|
#1 (permalink)
| | Member
Join Date: Feb 2002
Posts: 167
| Exploit in VB Gallery 2.5.1
For some reason I cannot post in the vbgallery support forums so here is the only place I could put it..
There is an exploit in photopost VBGallery 2.5.1 in the email to friend feature. A malicious user can use it to send spam because none of the fields are sanitized properly in misc.php: Code: Content visible to verified customers only.
The sendtoname and subject fields need to be sanitized beyond just HTML, carriage returns, etc..
A guest on our site pumped out massive amounts of spam with this. Fortunately for us, we log all email sent by the mail() function and log message headers and exact time. With that we were able to trace it back in the apache logs to the user using this feature.
We have disabled it on our sites, but it is still vulnerable in the current download.
|
| |
February 2nd, 2012, 02:33 PM
|
#2 (permalink)
| | Member
Join Date: Feb 2002
Posts: 167
|
Hmm, I don't really have time to trace everything back in the code, but I think even if you disable this in the CP, it is still there if a bot posts to it.. It LOOKS like the only thing the perm change does is not to display the form...
|
| |
February 2nd, 2012, 03:43 PM
|
#3 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
HMM well no idea why you say it is not sanitized looks fine to me as it is indeed ran through the vbulletin sanitizer function.
You can try changing TYPE_NOHTML to TYPE_STR but I really can not say whether it would make any difference as you really have not provided any direct examples as to the specific problem your having.
|
| |
February 2nd, 2012, 05:09 PM
|
#5 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
I hear what your saying I just do not see in vbulletin what option they use for that is what I am saying. Obviously we are using the common normal vb santitation routines in vb which is what vbgallery does.
I checked vbulletin sendmessage.php script and this is what they do Code: Content visible to verified customers only.
Therefore from what I see using TYPE_STR would be the same as vbulletin forum is using to sanitize email message or sender email.
|
| |
February 2nd, 2012, 05:18 PM
|
#6 (permalink)
| | Member
Join Date: Feb 2002
Posts: 167
|
Vbulletin doesn't allow the user to create the TO user.. Yours does..
**Edited, changed FROM to TO
|
| |
February 2nd, 2012, 05:26 PM
|
#7 (permalink)
| | Member
Join Date: Feb 2002
Posts: 167
|
Try to use sendtofriend vb feature and put something like this in the to line: joe@schmoe.com, bob@bill.com, etc@etc.com.. Doesn't work does it?
This is why: Code: Content visible to verified customers only.
|
| |
February 2nd, 2012, 05:40 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
Actually a little different as you would need to use vbGallery variables should look like this in misc.php Code: Content visible to verified customers only.
|
| |
February 2nd, 2012, 07:11 PM
|
#9 (permalink)
| | Member
Join Date: Feb 2002
Posts: 167
|
Not sure, all I see is "Content visible to verified customers only." I guess I am not verified anymore lol..
|
| |
February 2nd, 2012, 08:10 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
| |
| |
February 12th, 2012, 12:45 AM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Oct 2004 Location: Florida
Posts: 318
|
Please lend a hand to place the above code exactly into misc.php Code: Content visible to verified customers only.
|
| |
February 12th, 2012, 08:30 AM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
You are replacing that if clause with the one I have in bold in my example it is around line 245 of misc.php
|
| |
February 12th, 2012, 11:33 AM
|
#13 (permalink)
| | Member Verified Customer
Join Date: Oct 2004 Location: Florida
Posts: 318
|
The script still sent out the email.
I have now commented out...
Do Send to Friend
and
Email Friend
I will wait for the next upgrade.
=============
NOT logged in Code: Content visible to verified customers only.
where i=16 is any valid image number
|
| |
February 12th, 2012, 12:12 PM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
imageid is simply the image id
The email to friend link is going to appear to any group you have given permission to use the feature. As long as they enter a valid email and enter a valid message sure any message would be sent out.
|
| |
February 12th, 2012, 12:46 PM
|
#15 (permalink)
| | Member Verified Customer
Join Date: Oct 2004 Location: Florida
Posts: 318
|
I'm referring to users not logged in. This is the way the exploit was used.
Nothing to do with permissions.
|
| |
February 12th, 2012, 01:06 PM
|
#16 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
If you are allowing a usergroup to use the send to friend link they would indeed be allowed to send an email is what I am saying.
I would bet on your setup the send to friend link appears for all right?
|
| |
February 12th, 2012, 01:16 PM
|
#17 (permalink)
| | Member Verified Customer
Join Date: Oct 2004 Location: Florida
Posts: 318
|
No, the drop down link was not there.
This spam outfit obviously knew about the exploit. They were NOT logged in, nor had they ever registered.
They simply used the same URL each time: Code: Content visible to verified customers only.
Which worked for them to send hundreds of spam emails while NOT logged in until I commented out code in misc.php. Now they'll get a white screen.
The other thing about this exploit was that HUNDREDS of email addresses could be placed in the To: line.
inetnum: 124.107.69.88 - 124.107.69.88
netname: SLITES
country: PH
descr: 322367987_Edago Dexter Cyberzone Co.
Last edited by oldengine; February 12th, 2012 at 01:21 PM.
|
| |
February 12th, 2012, 01:23 PM
|
#18 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
I will pass it along but the way it is designed from what I see is the actual permissions are applied before the link appears so maybe applying those same permissions to that part will stop things. I would have to see
|
| |
February 15th, 2012, 08:01 AM
|
#19 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
You can try this as what this should do only send an email if you give the usergroup permission to use the feature.
Other than that there is no way to stop from using a feature you permit users to use.
You can compare the function here to the one in your misc.php file to see what I did. Code: Content visible to verified customers only.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 10:27 AM. | |