phpwind较高版本论坛中存在一个严重的漏洞,成功利用该漏洞可以远程执行任意php代码 pw_ajax.php中的 } elseif ($action == 'pcdelimg') { InitGP(array('fieldname','pctype')); InitGP(array('tid','id'),2); if (!$tid || !$id || !$fieldname || !$pctype) { echo 'fail'; } $id = (int)$id; if ($pctype == 'topic') { $tablename = GetTopcitable($id); } elseif ($pctype == 'postcate') { $tablename = GetPcatetable($id); } $path = $db->get_value("SELECT $fieldname FROM $tablename WHERE tid=". pwEscape($tid)); fieldname未经任何有效的过滤(全局的一些其他的比较搞笑看起来不错的过滤对这里不起任何安全上的意义,只是对漏洞利用带来了一些难度),利用该注射可以获取任何数据库里的数据。 另外class_other.php中存在一个任意命令执行的漏洞 function threadscateGory($classdb) {//生成帖子交换分类 $classcache = "<?php\r\n\$info_class=array(\r\n"; foreach ($classdb as $key => $class) { !$class['ifshow'] && $class['ifshow'] = '0'; $flag && $info_class[$class['cid']]['ifshow'] && $class['ifshow'] = '1'; $class['name'] =...
phpwind较高版本论坛中存在一个严重的漏洞,成功利用该漏洞可以远程执行任意php代码 pw_ajax.php中的 } elseif ($action == 'pcdelimg') { InitGP(array('fieldname','pctype')); InitGP(array('tid','id'),2); if (!$tid || !$id || !$fieldname || !$pctype) { echo 'fail'; } $id = (int)$id; if ($pctype == 'topic') { $tablename = GetTopcitable($id); } elseif ($pctype == 'postcate') { $tablename = GetPcatetable($id); } $path = $db->get_value("SELECT $fieldname FROM $tablename WHERE tid=". pwEscape($tid)); fieldname未经任何有效的过滤(全局的一些其他的比较搞笑看起来不错的过滤对这里不起任何安全上的意义,只是对漏洞利用带来了一些难度),利用该注射可以获取任何数据库里的数据。 另外class_other.php中存在一个任意命令执行的漏洞 function threadscateGory($classdb) {//生成帖子交换分类 $classcache = "<?php\r\n\$info_class=array(\r\n"; foreach ($classdb as $key => $class) { !$class['ifshow'] && $class['ifshow'] = '0'; $flag && $info_class[$class['cid']]['ifshow'] && $class['ifshow'] = '1'; $class['name'] = str_replace(array('"',"'"),array("&quot;","&#39;"),$class['name']); $classcache .= "'$class[cid]'=>".pw_var_export($class).",\r\n\r\n"; } $classcache .= ");\r\n?>"; writeover(D_P."data/bbscache/info_class.php",$classcache); } $class[cid]未经过滤,进入此逻辑需要一些较为关键的key,借助上面的注射漏洞即可获得该key phpwind 7 phpwind 8 厂商补丁: PHPWind ------- 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本: http://www.phpwind.net/