乌云(WooYun.org)历史漏洞查询---http://wy.zone.ci/
乌云 Drops 文章在线浏览--------http://drop.zone.ci/
2014-06-10: 细节已通知厂商并且等待厂商处理中 2014-06-10: 厂商已经确认,细节仅向厂商公开 2014-06-13: 细节向第三方安全合作伙伴开放 2014-08-04: 细节向核心白帽子及相关领域专家公开 2014-08-14: 细节向普通白帽子公开 2014-08-24: 细节向实习白帽子公开 2014-09-08: 细节向公众公开
phpok赶快成长变成大厂商!感谢P牛传授黑白盒配合挖掘漏洞的姿势,thx @phithon
缺陷文件:framework/phpok_call.php line:108
function _project($rs){ return $GLOBALS['app']->model('data')->project($rs);}
跟踪project方法:framework/model/data.php
public function project($rs){ if(!$rs['pid'] && !$rs['phpok']) return false; if(!$rs['pid']) { $tmp = $this->_id($rs['phpok'],$this->site['id']); if(!$tmp || $tmp['type'] != 'project') return false; $rs['pid'] = $tmp['id']; } if(!$rs['pid']) return false; $rs = $this->_project($rs['pid'],$rs['project_ext']); //继续跟踪_project方法 if(!$rs) return false; //绑定链接 if(!$rs['url']) $rs['url'] = $GLOBALS['app']->url($rs['identifier']); return $rs;}public function _project($id,$ext=false){ if($this->cdata['project'][$id]) {//echo "aaa";exit; $rs = $this->cdata['project'][$id]; } else { $sql = "SELECT * FROM ".$this->db->prefix."project WHERE id=".$id;//注意此处变量id即为$rs['pid'],继续跟踪看看是否可控,如果可控则存在SQL注射漏洞! //print_r($sql); $rs = $this->db->get_one($sql); //if(!$this->cdata['project']) //echo $id.'---'.$rs; $this->cdata['project'][$id] = $rs; } if(!$rs) return false; if($ext) { $ext = $this->ext_all('project-'.$id); if($ext) $rs = array_merge($ext,$rs); } return $rs;}
回溯$rs['pid']是从哪里传递过来的:framework/api/api_control.php
function phpok_f(){ $id = $this->get('id');//get方法传值,会对敏感字符进行addslashes if(!$id) $this->json('未指定数据调用中心ID'); $param = $this->get('param');//这里就是$rs,见phpok方法 $list = $this->call->phpok($id,$param); //注意,继续跟方法phpok if(!$list) $this->json('ok',true,true,false); $tpl = $this->get("tpl"); if($tpl && $this->tpl->check_exists($tpl)) { $this->assign("rslist",$list); $info = $this->fetch($tpl); $this->json($info,true,true,false); } $this->json($list,true);}function phpok($id,$rs=""){//很清楚了,$rs就是通过GET方法传递的param if(!$id) return false; ...省略 if(substr($id,0,1) != '_') ...省略 else { if(!$rs || !is_array($rs)) return false; //arclist,文章列表 //arc,单篇文章信息 //cate,分类信息 //catelist,分类树 //project,项目信息 //sublist,子项目信息 //parent,父级项目信息 //plist,同级项目信息 //fields,字段表单 //user,会员 //userlist,会员列表 //total,文章总数 //cate_id,当前分类信息(不带项目,不生成链接) //subcate,子分类信息,即当前分类下的子分类 $list = array('arclist','arc','cate','catelist','project','sublist','parent','plist','fields','user','userlist','total','cate_id','subcate'); $id = substr($id,1); //如果是arclist,且未定义is_list属性,则默认启用此属性 if($id == "arclist") { $rs["is_list"] = $rs["is_list"] == 'false' ? 0 : 1; } if(!$id || !in_array($id,$list)) return false;//控制器 $call_rs = array_merge($rs,array('type_id'=>$id)); } $content = $this->load_call($call_rs); if($content && $cacheId) $GLOBALS['app']->cache->write($cacheId,$content); return $content;}
分析了半天,懂的人应该就懂了,EXP如下:
月底统一修好,还有很多问题的。
危害等级:中
漏洞Rank:9
确认时间:2014-06-10 19:21
给这个评中,不是说这个漏洞不对,而是重复接收了!不过还是感谢你们的支持!实力有限,钱钱有限!但我们会一直在努力!
暂无