Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3658644.3670318acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article
Open access

AuthSaber: Automated Safety Verification of OpenID Connect Programs

Published: 09 December 2024 Publication History

Abstract

Single Sign-On (SSO)-based authentication protocols, like OpenID Connect (OIDC), play a crucial role in enhancing security and privacy in today's interconnected digital world, gaining widespread adoption among the majority of prominent authentication service providers. These protocols establish a structured framework for verifying and authenticating the identities of individuals, organizations, and devices, while avoiding the necessity of sharing sensitive credentials (e.g., passwords) with external entities. However, the security guarantees of these protocols rely on their proper implementation, and real-world implementations can, and indeed often do, contain logical programming errors leading to severe attacks, including authentication bypass and user account takeover. In response to this challenge, we present AuthSaber, an automated verifier designed to assess the real-world OIDC protocol implementations against their standard safety specifications in a scalable manner. AuthSaber addresses the challenges of expressiveness for OIDC properties, modeling multi-party interactions, and automation by first designing a novel specification language based on linear temporal logic, leveraging an automaton-based approach to constrain the space of possible interactions between OIDC entities, and incorporating several domain-specific transformations to obtain programs and properties that can be directly reasoned about by software model checkers. We evaluate AuthSaber on the 15 most popular and widely used OIDC libraries and discover 16 previously unknown vulnerabilities, all of which are responsively disclosed to the developers. Five categories of these vulnerabilities also led to new CVEs.

References

[1]
Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. 1986. Compilers: Principles, Techniques, and Tools. Addison-Wesley. https://www.worldcat.org/oclc/12285707
[2]
Mahmoud Ammar, Bruno Crispo, Bart Jacobs, Danny Hughes, and Wilfried Daniels. 2019. S μ V'The Security MicroVisor: A Formally-Verified Software-Based Security Architecture for the Internet of Things. IEEE Transactions on Dependable and Secure Computing 16, 5 (2019), 885--901.
[3]
AppAuth. 2023. AppAuth-Android. https://openid.github.io/AppAuth-Android/.
[4]
Linard Arquint, Felix A Wolf, Joseph Lallemand, Ralf Sasse, Christoph Sprenger, Sven N Wiesner, David Basin, and Peter Müller. 2023. Sound verification of security protocols: From design to interoperable implementations. In 2023 IEEE Symposium on Security and Privacy (SP). IEEE, 1077--1093.
[5]
Guangdong Bai, Jike Lei, Guozhu Meng, Sai Sathyanarayan Venkatraman, Prateek Saxena, Jun Sun, Yang Liu, and Jin Song Dong. 2013. Authscan: Automatic extraction of web authentication protocols from implementations. (2013).
[6]
Christel Baier and Joost-Pieter Katoen. 2008. Principles of model checking. MIT press.
[7]
Mike Barnett, Bor-Yuh Evan Chang, Robert DeLine, Bart Jacobs, and K Rustan M Leino. 2006. Boogie: A modular reusable verifier for object-oriented programs. In Formal Methods for Components and Objects: 4th International Symposium, FMCO 2005, Amsterdam, The Netherlands, November 1--4, 2005, Revised Lectures 4. Springer, 364--387.
[8]
David Basin, Jannik Dreier, Lucca Hirschi, Sa'a Radomirovic, Ralf Sasse, and Vincent Stettler. 2018. A formal analysis of 5G authentication. In Proceedings of the 2018 ACM SIGSAC conference on computer and communications security. 1383--1396.
[9]
Bruno Blanchet. 2014. Automatic verification of security protocols in the symbolic model: The verifier proverif. Foundations of Security Analysis and Design VII: FOSAD 2012/2013 Tutorial Lectures (2014), 54--87.
[10]
Stefano Calzavara, Riccardo Focardi, Matteo Maffei, Clara Schneidewind, Marco Squarcina, and Mauro Tempesta. 2018. WPSE: fortifying web protocols via browser-side security monitoring. In 27th USENIX Security Symposium. 1493--1510.
[11]
Edmund Clarke, Orna Grumberg, Somesh Jha, Yuan Lu, and Helmut Veith. 2000. Counterexample-guided abstraction refinement. In Computer Aided Verification: 12th International Conference, CAV 2000, Chicago, IL, USA, July 15--19, 2000. Proceedings 12. Springer, 154--169.
[12]
Cas Cremers and Martin Dehnel-Wild. 2019. Component-based formal analysis of 5G-AKA: Channel assumptions and session confusion. In Network and Distributed System Security Symposium (NDSS). Internet Society.
[13]
Cas Cremers, Marko Horvat, Jonathan Hoyland, Sam Scott, and Thyla van der Merwe. 2017. A comprehensive symbolic analysis of TLS 1.3. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security. 1773--1788.
[14]
Cas Cremers, Marko Horvat, Sam Scott, and Thyla van der Merwe. 2016. Automated analysis and verification of TLS 1.3: 0-RTT, resumption and delayed authentication. In 2016 IEEE Symposium on Security and Privacy (SP). IEEE, 470--485.
[15]
Daniel Dietsch, Matthias Heizmann, Vincent Langenfeld, and Andreas Podelski. 2015. Fairness modulo theory: A new approach to LTL software model checking. In Computer Aided Verification: 27th International Conference, CAV 2015, San Francisco, CA, USA, July 18--24, 2015, Proceedings, Part I 27. Springer, 49--66.
[16]
Yizhak Yisrael Elboher, Justin Gottschlich, and Guy Katz. 2020. An abstraction-based framework for neural network verification. In Computer Aided Verification: 32nd International Conference, CAV 2020, Los Angeles, CA, USA, July 21--24, 2020, Proceedings, Part I 32. Springer, 43--65.
[17]
Expo. 2023. Critical OAuth Vulnerability in Expo Framework Allows Account Hijacking. https://thehackernews.com/2023/05/critical-oauth-vulnerability-in-expo. html.
[18]
Facebook. 2018. Facebook Security Update. https://about.fb.com/news/2018/09/security-update.
[19]
Haonan Feng, Hui Li, Xuesong Pan, Ziming Zhao, and T Cactilab. 2021. A Formal Analysis of the FIDO UAF Protocol. In NDSS.
[20]
Daniel Fett, Pedram Hosseyni, and Ralf Küsters. 2019. An extensive formal security analysis of the openid financial-grade api. In 2019 IEEE Symposium on Security and Privacy (SP). IEEE, 453--471.
[21]
Daniel Fett, Ralf Küsters, and Guido Schmitz. 2016. A comprehensive formal security analysis of OAuth 2.0. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security. 1204--1215.
[22]
Daniel Fett, Ralf Küsters, and Guido Schmitz. 2017. The web sso standard openid connect: In-depth formal security analysis and security guidelines. In 2017 IEEE 30th Computer Security Foundations Symposium (CSF). IEEE, 189--202.
[23]
Google. 2023. Google Oauth Client. https://cloud.google.com/java/docs/reference/google-oauth-client/latest/overview.
[24]
Grammarly. 2023. Critical OAuth Flaws Uncovered in Grammarly, Vidio, and Bukalapak Platforms. https://thehackernews.com/2023/10/critical-oauth-flaws-uncovered-in.html.
[25]
Sven Hammann, Ralf Sasse, and David Basin. 2020. Privacy-preserving openid connect. In Proceedings of the 15th ACM Asia Conference on Computer and Communications Security. 277--289.
[26]
Boyuan He, Vaibhav Rastogi, Yinzhi Cao, Yan Chen, VN Venkatakrishnan, Runqing Yang, and Zhenrui Zhang. 2015. Vetting SSL usage in applications with SSLint. In 2015 IEEE Symposium on Security and Privacy. IEEE, 519--534.
[27]
Fatima Hussain, Rasheed Hussain, Brett Noye, and Salah Sharieh. 2020. Enterprise API security and GDPR compliance: Design and implementation perspective. IT Professional 22, 5 (2020), 81--89.
[28]
IETF. 2021. OAuth 2.0 Security Best Current Practice. https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics.
[29]
Daniel Jackson. 2012. Software Abstractions: logic, language, and analysis. MIT press.
[30]
Charlie Jacomme, Elise Klein, Steve Kremer, and Maïwenn Racouchot. 2023. A comprehensive, formal and automated analysis of the EDHOC protocol. In USENIX Security'23--32nd USENIX Security Symposium.
[31]
Peng Jin, Jiaxu Tian, Dapeng Zhi, Xuejun Wen, and Min Zhang. 2022. Trainify: A cegar-driven training and verification framework for safe deep reinforcement learning. In International Conference on Computer Aided Verification. Springer, 193--218.
[32]
JWT. 2015. Json Web Token. https://datatracker.ietf.org/doc/html/rfc7519.
[33]
K Rustan M Leino. 2008. This is boogie 2. manuscript KRML 178, 131 (2008), 9.
[34]
K Rustan M Leino. 2010. Dafny: An automatic program verifier for functional correctness. In International conference on logic for programming artificial intelligence and reasoning. Springer, 348--370.
[35]
Jintian Lu, Jinli Zhang, Jing Li, ZhongyuWan, and Bo Meng. 2017. Automatic verification of security of openid connect protocol with proverif. In Advances on P2P, Parallel, Grid, Cloud and Internet Computing: Proceedings of the 11th International Conference on P2P, Parallel, Grid, Cloud and Internet Computing (3PGCIC--2016) November 5--7, 2016, Soonchunhyang University, Asan, Korea. Springer, 209--220.
[36]
Simon Meier, Benedikt Schmidt, Cas Cremers, and David Basin. 2013. The TAMARIN prover for the symbolic analysis of security protocols. In Computer Aided Verification: 25th International Conference, CAV 2013, Saint Petersburg, Russia, July 13--19, 2013. Proceedings 25. Springer, 696--701.
[37]
Microsoft. 2023. Azure B2C -- Crypto Misuse and Account Compromise. https://securityboulevard.com.
[38]
Microsoft. 2023. Microsoft Bug Allowed Hackers to Breach Over Two Dozen Organizations via Forged Azure AD Tokens. https://thehackernews.com/2023/07/microsoft-bug-allowed-hackers-to-breach.html.
[39]
Nitin Naik and Paul Jenkins. 2017. Securing digital identities in the cloud by selecting an apposite Federated Identity Management from SAML, OAuth and OpenID Connect. In 2017 11th International Conference on Research Challenges in Information Science (RCIS). IEEE, 163--174.
[40]
Saeed Nejati, Jia Hui Liang, Catherine Gebotys, Krzysztof Czarnecki, and Vijay Ganesh. 2017. Adaptive restart and CEGAR-based solver for inverting cryptographic hash functions. In Verified Software. Theories, Tools, and Experiments: 9th International Conference, VSTTE 2017, Heidelberg, Germany, July 22--23, 2017, Revised Selected Papers 9. Springer, 120--131.
[41]
OpenID. 2021. OpenID Connect Core 1.0. https://openid.net/specs/openidconnect-core-1_0.html.
[42]
OpenID. 2023. OpenID Certification. https://openid.net/certification/.
[43]
Pac4j. 2023. Pac4J. https://www.pac4j.org.
[44]
Anton Permenev, Dimitar Dimitrov, Petar Tsankov, Dana Drachsler-Cohen, and Martin Vechev. 2020. Verx: Safety verification of smart contracts. In 2020 IEEE symposium on security and privacy (SP). IEEE, 1661--1677.
[45]
Portswigger. 2023. Authentication bug that enabled unauthorized access to client applications. https://portswigger.net.
[46]
Tamjid Al Rahat, Yu Feng, and Yuan Tian. 2019. OAUTHLINT: An Empirical Study on OAuth Bugs in Android Applications. In 34th IEEE/ACM International Conference on Automated Software Engineering, ASE 2019, San Diego, CA, USA, November 11--15, 2019. 293--304.
[47]
Tamjid Al Rahat, Yu Feng, and Yuan Tian. 2022. Cerberus: Query-Driven Scalable Vulnerability Detection in OAuth Service Provider Implementations. In Proceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security. 2459--2473.
[48]
RFC6749. 2021. The OAuth 2.0 Authorization Framework. https://tools.ietf.org/html/rfc6750.
[49]
SAML. 2023. SAML protocol. http://saml.xml.org/saml-specifications.
[50]
Alireza Souri and Monire Norouzi. 2019. A state-of-the-art survey on formal verification of the internet of things applications. Journal of Service Science Research 11, 1 (2019), 47--67.
[51]
Jon Stephens, Kostas Ferles, Benjamin Mariano, Shuvendu Lahiri, and Isil Dillig. 2021. SmartPulse: automated checking of temporal properties in smart contracts. In 2021 IEEE Symposium on Security and Privacy (SP). IEEE, 555--571.
[52]
Lorenzo Veronese, Stefano Calzavara, and Luca Compagna. 2020. Bulwark: Holistic and Verified Security Monitoring of Web Protocols. In European Symposium on Research in Computer Security. Springer, 23--41.
[53]
WALA. 2023. T.J. Watson Libraries for Analysis (WALA). https://sourceforge.net/projects/wala.
[54]
Ronghai Yang, Wing Cheong Lau, Jiongyi Chen, and Kehuan Zhang. 2018. Vetting Single Sign-On SDK Implementations via Symbolic Reasoning. In 27th USENIX Security Symposium. 1459--1474.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CCS '24: Proceedings of the 2024 on ACM SIGSAC Conference on Computer and Communications Security
December 2024
5188 pages
ISBN:9798400706363
DOI:10.1145/3658644
This work is licensed under a Creative Commons Attribution International 4.0 License.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 December 2024

Check for updates

Author Tags

  1. authentication
  2. authorization
  3. automated analysis
  4. openid connect security
  5. safety verification
  6. single sign-on

Qualifiers

  • Research-article

Funding Sources

Conference

CCS '24
Sponsor:

Acceptance Rates

Overall Acceptance Rate 1,261 of 6,999 submissions, 18%

Upcoming Conference

CCS '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 185
    Total Downloads
  • Downloads (Last 12 months)185
  • Downloads (Last 6 weeks)185
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media