注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Tetraph 的博客

IT 计算机网络信息安全技术 数学 统计 云计算 安全漏洞 日常随笔 散文 音乐

 
 
 

日志

 
 

Alibaba Taobao OAuth 2.0 Covert Redirect Vulnerability (Information Leakage & Open Redirect) 阿里巴巴 淘宝 漏洞  

2014-05-06 13:35:52|  分类: OAuth2.0 漏洞 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Covert Redirect: http://tetraph.com/covert_redirect/


Covert Redirect Related to OAuth 2.0 and OpenID:

http://tetraph.com/covert_redirect/oauth2_openid_covert_redirect.html




Taobao's OAuth 2.0 system is susceptible to Attacks. More specifically, the authentication of parameter "&redirct_uri" in OAuth 2.0 system is insufficient. It can be misused to design Open Redirect Attacks to Taobao.


At the same time, it can be used to collect sensitive information of both third-party app and users by using the following parameters (sensitive information is contained in HTTP header.),

"&response_type"=sensitive_info,token...

"&scope"=get_user_info%2Cadd_share...


It increases the likelihood of successful Open Redirect Attacks to third-party websites, too.



The vulnerabilities occurs at page "/authorize?" with parameter "&redirect_uri", e.g.

https://oauth.taobao.com/authorize?client_id=21263967&response_type=code&state=O2CRSF7bdf17633d9f4934bb7f4e937eef6d59&redirect_uri=http://store.tv.sohu.com/web/login.do%3Fbru%3Dhttp%3A%2F%2Ftetraph.com%2Fessayjeans%2Fseasons%2F%25E7%25A5%25AD%25E6%2598%25A5.html [1]



Before acceptance of third-party application:

When a logged-in Taobao user clicks the URL ([1]) above, he/she will be asked for consent as in whether to allow a third-party website to receive his/her information. If the user clicks OK, he/she will be then redirected to the URL assigned to the parameter "&redirect_uri".


If a user has not logged onto Taobao and clicks the URL ([1]) above, the same situation will happen upon login.



After acceptance of third-party application:

A logged-in Taobao user would no longer be asked for consent and could be redirected to a webpage controlled by the attacker when he/she clicks the URL ([1]).


For a user who has not logged in, the attack could still be completed after a pop-up page that prompts him/her to log in.




(1) Taobao would normally allow all the URLs that belong to the domain of an authorized third-party website. However, these URLs could be prone to manipulation. For example, the "&redirect_uri" parameter in the URLs is supposed to be set by the third-party websites, but an attacker could change its value to make Attacks. 


Hence, a user could be redirected from Taobao to a vulnerable URL in that domain first and later be redirected from this vulnerable site to a malicious site unwillingly. This is as if the user is redirected from Taobao directly. The number of Taobao's OAuth 2.0 client websites is so huge that such Attacks could be commonplace.


Before acceptance of the third-party application, Taobao's OAuth 2.0 system makes the redirects appear more trustworthy and could potentially increase the likelihood of successful Open Redirect Attacks of third-party website.


Once the user accepts the application, the attackers could completely bypass Taobao's authentication system and attack more easily.



(2) I used one of my webpages for the following tests. The webpage is "http://tetraph.com/essayjeans/seasons/%E7%A5%AD%E6%98%A5.html". We can suppose it is malicious and contains code that collect sensitive information of both third-party app and users.


Below is an example of a vulnerable third-party domain:

sohu.com


Vulnerable URL in this domain:

http://store.tv.sohu.com/web/login.do?bru=http%3A%2F%2Ftetraph.com%2Fessayjeans%2Fseasons%2F%25E7%25A5%25AD%25E6%2598%25A5.html


Vulnerable URL from Taobao that is related to sohu.com:

https://oauth.taobao.com/authorize?client_id=21263967&response_type=code&state=O2CRSF7bdf17633d9f4934bb7f4e937eef6d59&redirect_uri=http://sohu.com


POC:

https://oauth.taobao.com/authorize?client_id=21263967&response_type=code&state=O2CRSF7bdf17633d9f4934bb7f4e937eef6d59&redirect_uri=http://store.tv.sohu.com/web/login.do%3Fbru%3Dhttp%3A%2F%2Ftetraph.com%2Fessayjeans%2Fseasons%2F%25E7%25A5%25AD%25E6%2598%25A5.html




(3) The following URLs have the same vulnerabilities.

https://login.taobao.com/member/login.jhtml?sign=8uBo%2FBShyXsFVd4q%2FREkfg%3D%3D&timestamp=2014-03-19+09%3A24%3A22&sub=true&style=mini_top&need_sign=top&full_redirect=true&from=mini_top&from_encoding=utf-8&TPL_redirect_url=https%3A%2F%2Foauth.taobao.com%2Fauthorize%3Fstate%3D1%26response_type%3Dcode%26client_id%3D21112101%26redirect_uri%3Dhttp%253A%252F%252Fwww.paidai.com%252Fuser%252Foauth_taobao.php




My tests were performed on Firefox (26.0) in Ubuntu (12.04) and IE (9.0.15) in Windows 7.





More Details:

Blog: http://tetraph.com/blog/

Youtube: http://www.youtube.com/user/tetraph/feed?activity_view=3






  评论这张
 
阅读(67)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017