本人菜鸟 刚刚学php 不久 开始尝试挖 人生中的第一个0day 是个 2次安装漏洞
版本:sitestar_v2.3
文件:include/index.php
define('IN_CONTEXT', 1);
include_once('load.php');
文件:include/load.php
if($_a=='template'){
include P_TPL."/template.php";
}else if($_a=='check'){
include P_TPL."/check.php";
}else if($_a=='setting'){
$default_tpl = ParamHolder::get("default_tpl","jixie-110118-a16");
$_SESSION['default_tpl'] = $default_tpl;
include P_TPL."/setting.php";
}else if($_a=='result')
..........
else{
$lockfile = ROOT.'/install.lock';
if(file_exists($lockfile)) {
exit('please delete install.lock!');
}
include P_TPL."/index.php";
}
小菜 不太懂要怎么解释
就是 说 $a == check 就回去 i包含/check.php 这个文件 而不会走 最后的else
测试方法:http://localhost/sitestar_v2.3/install/index.php?_a=check