angrgdb: Use angr inside GDB
angrgdb
Use angr inside GDB. Create an angr state from the current debugger state.
Install
pip install angrgdb echo "python import angrgdb.commands" >> ~/.gdbinit
Usage
angrgdb implements the angrdbg API in GDB.
You can use it in scripts like this:
You can also use angrgdb commands directly in GDB for simple stuff:
angrgdb sim <register name> [size]
Symbolize a registerangrgdb sim <address> [size]
Symbolize a memory areaangrgdb list
List all items that you set as symbolicangrgdb find <address0> <address1> ... <addressN>
Set the list of find targetsangrgdb avoid <address0> <address1> ... <addressN>
Set the list of avoiding targetsangrgdb reset
Reset the context (symbolic values and targets)angrgdb run
Generate a state from the debugger state and run the explorationangrgdb shell
Open a shell with a StateManager instance created from the current GDB stateangrgdb interactive
Generate a state from the debugger state and explore by hand using a modified version of angr-cli
An example crackme solve using angrgdb+GEF+idb2gdb:
Loading scripts in GDB
This is a tip if you don’t want to use angrgdb from the cli but you want to use a python script. To load a script in GDB use source script.py.
Copyright (c) 2018, Andrea Fioraldi
All rights reserved.