Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > vbBux / vbPlaza
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools
Security hole in attachment downloads for points. Details »»
Security hole in attachment downloads for points.
Version: , by Bernd Bernd is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-20-2006 Last Update: Never Installs: 0
 
No support by the author.

Personally I tend to copy and paste links from the attachment manager into the text editor to link attachment downloads and i've come across the following issue.

Links in the attachment manager after upload are structured like the example below.

Code:
http://yoursite/forum/attachment.php?attachmentid=137&stc=1&d=1137783349
An equivalent link without stc=1 will substract the points or show the purchase attachment template.

If you use the links with STC=1, they will be available for free...anybody who knows this can download anything for free, no matter the amount of points needed.

I believe the issue can be easily fixed, but I'm not a php expert.
If i'm not mistaken the file to be fixed is plugins/vbplaza_attachment_start.php.

I have a shop built around vbplaza and would love to have this fixed since we are about to launch in a few days.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-31-2006, 06:52 PM
Bernd Bernd is offline
 
Join Date: Apr 2005
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am a complete php noob, so no
So just replace post with get in vbplaza_attachment_start.php, and the issue could possibly be solved?
Reply With Quote
  #13  
Old 05-31-2006, 07:07 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just be careful but yes, the difference between a GET and POST is that teh GET sends the variable name in the url while with a POST the variable and the value is hidden.

Now, I can't promise this will work as there are a great many things about vBulletin that I need to learn but that is certainly the basic PHP code difference between a GET and POST!
Reply With Quote
  #14  
Old 05-31-2006, 07:28 PM
Bernd Bernd is offline
 
Join Date: Apr 2005
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, thanks for explaining. I'll try that one and post the results.

Code:
				// check if the user has already OK'd the points removal
				if ($vbulletin->options['vbbux_attachconfirmpage'] && ($_GET['download'] != '1'))
is the only place in vbplaza_attachment_start.php where "POST" is located. Doesn't seem like that's causing the issue though. To be certain i have replaced it with "GET", but a link with STC=1 will still download without showing the vbplaza download attachment template or substracting the points.

Could there be a plugin hooked into attachment somewhere that contains POST? Still seems to be there's something wrong in the above mentioned php.
Reply With Quote
  #15  
Old 06-01-2006, 09:04 AM
Replicators's Avatar
Replicators Replicators is offline
 
Join Date: Jul 2005
Location: Jamestown, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope this exploit gets fixed, cause my site relies heavily on the attachment download system.
Reply With Quote
  #16  
Old 06-01-2006, 11:12 AM
fly fly is offline
 
Join Date: Oct 2003
Posts: 1,215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is odd. Where has CMX been?
Reply With Quote
  #17  
Old 06-01-2006, 12:39 PM
Bernd Bernd is offline
 
Join Date: Apr 2005
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't know, haven't seen him answer any questions for about 1.5 weeks.
I've sent him a private message. Personally willing to hire a coder to fix the issue, so If I don't get a reply from cmx within two weeks I'll post the fix here once a coder has accepted the job.
Reply With Quote
  #18  
Old 06-01-2006, 12:53 PM
fly fly is offline
 
Join Date: Oct 2003
Posts: 1,215
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe we should all read the 17 stickys in this forum... *hint*hint* LOL
Reply With Quote
  #19  
Old 06-01-2006, 12:55 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bernd
Ok, thanks for explaining. I'll try that one and post the results.

Code:
				// check if the user has already OK'd the points removal
				if ($vbulletin->options['vbbux_attachconfirmpage'] && ($_GET['download'] != '1'))
is the only place in vbplaza_attachment_start.php where "POST" is located. Doesn't seem like that's causing the issue though. To be certain i have replaced it with "GET", but a link with STC=1 will still download without showing the vbplaza download attachment template or substracting the points.

Could there be a plugin hooked into attachment somewhere that contains POST? Still seems to be there's something wrong in the above mentioned php.
I am in the middle of a major progaming effort myself so I can't take the time to debug this but I am confident that the line of code posted above is NOT the code that is the problem ...

I believe you will find the problem somewhere in the pluggin system or one of the hooks and that the code you will be looking for is more like:

<form action=somescript.php method=get ..........>

That code could be just about anywhere however. As I said, I would look in the plugin and hooks, then I would look at the php files for the script...

The developer should be able to advise in seconds where the code is that does this update however...

Good luck and if I find the time I can try to work on it but right now I have a huge project of my own that is taking all my free time and this "Security Gap" does not affect me and my sites at this time...
Reply With Quote
  #20  
Old 06-01-2006, 01:03 PM
Bernd Bernd is offline
 
Join Date: Apr 2005
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by flypaper
Maybe we should all read the 17 stickys in this forum... *hint*hint* LOL
Whoops

"I'm currently involved in a business matter that is 'away from home'."
Says he'll be back around the second to answer posts. Our site is probably going live in about three weeks, so not in that much of a hurry.

@ Quarterbore

Thanks for the extra info..i'll see if i can find some attachment hooks that are relevant in this case.
Reply With Quote
  #21  
Old 06-04-2006, 02:21 PM
Gio~Logist's Avatar
Gio~Logist Gio~Logist is offline
 
Join Date: Jun 2004
Location: San Francisco
Posts: 2,575
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
		if ($vbulletin->options['vbbux_pointsforattachments'] && ($_GET['stc'] != 1))
Naturally, this can be removed my reply removing the && ($_GET['stc'] != 1). However, there has to be a reason as to why that's there. Are you sure that this "exploit" is the same for even regular members? Has anyone tried setting up a test account on their site to see?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:07 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04299 seconds
  • Memory Usage 2,300KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete