| 网站首页 | 资讯 | Hack | 漏洞 | 网管 | 编程 | 培训 | 品黑页 | 软件 | 论坛 | 动画 | 视频 | 经典 | 教学站 | 黑客点睛 | 
免费服务 我要发布 在线破解 黑客游戏 精华收集 免费空间 网络硬盘 独家报道 黑器点播 免费 FTP 交换资源
收费服务 黑客培训 光盘刻录 黑客书籍 视频下载 主力频道 空间域名 网站建设 特色服务 解决方案 我要投诉
您现在的位置: 华夏黑客同盟 >> 漏洞 >> web apps >> 正文 用户登录 新用户注册
SunShop 远程SQL注入           ★★★ 【字体:
SunShop <= 4.1.4 (id) Remote SQL Injection Vulnerability
作者:milw0rm 文章来源:milw0rm 点击数: 更新时间:2008-8-21
##########################################################
# GulfTech Security Research              August 18, 2008
##########################################################
# Vendor : Turnkey Web Tools, Inc
# URL : http://www.turnkeywebtools.com
# Version : SunShop <= 4.1.4
# Risk : SQL Injection
##########################################################


Description:
SunShop shopping cart is a full featured ecommerce solution written
in php that allows for web masters to run their own online ecommerce
operation. Unfortunately there are a number of SQL Injection issues
in SunShop that allow for an attacker to have arbitrary access to the
SunShop database where they can access information such as customer
and administrator details. An updated version of SunShop has been
released to address these issues, and users should upgrade soon.



SQL Injection:
There are quite a few SQL Injection issues within SunShop that for an
attacker to have arbitrary access to the SunShop database. The first
example we will have a look at is in class.ajax.php @ lines 348-362

function edit_registry ($id="") {
    global $DB_site, $dbprefix, $settings, $lang, $sess;
    $data = $DB_site->query_first("SELECT * FROM `".$dbprefix."users_registry`
    WHERE id='".$_POST[id]."' AND userid='".$sess->gvar('userid')."'");
    $data = filter_data($data);
    $out  = 'document.getElementById(\'wishform\').style.display = \'none\';';
    $out .= 'document.getElementById(\'wisheditform\').style.display = \'block\';';
    $out .= 'form = document.forms[\'edit_registry\'];';
    $out .= 'form.elements[\'event[id]\'].value = \''.js_clean($data[id]).'\';';
    $out .= 'form.elements[\'event[name]\'].value = \''.js_clean($data[name]).'\';';
    $out .= 'form.elements[\'event[desc]\'].value = \''.js_clean($data[description]).'\';';
    $out .= 'form.elements[\'event[month]\'].selectedIndex = '.(date('m',
    strtotime($data['date']))-1).';';
    $out .= 'form.elements[\'event[day]\'].selectedIndex = '.(date('d',
    strtotime($data['date']))-1).';';
    $out .= 'form.elements[\'event[year]\'].selectedIndex = '.((date('Y',
    strtotime($data['date'])))-date('Y')).';';
    return $out;
}

As seen above the SQL Injection issue here is pretty straight forward
and is a result of a $_POST variable being used in the middle of the
query. An attacker could exploit this SQL Injection issue by making a
post request to "/index.php?l=edit_registry&p=1" with the following
post data.

id=-99' UNION SELECT 1,2,3,concat(username,char(58),password),5,6 FROM ss_users/*

Upon successful exploitation an attacker would be presented with the
targeted credentials. In addition to this SQL Injection are several more
SQL Injection issues within class.ajax.php and can be found at lines 77,
113, 138 (via the check_email() function), 349, 374, and 400. With the
exception of the issue @ line 138 these issues are very easily identified as they use GPC variables directly within SQL queries.



Solution:
The TurnKeyWebTools developers have addressed these issues in the latest
version of SunShop which can be found at the following url.

http://www.turnkeywebtools.com/esupport/index.php?_m=news&_a=viewnews&newsid=63


Credits:
James Bercegay of the GulfTech Security Research Team



Related Info:
The original advisory can be found at the following location
http://www.gulftech.org/?node=research&article_id=00125-08182008

# milw0rm.com
责任编辑:朱倩  联系方式  Email:朱倩
电话:51228163
  • 上一篇漏洞:

  • 下一篇漏洞:
  • 最新hack更新
    最新推荐资讯
    相关漏洞
    远程文件泄露漏洞
    id 远程SQL注入漏洞
    远程SQL注入漏洞
    远程任意文件上传漏洞
    多个远程SQL注入漏洞
    远程文件包含漏洞
    远程SQL注入漏洞
    SQL注入漏洞的利用
    ZEEJOBSITE SQL Injection Vulne
    ActiveX远程
    最新会员软件
    最新推荐视频
    最新推荐动画

    Copyright @ 2005 77169.Net Inc. All rights reserved. 华夏黑客同盟 版权所有
    北京市电信通提供网络带宽

    mailto:webmaster@77169.net
    咨询QQ号:836982 / 59280880
    联系站长 QQ38588913
    热线电话: 86-10-67634029/676229433
    京ICP证041431号