Symbolic Execution Engine
Explore all possible execution paths mathematically. Generate concrete exploit inputs that prove vulnerabilities are real.
Overview
Symbolic Execution treats program inputs as mathematical symbols rather than concrete values. By solving the constraints that govern execution paths, Bloodhound can prove whether a vulnerability is actually reachable and generate inputs that trigger it.
Why Symbolic Execution?
How It Works
Constraint Solving
Bloodhound uses SMT (Satisfiability Modulo Theories) solvers to find concrete values that satisfy path constraints.
Supported Constraint Types
Arithmetic
- • Integer arithmetic (+, -, *, /, %)
- • Floating point operations
- • Bitwise operations (&, |, ^, ~)
- • Overflow/underflow detection
Strings
- • String concatenation
- • Length constraints
- • Substring operations
- • Regex matching
Arrays
- • Array indexing
- • Bounds checking
- • Element constraints
- • Length tracking
Objects
- • Property access
- • Type constraints
- • Null/undefined checks
- • Prototype chains
Handling Path Explosion
Programs can have exponentially many paths. Bloodhound uses several techniques to make analysis tractable.
Path Merging
Paths with similar states are merged to reduce redundant exploration. This trades precision for coverage.
Directed Search
Prioritizes paths that lead toward sinks (dangerous operations). Uses heuristics from taint analysis.
Loop Bounding
Limits loop iterations to prevent infinite exploration. Configurable depth based on scan mode.
Function Summaries
Caches the behavior of analyzed functions to avoid re-analysis. Dramatically speeds up large codebases.
Exploit Generation
When a vulnerability is found, symbolic execution generates concrete inputs that trigger it.
Blockchain Exploit Proofs
Limitations
Symbolic execution is powerful but has inherent limitations:
- •External calls: Can't reason about network requests, database state, or file contents without mocking.
- •Concurrency: Thread interleavings create exponential path explosion.
- •Dynamic features: eval(), reflection, and dynamic dispatch are challenging to model.
- •Time complexity: Analysis time grows with program complexity. Apex mode allows longer analysis.