Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3460120.3484793acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article
Open access

On Re-engineering the X.509 PKI with Executable Specification for Better Implementation Guarantees

Published: 13 November 2021 Publication History

Abstract

The X.509 Public-Key Infrastructure (PKI) standard is widely used as a scalable and flexible authentication mechanism. Flaws in X.509 implementations can make relying applications susceptible to impersonation attacks or interoperability issues. In practice, many libraries implementing X.509 have been shown to suffer from flaws that are due to noncompliance with the standard. Developing a compliant implementation is especially hindered by the design complexity, ambiguities, or under-specifications in the standard written in natural languages. In this paper, we set out to alleviate this unsatisfactory state of affairs by re-engineering and formalizing a widely used fragment of the X.509 standard specification, and then using it to develop a high-assurance implementation. Our X.509 specification re-engineering effort is guided by the principle of decoupling the syntactic requirements from the semantic requirements. For formalizing the syntactic requirements of X.509 standard, we observe that a restricted fragment of attribute grammar is sufficient. In contrast, for precisely capturing the semantic requirements imposed on the most-widely used X.509 features, we use quantifier-free first-order logic (QFFOL). Interestingly, using QFFOL results in an executable specification that can be efficiently enforced by an SMT solver. We use these and other insights to develop a high-assurance X.509 implementation named CERES. A comparison of CERES with 3 mainstream libraries (i.e., mbedTLS, OpenSSL, and GnuTLS) based on 2 million real certificate chains and 2 million synthetic certificate chains shows that CERES rightfully rejects malformed and invalid certificates.

Supplementary Material

MP4 File (CCS21-fp468.mp4)
Presentation video - short version

References

[1]
2014. stringprep: Implements the "StringPrep" algorithm. https://hackage.haskell.org/package/stringprep.
[2]
2020. SSL certificate chain resolver. https://github.com/zakjan/cert-chain-resolver.
[3]
2021. GnuTLS. https://www.gnutls.org/.
[4]
2021. mbedTLS. https://tls.mbed.org/.
[5]
2021. OpenSSL. https://www.openssl.org/.
[6]
2021. parsec 3.8. https://pypi.org/project/parsec/.
[7]
Carlisle Adams and Steve Lloyd. 2003. Understanding PKI: concepts, standards, and deployment considerations. Addison-Wesley Professional.
[8]
Henk Alblas and Borivoj Melichar. 1991. Attribute Grammars, Applications and Systems: International Summer School SAGA, Prague, Czechoslovakia, June 4--13, 1991. Proceedings. Vol. 545. Springer Science & Business Media.
[9]
Julian Bangert and Nickolai Zeldovich. 2014. Nail: A Practical Tool for Parsing and Generating Data Formats. In 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI '14). 615--628.
[10]
Alessandro Barenghi, Nicholas Mainardi, and Gerardo Pelosi. 2018. Systematic parsing of X. 509: eradicating security issues with a parse tree. Journal of Computer Security (2018), 817--849.
[11]
Clark Barrett, Aaron Stump, Cesare Tinelli, et al. 2010. The smt-lib standard: Version 2.0. In SMT Workshop.
[12]
Clark W. Barrett, Christopher L. Conway, Morgan Deters, Liana Hadarean, Dejan Jovanovic, Tim King, Andrew Reynolds, and Cesare Tinelli. 2011. CVC4. In Computer Aided Verification (Lecture Notes in Computer Science). 171--177. https://doi.org/10.1007/978--3--642--22110--1_14
[13]
Barry Bond, Chris Hawblitzel, Manos Kapritsos, K. Rustan M. Leino, Jacob R. Lorch, Bryan Parno, Ashay Rane, Srinath Setty, and Laure Thompson. 2017. Vale: Verifying High-Performance Cryptographic Assembly Code. In 26th USENIX Security Symposium (SEC'17). 917--934.
[14]
Chad Brubaker, Suman Jana, Baishakhi Ray, Sarfraz Khurshid, and Vitaly Shmatikov. 2014. Using frankencerts for automated adversarial testing of certificate validation in SSL/TLS implementations. In 2014 IEEE Symposium on Security and Privacy (SP). 114--129.
[15]
Sze Yiu Chau, Omar Chowdhury, Endadul Hoque, Huangyi Ge, Aniket Kate, Cristina Nita-Rotaru, and Ninghui Li. 2017. SymCerts: Practical Symbolic Execution for Exposing Noncompliance in X.509 Certificate Validation Implementations. In 2017 IEEE Symposium on Security and Privacy (SP). 503--520. https://doi.org/10.1109/SP.2017.40
[16]
Sze Yiu Chau, Moosa Yahyazadeh, Omar Chowdhury, Aniket Kate, and Ninghui Li. 2019. Analyzing semantic correctness with symbolic execution: A case study on pkcs# 1 v1. 5 signature verification. In Network and Distributed Systems Security Symposium 2019 (NDSS '19).
[17]
Yuting Chen and Zhendong Su. 2015. Guided Differential Testing of Certificate Validation in SSL/TLS Implementations. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE 2015). 793--804. https://doi.org/10.1145/2786805.2786835
[18]
Alessandro Cimatti, Alberto Griggio, and Roberto Sebastiani. 2011. Computing Small Unsatisfiable Cores in Satisfiability modulo Theories. J. Artif. Int. Res. (2011), 701--728.
[19]
D. Cooper, S. Santesson, S. Farrell, S. Boeyen, R. Housley, and W. Polk. 2008. Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile. Technical Report. http://www.rfc-editor.org/rfc/rfc5280.txt
[20]
Pascal Cuoq, Florent Kirchner, Nikolai Kosmatov, Virgile Prevosto, Julien Signoles, and Boris Yakobowski. 2012. Frama-C: A Software Analysis Perspective. In Proceedings of the 10th International Conference on Software Engineering and Formal Methods (SEFM'12). 233--247. https://doi.org/10.1007/978--3--642--33826--7_16
[21]
Joyanta Debnath, Sze Yiu Chau, and Omar Chowdhury. 2021. Source Code for CERES. https://github.com/joyantaDebnath/CERES.
[22]
Benjamin Delaware, Sorawit Suriyakarn, Clément Pit-Claudel, Qianchuan Ye, and Adam Chlipala. 2019. Narcissus: Correct-by-Construction Derivation of Decoders and Encoders from Binary Formats. Proc. ACM Program. Lang. 3, ICFP, Article 82 (July 2019), 29 pages. https://doi.org/10.1145/3341686
[23]
Zakir Durumeric, David Adrian, Ariana Mirian, Michael Bailey, and J. Alex Halderman. 2015. A Search Engine Backed by Internet-Wide Scanning. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security (CCS '15). 542--553. https://doi.org/10.1145/2810103.2813703
[24]
Zakir Durumeric, James Kasten, Michael Bailey, and J. Alex Halderman. 2013. Analysis of the HTTPS Certificate Ecosystem. In Proceedings of the 2013 ACM SIGCOMM Internet Measurement Conference (IMC '13). 291--304. https://doi.org/10.1145/2504730.2504755
[25]
Kathleen Fisher, Yitzhak Mandelbaum, and David Walker. 2010. The next 700 Data Description Languages. J. ACM 57, 2, Article 10 (Feb. 2010), 51 pages. https://doi.org/10.1145/1667053.1667059
[26]
Marco Gario and Andrea Micheli. 2015. PySMT: a solver-agnostic library for fast prototyping of SMT-based algorithms. In SMT Workshop.
[27]
P. Hoffman and M. Blanchet. 2002. Preparation of Internationalized Strings (?string-prep"). Technical Report. https://tools.ietf .org/rfc/rfc3454.txt
[28]
ITU-T. 2021. X.690 : Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER). (2021).
[29]
Trevor Jim, Yitzhak Mandelbaum, and David Walker. 2010. Semantics and Algorithms for Data-Dependent Grammars. In Proceedings of the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '10). 417--430. https://doi.org/10.1145/1706299.1706347
[30]
Burt Kaliski. 1998. PKCS# 1: RSA encryption version 1.5. Technical Report. https://tools.ietf .org/rfc/rfc2313.txt
[31]
Hannes Mehnert, Anil Madhavapeddy, and Peter Sewell. 2015. Not-Quite-So-Broken TLS: Lessons in Re-Engineering a Security Protocol Specification and Implementation. In 24th USENIX Security Symposium (SEC'15). 223--238.
[32]
Dan Kaminsky, Meredith L. Patterson, and Len Sassaman. 2010. PKI Layer Cake: New Collision Attacks against the Global X.509 Infrastructure. In Financial Cryptography and Data Security. 289--303.
[33]
Donald E. Knuth. 1968. Semantics of Context-Free Languages. In In Mathematical Systems Theory. 127--145.
[34]
Ulrich Kühn, A. Pyshkin, E. Tews, and R. Weinmann. 2008. Variants of Bleichenbacher's Low-Exponent Attack on PKCS#1 RSA Signatures. (2008).
[35]
Deepak Kumar, Zhengping Wang, Matthew Hyder, Joseph Dickinson, Gabrielle Beck, David Adrian, Joshua Mason, Zakir Durumeric, J. Alex Halderman, and Michael Bailey. 2018. Tracking Certificate Misissuance in the Wild. In 2018 IEEE Symposium on Security and Privacy (SP). 785--798. https://doi.org/10.1109/SP.2018.00015
[36]
Yitzhak Mandelbaum, Kathleen Fisher, David Walker, Mary Fernandez, and Artem Gleyzer. 2007. PADS/ML: A Functional Data Description Language. In Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Nice, France) (POPL '07). Association for Computing Machinery, New York, NY, USA, 77--83. https://doi.org/10.1145/1190216.1190231
[37]
Duckki Oe, Andrew Reynolds, and Aaron Stump. 2009. Fast and Flexible Proof Checking for SMT. In Proceedings of the 7th International Workshop on Satisfiability Modulo Theories (Montreal, Canada) (SMT '09). Association for Computing Machinery, New York, NY, USA, 6--13. https://doi.org/10.1145/1670412.1670414
[38]
Ruoming Pang, Vern Paxson, Robin Sommer, and Larry Peterson. 2006. Binpac: A yacc for writing application protocol parsers. In Proceedings of the 2006 ACM SIGCOMM Internet Measurement Conference (IMC '06). 289--300. https://doi.org/10.1145/1177080.1177119
[39]
Terence Parr. 2013. The definitive ANTLR 4 reference. Pragmatic Bookshelf.
[40]
Jonathan Protzenko, Bryan Parno, Aymeric Fromherz, Chris Hawblitzel, Marina Polubelova, Karthikeyan Bhargavan, Benjamin Beurdouche, Joonwon Choi, Antoine Delignat-Lavaud, Cédric Fournet, Natalia Kulatova, Tahina Ramananandro, Aseem Rastogi, Nikhil Swamy, Christoph M. Wintersteiger, and Santiago Zanella-Beguelin. 2020. EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider. In 2020 IEEE Symposium on Security and Privacy (SP). 983--1002. https://doi.org/10.1109/SP40000.2020.00114
[41]
Tahina Ramananandro, Antoine Delignat-Lavaud, Cedric Fournet, Nikhil Swamy, Tej Chajed, Nadim Kobeissi, and Jonathan Protzenko. 2019. EverParse: Verified Secure Zero-Copy Parsers for Authenticated Message Formats. In 28th USENIX Security Symposium (SEC'19). 1465--1482.
[42]
Suphannee Sivakorn, George Argyros, Kexin Pei, Angelos D. Keromytis, and Suman Jana. 2017. HVLearn: Automated Black-Box Analysis of Hostname Verification in SSL/TLS Implementations. In 2017 IEEE Symposium on Security and Privacy (SP). 521--538. https://doi.org/10.1109/SP.2017.46
[43]
Robin Sommer, Johanna Amann, and Seth Hall. 2016. Spicy: A Unified Deep Packet Inspection Framework for Safely Dissecting All Your Data. In Annual Conference on Computer Security Applications (ACSAC '16). 558--569. https://doi.org/10.1145/2991079.2991100
[44]
Zhe Tao, Aseem Rastogi, Naman Gupta, Kapil Vaswani, and Aditya V. Thakur. 2021. DICE*: A Formally Verified Implementation of DICE Measured Boot. In 30th USENIX Security Symposium (USENIX Security 21). USENIX Association, 1091--1107. https://www.usenix.org/conference/usenixsecurity21/presentation/tao
[45]
Sebastian Andreas Ullrich. 2016. Simple Verification of Rust Programs via Functional Purification.
[46]
Dominik Winterer, Chengyu Zhang, and Zhendong Su. 2020. On the Unusual Effectiveness of Type-Aware Operator Mutations for Testing SMT Solvers. Proc. ACM Program. Lang. 4, OOPSLA, Article 193 (Nov. 2020), 25 pages. https://doi.org/10.1145/3428261
[47]
Dominik Winterer, Chengyu Zhang, and Zhendong Su. 2020. Validating SMT Solvers via Semantic Fusion. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020). 718--730. https://doi.org/10.1145/3385412.3385985
[48]
K Zeilenga. 2006. Lightweight Directory Access Protocol (LDAP): Internationalized String Preparation. Technical Report. https://www.rfc-editor.org/rfc/rfc4518.txt
[49]
Jean-Karim Zinzindohoué, Karthikeyan Bhargavan, Jonathan Protzenko, and Benjamin Beurdouche. 2017. HACL*: A Verified Modern Cryptographic Library. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (CCS '17). 1789--1806. https://doi.org/10.1145/3133956.3134043

Cited By

View all
  • (2024)ARMOR: A Formally Verified Implementation of X.509 Certificate Chain Validation2024 IEEE Symposium on Security and Privacy (SP)10.1109/SP54263.2024.00220(1462-1480)Online publication date: 19-May-2024
  • (2024)Lightweight privacy-enhanced secure data sharing scheme for smart gridPeer-to-Peer Networking and Applications10.1007/s12083-024-01653-717:3(1322-1334)Online publication date: 22-Feb-2024
  • (2022)X-FTPC: A Fine-Grained Trust Propagation Control Scheme for Cross-Certification Utilizing Certificate TransparencyApplied Cryptography in Computer and Communications10.1007/978-3-031-17081-2_8(123-138)Online publication date: 6-Oct-2022

Index Terms

  1. On Re-engineering the X.509 PKI with Executable Specification for Better Implementation Guarantees

      Recommendations

      Comments

      Please enable JavaScript to view thecomments powered by Disqus.

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      CCS '21: Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security
      November 2021
      3558 pages
      ISBN:9781450384544
      DOI:10.1145/3460120
      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: 13 November 2021

      Check for updates

      Author Tags

      1. PKI
      2. SMT solver
      3. SSL/TLS protocol
      4. X.509 certificate
      5. authentication
      6. differential testing
      7. network security

      Qualifiers

      • Research-article

      Funding Sources

      • National Science Foundation

      Conference

      CCS '21
      Sponsor:
      CCS '21: 2021 ACM SIGSAC Conference on Computer and Communications Security
      November 15 - 19, 2021
      Virtual Event, Republic of Korea

      Acceptance Rates

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

      Upcoming Conference

      CCS '25

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)246
      • Downloads (Last 6 weeks)29
      Reflects downloads up to 16 Nov 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)ARMOR: A Formally Verified Implementation of X.509 Certificate Chain Validation2024 IEEE Symposium on Security and Privacy (SP)10.1109/SP54263.2024.00220(1462-1480)Online publication date: 19-May-2024
      • (2024)Lightweight privacy-enhanced secure data sharing scheme for smart gridPeer-to-Peer Networking and Applications10.1007/s12083-024-01653-717:3(1322-1334)Online publication date: 22-Feb-2024
      • (2022)X-FTPC: A Fine-Grained Trust Propagation Control Scheme for Cross-Certification Utilizing Certificate TransparencyApplied Cryptography in Computer and Communications10.1007/978-3-031-17081-2_8(123-138)Online publication date: 6-Oct-2022

      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