andreafioraldi / angrdbg

Abstract library to generate angr states from a debugger state
BSD 2-Clause "Simplified" License
58 stars 15 forks source link
angr concrete debugger synchronization

angrdbg

Abstract library to generate angr states from a debugger state

Works with both angr 7 and 8.

Install

pip install angrdbg

Windows

Before installing angrdbg you must install Visual C++ Redistributable Packages for Visual Studio 2013.

Then type in the command prompt:

py -m pip install capstone-windows
py -m pip install angrdbg

Usage

The library uses an abstract class, Debugger, to be agnostic from the debugger api.

The user must implement a derived class, see abstract_debugger.py to view the methods that must be implemented.

After this register an instance of the derived class with the register_debugger function.

To create an angr state from the current debugger state use StateShot.

Api

StateShot

Return an angr state from the current debug session state.

StateManager

A wrapper around angr to simplify the symbolic values creation and to write the results back in the debugger when angr founds a valid path.

Methods

note: memory values are the same that are returned by state.mem[addr]

Managing the Project

load_project and reload_project are used to get or lazily create a project based on the current debugger state.

Memory type

The memory type defines how angrdbg get the memory from the debugger and from the cle backer. Use get_memory_type to know what the active one.

You can change the memory type with set_memory_type.

Frontends

Cite

Thesis PDF.

Bibtex:

@misc{fioraldi2020symbolic,
    title={Symbolic Execution and Debugging Synchronization},
    author={Andrea Fioraldi},
    year={2020},
    eprint={2006.16601},
    archivePrefix={arXiv},
    primaryClass={cs.CR}
}