osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Re: Security Patch

This is a discussion on Re: Security Patch within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; Hi, I just recieved an email asking me to patch up the BTS files by replacing certain code, and i ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 03-21-2005, 05:36 PM
New Member
 
Join Date: Mar 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
loba
Default Re: Security Patch

Hi,

I just recieved an email asking me to patch up the BTS files by replacing certain code, and i realised that my code was a bit different from the one listed...

code found in my oscmax -->
e.g.
<?php if ($javascript) { require(DIR_WS_JAVASCRIPT . $javascript); } ?>

code that was supposed to be replaced -->
e.g.
<?php if ($_javascript) { require(DIR_WS__JAVASCRIPT . $_javascript); } ?>

Should i be replacing the code since i couldnt find any code the resembles that except for the one i showed? or should i remove the underscore?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 03-21-2005, 06:20 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,289
Thanks: 66
Thanked 310 Times in 295 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: Re: Security Patch

Hi,

Give it a try and replace them. It should not matter. If you run into problems, come back and let me know.
__________________
Michael Sasek
osCMax Developer


osCMax Templates - Hundreds of premium quality templates. New designs every month!

xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience


osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 03-21-2005, 06:56 PM
New Member
 
Join Date: Mar 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
loba
Default RE: Re: Security Patch

ok thanks mate!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 03-22-2005, 06:12 AM
Member
 
Join Date: Jan 2004
Location: Netherlands
Posts: 71
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
paulM
Default RE: Re: Security Patch

Hi msasek,

thanks for the security update!

I'm not sure how the exploit exactly works, but would you agree that this vulnerability would not have existed if register_globals would be off? (and the script would have been register_globals off compatible of course)

Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 03-22-2005, 09:58 AM
Member
 
Join Date: Dec 2004
Posts: 75
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
bdneuman
Default

msasek:

Can you give me an idea of how this code can be exploited?

I have and continue to modify my site w/ contrib's as well as my own tweaks (including added javascripts). I would just like to have an idea of what to look out for to avoid unknowingly opening up another security leak as I am editing the code.

Thanks in advance for the info.
__________________
Brian Neuman
Webmaster
www.honeybeadjewelry.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 03-22-2005, 10:34 AM
New Member
 
Join Date: Mar 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
dreamscape
Default Re: RE: Re: Security Patch

Quote:
Originally Posted by paulM
I'm not sure how the exploit exactly works, but would you agree that this vulnerability would not have existed if register_globals would be off? (and the script would have been register_globals off compatible of course)
Hi Paul. Your intuition is correct. This exploit and the vast majority of exploits for osCommerce and its contributions only work because they exploit the scripts reliance on register_globals.

I'm not sure why the OSC team did not make MS2 register_globals OFF compatible (or better yet require that it be off). It is actually not that difficult to do. Not to bash the team or anything, but over the years it has become pretty apparent that security is not among their top concerns.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 03-22-2005, 12:31 PM
Lurker
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
swdave
Default

I recommend you put an .htaccess file in the templates directory to deny direct access to any php files and then define in application_top any variables used by the template code.

//Protection application_top
$javascript = '';
$content = '';
$content_template = '';
$boxLink = '';
etc...

.httaccess in templates dir

<Files *.php>
Order Deny,Allow
Deny from all
</Files>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 03-22-2005, 12:40 PM
Member
 
Join Date: Dec 2004
Posts: 75
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
bdneuman
Default

Quote:
Originally Posted by swdave
I recommend you put an .htaccess file in the templates directory to deny direct access to any php files and then define in application_top any variables used by the template code.

//Protection application_top
$javascript = '';
$content = '';
$content_template = '';
$boxLink = '';
etc...

.httaccess in templates dir

<Files *.php>
Order Deny,Allow
Deny from all
</Files>
Michael?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 03-22-2005, 01:18 PM
Member
 
Join Date: Jan 2004
Location: Netherlands
Posts: 71
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
paulM
Default

Quote:
Originally Posted by bdneuman
Michael?
I'm not Michael, but I quite sure he will agree with swdave's ideas Actually it's very likely that the next BTS version will include exactly that security improvements.

Also it seems wise to add the .htaccess file (as above) to most other osC folders that don't need direct access too.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #10  
Old 03-22-2005, 01:23 PM
Member
 
Join Date: Dec 2004
Posts: 75
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
bdneuman
Default

Quote:
Originally Posted by paulM
Quote:
Originally Posted by bdneuman
Michael?
I'm not Michael, but I quite sure he will agree with swdave's ideas Actually it's very likely that the next BTS version will include exactly that security improvements.

Also it seems wise to add the .htaccess file (as above) to most other osC folders that don't need direct access too.
Forgive my noviceness, but you just put the variable in application_top to make the initial definition? Do you remove any of the variables from the various templates files then?
__________________
Brian Neuman
Webmaster
www.honeybeadjewelry.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
osCMax 2.0RC2 Security Patch/Update 051112 wilde-uk osCMax v2 Installation issues 5 04-12-2006 07:45 PM
Blank default page after did the security patch alphaque osCMax v2 Installation issues 6 03-27-2006 02:35 AM
Security Patch osCMax 2.0RC2 warrenthewindmill osCMax v1.7 Discussion 2 12-04-2005 10:50 AM
osCMax 2.0RC2 Security Patch/Update 051112 michael_s osCMax v2 Announcements 0 11-27-2005 10:12 AM
Security patch killed pop-up function bjrafferty osCMax v1.7 Discussion 2 03-24-2005 01:13 PM


All times are GMT -8. The time now is 08:03 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax