Discuz某插件任意本地下载漏洞
插件的下载地址:http://www.discuz.net/forum.php?mod=viewthread&tid=3169556
然后看代码:
$doc=$_GET['doc'];
$doc="../../../".$doc;
$filename=$_GET['filename'];
$ext=$_GET['ext'];
//设置文件类型
if($ext=='doc'){$_ext="application/msword";}
if($ext=='xls'){$_ext="application/vnd.ms-excel";}
if($ext=='ppt'){$_ext="application/vnd.ms-powerpoint";}
if($ext=='docx') {$_ext="application/vnd.openxmlformats-officedocument.wordprocessingml.template";}
if($ext=='xlsx') {$_ext="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";}
if($ext=='pptx') {$_ext="application/vnd.openxmlformats-officedocument.presentationml.presentation";}
if($ext=='pdf'){$_ext="application/pdf";}
if($ext=='txt'){$_ext="application/plain";}
//设置文件头
header('Content-Disposition: attachment; filename='.$filename);
header('Content-Type:'.$_ext);
header('Content-Length:'.filesize($doc));
//读取文件
readfile($doc);
?>
$doc居然没经过任何处理就readfile了。。。
利用:
**** Hidden Message ***** 膜拜大牛 看看。。。。 大牛又挖洞了 好东西,先收下了 对楼猪只能说,你太伟大了!!
又爆 漏洞了 kankan看看 好东西啊 又开始挖漏洞了