Abstraktor is a tool designed to assist in the validation of distributed protocol implementations by automatically generating enabling-preserving abstractions (EPAs). Unlike existing tools that only detect runtime errors, Abstraktor aims to uncover issues in the business logic of implementations.
The solution is based on four main components:
- Instrumenter: Processes the source code of the target application to generate an executable that exposes its internal state.
- Mallory Extension: A fork of the Mallory tool that performs efficient fuzzing while also extracting the internal state of the instrumented executable.
- EPA Generator: Builds and exports EPAs using the state data collected during fuzzing.
- CLI Tool: Coordinates and orchestrates the interaction between all components to produce the final abstractions.
To install Abstraktor, you need to have Rust and Cargo installed on your system. If you haven't installed them yet, you can follow the instructions on the official Rust website.
Once you have Rust and Cargo installed, you can clone the repository and build the project:
cargo build
Run tests using:
cargo test
sequenceDiagram
participant Dev as Developer
participant CLI as Abstraktor CLI
participant LLVM as LLVM Instrumenter
participant Mallory as Mallory Engine
participant EPAGen as EPA Generator
Dev->>Dev: Annotate source code
Dev->>CLI: Run prepare-binary
CLI->>LLVM: Instrument code using annotations
LLVM-->>CLI: Instrumented binary ready
Dev->>CLI: Run run-mallory
CLI->>Mallory: Execute instrumented binary
Mallory-->>CLI: Collect runtime events
Dev->>CLI: Run generate-epas
CLI->>EPAGen: Generate EPAs from collected events
EPAGen-->>Dev: Output EPAs
- Annotate Source Code: Manually add comments to relevant parts of your application logic to mark key points for analysis.
- prepare-binary: Instruments the source code using LLVM based on the provided annotations.
- run-mallory: Executes the instrumented binary under Mallory to simulate network conditions and collect runtime events.
- generate-epas: Processes the collected data to automatically construct enabling-preserving abstractions (EPAs).