SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Commerce)  >   CactuShop Vendors:   Cactusoft Ltd.
CactuShop Input Validation Holes in 'mailorder.asp' and 'payonline.asp' Let Remote Users Inject SQL Commands and Execute Operating System Commands
SecurityTracker Alert ID:  1009601
SecurityTracker URL:  http://securitytracker.com/id/1009601
CVE Reference:   GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  Mar 31 2004
Impact:   Disclosure of authentication information, Disclosure of user information, Execution of arbitrary code via network, Modification of user information, User access via network
Vendor Confirmed:  Yes  Exploit Included:  Yes  
Version(s): 5.1
Description:   Some vulnerabilities were reported in CactuShop. A remote user can inject SQL commands and execute arbitrary operating system commands. A remote user can also conduct cross-site scripting attacks.

S-Quadra reported that the 'mailorder.asp' and 'payonline.asp' scripts do not properly validate user-supplied input in the 'strItems' parameter. A remote user can reportedly supply a specially crafted URL to execute SQL commands on the underlying database. This can be used to invoke the xp_cmdshell() function to execute operating system commands, the advisory noted.

A demonstration exploit value for 'payonline.asp' that will execute the 'dir c:' command is provided:

strAgain=yes&CD_EmailAddress=dummy@someemailservice.com&CD_Password=&
CD_AffiliateID=&CD_CardholderCountry=200&CD_ShippingCountry=200&
CD_ShippingPostcode=&strPaymentSystem=email&CP_CouponCode=&numLanguageID=1&
numCurrencyID=1&numItemCount=2&strItems=214;+exec+master..xp_cmdshell+'dir+c:'--z165z&
strQuantities=6z2z&numShipMethod=1&btnProceed=Proceed

It is also reported that the 'largeimage.asp'script does not filter HTML scripting code from user-supplied input. A remote user can 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 CactuShop 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. A demonstration exploit URL is provided:

http://[target]/popuplargeimage.asp?strImageTag=<script>alert(document.cookie)</script>

The original advisory is available at:

http://www.s-quadra.com/advisories/Adv-20040331.txt

The vendor was reportedly notified on March 11, 2004. After the initial fix failed to fully correct the problem, the vendor was reportedly notified on March 16 and 26, 2004, without response.

Impact:   A remote user can execute SQL commands on the underlying database, including operating system commands.

A remote user can access the target user's cookies (including authentication cookies), if any, associated with the site running the CactuShop 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.

On March 15, 2004 the vendor reportedly issued a fix but S-Quadra indicates that the fix did not fully correct the vulnerabilities.

Vendor URL:  www.cactushop.com/main/default.asp (Links to External Site)
Cause:   Input validation error
Underlying OS:  Windows (NT), Windows (2000), Windows (2003)

Message History:   None.


 Source Message Contents

Subject:  http://www.s-quadra.com/advisories/Adv-20040331.txt


http://www.s-quadra.com/advisories/Adv-20040331.txt

       S-Quadra Advisory #2004-03-31

Topic: CactuSoft CactuShop v5.x shopping cart software multiple security
vulnerabilities
Severity: High
Vendor URL: http://www.cactushop.com
Advisory URL: http://www.s-quadra.com/advisories/Adv-20040331.txt
Release date: 31 Mar 2004

1. DESCRIPTION

CactuShop is an ASP application for running an e-commerce web site. It
incorporates a databased catalogue system, front end pages for product
navigation, back end pages for updating product details and robust
basket code for memorizing product selections as a visitor moves around
the web site. ASP software is designed to run on a Microsoft NT or Win
2000 server and to use MS Access, MS SQL Server or MySQL as a backend.
Please visit http://www.cactushop.com for information about CactuShop
shopping cart.

2. DETAILS

-- Vulnerability 1: SQL Injection vulnerability

An SQL Injection vulnerability has been found in following scripts :
'mailorder.asp' and 'payonline.asp'. User supplied input parameter is
'strItems' not filtered before being used in an SQL query. Thus the
query modification through malformed input is possible.

Successful exploitation of this vulnerability can enable an attacker
to execute commands in the system (via MS SQL xp_cmdshell function).

-- Vulnerability 2: Cross Site Scripting vulnerability found in
'largeimage.asp'script

By injecting specially crafted javascript code in url and tricking a
user to visit it a remote attacker can steal user session id and gain
access to user's personal data.

--PoC code

--Vulnerability 1:

Platform: MS SQL Server as a backend

Posting this data to 'payonline.asp' executes 'dir c:' command

strAgain=yes&CD_EmailAddress=dummy@someemailservice.com&CD_Password=&
CD_AffiliateID=&CD_CardholderCountry=200&CD_ShippingCountry=200&
CD_ShippingPostcode=&strPaymentSystem=email&CP_CouponCode=&numLanguageID=1&
numCurrencyID=1&numItemCount=2&strItems=214;+exec+master..xp_cmdshell+'dir+c:'--z165z&
strQuantities=6z2z&numShipMethod=1&btnProceed=Proceed

-- Vulnerability 2:

http://[target]/popuplargeimage.asp?strImageTag=<script>alert(document.cookie)</script>

3. FIX INFORMATION

11 Mar 2004: S-Quadra alerted CactuSoft (CactuShop developers) on these
issues.
15 Mar 2004: CactuSoft response:

"1) SQL Injection

On payonline.asp and all mailorder pages the strItems field is now
parsed for single-quote (') characters before being used with database
queries. Single quotes are escaped (replaced with 2 single-quotes) to
ensure SQL Injection won't work.

2) Javascript Injection

The strImageTag field is parse for HTML tags characters (< and >) and
are removed from the string. This should ensure against <script> and any
other HTML tags.

This can be tested on the demo of the new CactuShop v5.1
(http://www.cactushop.com/cs51/)."

16 Mar 2004: S-Quadra tested patched version of CactuShop.
Vulnerabilities not fixed. New PoC Code:

  For SQL Injection

strItems=214;declare%20@a%20sysname%20set%20@a%20=%20char(100)%2bchar(105)%2bchar(114)%2bchar(32)%2bchar(99)%2bchar(58)%20exec%20master..xp_cmdshell%20@a;--z165z

  For XSS:

http://[target]/popuplargeimage.asp?strImageTag=<img+src="uploads/images_products_large/113.gif"%20onLoad="alert(document.cookie)">

16 Mar 2004: S-Quadra alerted CactuSoft about new PoC Code.
26 Mar 2004: S-Quadra alerted CactuSoft about new PoC Code.

 From 03.16.2004 Cactusoft dropped their communication with us so no
further response has been received therefore no new Fix information is
available.

4. CREDITS

Nick Gudov, chief security researcher at S-Quadra <cipher@s-quadra.com>
has detected above mentioned vulnerabilities.

5. ABOUT

S-Quadra dedicates its substantial knowledge and resources to managing
clients' IT security risks. S-Quadra audits and protection for software
and networks implement pioneering methods and ground-breaking
technologies.

        S-Quadra Advisory #2004-03-31


 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2020, SecurityGlobal.net LLC