
Agent-native CLI, das IDA Pro IDALib für zustandslose Binäranalyse mit JSON-Ausgabe kapselt: Disassemblierung, Hex-Rays-Dekompilierung, CFG, Xrefs, Strings sowie Batch- oder parallele IDB-Verarbeitung.
Agent-native CLI für die IDA Pro IDALib — jeder Befehl akzeptiert ein -d/--db-Flag, jede Antwort ist JSON.
-d/--db <PATH> (eine Binärdatei oder eine .i64); kein Daemon, keine Session-Verwaltung.Voraussetzungen: IDA Pro 9.1 (lizenziert, einmal gestartet) · IDA 9.1 SDK entpackt (nur zur Build-Zeit) · Rust + LLVM/Clang (bindgen-Anforderungen)
export IDADIR="/Applications/IDA Professional 9.1.app/Contents/MacOS" # IDA install dir
export IDASDKDIR=/path/to/idasdk91 # unpacked SDK (absolute path!)
git clone <this-repo> && cd idalib-cli
cargo install --path .
idalib-cli info # ✅ verify tool version, IDA version, license
Das SDK wird nur zur Build-Zeit benötigt; die Binärdatei linkt zur Laufzeit gegen deine lokale IDA-Installation. Dev-Checks ohne SDK:
cargo test --no-default-features --features stub-idalib.
Jeder Befehl benötigt -d/--db <PATH> — eine IDB-Datei (.i64) oder eine Binärdatei (eine
IDB wird bei der ersten Verwendung daneben erstellt). Adressen akzeptieren 0x401000 oder
401000. Die Ausgabe ist immer ein JSON-Dokument; Fehler gehen an stderr mit einem
Nicht-Null-Exit-Code.
| Befehl | Beschreibung |
|---|---|
idalib-cli -d <bin-or-i64> db info | Aufgelöste Pfade, IDB-Zustand, Größe |
| Befehl | Beschreibung |
|---|---|
idalib-cli -d <db> meta | Dateityp, Compiler, Bitness |
idalib-cli -d <db> processor | Prozessor-Info |
idalib-cli -d <db> segments | Alle Segmente |
idalib-cli -d <db> segments-by-range -a <ea> | Segment, das eine Adresse enthält |
idalib-cli -d <db> functions [-u] | Funktionsliste (-u = lib/thunk überspringen) |
idalib-cli -d <db> function -a <ea> | Eine Funktion: CFG, Blöcke, Xrefs |
idalib-cli -d <db> disasm -a <ea> [-n N] | N Instruktionen disassemblieren (Standard 8) |
idalib-cli -d <db> decompile -a <ea> [--all-blocks] | Hex-Rays-Pseudocode |
idalib-cli -d <db> insn -a <ea> | Einzelne Instruktion (+ group/is_call/is_ret-Klassifizierung) |
idalib-cli -d <db> strings | String-Liste |
idalib-cli -d <db> names | Benannte Speicherorte |
idalib-cli -d <db> xrefs [-a <ea>] [--all] [--from] | Xrefs zu einer Adresse (Standard) oder von ihr (--from), oder alle |
idalib-cli -d <db> find --text <s> | Text-Treffer suchen |
idalib-cli -d <db> find --imm 0x1337 | Immediate-Wert-Treffer suchen |
idalib-cli -d <db> find --pattern 554889e5 | Ein Hex-Byte-Muster suchen |
idalib-cli -d <db> bytes -a <ea> [-n N] [--width byte|word|dword|qword] | Rohbytes (Hexdump) oder Little-Endian-Integer |
idalib-cli -d <db> entries | Einstiegspunkte |
| Befehl | Beschreibung |
|---|---|
idalib-cli -d <db> comments get|set|append|remove -a <ea> [-c "text"] | Kommentare |
idalib-cli -d <db> bookmarks list|add|get|remove -a <ea> [-d "desc"] | Lesezeichen |
idalib-cli -d <db> rename -a <ea> -n <name> | Eine Funktion / ein Datenlabel umbenennen |
idalib-cli -d <db> set-type -a <ea> -t "int f(int, char *);" | Eine C-Typdeklaration anwenden (Funktionsprototyp / Datentyp) |
idalib-cli -d <db> signatures --make [--only-pat] | FLIRT-Signaturen generieren |
| Befehl | Beschreibung |
|---|---|
idalib-cli -d <db> batch -- <op> [<op>...] | Sequenzielle Ops, IDB einmal geöffnet |
idalib-cli parallel -d <list|glob> [--jobs N] -- <op> | Eine Op über viele DBs, jeweils als Subprozess |
idalib-cli info [--version|--ida|--all] | Tool-/IDA-Version, Lizenz |
🔎 Eine unbekannte Binärdatei triagieren
idalib-cli -d ./sample meta # what is it? (filetype/compiler/bitness)
idalib-cli -d ./sample segments # memory layout
idalib-cli -d ./sample strings # quick hints
idalib-cli -d ./sample functions -u # user code only
🔍 In eine Funktion eintauchen
idalib-cli -d ./sample function -a 0x401000 # CFG + blocks + xrefs
idalib-cli -d ./sample decompile -a 0x401000 # read the pseudo-code
idalib-cli -d ./sample disasm -a 0x401000 -n 20 # or the raw instructions
idalib-cli -d ./sample xrefs -a 0x401000 --all # who calls it
📝 Erkenntnisse annotieren (überlebt über Prozesse/Agenten hinweg)
idalib-cli -d ./sample comments set -a 0x401000 -c "parses config, see 0x402100"
idalib-cli -d ./sample bookmarks add -a 0x401000 -d "entry point"
idalib-cli -d ./sample comments get -a 0x401000 # verify
⚡ Massenanalyse vieler Samples
# first pass: create IDBs + overview for every sample
idalib-cli parallel -d "./samples/*.bin" -- "batch -- meta functions -u"
# deep pass: decompile one hot function in every IDB
idalib-cli parallel -d "./samples/*.i64" --jobs 8 -- "decompile -a 0x401000"
🔎 Rohdaten suchen & inspizieren
idalib-cli -d ./sample find --text "MAGIC" # string hits
idalib-cli -d ./sample find --imm 0x1337 # immediate-value hits
idalib-cli -d ./sample find --pattern 554889e5 # byte pattern (prologue)
idalib-cli -d ./sample bytes -a 0x401000 -n 32 # hexdump
idalib-cli -d ./sample bytes -a 0x401000 --width qword -n 4
idalib-cli -d ./sample xrefs -a 0x401000 --from # outgoing refs (calls)
idalib-cli -d ./sample rename -a 0x401000 -n decrypt # label it
idalib-cli -d ./sample set-type -a 0x401000 -t "int f(const char *, int);" # set prototype
🤖 Agent-freundliche gebündelte Inspektion (ein JSON-Dokument)
idalib-cli -d ./sample batch -- "meta" "segments" "functions -u" "decompile -a 0x401000"
Agent-Workflow-Anleitung: skills/idalib-cli/SKILL.md; ein ausführbares
End-to-End-Beispiel in examples/workflow.sh.
decompile){
"id": 7,
"start": "0x401000",
"end": "0x401080",
"size": 128,
"name": "main",
"blocks": 3,
"decompiled": true,
"pseudocode": "int __cdecl main(...) { ... }"
}
Optional ~/.idapro/idalib-cli/config.toml (Basisverzeichnis: $IDALIB_CLI_HOME):