{"id":13422927,"url":"https://github.com/andreafioraldi/angrgdb","last_synced_at":"2025-04-07T09:17:48.282Z","repository":{"id":57410364,"uuid":"132895722","full_name":"andreafioraldi/angrgdb","owner":"andreafioraldi","description":"Use angr inside GDB. Create an angr state from the current debugger state.","archived":false,"fork":false,"pushed_at":"2020-07-22T15:30:21.000Z","size":54,"stargazers_count":198,"open_issues_count":4,"forks_count":25,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-31T08:09:27.274Z","etag":null,"topics":["angr","angrdbg","concrete","debugger","gdb","plugin","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreafioraldi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-10T12:14:49.000Z","updated_at":"2025-03-30T05:51:00.000Z","dependencies_parsed_at":"2022-09-26T17:10:32.496Z","dependency_job_id":null,"html_url":"https://github.com/andreafioraldi/angrgdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreafioraldi%2Fangrgdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreafioraldi%2Fangrgdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreafioraldi%2Fangrgdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreafioraldi%2Fangrgdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreafioraldi","download_url":"https://codeload.github.com/andreafioraldi/angrgdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622986,"owners_count":20968575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angr","angrdbg","concrete","debugger","gdb","plugin","python"],"created_at":"2024-07-30T23:00:59.964Z","updated_at":"2025-04-07T09:17:48.263Z","avatar_url":"https://github.com/andreafioraldi.png","language":"Python","funding_links":[],"categories":["GDB Plugins"],"sub_categories":[],"readme":"# angrgdb\n\nUse angr inside GDB. Create an angr state from the current debugger state.\n\n## Install\n\n```\npip install angrgdb\necho \"python import angrgdb.commands\" \u003e\u003e ~/.gdbinit\n```\n\n## Usage\n\nangrgdb implements the [angrdbg](https://github.com/andreafioraldi/angrdbg) API in GDB.\n\nYou can use it in scripts like this:\n\n```python\nfrom angrgdb import *\n\ngdb.execute(\"b *0x004005f9\")\ngdb.execute(\"r aaaaaaaa\")\n\nsm = StateManager()\nsm.sim(sm[\"rax\"], 100)\n\nm = sm.simulation_manager()\nm.explore(find=0x00400607, avoid=0x00400613)\n\nsm.to_dbg(m.found[0]) #write input to GDB\n\ngdb.execute(\"x/s $rax\")\n#0x7fffffffe768:\t\"ais3{I_tak3_g00d_n0t3s}\"\ngdb.execute(\"c\")\n#Correct! that is the secret key!\n```\n\nYou can also use angrgdb commands directly in GDB for simple stuffs:\n\n+ `angrgdb sim \u003cregister name\u003e [size]` Symbolize a register\n+ `angrgdb sim \u003caddress\u003e [size]` Symbolize a memory area\n+ `angrgdb list` List all items that you setted as symbolic\n+ `angrgdb find \u003caddress0\u003e \u003caddress1\u003e ... \u003caddressN\u003e` Set the list of find targets\n+ `angrgdb avoid \u003caddress0\u003e \u003caddress1\u003e ... \u003caddressN\u003e` Set the list of avoid targets\n+ `angrgdb reset` Reset the context (symbolic values and targets)\n+ `angrgdb run` Generate a state from the debugger state and run the exploration\n+ `angrgdb shell` Open an shell with a StateManager instance created from the current GDB state\n+ `angrgdb interactive` Generate a state from the debugger state and explore by hand using a modified version of [angr-cli](https://github.com/fmagin/angr-cli)\n\nAn example crackme solve using angrgdb+GEF+[idb2gdb](https://github.com/andreafioraldi/idb2gdb):\n\n[![asciicast](https://asciinema.org/a/207571.png)](https://asciinema.org/a/207571)\n\n### Loading scripts in GDB\n\nThis is a tip if you don't want to use angrgdb from the cli but you want to use a python script.\nTo load a script in GDB use `source script.py`.\n\n## TODO\n\n+ add remote angrdbg like in IDAngr\n\n## Cite\n\nThesis [PDF](https://arxiv.org/pdf/2006.16601.pdf).\n\nBibtex:\n```\n@misc{fioraldi2020symbolic,\n    title={Symbolic Execution and Debugging Synchronization},\n    author={Andrea Fioraldi},\n    year={2020},\n    eprint={2006.16601},\n    archivePrefix={arXiv},\n    primaryClass={cs.CR}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreafioraldi%2Fangrgdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreafioraldi%2Fangrgdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreafioraldi%2Fangrgdb/lists"}