Skip to main content
QUICK REVIEW

[论文解读] A Comprehensive Formal Security Analysis of OAuth 2.0

Daniel Fett, R. Kuesters|arXiv (Cornell University)|Jan 6, 2016
Web Application Security Vulnerabilities参考文献 21被引用 35
一句话总结

本文首次使用一种能够捕捉真实网络交互的表达性网络模型,对 OAuth 2.0 进行了全面的形式化安全分析。该研究发现了四个此前未知的攻击——307 重定向、身份提供商混淆、状态泄露和轻率的依赖方会话完整性攻击——提出了修复方案,并形式化证明了修补后的协议在标准安全最佳实践下实现了强授权、强认证和会话完整性。

ABSTRACT

The OAuth 2.0 protocol is one of the most widely deployed authorization/single sign-on (SSO) protocols and also serves as the foundation for the new SSO standard OpenID Connect. Despite the popularity of OAuth, so far analysis efforts were mostly targeted at finding bugs in specific implementations and were based on formal models which abstract from many web features or did not provide a formal treatment at all. In this paper, we carry out the first extensive formal analysis of the OAuth 2.0 standard in an expressive web model. Our analysis aims at establishing strong authorization, authentication, and session integrity guarantees, for which we provide formal definitions. In our formal analysis, all four OAuth grant types (authorization code grant, implicit grant, resource owner password credentials grant, and the client credentials grant) are covered. They may even run simultaneously in the same and different relying parties and identity providers, where malicious relying parties, identity providers, and browsers are considered as well. Our modeling and analysis of the OAuth 2.0 standard assumes that security recommendations and best practices are followed, in order to avoid obvious and known attacks. When proving the security of OAuth in our model, we discovered four attacks which break the security of OAuth. The vulnerabilities can be exploited in practice and are present also in OpenID Connect. We propose fixes for the identified vulnerabilities, and then, for the first time, actually prove the security of OAuth in an expressive web model. In particular, we show that the fixed version of OAuth (with security recommendations and best practices in place) provides the authorization, authentication, and session integrity properties we specify.

研究动机与目标

  • 在真实的网络模型中,对 OAuth 2.0 标准进行形式化、全面的安全分析。
  • 定义并形式化验证强安全属性:授权、认证和会话完整性。
  • 识别并分析 OAuth 2.0 及其衍生协议 OpenID Connect 中此前未知的攻击。
  • 为发现的漏洞提出实用修复方案,并形式化证明其有效性。
  • 证明当与安全最佳实践结合时,OAuth 2.0 在真实威胁模型下可实现强安全保证。

提出的方法

  • 开发了 FKS 网络模型,以形式化表示 OAuth 2.0 交互,包括浏览器、依赖方、身份提供商和网络攻击者。
  • 在同一形式化框架内建模了 OAuth 2.0 的全部四种授权类型(授权码、隐式、资源所有者密码、客户端凭证)。
  • 定义了形式化安全属性:授权(仅授权用户可访问资源)、认证(用户被正确识别)和会话完整性(会话状态免遭篡改)。
  • 形式化定义了攻击者的权限,包括恶意依赖方、身份提供商、浏览器以及网络层操纵(如 DNS 伪造、307 重定向)。
  • 使用符号执行和模型检测技术,验证修补后的 OAuth 2.0 协议是否满足所有定义的安全属性。
  • 通过结构化证明框架证明安全定理,利用关于事件序列、令牌处理和组件间状态一致性的引理。

实验结果

研究问题

  • RQ1形式化模型能否捕捉 OAuth 2.0 在真实网络环境中交互的全部复杂性?
  • RQ2在 OAuth 2.0 背景下,强授权、强认证和会话完整性的形式化定义是什么?
  • RQ3在真实威胁模型下,哪些 OAuth 2.0 和 OpenID Connect 中的漏洞可被形式化识别并利用?
  • RQ4为已识别漏洞提出的修复方案是否能恢复预期的安全保证?
  • RQ5修补后的 OAuth 2.0 是否在定义的安全属性和攻击者模型下可形式化证明为安全?

主要发现

  • 正式发现了四种新型攻击:307 重定向、身份提供商混淆、状态泄露和轻率的依赖方会话完整性攻击,这些攻击在实践中均可利用,并存在于 OpenID Connect 中。
  • 307 重定向攻击允许攻击者通过操纵 HTTP 307 重定向,将用户的授权流程重定向至恶意身份提供商。
  • 身份提供商混淆攻击使攻击者能够通过诱骗依赖方接受来自不同身份提供商的令牌,从而冒充用户。
  • 状态泄露攻击源于状态参数未被正确验证,导致会话固定和请求伪造。
  • 轻率的依赖方会话完整性攻击发生在依赖方未能验证访问令牌来源时,导致会话劫持。
  • 在应用所提出的修复方案后,形式化证明确认增强后的 OAuth 2.0 协议满足所有定义的安全属性:授权、认证和会话完整性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。