Skip to main content

A wrapper around IDAPro's `idat` binary

Project description

ida_runner

A small Python wrapper around IDA Pro's idat console binary. It builds and runs the idat command line for you — auto-analyzing a target, optionally running a headless script, and writing the resulting IDB to a chosen directory.

It is geared toward batch / headless workflows, with built-in file-type hints for Apple XNU kernelcaches, kernels, and kexts.

Installation

pip install ida_runner

Or from source:

git clone https://github.com/nixerr/ida_runner
cd ida_runner
pip install .

Requires Python 3.9+ and a working IDA Pro installation that includes the idat binary.

Usage

from ida_runner import IDARunner, IDABinaryType

# Point the runner at your IDA Pro application directory (the one containing `idat`)
IDARunner.set_idapro_path("/Applications/IDA Professional 9.0.app/Contents/MacOS")

# Auto-analyze a kernelcache and run a headless script against it
IDARunner.execute(
    type=IDABinaryType.KERNELCACHE,
    binary="/path/to/kernelcache",
    idbdir="/path/to/output",          # where to write the .i64 / .idb
    script="/path/to/script.py",       # IDAPython script to run headless
    args=["arg1", "arg2"],             # arguments passed to the script
    logfile="/path/to/ida.log",
    verbose=True,                      # print the constructed command
)

Binary types

IDABinaryType maps a high-level binary kind to the IDA loader type passed via idat -T:

Member IDA file type
KERNELCACHE Apple XNU kernelcache for ARM64e
KERNEL Mach-O
KEXT_FAT Fat Mach-O File, 2
KEXT Mach-O

API

IDARunner.set_idapro_path(path)

Class method. Sets the directory containing the idat binary. Must be called before execute.

IDARunner.execute(type, binary=None, idbdir=None, script=None, args=None, logfile=None, verbose=False)

Builds and runs the idat command. The resulting command is roughly:

idat -A -T<file type> [-S<script> <args>] [-L<logfile>] [-o<idbdir>] <binary>
  • type — an IDABinaryType selecting the IDA loader file type.
  • binary — path to the input binary.
  • idbdir — output directory / path for the database (-o).
  • script — IDAPython script to run headless (-S).
  • args — list of arguments appended to the script invocation.
  • logfile — log output path (-L).
  • verbose — print the command before running it.

Analysis runs in auto mode (-A) with idat's stdout/stderr suppressed.

License

MIT — see pyproject.toml.

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

ida_runner-0.0.2.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

ida_runner-0.0.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file ida_runner-0.0.2.tar.gz.

File metadata

  • Download URL: ida_runner-0.0.2.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for ida_runner-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2e3dcd5d3fc8ebcb7577948290463f3ac3b400a024006f9d48982d14b1cb31ad
MD5 22554be33c917ea0b89a96d6ffbc7fab
BLAKE2b-256 93bdd63d6e38412e23246226c24047221cf9dba676375ec934a8ceb83e891080

See more details on using hashes here.

File details

Details for the file ida_runner-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ida_runner-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for ida_runner-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f3978d8d50160205734fa95467a86419907698d65d4c8a3ba9885cd4a9b85a95
MD5 36bbb4b383209452f520c1aa823acd7a
BLAKE2b-256 b3963dccfc7fcb471d045a37d43b1d0521930decf8d0cd5d7e4355cb667a81f8

See more details on using hashes here.

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