phpmywind后台代码执行漏洞
继续来更新一下博客吧!
本论坛原创禁止转载
作者:mOon
论坛:www.moonsafe.com 博客:www.moonsec.com
六月份,公布了这套系统两个漏洞,继续公布吧。
好礼继续来袭!
这个漏洞要配合前两个漏洞使用才行,因为它需要登录后台。
漏洞放在内部群很久了。久得我都忘记时间了。
把当时写的doc翻出来看看。
下面是一些分析。
有谁想学代码审计可以联系 mOon 不免费噢
名额有限噢,谁想学得速度来吧。
核心配置文件common.inc.php
/*字符串转数组*/ if(!function_exists('String2Array')) { function String2Array($data) { if($data == '') return array(); @eval("/$array = $data;"); return $array; //www.moonsafe.com www.moonsec.com } }
查找调用函数
$rowattr = String2Array($row['attrstr']); 查找提交的地方 goods_save.php if(is_array($attrid) && is_array($attrvalue)) { //组成商品属性与值 $attrstr .= 'array('; $attrids = count($attrid); for($i=0; $i<$attrids; $i++) { $attrstr .= '"'.$attrid[$i].'"=>'.'"'.$attrvalue[$i].'"'; if($i < $attrids-1) { $attrstr .= ','; } } $attrstr .= ');'; } //www.moonsafe.com www.moonsec.com
以上的内容是 重新组合数组,可以看到我们我提交的值没有被过滤的。
插入数据库 $sql = "INSERT INTO `$tbname` (classid, parentid, parentstr, typeid, typepid, typepstr, brandid, brandpid, brandpstr, title, colorval, boldval, flag, goodsid, payfreight, weight, attrstr, marketprice, salesprice, housenum, housewarn, warnnum, integral, source, author, linkurl, keywords, description, content, picurl, picarr, hits, orderid, posttime, checkinfo {$fieldname}) VALUES ('$classid', '$parentid', '$parentstr', '$typeid', '$typepid', '$typepstr', '$brandid', '$brandpid', '$brandpstr', '$title', '$colorval', '$boldval', '$flag', '$goodsid', '$payfreight', '$weight', '$attrstr', '$marketprice', '$salesprice', '$housenum', '$housewarn', '$warnnum', '$integral', '$source', '$author', '$linkurl', '$keywords', '$description', '$content', '$picurl', '$picarr', '$hits', '$orderid', '$posttime', '$checkinfo' {$fieldvalue})"; if($dosql->ExecNoneQuery($sql)) { header("location:$gourl"); exit(); }
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论