Plugin Architecture
The plugin system is built around theBasePlugin class and a centralized PluginManager that handles loading, activation, and event dispatching.
Key Components
BasePlugin
Base class that all plugins extend
PluginManager
Manages plugin lifecycle and event dispatching
Plugin Descriptions
TOML metadata files describing plugins
Event Hooks
Callbacks for UI and analysis events
Creating a Plugin
Basic Plugin Structure
Create a new plugin by subclassingBasePlugin (angrmanagement/plugins/base_plugin.py:27):
Plugin Metadata
Create aplugin.toml file to describe your plugin (angrmanagement/plugins/plugin_description.py:7):
Sample Plugin
Here’s a complete example (angrmanagement/plugins/sample_plugin.py):
Plugin Capabilities
UI Customization
Plugins can customize the UI in multiple ways:Toolbar Buttons
Menu Buttons
Status Bar Widgets
Visual Customization
Coloring Instructions
Coloring Blocks
Coloring Functions
Custom Drawing
Context Menus
Add custom context menu items:Function Table Columns
Add custom columns to the function table:Event Hooks
Analysis Events
Variable and Type Events
Project Events
View Events
Click Events
Data Persistence
Plugins can persist data in angr databases:Decompiler Integration
Custom Optimization Passes
Configuration Entries
Add custom configuration options:URL Actions
Handle custom URL schemes:Plugin Manager
The PluginManager handles plugin lifecycle (angrmanagement/plugins/plugin_manager.py:29):
Discovery and Loading
Plugin Activation
Event Dispatching
The manager dispatches events to all active plugins (angrmanagement/plugins/plugin_manager.py:263):
Plugin Locations
Plugins can be loaded from:- Built-in plugins:
angrmanagement/plugins/ - User plugins:
~/.local/share/angr-management/plugins/ - Custom paths: Configured via
Conf.plugin_search_path
Built-in Plugins
angr Management includes several built-in plugins:BinSync
BinSync
Collaborative reverse engineering with real-time synchronization
Coverage Viewer
Coverage Viewer
Visualize code coverage from dynamic analysis
Trace Viewer
Trace Viewer
Analyze execution traces from AFL, QEMU, and other sources
Dependency Viewer
Dependency Viewer
Display function dependencies and call graphs
Source Viewer
Source Viewer
View source code alongside disassembly (when available)
Source Importer
Source Importer
Import source code information and debug symbols
Value Search
Value Search
Search for specific values in memory and code
AIL to ASM
AIL to ASM
Convert AIL (angr Intermediate Language) back to assembly
Decompiler Poison
Decompiler Poison
Identify and highlight potentially incorrect decompilation
Memory Checker
Memory Checker
Detect memory issues and vulnerabilities
Precise Diffing
Precise Diffing
Compare binaries with function-level diffing
Execution Statistics Viewer
Execution Statistics Viewer
View execution statistics and performance metrics
Variable Recovery
Variable Recovery
Enhanced variable recovery and type inference
Best Practices
Thread Safety
Debugging Plugins
Enable plugin logging:Example: Complete Plugin
Here’s a complete plugin example:See Also
- Plugin Development - Detailed plugin development
- Collaborative Analysis - BinSync plugin
- Plugin API Reference - Complete plugin API documentation