Skip to main content

idaenv - IDAPython Plugin Management

idaenv is a plugin manager for the IDA Pro disassembler. It bridges the gap between IDA Pro and the greater Python ecosystem of setuptools/virtualenv.

Most Python packages are distributed using setuptools (or perhaps distutils) and the PyPi package repository. However IDA Pro expects extensions to be standalone files placed in a specific directory. Using idaenv, you can install Python packages into a virtual environment using setuptools (or pip), run a single "update" command, and immediately use plugins, processor modules, or loaders contained in the package.

Usage

If you're using IDA 7.3 or earlier, initialize a Python 2 virtual environment and activate it:

$ virtualenv -p python2 ida
$ ./ida/bin/activate

If you're using IDA 7.4 or later, it is recommended to use venv, which is included in the standard library.

$ python3 -m venv ida
$ ./ida/bin/activate

It is still possible to use virtualenv with Python 3, however you will encounter an exception when starting IDA 7.4 due to a longstanding issue in virtualenv.

Once virtual environment is activated, install idaenv:

$ pip install idaenv

Update the IDAUSR environment variable to include the idaenv plugin directory:

$ export IDAUSR=$HOME/.idapro:$( idaenv prefix )

Install some idaenv compatible extensions using setup.py or pip. Then use the idaenv "update" command:

$ pip install ...
$ idaenv update
Writing wrapper to '/home/me/.virtualenvs/cpy2/ida/plugins/keypatch_keypatch_f265c7.py'...
Writing wrapper to '/home/me/.virtualenvs/cpy2/ida/plugins/uemu_uemu_791c39.py'...
  Updated:
    - keypatch.keypatch
    - uemu.uemu

... TODO include output ...

To see what plugins are installed, use the "ls" or "status" command.

$ idaenv ls
Plugins:
  Active:
    - keypatch.keypatch
    - uemu.uemu

Mechanism

idaenv takes inspiration from the established console_scripts mechanism in Python. It generates and manages small wrapper scripts that import from an installed package and then export the interface expected by IDA Pro. For example, plugin wrappers use the following template:

from %(module)s import %(attr)s

def PLUGIN_ENTRY():
    return %(attr)s()

Packaging

In order for idaenv to know where plugins are located inside of a package, they have to be called out in setup.py using "entry points". For example, the declaration for a traditional plugin that consists of just a single file (like the excellent keypatch) might look like:

from setuptools import setup


setup(name='keypatch',
      version="0.0",
      py_modules=["keypatch"],
      install_requires=[
          "keystone-engine"
      ],
      zip_safe=False,
      entry_points={
          "idapython_plugins": [
              "keypatch=keypatch:Keypatch_Plugin_t",
          ]
      })

The structure of the entry points dictionary is described in detail by the setuptools documentation. The general structure is:

{
    "entry_point_group": [
        "plugin_name=module.submodule:PluginClass.plugin_method
    ]
}

idaenv supports the following entry point groups:

  • idapython_plugins
  • idapython_procs
  • idapython_loaders

Metadata

Release files for idaenv 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for idaenv 0.4.0
File Size Uploaded
idaenv-0.4.0.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for idaenv 0.4.0
File Interpreter ABI Platform
idaenv-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / idaenv-0.4.0.tar.gz

Download URL idaenv-0.4.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
85655525881d0b4f0d17c841dd62506cf7036ecbbe03d4147f0cd64b352f6c73
BLAKE2b-256 checksum
How to use checksums
4e11a34a4023642b9ae537ea9adc4a9b3b6e8de0aca204abbe2a9ef0fb600b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

Release files / idaenv-0.4.0-py3-none-any.whl

Download URL idaenv-0.4.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de115d905fdb0c5583570407fe0028156c065299b327a1979378d96184018fe1
BLAKE2b-256 checksum
How to use checksums
81f4cd3887d037f20425d3a15eecb9d520c1b1288b47494be34448b63c23fbea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.2.0

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page