Registry / ai-ml / angr
library9.3.3pypypi✓ verified 23d ago

angr is a multi-architecture binary analysis toolkit, providing capabilities for dynamic symbolic execution, various static analyses, and program instrumentation on binaries. It is actively developed and maintained, with frequent minor and patch releases, and less frequent major version changes.

pip install angr
INSTALL
IMPORT
SIG · ANGR
A
angr
ai-mlpythonv9.3.3
Install
21.5s avg
Import
4148ms
Disk
473MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v9.2.213 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 21.5s · import 4.148s · 354MB
473MB installed
● package 473MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

angr
import angr

This quickstart loads a specified binary (defaults to '/bin/ls') into an angr Project, prints basic information, and creates an initial execution state. It demonstrates the fundamental steps for starting an analysis. The commented-out section shows a typical pattern for symbolic execution, which would require a specific challenge binary with known target addresses.

import angr import os binary_path = os.environ.get('ANGR_BINARY_PATH', '/bin/ls') try: project = angr.Project(binary_path, auto_load_libs=False) print(f"Successfully loaded binary: {project.filename}") print(f"Architecture: {project.arch}") print(f"Entry point: {hex(project.entry)}") # Example of creating an initial state initial_state = project.factory.entry_state() print(f"Initial state created at: {hex(initial_state.addr)}") # Optional: Basic symbolic execution (requires a suitable binary and goal) # simgr = project.factory.simulation_manager(initial_state) # simgr.explore(find=0x400844, avoid=0x400850) # Replace with addresses relevant to your binary # if simgr.found: # solution = simgr.found[0] # print(f"Found solution input: {solution.posix.dumps(0)}") except Exception as e: print(f"An error occurred: {e}") print("Please ensure 'ANGR_BINARY_PATH' is set to a valid executable, or that /bin/ls exists.")
angr --version
Debug
Known issues
breakingWith angr 9.0+, there was a significant refactoring around the 'KnowledgeBase'. Analysis results and program facts are now primarily stored in `project.kb`, instead of being directly attributes of analysis objects. Code interacting with older analysis result storage patterns will break.
fix
Migrate your code to access program information and analysis results via `project.kb`. Consult the official documentation for specific migration paths.
affects: 9.0 and later
gotchaangr relies on several dependencies (like `pyvex` and `z3`) which include forked native code libraries. Installing directly into a global Python environment can lead to conflicts with existing system libraries or other Python projects. This is a common source of unexpected behavior or installation failures.
fix
Always install angr within a dedicated Python virtual environment (e.g., `venv`, `conda`).
affects: All versions
gotchaDirect `pip install angr` is generally not supported on Windows due to complexities with its native code dependencies. Users on Windows typically need to install individual components manually or use the official Docker image.
fix
On Windows, consider using the official `angr/angr` Docker image or follow detailed source installation instructions for individual components if a native installation is required.
affects: All versions
gotchaBinary analysis, especially symbolic execution, is computationally intensive and can be slow, leading to 'path explosion' for complex programs. Initial attempts may seem non-performant or get stuck.
fix
Start with small, focused binaries. Utilize angr's various analysis techniques (e.g., CFG, VSA) to reduce the search space before symbolic execution. Be mindful of state options and exploration techniques to prune irrelevant paths. Consult the 'Optimization considerations' section in the documentation.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'angr'
This error occurs when the 'angr' package is not installed in the Python environment.
fix
Install 'angr' using pip: 'pip install angr'.
ModuleNotFoundError: No module named 'distutils'
This error occurs when the 'distutils' module is missing, often due to using Python 3.12 or later where 'distutils' is deprecated.
fix
Install the 'distutils' module using your package manager, e.g., 'sudo apt-get install python3-distutils' on Ubuntu.
AttributeError: module 'angr' has no attribute 'Project'
This error occurs when there is a naming conflict, such as having a script or directory named 'angr' in the working directory.
fix
Rename the conflicting script or directory to avoid the naming conflict.
AttributeError: 'module' object has no attribute 'KS_ARCH_X86'
This error occurs when the 'keystone' package is installed instead of 'keystone-engine', which conflicts with angr's dependencies.
fix
Uninstall 'keystone' and install 'keystone-engine' using pip: 'pip uninstall keystone' followed by 'pip install keystone-engine'.
TypeError: unsupported operand type(s)
This often arises during analysis when angr encounters unexpected data types in operations, potentially due to incompatible versions of angr or its dependencies, complex interactions with symbolic values, or issues within SimProcedures.
fix
Ensure all angr components and their dependencies (e.g., claripy, archinfo) are up-to-date and compatible by reinstalling them in a fresh Python virtual environment. If the issue persists with custom code, review how symbolic values and types are being handled.
Upgrade
Version history
9.3.3latest on PyPI · released Aug 19, 2026
Audit
Dependencies
cffirequiredUsed for Python bindings to native code; often requires system-level `libffi-dev`.
archinforequiredInformation about CPU architectures.
pyvexrequiredPython bindings to the VEX IR.
clerequiredMany-platform binary loader.
claripyrequiredSolver abstraction layer.
Agent activity
55 hits · last 30 days
node
48
OpenAI (training)
1
Resources
angr — pip install angr · libregistry