Automating Crypto Bugs Discovery

Automating Crypto Bugs Discovery

We present a new and efficient approach to systematic testing of
cryptographic software: differential fuzzing. Unlike general-purpose
software fuzzing such as afl, differential fuzzing doesn't aim to find
memory corruption bugs (although they might come as a by-product), but
to find logic bugs. Compared to test vectors, differential fuzzing
provides greater code coverage. Compared to formal verification,
differential fuzzing is easier to apply, both for testers and
developers.

We'll release CDF, a tool that implements differential fuzzing for most
common cryptographic APIs: RSA encryption and signatures, elliptic-curve
cryptography, or any symmetric-key schemes through a unified interface.
CDF combines differential fuzzing with a number of unit tests to detect
vulnerabilities specific to the cryptographic functions tested. It can
also detect timing leaks, thanks to state-of-the-art leakage detection
techniques.

CDF is coded in Go, and is trivially portable to various CPU
architectures. Unlike other tools, CDF runs its tests in a totally
black-box fashion: no source code is needed, you only need an executable
file such as a binary program, Python script, or shell script calling a
remote service.

We ran CDF on high-profile, widely used crypto software components.
CDF discovered issues in a number of libraries including Go's crypto
package, OpenSSL, and mbedTLS.

Presented by