angr’s execution engines are responsible for taking a state and producing successor states. The engine system is modular, with base classes and mixins that can be composed to create custom execution engines.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/angr/angr/llms.txt
Use this file to discover all available pages before exploring further.
SimEngine
The base class for all execution engines.The angr project this engine belongs to
Attributes
The associated angr project
The architecture being analyzed (derived from project.arch)
The current state being executed
SimSuccessors
Categorizes all result states from a SimEngine run.The address at which execution is taking place
The initial state for which execution produced these successors
Attributes
The “normal” successors. IP may be symbolic, but must have reasonable number of solutions
Normal successors with symbolic IPs concretized. One state per possible IP value
Successors that are unsatisfiable after guard condition is added
States with too many possible IP solutions during flattening
All successors (successors + unsat_successors)
The engine that produced these successors
Whether processing succeeded
Analysis byproducts (e.g., IRSB) produced during execution
Methods
add_successor
Add a successor state to the appropriate list.The successor state
The target address of the jump/call/ret
The guard expression for this successor
Type of jump: ‘Ijk_Call’, ‘Ijk_Ret’, ‘Ijk_Boring’, ‘Ijk_Sys*’, etc.
Whether to add the guard constraint to the state
The ID of the exit statement (‘default’ for default exit, None for non-statement exits)
The instruction pointer of this exit
The source address of the jump (basic block address)
SuccessorsEngine
Mixin for engines that produce SimSuccessors objects.Methods
process
Perform execution with a state.The state to execute. Will be copied before modification unless inline=True
Don’t copy the state before execution
Force execution to pretend we’re at this concrete address
SimSuccessors object categorizing the execution’s successor states.
process_successors
Override this method to fill out the SimSuccessors object.The successors object to fill with results
UberEngine
The default execution engine for angr.- VEX IR execution - Execute VEX intermediate representation
- Unicorn - Concrete execution using Unicorn Engine
- Syscall handling - Process system calls
- Hook support - Execute user-defined hooks
- SimProcedure handling - Execute symbolic procedure summaries
- Action tracking - Record memory/register operations
- Inspection - Breakpoint and instrumentation support
HeavyVEXMixin
Execution engine based on VEX (Valgrind’s IR).Step Parameters
Responds to the following keyword arguments instep():
PyVEX IRSB object to use for execution. If not provided, one will be lifted
Number of statements to skip in processing
Do not execute any statements after this statement
Only execute statements in this set
Force block to be lifted in ARM’s THUMB mode
Additional addresses at which to break basic blocks
VEX optimization level (0-2)
Bytes to use for the block instead of reading from project
Maximum size of the block in bytes
Maximum number of instructions to execute
VEX trace flags for debugging
SimEngineSyscall
Engine mixin for handling system calls.SimEngineUnicorn
Engine for concrete execution using Unicorn Engine.Example: Using Different Engines
Example: Using Different Engines
Example: Accessing Execution Artifacts
Example: Accessing Execution Artifacts