Skip to main content

🧠 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 installs the plugin under $IDAUSR/plugins/idavator and first installs the matching idavator wheel into IDA's Python environment. The wheel declares llvmlite, numpy, and typer, so no separate pip install is needed for an HCLI installation. IDA loads the plugin on its next launch. Requires IDA 9.0+.

For source checkouts, embedders, or manual installs, install the package with the Python interpreter IDA uses:

python -m 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 the HCLI manifest version and its exact idavator==VERSION dependency before staging the manifest. 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.

Metadata

Release files for idavator 0.1.1

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

Source distribution (sdist)

Source distribution for idavator 0.1.1
File Size Uploaded
idavator-0.1.1.tar.gz 286.2 kB Details

Built distribution (wheel)

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

Total release size: 471.4 kB

Release files / idavator-0.1.1.tar.gz

Download URL idavator-0.1.1.tar.gz
Size 286.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ff3d87545ef616a5f744e0cb5adcb6316eaa55bdd7c154fe31f8505bf85e3a31
BLAKE2b-256 checksum
How to use checksums
c0b2727f4f49f77855ee03d48224a15fda5805411b8dd79d0d33519fcaa3088a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.

Transparency log

Release files / idavator-0.1.1-py3-none-any.whl

Download URL idavator-0.1.1-py3-none-any.whl
Size 185.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5661df2e63929d52930bcbaca920ff1fcd32eeced04a47a7f382972e85e4e004
BLAKE2b-256 checksum
How to use checksums
25d1202327aa6859f0f2e192bae7e114de376cceb0ed23c4e68c52f3bad4157e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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