title: Using Frankencerts for Automated Adversarial Testing of Certificate Validation in SSL/TLS Implementations.
abstract: Modern network security rests on the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. Distributed systems, mobile and desktop applications, embedded devices, and all of secure Web rely on SSL/TLS for protection against network attacks. This protection critically depends on whether SSL/TLS clients correctly validate X.509 certificates presented by servers during the SSL/TLS handshake protocol. We design, implement, and apply the first methodology for large-scale testing of certificate validation logic in SSL/TLS implementations. Our first ingredient is "frankencerts," synthetic certificates that are randomly mutated from parts of real certificates and thus include unusual combinations of extensions and constraints. Our second ingredient is differential testing: if one SSL/TLS implementation accepts a certificate while another rejects the same certificate, we use the discrepancy as an oracle for finding flaws in individual implementations. Differential testing with frankencerts uncovered 208 discrepancies between popular SSL/TLS implementations such as OpenSSL, NSS, CyaSSL, GnuTLS, PolarSSL, MatrixSSL, etc. Many of them are caused by serious security vulnerabilities. For example, any server with a valid X.509 version 1 certificate can act as a rogue certificate authority and issue fake certificates for any domain, enabling man-in-the-middle attacks against MatrixSSL and GnuTLS. Several implementations also accept certificate authorities created by unauthorized issuers, as well as certificates not intended for server authentication. We also found serious vulnerabilities in how users are warned about certificate validation errors. When presented with an expired, self-signed certificate, NSS, Safari, and Chrome (on Linux) report that the certificate has expired-a low-risk, often ignored error-but not that the connection is insecure against a man-in-the-middle attack. These results demonstrate that automated adversarial testing with frankencerts is a powerful methodology for discovering security flaws in SSL/TLS implementations.
authors.affiliation: Google ; The University of Texas at Austin.
authors.forename: Chad
authors.initials: C
authors.lastname: Brubaker
authors.affiliation: The University of Texas at Austin.
authors.forename: Suman
authors.initials: S
authors.lastname: Jana
authors.affiliation: University of California, Davis.
authors.forename: Baishakhi
authors.initials: B
authors.lastname: Ray
authors.affiliation: The University of Texas at Austin.
authors.forename: Sarfraz
authors.initials: S
authors.lastname: Khurshid
authors.affiliation: The University of Texas at Austin.
authors.forename: Vitaly
authors.initials: V
authors.lastname: Shmatikov