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.

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.1.tar.gz (286.2 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.1-py3-none-any.whl (185.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: idavator-0.1.1.tar.gz
  • Upload date:
  • Size: 286.2 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.1.tar.gz
Algorithm Hash digest
SHA256 ff3d87545ef616a5f744e0cb5adcb6316eaa55bdd7c154fe31f8505bf85e3a31
MD5 7699c0825d8cb2fc6b07f0189ebc8a01
BLAKE2b-256 c0b2727f4f49f77855ee03d48224a15fda5805411b8dd79d0d33519fcaa3088a

See more details on using hashes here.

Provenance

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

Publisher: release.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.1-py3-none-any.whl.

File metadata

  • Download URL: idavator-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5661df2e63929d52930bcbaca920ff1fcd32eeced04a47a7f382972e85e4e004
MD5 22c2013763bb63688d9f65d742ecb5ae
BLAKE2b-256 25d1202327aa6859f0f2e192bae7e114de376cceb0ed23c4e68c52f3bad4157e

See more details on using hashes here.

Provenance

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

Publisher: release.yml on mahmoudimus/idavator

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 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