### 简要描述:
尽管新浪已经修复了OAuth的redirect_uri重定向漏洞,但是不怕神一样的对手 就怕...
这个就是一个样列...
### 详细说明:
```
/app/account/main.php
191行开始
public function sync_login_action()
{
if (get_setting('ucenter_enabled') == 'Y')
{
if ($uc_uid = $this->model('ucenter')->is_uc_user($this->user_info['email']))
{
$sync_code = $this->model('ucenter')->sync_login($uc_uid);
}
}
if ($_GET['url'])
{
$url = base64_decode($_GET['url']);
}
if ((strstr($url, '://') AND !strstr($url, get_setting('base_url'))) OR !$url)
{
$url = '/';
}
H::redirect_msg(AWS_APP::lang()->_t('欢迎回来: %s , 正在带您进入站点...', $this->user_info['user_name']) . $sync_code, $url);
}
```
if ((strstr($url, '://') AND !strstr($url, get_setting('base_url'))) OR !$url) 对base64之后的url进行了判断但是可以用 "@" 绕过判断。
于是....
```
EXP:
http://127.0.0.1/?/account/sync_login/url-aHR0cDovLzEyNy4wLjAuMTp0ZXN0QHd3dy5iYWlkdS5jb20=
```
base64解开是http://127.0.0.1:test@www.baidu.com
唔 chrome下是不提示直接跳转的 为了生动演示效果用了Firefox
[<img src="https://images.seebug.org/upload/201411/2014565709617d1df8788b5c0d7af906ed542d6d.png" alt="1.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201411/2014565709617d1df8788b5c0d7af906ed542d6d.png)
这样好像只是个普通的任意跳转 没有啥危害.但是配合起OAuth的redirect_uri就可以挟持微博绑定的帐号了.
攻击者构造地址让受害者打开,攻击者再记录下REFERER就可以挟持weibo了
[<img src="https://images.seebug.org/upload/201411/20150036193913b150fd9d102fdf5f81eaab32d1.png" alt="2.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201411/20150036193913b150fd9d102fdf5f81eaab32d1.png)
### 漏洞证明:
[<img src="https://images.seebug.org/upload/201411/20150036193913b150fd9d102fdf5f81eaab32d1.png" alt="2.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201411/20150036193913b150fd9d102fdf5f81eaab32d1.png)
暂无评论