dedecms

关注公众号 jb51net

关闭
首页 > 网站技巧 > 整站程序 > dedecms > dedecms v5.1注入

dedecms v5.1 WriteBookText() code injection vul注入漏洞

作者:

来源:Ph4nt0m Google Group by Flyh4t@126.com QQ:378367942

\include\inc_bookfunctions.php 
--------------------------------------------------- 
…… 
复制代码 代码如下:

function WriteBookText($cid,$body)  
{<span id="more-1944"></span>  
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 = "&lt;"."?php\r\n".$body."\r\n?"."&gt;";  
@$fp = fopen($bookfile,'w');  
@flock($fp);  
@fwrite($fp,$body);  
@fclose($fp);  
<div id="qhide_185676" class="qt" style="display: block;">}  

</div>  
…… 

—————————————————

\member\story_add_content_action.php
—————————————————

…… 
复制代码 代码如下:

WriteBookText($arcID,addslashes($body));  
…… 

—————————————————

找了个好看的站测试了一下

阅读全文