{"id":13539207,"url":"https://github.com/invictus1306/beebug","last_synced_at":"2025-08-21T04:31:15.529Z","repository":{"id":215845600,"uuid":"147337606","full_name":"invictus1306/beebug","owner":"invictus1306","description":"A tool for checking exploitability","archived":false,"fork":false,"pushed_at":"2019-05-31T11:01:13.000Z","size":12101,"stargazers_count":209,"open_issues_count":0,"forks_count":35,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-08T03:39:07.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/invictus1306.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-09-04T11:46:00.000Z","updated_at":"2025-02-01T11:43:07.000Z","dependencies_parsed_at":"2024-01-22T06:13:30.971Z","dependency_job_id":null,"html_url":"https://github.com/invictus1306/beebug","commit_stats":null,"previous_names":["invictus1306/beebug"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/invictus1306/beebug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invictus1306%2Fbeebug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invictus1306%2Fbeebug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invictus1306%2Fbeebug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invictus1306%2Fbeebug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/invictus1306","download_url":"https://codeload.github.com/invictus1306/beebug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invictus1306%2Fbeebug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271425067,"owners_count":24757400,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-01T09:01:21.751Z","updated_at":"2025-08-21T04:31:14.748Z","avatar_url":"https://github.com/invictus1306.png","language":"Python","readme":"# beebug - A tool for checking exploitability\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"beebug.png\" width=\"50%\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.python.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Python-3-yellow.svg\"\u003e\u003c/a\u003e \u003cimg src=\"https://img.shields.io/badge/license-GPLv3-red.svg\"\u003e \n\u003c/p\u003e\n\n## Description\n**beebug** is a tool that can be used to verify if a program crash could be exploitable.\n\nThis tool was presented the first time at [r2con](https://rada.re/con/2018/) 2018 in Barcelona.\n\nSome implemented functionality are:\n* Stack overflow on libc \n* Crash on Program Counter\n* Crash on branch\n* Crash on write memory\n* Heap vulnerabilities \n* Read access violation (some exploitable cases)\n* Graph based on *[functrace]*(https://github.com/invictus1306/functrace) (Dynamic Binary Instrumentation)\n\nWe can use beebug for:\n* Crash analysis (based on r2pipe)\n* Graph Generation (based on functrace)\n* Crash analysis + Graph Generation\n\n## Dependencies\n\n* r2pipe\n* pydot\n* graphviz\n* pyqtgraph\n\n## Installation\n```shell\n$ wget https://github.com/radare/radare2/archive/3.5.0.tar.gz\n$ tar xvzf 3.5.0.tar.gz\n$ cd radare2-3.5.0/\n$ ./configure --prefix=/usr\n$ make -j8\n\n$ sudo make install\n$ sudo apt-get install graphviz\n\n$ git clone https://github.com/invictus1306/beebug\n$ cd beebug\n$ sudo pip3 install -r requirements.txt\n```\n## Simple DEMO\n\n![beebug](https://github.com/invictus1306/beebug/blob/master/images/beebug.gif)\n\n## Usage\n\n### help\n\n```shell\n$ python3 ./beebug.py -h\nusage: beebug.py [-h] -t TARGET [-ta TARGETARGS] [-f FILE] [-g GRAPH] [-i]\n                 [-a] [-r REPORT_FILE] [-v]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -t TARGET, --target TARGET\n                        target program to analyze\n  -ta TARGETARGS, --targetargs TARGETARGS\n                        arguments for the target program\n  -f FILE, --file FILE  input file\n  -g GRAPH, --graph GRAPH\n                        output graph name\n  -i, --instrumentation\n                        instrumentation option\n  -a, --analyze         analyze crash\n  -r REPORT_FILE, --report_file REPORT_FILE\n                        DynamoRIO report file to parse\n  -v, --version         show program's version number and exit\n```\n\n### Crash analysis using r2 (no instrumentation)\n```shell\n$ python3 beebug.py -t ./tests/simple_crash -a\nProcess with PID 5047 started...\nFile dbg:///home/invictus1306/Documents/warcon_demo/beebug/tests/simple_crash  reopened in read-write mode\n= attach 5047 5047\nptrace (PT_ATTACH): Operation not permitted\nchild stopped with signal 11\n[+] SIGNAL 11 errno=0 addr=0x00000000 code=1 ret=0\nptrace (PT_ATTACH): Operation not permitted\nptrace (PT_ATTACH): Operation not permitted\nInvalid write crash - Generally it is exploitable, the write value/address could be tainted - Invalid write of size 2\nbacktrace\n0  0x400552           sp: 0x0                 0    [sym.vuln]   \n1  0x400574           sp: 0x7fff635890c8      24   [main]  main+25 \n2  0x7f34d4372830     sp: 0x7fff635890e8      32   [??]  sym.libc_start_main+240 \n3  0x7f34d472c7cb     sp: 0x7fff63589178      144  [??]  sym.dl_rtld_di_serinfo+29051 \n4  0x400459           sp: 0x7fff635891a8      48   [??]  entry0+41 \n\nregisters\nrax = 0x00000000\nrbx = 0x00000000\nrcx = 0x7f34d4716b20\nrdx = 0x01d85010\nr8 = 0x01d85000\nr9 = 0x0000000d\nr10 = 0x7f34d4716b78\nr11 = 0x00000000\nr12 = 0x00400430\nr13 = 0x7fff635891c0\nr14 = 0x00000000\nr15 = 0x00000000\nrsi = 0x01d85020\nrdi = 0x7f34d4716b20\nrsp = 0x7fff635890b0\nrbp = 0x7fff635890c0\nrip = 0x00400552\nrflags = 0x00010202\norax = 0xffffffffffffffff\n\n```\n\n### configuration file for instrumentation\n\nIt is needed only of you want to use instrumentation\n\n*config* file\n```shell\n[dynamorio]\ndrrun               = /your_path/DynamoRIO-Linux-7.0.0-RC1/bin64/drrun\nclient              = /your_path/functrace/build/libfunctrace.so\n[instrumentation]\ndisassembly         = False\ndisas_func          = main\nwrap_function       =\nwrap_function_args  = 0\ncbr                 = True\nverbose             = False\n```\n\n### Graph generation (no crash analysis)\n```shell\n$ python3 beebug.py -t ./tests/simple_crash -i -r report1 -g graph1 \n$ xpdf grap1\n```\n![simplecrash](https://github.com/invictus1306/beebug/blob/master/images/graph1.pdf)\n\n### Crash analysis + Graph generation\n```shell\npython3 beebug.py -t ./tests/simple_crash -i -r report1 -g graph1 -a\nProcess with PID 5081 started...\nFile dbg:///home/invictus1306/Documents/warcon_demo/beebug/tests/simple_crash  reopened in read-write mode\n= attach 5081 5081\nptrace (PT_ATTACH): Operation not permitted\nchild stopped with signal 11\n[+] SIGNAL 11 errno=0 addr=0x00000000 code=1 ret=0\nptrace (PT_ATTACH): Operation not permitted\nptrace (PT_ATTACH): Operation not permitted\nInvalid write crash - Generally it is exploitable, the write value/address could be tainted - Invalid write of size 4\nbacktrace\n0  0x400552           sp: 0x0                 0    [sym.vuln]   \n1  0x400574           sp: 0x7fff5ec31f88      24   [main]  main+25 \n2  0x7fb834795830     sp: 0x7fff5ec31fa8      32   [??]  sym.libc_start_main+240 \n3  0x7fb834b4f7cb     sp: 0x7fff5ec32038      144  [??]  sym.dl_rtld_di_serinfo+29051 \n4  0x400459           sp: 0x7fff5ec32068      48   [??]  entry0+41 \n\nregisters\nrax = 0x00000000\nrbx = 0x00000000\nrcx = 0x7fb834b39b20\nrdx = 0x00d15010\nr8 = 0x00d15000\nr9 = 0x0000000d\nr10 = 0x7fb834b39b78\nr11 = 0x00000000\nr12 = 0x00400430\nr13 = 0x7fff5ec32080\nr14 = 0x00000000\nr15 = 0x00000000\nrsi = 0x00d15020\nrdi = 0x7fb834b39b20\nrsp = 0x7fff5ec31f70\nrbp = 0x7fff5ec31f80\nrip = 0x00400552\nrflags = 0x00010202\norax = 0xffffffffffffffff\n```\n\n## Limitation\n* If the program require user input at runtime, it is not possibile to add it (based on r2pipe)\n* graph view (based on pydot/graphiz) is limited to small target program\n\n## Future direction\n* Support different architectures\n* Graph improvement (based on graphviz)\n* Analyze core dumps (based on radare2)\n\n## Lead Developer\n* Andrea Sindoni - [Twitter](https://twitter.com/invictus1306)\n\n","funding_links":[],"categories":["\u003ca id=\"683b645c2162a1fce5f24ac2abfa1973\"\u003e\u003c/a\u003e漏洞\u0026\u0026漏洞管理\u0026\u0026漏洞发现/挖掘\u0026\u0026漏洞开发\u0026\u0026漏洞利用\u0026\u0026Fuzzing","Pentesting"],"sub_categories":["\u003ca id=\"41ae40ed61ab2b61f2971fea3ec26e7c\"\u003e\u003c/a\u003e漏洞利用","Exploits"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvictus1306%2Fbeebug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvictus1306%2Fbeebug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvictus1306%2Fbeebug/lists"}