deepstate  by trailofbits

Testing framework for fuzzing and symbolic execution of C/C++ code

Created 8 years ago
838 stars

Top 42.5% on SourcePulse

GitHubView on GitHub
Project Summary

DeepState provides a unified interface for C/C++ developers to leverage multiple fuzzing and symbolic execution engines. It allows users to write a single test harness with a Google Test-like API and execute it across various backends (e.g., AFL++, Manticore, angr, libFuzzer) without learning each engine's specifics, thereby simplifying and enhancing software testing and vulnerability discovery.

How It Works

DeepState acts as an abstraction layer over diverse fuzzing and symbolic execution tools. It enables parameterized unit testing where test data is generated by these backends. Its core advantage lies in its "write once, run anywhere" approach for test harnesses, allowing seamless switching between engines for benchmarking or bug finding. Novel features like "pumping" for selecting concrete values and automatic decomposition of integer comparisons aim to improve fuzzing effectiveness.

Quick Start & Requirements

  • Install/Run: docker pull agroce/deepstate_examples_aflpp then docker run -it agroce/deepstate_examples_aflpp. Inside the container, navigate to an example directory (e.g., cd ~/examples/fuzz_tcas) and run deepstate-afl ./TCAS_AFL -o fuzz_afl --fuzzer_out --timeout 120.
  • Prerequisites: Docker, GCC/G++ with multilib support (Linux), CMake, Python 3.6+, Z3 (for Manticore backend), Yices2 (Ubuntu). macOS support is in progress, with fuzzing working but symbolic execution requiring cross-compilation. ARM64 (Apple Silicon) is not supported due to lack of multilib compiler support.
  • Setup: Docker build can take ~40 minutes.
  • Docs: docs folder

Highlighted Details

  • Supports multiple backends: Manticore, Angr, libFuzzer, AFL/AFL++, Eclipser, and file-based fuzzing.
  • Enables API sequence testing and automatic test generation.
  • Features automatic test case reduction for debugging.
  • Includes "pumping" and integer compare decomposition for improved fuzzing efficiency.

Maintenance & Community

  • Developed by Trail of Bits.
  • Bounties offered for accepted PRs.
  • Community discussion via #deepstate on Empire Hacking Slack.

Licensing & Compatibility

  • Apache License 2.0.
  • Permissive license suitable for commercial use and closed-source linking.

Limitations & Caveats

macOS symbolic execution requires painful cross-compilation. ARM64 architecture, including Apple Silicon, is not supported due to the absence of multilib compiler support.

Health Check
Last Commit

3 weeks ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Edward Z. Yang Edward Z. Yang(Research Engineer at Meta; Maintainer of PyTorch), and
5 more.

yet-another-applied-llm-benchmark by carlini

0.2%
1k
LLM benchmark for evaluating models on previously asked programming questions
Created 1 year ago
Updated 4 months ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Binyuan Hui Binyuan Hui(Research Scientist at Alibaba Qwen), and
2 more.

evalplus by evalplus

0.3%
2k
LLM code evaluation framework for rigorous testing
Created 2 years ago
Updated 1 month ago
Feedback? Help us improve.