Skip to main content

IDAvator is a bi-directional bridge between IDA Pro's Hex-Rays microcode and LLVM IR. It lets you lift decompiler microcode into LLVM for analysis, optimization, or deobfuscation. Then, drop it back into IDA, patched and ready for further exploration.

Project description

🧠 IDAvator - Ride the elevator to lift between microcode and machine.

idavator tests

About | QuickStart | Acknowledgements |

About

IDAvator is a bi-directional bridge between IDA Pro’s Hex-Rays microcode and LLVM IR. It lets you lift decompiler microcode into LLVM for analysis, optimization, or deobfuscation. Then, drop it back into IDA, patched and ready for further exploration.

Features

Action Command Description
Lift idavator ida2llvm Headless: microcode (mba_t) → LLVM IR via idalib.
Drop IDA plugin (GUI) Edit → IDAvator → Apply LLVM IR... (microcode drop; patch/export WIP).
Lift (interactive) IDA plugin (GUI) Edit → IDAvator → Lifting Viewer (Ctrl+Alt+L).
Optimize Use opt or any LLVM pass pipeline Apply LLVM analyses or transformations (e.g., constant propagation, CFG cleanup).
Deobfuscate Combine with IDAvator’s switch-flattening or simplification passes Simplify complex control flow graphs.
Patch / Rebuild Patch directly in IDA or export .o / .bin Choose live patching or external reconstruction.

Architecture

  +-----------+           +------------------+           +-------------+
  |  IDA Pro  |  ida2llvm |     LLVM IR      | llvm2ida  |  Patched IDA|
  | (microcode) +---------> (optimize, deobf) +----------> (clean code) |
  +-----------+           +------------------+           +-------------+
         ^                        |
         |        idavator        |
         +------------------------+

QuickStart

Install

pip install -e .

Requires Python >= 3.10, IDA Pro 9+ with idalib, and dependencies from pyproject.toml (llvmlite, numpy, typer).

Install with hcli

hcli is Hex-Rays' command-line tool; it installs IDAvator from the IDA Plugin Repository. Install hcli once:

curl -LsSf https://hcli.docs.hex-rays.com/install | sh        # macOS/Linux
iwr -useb https://hcli.docs.hex-rays.com/install.ps1 | iex    # Windows (PowerShell)

Then authenticate (see the hcli docs) and install the plugin:

hcli plugin search idavator
hcli plugin install idavator

hcli downloads the plugin into $IDAUSR/plugins (~/.idapro/plugins on macOS/Linux), where IDA loads it on the next launch. Requires IDA 9.0+.

Because IDAvator is a multi-module package with third-party dependencies (llvmlite, numpy, typer) that hcli does not install, also install the package into IDA's Python so those imports resolve:

pip install idavator

Lift (ida2llvm)

Lift a binary to LLVM IR (headless via idalib):

idavator ida2llvm -f binary -o output.ll
Option Description
-f, --file Input binary to analyze
-o, --output Output LLVM IR path (.ll)
--target Target triple: host (default) or ida
--ir-pass, --ir-passes Comma-separated post-lift IR pass pipeline
--annotate-concurrency Compatibility alias for --ir-pass concurrency
--log-type Log destination: file (default) or console (stderr)
--log-file Log file path when --log-type=file (default: idavator.log)
-v, --verbose Enable DEBUG logging
idavator ida2llvm -f binary -o output.ll --log-type console -v

Logging is configured before the lift module loads, so early messages use the chosen destination.

Run post-lift IR passes while writing the output:

idavator ida2llvm -f binary -o output.ll --ir-pass concurrency,verify

Available passes:

Pass Description
concurrency Appends metadata for recognized TLS helper calls, syscalls, and futex syscalls
verify Parses and verifies the final LLVM IR with llvmlite

For older scripts, --annotate-concurrency is still accepted and enables the concurrency pass.

Regression baselines (pytest)

Metric baselines live under tests/artifacts/ and compare lift/pass output without requiring full IR text diffs. Refresh them after intentional improvements:

pip install -e ".[dev]"
pytest --baseline-update
pytest

IDA-backed lift checks run only when idalib is available:

pytest -m ida

IDA plugin (GUI)

Install the package into IDA’s Python (pip install -e . from this repo), then load the plugin via ida-plugin.json (IDA 9+).

Menu Hotkey Purpose
Edit → IDAvator → Lifting Viewer Ctrl+Alt+L Interactive lift: add functions, declare-only toggle, preview IR, save .ll
Edit → IDAvator → Apply LLVM IR... Drop optimized .ll back into the open database (microcode)

Headless batch lift remains CLI-only (idavator ida2llvm). Drop is not on the CLI.

Workflow:

  1. Lift in IDA (viewer) or headless (idavator ida2llvm -f binary -o output.ll).
  2. Optimize LLVM offline (opt, custom passes).
  3. Edit → IDAvator → Apply LLVM IR... on the same database.
pip install -e .
python -m idavator ida2llvm -f binary -o output.ll

Requirements

  • Python >= 3.10, llvmlite, and IDA Pro 9+ with idalib

Contributing

The version lives in one place: __version__ in src/idavator/__init__.py (pyproject.toml derives the package version from it). The IDA Plugin Repository and hcli read the version out of ida-plugin.json, so the two must agree. To keep them in step automatically, enable the repo's git hook once per clone:

git config core.hooksPath .githooks

The pre-commit hook (.githooks/pre-commit) runs tools/sync_plugin_version.py, which copies __version__ into ida-plugin.json and stages it, so the manifest can never drift behind a version bump. The test suite runs the same check (tests/test_plugin_manifest.py) as a CI backstop.

Acknowledgements

  • sandspeare's ida2llvm continuation - Thank you for such a great tool!
  • loyaltypollution's original ida2llvm: The codebase sandspeare built on, fixing most of the bugs (float, unsupport inst, unsupport typecast and structure) and transforming it from an experimental toy to a stable tool.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idavator-0.1.0.tar.gz (285.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

idavator-0.1.0-py3-none-any.whl (185.2 kB view details)

Uploaded Python 3

File details

Details for the file idavator-0.1.0.tar.gz.

File metadata

  • Download URL: idavator-0.1.0.tar.gz
  • Upload date:
  • Size: 285.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for idavator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6592de368a830a29a74aa17bdcaeeae0218380c34b04f585664965473a9652ea
MD5 36eadef201407c4685c2fc4bcd26fb49
BLAKE2b-256 97d710ab98321ab12d887a289c0196c553ae8c182ced278cee6ff68c70eac1df

See more details on using hashes here.

Provenance

The following attestation bundles were made for idavator-0.1.0.tar.gz:

Publisher: deploy.yml on mahmoudimus/idavator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file idavator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: idavator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 185.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for idavator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a7c6f9f0aa65a68f47eee7e6cbf21df4ea26c26e50e1c6ded84f337fc85fa4c
MD5 38f77838f9967a795d5fda07778e47e7
BLAKE2b-256 9f431a931b69299b3f64f4f1d7899c2b443486fdfada2867f427a1cb2eb70911

See more details on using hashes here.

Provenance

The following attestation bundles were made for idavator-0.1.0-py3-none-any.whl:

Publisher: deploy.yml on mahmoudimus/idavator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page