{"id":13754929,"url":"https://github.com/binaryanalysisplatform/bap-ida-python","last_synced_at":"2025-08-02T01:11:27.565Z","repository":{"id":78706333,"uuid":"60867187","full_name":"BinaryAnalysisPlatform/bap-ida-python","owner":"BinaryAnalysisPlatform","description":"integration with IDA","archived":false,"fork":false,"pushed_at":"2021-05-27T15:13:33.000Z","size":838,"stargazers_count":92,"open_issues_count":1,"forks_count":31,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-16T19:00:39.473Z","etag":null,"topics":["bap","ida","python","python-3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BinaryAnalysisPlatform.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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,"dei":null}},"created_at":"2016-06-10T18:00:33.000Z","updated_at":"2025-02-06T13:11:33.000Z","dependencies_parsed_at":"2023-03-11T05:01:38.920Z","dependency_job_id":null,"html_url":"https://github.com/BinaryAnalysisPlatform/bap-ida-python","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/BinaryAnalysisPlatform/bap-ida-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryAnalysisPlatform%2Fbap-ida-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryAnalysisPlatform%2Fbap-ida-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryAnalysisPlatform%2Fbap-ida-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryAnalysisPlatform%2Fbap-ida-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinaryAnalysisPlatform","download_url":"https://codeload.github.com/BinaryAnalysisPlatform/bap-ida-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryAnalysisPlatform%2Fbap-ida-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268322418,"owners_count":24231819,"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-01T02:00:08.611Z","response_time":67,"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":["bap","ida","python","python-3"],"created_at":"2024-08-03T10:00:37.008Z","updated_at":"2025-08-02T01:11:27.538Z","avatar_url":"https://github.com/BinaryAnalysisPlatform.png","language":"Python","funding_links":[],"categories":["\u003ca id=\"6fb7e41786c49cc3811305c520dfe9a1\"\u003e\u003c/a\u003e导入导出\u0026与其他工具交互"],"sub_categories":["\u003ca id=\"8ad723b704b044e664970b11ce103c09\"\u003e\u003c/a\u003e未分类"],"readme":"[![Build Status](https://travis-ci.org/BinaryAnalysisPlatform/bap.svg?branch=master)](https://travis-ci.org/BinaryAnalysisPlatform/bap-ida-python)\n\nBAP IDA Python\n==============\n\nThis package provides the necessary IDAPython scripts required for\ninteroperatibility between BAP and IDA Pro. It also provides many\nuseful feature additions to IDA, by leveraging power from BAP.\n\nFeatures\n--------\n\nBAP-IDA integration package installs several plugins into IDA\ndistribution. Some plugins works automatically, and do not require\nuser intervention, while others are invoked with keybindings, or via\nthe `Edit-\u003ePlugins` menu, that can be popped at with the `Ctrl-3`\nbindging.\n\n\n### Function information augmentation\n\nBy just hitting the `Shift+P` key, IDA will call BAP which will use\nits own analysis (and all the information sources that it knows of) to\nobtain all the locations where there are functions. This information\nis then propagated to IDA and used to create functions there\nautomatically. This is especially useful in scenarios where there are\na lot of indirect calls etc and BAP (using its different plugins) is\nable to detect functions in the code which IDA is unable to do so.\n\n### Taint Propagation\n\nBy choosing a taint source and hitting either `Ctrl+A` (for tainting\nan immediate value) or `Ctrl+Shift+A` (for data pointed by a value),\none can easily see how taint propagates through the code, in both\ndisassembly and decompilation views.\n\n#### In Text/Graph View\n![taint](docs/taint.png)\n\n#### In Pseudocode View\n![taint-decompiler](docs/taint-decompiler.png)\n\n### BIR Attribute Tagging, with arbitrary BAP plugins\n\nBAP has the ability to tag a lot of possible attributes to\ninstructions. These BIR attributes can be tagged automatically as\ncomments in IDA, by running arbitrary plugins in BAP. Just hit\n`Shift+S`.\n\nHere's an example of output for Saluki showing that a certain malloc\nis unchecked (pointing to a potential vulnerability).\n\nClearing all BAP comments (without affecting your own personal\ncomments in IDA) can be done by pressing `Ctrl+Shift+S`.\n\nTo view all current attributes in the single window hit `Shift-B`.\nYou can sort attributes by clicking the columns or you can search\nthrough them using IDA's extensive search facilities (hit the `Help`\nbottom on the list to get more information). You can jump directly\nto the attribute location by selecting it.\n\n#### In Text/Graph View\n![bir-attr-saluki](docs/bir-attr-saluki.png)\n\n#### In Pseudocode View\n![bir-attr-saluki-decompiler](docs/bir-attr-saluki-decompiler.png)\n\n### BAP Task Manager and Viewer\n\nEvery instance of BAP will have a corresponding view, that will\naccumulate all data written by BAP. The BAP Viewer (`Ctrl-Shift-F5`)\nprovides an easy way to switch between multiple BAP Views.\n\nSince you can run multiple instances of BAP asynchronously, it is\nuseful to have an ability to view the state of currently running\nprocesses, and, even, to terminate those who take too much time or\nmemory.  The BAP Task Manager (accessible via the `Ctrl-Alt-Shift-F5`\nkeybinding, or via the `Ctrl-3` plugin menu) provides such\nfunctionality.\n\n![bap-view](docs/bap-view.png)\n\n### Symbol and Type Information\n\nWhenever possible, `bap-ida-python` passes along the latest symbol and\ntype information from IDA (including changes you might have made\nmanually), so as to aid better and more accurate analysis in BAP. For\nexample, let's say you recognize that a function is a malloc in a\nstripped binary, by just using IDA's rename feature (Keybinding: `N`),\nyou can inform BAP of this change during the next run of, say, saluki,\nwithout needing to do anything extra. It works automagically!\n\nInstallation\n------------\n\nCopy all of the files and directories from the `plugins` directory\ninto `$IDADIR/plugins`.\n\nThe first run of IDA after that will prompt you to provide the path to\nBAP (along with a default if IDA is able to automatically detect\nBAP). If you wish to edit the path to BAP manually later, you can edit\nthe file `$IDADIR/cfg/bap.cfg`.\n\n#### Opam?\n\nIt is usually much easier to install through opam if you have already\nfollowed all the installation steps in the\n[bap repository](https://github.com/BinaryAnalysisPlatform/bap). Just\nrun:\n\n```\nopam install bap-ida\n```\nAfter the installation you'll see few commands that you need to run, e.g.:\n```\n=\u003e In order to install bap-ida-python plugin:\nrm -rf $IDA_PATH/plugins/bap/\ncp $(opam config var prefix)/share/bap-ida-python/plugin_loader_bap.py $IDA_PATH/plugins/\ncp -r $(opam config var prefix)/share/bap-ida-python/bap $IDA_PATH/plugins/\ncp $(opam config var prefix)/share/bap-ida-python/bap.cfg $IDA_PATH/cfg/\n...\n```\nwhere `IDA_PATH` denotes the root of IDA Pro installation.\n\nYou need to run all the commands manually because of the sandboxing enabled in\nmodern versions of opam, that doesn't allow to install files outside\nthe opam directory.\n\nDebugging\n---------\n\nThe integration package is still in alpha stage, so there are a few\nbugs lurking in the codebase. If you have any issues, then, please,\nenable the debug mode, by typing the following command in the IDA's\npython console:\n\n```python\nBapIda.DEBUG=True\n```\n\nThis will increase the verbosity level, so that you can see what commands\nwere actually issued to the bap backend. In the debug mode, the temporary\nfiles will not be removed, so they can be archived and sent to us, for the\nease of debugging.\n\n\n#### IDA Demo?\n\nYou can also use parts of the functionality (i.e. most of everything\nexcept for the decompiler outputs, and batch processing from bap) with\nIDA Free/Demo. However, you would need to install IDAPython. See\n[here](docs/IDAPython_on_IDADemo.md) for what one of our users\nreported to work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinaryanalysisplatform%2Fbap-ida-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinaryanalysisplatform%2Fbap-ida-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinaryanalysisplatform%2Fbap-ida-python/lists"}