Skip to content

Rikune v2.7.0

Choose a tag to compare

@github-actions github-actions released this 03 Dec 07:16
· 1 commit to main since this release

Changelog

2.7.0 — Microkernel Plugin Architecture, AI Model Security Auditor, eBPF/BTF/LLVM/CUDA Inspector & RISC-V/Win32/ObjC Native Emulation

Zero new external dependencies — pure Python + existing cross-platform wheels, evolving Rikune into a Microkernel + Lightweight Plugin Engine (51 real executable MCP/CLI primitives):

  • Microkernel + Lightweight Plugin Registry (core/plugins.py, CLI rikune plugins, MCP plugin_manage):
    • Added 4 declarative @runtime_checkable protocols: InspectorPlugin, BackendPlugin, StubPlugin, and ToolPlugin.
    • PyInstaller-safe static built-in registration for core domain inspectors (win_malware, macho_meta, app_bundle, ai_artifact, kernel_ir, protocol, js_deobf), plus zero-dep external discovery via importlib.metadata.entry_points(group="rikune.plugins") and ~/.rikune/plugins/*.py drop-ins.
    • Strict trust boundary (never scans CWD or sample directories; kill switch RIKUNE_DISABLE_PLUGINS=1), per-plugin fault isolation, automatic static_triage hook integration, and rikune plugins scaffold template generator.
  • Zero-Dep AI/ML Model & Supply-Chain Security Auditor (static/ai_artifact.py, CLI rikune ai-inspect, MCP ai_inspect, auto-routed in static_triage):
    • Read-only pickletools.genops static bytecode auditor for Python Pickle & PyTorch ZIP checkpoints (AST-verified zero pickle/eval/exec calls) catching dangerous globals (os.system, subprocess.*, builtins.eval, etc.).
    • Pure-Python Safetensors, GGUF v2/v3 (including tokenizer.chat_template Jinja2 SSTI detection), and ONNX (opset/op histogram, custom op domains, external_data path-traversal detection) parsers.
  • Zero-Dep Kernel, Cloud-Native & Accelerator Bytecode Inspector (static/kernel_ir.py, CLI rikune kernel-ir, MCP kernel_ir_inspect, auto-routed in static_triage):
    • Pure-Python Linux eBPF ELF (EM_BPF) ISA disassembler (~85 Linux BPF helper names + privileged helper findings) and full .BTF type-graph walker.
    • LLVM Bitcode (.bc) raw/wrapper parser and CUDA Fatbin (0xBA55ED50, standalone & embedded .nv_fatbin) / PTX inspector with zlib/LZ4 decompression, sm_XX extraction, and GPU kernel name recovery.
  • Native RISC-V / Win32 PEB / macOS objc_msgSend Emulation & Clang OLLVM Hardening (verify/unicorn_emu.py, graph/deobf_cfg.py):
    • Wired RISC-V 32/64 (UC_ARCH_RISCV + Linux ecall), Win32 x86 PEB/TEB + WinINet/WinHTTP/Crypt32/Advapi32 IOC recording, and macOS ARM64 _objc_msgSend Foundation stubs directly into emulate_function.
    • Hardened deobf_cfg.py for prologue-hoisted 32-bit state constants, shared latch blocks, and in_degree >= 2 varying-register dispatchers.
  • Packaging & Repository Hygiene:
    • Added Homebrew formula (packaging/homebrew/rikune.rb), Scoop manifest (packaging/scoop/rikune.json), and Python v2 .github/dependabot.yml; cleaned 22 obsolete legacy v1 remote branches.

2.6.0 — Struct Recovery, Whole-Binary Patch Audit, Multi-Binary Linking, Static Taint Audit, VM Trace Slicing, RISC-V/Win32/ObjC Stubs & Evidence Reports

Zero new external dependencies — pure Python + existing cross-platform wheels, expanding Rikune to 48 real executable MCP/CLI primitives:

  • Cross-Function C Struct & Type Recovery (graph/type_recovery.py, CLI rikune types, MCP recover_types):
    • Tracks x86_64/ARM64 argument pointers (including register copies & stack spills), infers field sizes and semantic C types (char *, void *, size_t, uint32_t, etc.) from API usage, clusters compatible layouts across functions, and generates byte-exact padded C headers + IDA Python idc.add_struc snippets.
  • Whole-Binary Semantic Patch Audit (graph/patch_diff.py, CLI rikune diff --audit, MCP binary_diff(audit=True)):
    • Automatically ranks modified functions between two binary versions by security-review relevance (added bounds/null checks, dangerous API replacements, auth logic edits, error branches, constant changes).
  • Multi-Binary Project Cross-Linker (graph/project_link.py, CLI rikune link-project, MCP link_project):
    • Connects Android APK/DEX native methods & System.loadLibrary to .so JNI Java_*/JNI_OnLoad exports, JS/Electron ASAR references to .wasm exports & .node libraries, and native imports to shared library exports.
  • Defensive Static Source-to-Sink Data-Flow Auditor (graph/taint_audit.py, CLI rikune taint-audit, MCP taint_audit):
    • Performs intra-procedural x86_64/ARM64 register & stack-slot taint tracking with bounds-guard detection, inter-procedural call chains, and concrete defensive remediation recommendations.
  • VM Trace Slicing & Cross-Platform Emulation Stubs (verify/trace_slice.py, verify/platform_stubs.py, CLI rikune trace-slice, MCP slice_trace):
    • Live Unicorn tracing with indirect-branch VM dispatcher detection, hot-handler ranking, and backward dependency slicing to eliminate VM fetch/decode overhead.
    • Added modular RISC-V 32/64 Unicorn emulation & Linux ecall table, Win32 (x86) PEB/TEB + WinINet/Crypt32/Registry stub recorder, and macOS ARM64 objc_msgSend selector logger & Foundation stubs.
  • Evidence-Backed Audit Reports, Validated YARA Synthesizer & Smart Triage Routing (static/report_yara.py, CLI rikune report, MCP audit_report, integrated in static_triage):
    • Generates self-contained Markdown and XSS-escaped single-file HTML audit reports combining fingerprints, lineage, [VERIFIED] annotations, and reproducible commands.
    • Synthesizes defensive YARA rules empirically validated via yara_x.compile() + live self-match verification against the sample.
    • Adds format- and finding-aware recommended_next_steps inside static_triage to guide analysts and AI agents accurately across 48 primitives.

2.5.0 — Cross-Platform Pro Suite: Windows Evasion/API-Hash, macOS/iOS Mach-O ObjC/Swift/Entitlements, App Bundles & Native OLLVM Deobfuscation

Zero new external dependencies — pure Python + existing cross-platform wheels, expanding Rikune to 43 real executable MCP/CLI primitives across Windows, Linux, and macOS:

  • Windows Malware & PE Deep Analyzer (static/win_malware.py, CLI rikune win-inspect, MCP win_inspect, auto-surfaced in static_triage):
    • Offline Win32/NT API-hash resolver & PE cluster scanner supporting ROR13 (ASCII + Stephen Fewer / Cobalt Strike dll+func UTF-16LE formula), DJB2, CRC32, FNV-1a, and SDBM backed by the bundled 549-API dictionary.
    • Capstone-verified evasion detection: x64/x86 PEB/TEB walking (gs:[0x60] / fs:[0x30]), Heaven's Gate (0x33 far jump / retf), and direct/indirect NT syscalls (Hell's/Halo's Gate / SysWhispers SSN extraction).
    • PE Overlay & high-entropy .rsrc payload inspection with --derive-overlay extraction directly into the workspace lineage tree.
  • macOS / iOS Mach-O Objective-C 2.0, Swift 5+ & Code-Signature Inspector (static/macho_meta.py, CLI rikune macho-meta, MCP macho_inspect, auto-surfaced in static_triage):
    • Pure-Python 64-bit Mach-O & Universal Fat binary parser supporting modern arm64e / dyld4 chained fixups, PAC pointer unmasking, and relative ObjC method lists (0x80000000).
    • Recovers ObjC classes/superclasses/metaclasses, instance & class methods with IMP addresses, properties, ivars, UTF-8/UTF-16LE __cfstring literals, Swift 5+ __swift5_types / __swift5_fieldmd / $s symbol demangling, and LC_CODE_SIGNATURE CodeDirectory + XML Entitlements.
    • Fixed macOS SIP-protected system binary ingestion in core/workspace.py (shutil.copyfile instead of shutil.copy2 to avoid chflags EPERM on /usr/bin/* and /System/Applications/*).
  • Cross-Platform App Bundle & Bytecode Unpacker (static/app_bundle.py, CLI rikune bundle, MCP bundle_inspect, auto-detected in static_triage):
    • Supports PyInstaller (MEI v2.0/v2.1 CArchive TOC + zlib extraction + version-independent safe .pyc marshal string & dis inspection), Electron ASAR (Chrome Pickle manifest + path-traversal-safe --derive extraction), React Native Hermes (.hbc), and Flutter Dart AOT (libapp.so) snapshots.
  • Native OLLVM CFG Deobfuscator (graph/deobf_cfg.py, CLI rikune deobf-cfg & decompile --deobf, MCP deobf_cfg & function_decompile(deobf=True)):
    • Cross-platform x86_64 & ARM64 OLLVM Control-Flow Flattening (CFF) dispatcher detection & edge reconstruction (cmp/sub/BST spines, cmov/csel conditional transitions), static opaque-predicate & dead-block pruning (including classic (x*(x±1)) & 1 == 0), and fixed-point MBA algebraic simplification on lifted pseudocode.

2.4.1 — Professional-Grade Stress Hardening

Hardened static triage, crypto recognition, CFG lifting, and commercial JS protector handling based on professional-grade reverse-engineering samples:

  • Inline Raw syscall Backdoor Detector (static/heuristics.py): Detects genuine x86_64 inline syscall (0f 05) instructions in dynamically linked non-Go ELF executables using Capstone backward-alignment verification (eliminating false positives from displacement bytes inside lea/je) and infers Linux syscall numbers/names (SYS_execve, etc.), emitting a HIGH inline_raw_syscall triage finding.
  • Lifter Empty-CFG Fallback (engine.py): When decompile --lift hits a huge unrolled function where the primary backend's CFG (agfj) returns 0 blocks, automatically falls back to FastNativeBackend.cfg() before lifting so callers still receive structured pseudocode instead of raw multi-thousand-line disassembly.
  • GOST Kuznyechik S-Box Detection (static/crypto_scan.py): Added RFC 7801 / GOST R 34.12-2015 KUZNYECHIK_SBOX recognition across plaintext, single-byte XOR (kuznyechik_sbox_single_xor_*), and adjacent two-share constxor (kuznyechik_sbox_xor_masked) tables.
  • Commercial JS Protector Signal Extraction & String.fromCharCode Folding (static/js_deobf.py): Added static String.fromCharCode(...) folding pass plus exported_symbols (module.exports / exports.* / ESM export) and function_outline extraction to locate real entrypoints past decoy functions.

2.4.0 — Lifter v2, Semantic CFG Patch Diff, Offline Android JNI, JS Unflattening, WASM Interpreter & Unicorn Micro-Fuzzer

Zero new external dependencies — pure Python + existing cross-platform wheels:

  • Lifter v2 & Semantic CFG Patch Diff (graph/lifter.py, graph/patch_diff.py, CLI rikune diff --semantic, MCP binary_diff(semantic_target=...)):
    • Upgraded zero-dep CFG pseudocode lifter with intra/cross-block register & expression tracking (arg1..arg4, local_XX), struct field clustering (arg1->field_0x58), inferred call arguments, and dominator-based natural loop back-edge recovery.
    • Added semantic CFG patch diffing detecting added/removed bounds checks, changed/replaced call targets, changed constants, and concise security hints (CVE fix vs. auth bypass/backdoor).
  • Offline Android JNIEnv* / JavaVM* Emulator (verify/jni.py, CLI rikune jni, MCP emulate_jni):
    • Synthetic 64-bit ARM64 & x86_64 JNIEnv* (235-slot JNINativeInterface) and JavaVM* (GetEnv slot 6) vtables in Unicorn, with automatic Python str/bytes ↔ jstring/jbyteArray marshaling, offline JNI_OnLoad RegisterNatives capture, and Java_* static JNI export decoding.
  • JS Control-Flow Unflattening & Pure-Python WebAssembly 1.0 Disassembler + Interpreter (static/js_deobf.py, static/wasm_disasm.py, CLI rikune wasm, MCP wasm_inspect):
    • Added lexical-safe object literal proxy folding and switch-while control-flow unflattening to js_deobfuscate.
    • Added zero-dep WebAssembly 1.0 WAT disassembler and bounded offline stack-machine interpreter supporting active data segments, linear memory seeding/reading, structured control flow (block/loop/if/br/br_if/call), and i32/i64 arithmetic/bitwise ops.
  • Unicorn Coverage-Guided Function Micro-Fuzzer (verify/microfuzz.py, CLI rikune fuzz, MCP microfuzz_function):
    • Added UC_HOOK_BLOCK basic-block coverage-guided micro-fuzzing with fast context restore, auto-extracted code dictionary, target PC / target return-value early stop, and deduplicated crash PoC discovery.

2.3.3 — Official PyPI OIDC Trusted Publishing Release

  • PyPI Publish CI (.github/workflows/release.yml): Strip dist/SHA256SUMS.txt before pypa/gh-action-pypi-publish so rikune publishes cleanly to official PyPI (uvx rikune / uv tool install rikune / pip install rikune).

2.3.2 — Release Asset Deduplication & PyPI Metadata Polish

  • GitHub Release CI (.github/workflows/release.yml): Deduplicate release asset globs (rikune-linux-*, rikune-macos-*, rikune-windows-*) so wheel/sdist are never uploaded twice alongside standalone binaries.
  • PyPI Metadata (pyproject.toml): Add PyPI trove classifiers and [project.urls] (Homepage, Repository, Issues, Changelog) ready for official PyPI Trusted Publishing.

2.3.1 — Standalone Single-File Binary Packaging Fix (--collect-data rikune)

  • PyInstaller Standalone Packaging (.github/workflows/release.yml): Include --collect-data rikune (so rikune/verify/data/api_names.txt is bundled into single-file executables) and normalize Windows --name without double .exe suffix.

2.3.0 — Business, Software, Mobile, Protocol & Frontend JS RE (Zero-Venv, Single-Binary Releases)

Zero new mandatory dependencies — every new core capability runs in-process in pure Python, plus automated single-file executable builds for Linux, macOS, and Windows:

  • Wave A — Software & Business Logic RE (graph/lifter.py, static/rtti.py, static/heuristics.py):
    • Added zero-dep structured CFG pseudocode lifter (decompile --lift / function_decompile(lift=True)) lifting x86/ARM64 cmp/test/cbz predicates, inlining short leaf branches, resolving annotations/calls/strings, and highlighting duplicate-branch control-flow anomalies.
    • Added pure-Python C++ RTTI & vtable recovery for Itanium ABI (ELF/Mach-O _ZTV/_ZTI) and MSVC PE (x64/x86 TypeDescriptor + CompleteObjectLocator + vtable method pointers), surfaced automatically in static_triage.
  • Wave B — Mobile (Android APK/AXML/DEX) & .NET CIL RE (static/axml.py, static/dex_disasm.py, static/dotnet_il.py, CLI rikune managed, MCP managed_inspect):
    • Zero-JDK binary AndroidManifest.xml (AXML) decoder (UTF-8/UTF-16LE string pools, permissions, exported components, deep links).
    • Pure-Python Dalvik DEX method indexer & bytecode disassembler with inline const-string, field, and invoke-* method resolution, plus APK lib/*.so lineage derivation for Unicorn ARM64 JNI emulation.
    • Pure-Python .NET MethodDef & Tiny/Fat CIL/MSIL disassembler with #US user-string and MemberRef token resolution.
  • Wave C — Frontend JavaScript & Mini-Program Deobfuscation (static/js_deobf.py, CLI rikune js-deobf, MCP js_deobfuscate):
    • Safe offline pure-Python deobfuscator (zero Node.js, zero eval): lexical-safe beautifier, \xNN/\uNNNN/\u{...} unescaping, constant folding, bracket-to-dot normalization, static obfuscator.io string-array/rotation/Base64 decoding, business signal extraction (endpoints, headers, crypto/key/IV candidates), and --derive lineage support.
  • Wave D — Binary Wire Protocols & Optional Runtime Bridge (static/protocol.py, bridges/frida_rikune_bridge.py, CLI rikune protocol, MCP protocol_inspect):
    • Zero-dep schema-less Protobuf wire decoder (recursive nested messages), TLV/length-prefixed framing detector, and classic PCAP + PCAPNG L4 payload parser (with automatic embedded Protobuf decode).
    • Optional drop-in bridges/frida_rikune_bridge.py (loopback HTTP + Bearer auth + offline --self-test) for pushing live runtime captures into Rikune annotations.
  • Wave E — Truly Zero-Venv Standalone Distribution (.github/workflows/release.yml):
    • Added cross-platform single-file executable builds (rikune-linux-x86_64, rikune-macos-arm64, rikune-windows-x86_64.exe) uploaded directly to GitHub Releases alongside wheel/sdist and GHCR Docker images.

2.2.0 — Verified Cipher Primitive, Large-Function Digests & Stdlib Noise Filtering

Driven by controlled same-model (deepseek-v4.1-flash-fast) A/B ablation findings:

  • Verified Pure-Python Cipher Primitive (static/crypto_ops.py, CLI rikune crypto, MCP crypto_transform):
    • Added 33rd executable MCP primitive and rikune crypto encrypt|decrypt CLI supporting FIPS/RFC-verified aes-ecb/cbc/ctr (128/192/256), sm4-ecb/cbc, chacha20 (IETF & DJB), rc4, xtea-ecb/cbc, tea-ecb, rc5-ecb/cbc, and xor with zero new external dependencies.
  • Large-Function Disassembly Digest & Budget Cap (engine.py, cli.py):
    • Automatically prepends a compact structural digest (Calls, Key Immediates prioritizing 64-bit inline IVs/magics, and Data/String Refs) to large disassembly_fallback outputs (>6 KB), plus --max-chars on rikune decompile to prevent LLM context dilution.
  • Business-Code Function Filtering (engine.py, cli.py, mcp_server.py):
    • Added --exclude-stdlib and --regex to functions_list / rikune functions to strip Go/C++/CRT stdlib noise when auditing 50 MB+ binaries.
  • Controlled A/B Verification (deepseek-v4.1-flash-fast):
    • Cut average wall time across 4 hard CREBench tasks (AES-constxor, RC5-constxor, XTEA-constxor, RC4-O3) by 1.82× (148.0s vs 269.6s) and total tokens by 28.5% (1.53M vs 2.14M) under strictly symmetric run_python parity.

2.1.1 — Controlled A/B Harness Evaluator, Full 100k Go .gopclntab, ARIA/Camellia Detection & Verification Rule

Driven by controlled same-model A/B ablation (deepseek-v4.1-flash-fast: Baseline Unix tools vs. Rikune v2.1):

  • Full Go .gopclntab Recovery (static/lang_symbols.py): Raised default parse_go_pclntab cap from 2,000 to 100,000 functions and prioritized main/third-party module packages ahead of Go stdlib (verified on a 50 MB stripped Go 1.25 Caddy binary: all 62,449 functions indexed in 1.9s via --backend fast, instantly surfacing caddyhttp.checkDebugMode @ 0x15d3220).
  • Expanded Obscure Cipher Detection (static/crypto_scan.py): Added static & inline-immediate detection for ARIA-128 (aria_ck1_*, aria_ck1_inline_imm, aria_ck1_xor_masked) and Camellia-128 (camellia_sigma1/2).
  • Controlled Same-Model A/B Harness Evaluator (benchmarks/ab_harness_eval.py): Added reusable, environment-configured OpenAI-compatible A/B harness (baseline vs. rikune) to measure true Harness Uplift independent of frontier model strength; fixed stale expected token in benchmarks/agent_eval.py.
  • Verification-First Prompting (SKILL.md, mcp_server.py): Elevated the rule to always validate candidate solutions on the binary's real validator/oracle via emulate_function instead of trusting hand-written Python reimplementations.

2.1.0 — Cross-Arch Embedded Emulation, Linux Syscalls, Stack-Buffer Batch Decrypt & FastNativeBackend

  • MIPS32 (BE/LE) & ARM32 Emulation + Linux User-Mode Syscall Engine (verify/syscall.py, verify/unicorn_emu.py):
    • Extended Unicorn micro-emulation to full MIPS32 (big- and little-endian) and ARM32 calling conventions, register maps, return hooks, and fault disassembly.
    • Added cross-architecture Linux user-mode syscall / svc / swi / int 0x80 emulation (write, read, brk, mmap, mprotect, munmap, exit, exit_group, getpid/getuid/gettid, uname, clock_gettime, gettimeofday, getrandom, arch_prctl), capturing stdout to __syscall_stdout__ and structured traces to __syscalls__.
  • Stack-Constructed Ciphertext Forwarding in batch-decrypt (verify/batch_decrypt.py):
    • Automatically captures caller-initialized stack buffers and non-stack writes during the pre-call micro-emulation window (32+ instruction lookback) and seeds the remapped scratch buffer via write_memory, recovering stack-assembled ciphertexts/keys cleanly.
  • Zero-Subprocess FastNativeBackend (backends/fast_native.py, engine.py):
    • Added --backend fast powered in-process by LIEF + Go .gopclntab + PE64 .pdata + WASM exports + Capstone (list_functions, decompile, xrefs, cfg, diff).
    • Indexes 40–50 MB production Go binaries in ~1.1s (zero Rizin aaa wait) and acts as an always-available fallback backend on hosts without Rizin or Ghidra.
  • Embedded Firmware Inspection (static/firmware.py, static/heuristics.py):
    • Added zero-dependency inspection of U-Boot uImage (CRC32-verified), SquashFS v4 (exact 10-field superblock: compression, inodes, block size, bytes used), FDT/DTB, and CPIO SVR4 archive file listings (with ELF member tagging), surfaced directly in static_triage.

2.0.2 — External Benchmark Hardening (AgentRE-Bench, CREBench, BinaryAudit & BIOPSY-Bench)

Driven by live blind evaluations across four public 2026 RE benchmarks (AgentRE-Bench, CREBench, BinaryAudit, BIOPSY-Bench):

  • ELF SHT_NOBITS (.bss) Fix (static/formats.py, static/disasm.py): Stop mapping NOBITS sections (.bss) to overlapping .comment/.shstrtab file offsets (raw_size=0, raw_offset=0, entropy=0.0), and annotate RIP-relative .bss references cleanly as [.bss].
  • Obfuscated & Inline Crypto Detection (static/crypto_scan.py): Detect single-byte XORed AES/SM4 S-boxes, adjacent two-share XOR-masked tables (constxor AES/SM4 S-Box, FK, CK), and inline .text 32-bit immediate ChaCha20 sigma constants.
  • Firmware Carving (static/pattern.py): Add validated carving for embedded router/IoT firmware artifacts — SquashFS (hsqs/sqsh), U-Boot uImage (with header CRC32 verification), FDT/DTB (0xd00dfeed), and CPIO (070701).
  • Decompile, Xrefs & Slicer Accuracy (backends/rizin.py, graph/slicer.py, static/strings.py, static/heuristics.py):
    • Prefer exact start-address match (then narrowest enclosing span) in Rizin target resolution so overlapping entry.init0 never hijacks user functions.
    • Use exact PE64 .pdata spans in Capstone fallback so tail-jumped WinMain functions are never truncated.
    • Reverse-index callrefs + axtj fallback in RizinBackend.xrefs so PLT imports (e.g. sym.imp.execl) report all calling functions.
    • Support .pdata and explicit-address seeds in call_graph_slice.
    • Prioritize non-executable data sections (.rdata/.rodata/.data) over .text opcode noise in default strings_search, and downgrade standard MinGW CRT TLS callbacks to info.
  • Unicorn PIE ELF & @argN Reads (verify/stubs.py, verify/unicorn_emu.py): Add fortified glibc _chk stubs (__printf_chk, __fprintf_chk, __sprintf_chk, __snprintf_chk), mount safe default fallback stubs on unimplemented ELF GOT/PLT function slots (preventing jumps to 0x0 into \x7fELF), and snapshot initial ABI argument registers so --read-mem out:@arg0:16 survives caller-saved clobbering.
  • CLI & MCP Parity (cli.py, engine.py, mcp_server.py): Add rikune xrefs, rikune cfg, functions --sort score|addr|size --min-addr --max-addr, positional length in rikune mem <sample> <addr> [len], positional seed in rikune slice <sample> [seed], and --length/--size aliases on rikune disasm.

2.0.1 — Final Exam A+ Polish (Win64 BCrypt HMAC, ntdll Syscall Prologues, PEB Heaps & CLI Parity)

Driven by the full v2.0.0 field exam on the 5.25 MB XYVM crackme.exe:

  • Win64 BCrypt* 32-bit ULONG masking (verify/peb.py): Mask 32-bit ULONG/DWORD stack/register parameters (cbSecret, cbInput, cbOutput, dwFlags, cbBuffer) with & 0xFFFFFFFF so MSVC 32-bit stack writes with stale upper bits never corrupt HMAC-SHA256.
  • Stealthier Synthetic DLLs & Stubs (verify/peb.py, verify/stubs.py): Emit realistic Win10 x64 ntdll.dll syscall prologues (4c 8b d1 b8 <ssn>), bump stub/trampoline stride to 32 bytes with pure 0x90 NOP padding (zero 0xCC), populate KUSER_SHARED_DATA InterruptTime/SystemTime and PEB ProcessHeap/NumberOfHeaps/ProcessHeaps, and add TerminateProcess/TerminateThread/NtGetContextThread/NtContinue/RtlPcToFileHeader/HeapFree/Fls*/RaiseException stubs.
  • Slicer, Xrefs & Rizin Fixes (graph/slicer.py, static/pattern.py, backends/rizin.py): Register synthetic code_*/pdata_* string-anchor seeds into by_addr so slice --string-anchor never returns empty; expand data_xrefs budget to 12 MiB with entry-point resync inside large encrypted sections; filter addr == 0 noise from Rizin xrefs.
  • CLI & Trace Parity (cli.py, verify/trace.py): Add rikune diff, rikune trace --manual-iat, segment registers (cs/ss/ds/es/fs/gs) in trace --regs, and document type in rikune annotate --help.

2.0.0 — Clean-Slate Rewrite (Verified Reverse-Engineering Core Engine)

Rikune v2 is a ground-up architectural rewrite of the v1 TypeScript/Node monolith (preserved on git tag v1-legacy), shrinking the codebase by >97% while adding a verification-first execution loop.

Highlights

  • Native Python Core (uv): Unified single-language engine running natively on macOS (Apple Silicon & Intel), Linux, and Windows — no Linux-only/amd64 container wall.
  • 27 Real Executable MCP Tools + tool_search + Native Prompts & Resources + CLI-First UX: Replaced v1's 117 plugins and plan-only stubs with 27 direct, real executable MCP tools (including memory_read, function_cfg, solve_z3, and advisory tool_search), 3 MCP prompts (triage-binary, decrypt-and-verify, diff-security-patch), 3 read-only MCP resources, and matching rikune CLI commands (--json + Rich tables).
  • Modern Binary Static Analysis (static/):
    • Unified LIEF PE/ELF/Mach-O parsing (PE IAT VA normalization + PE64 .pdata RUNTIME_FUNCTION recovery), VA/offset memory_read, entropy/suspicious-import heuristics, VA/section-filtered ASCII/UTF-16LE strings, YARA-X, RIP/ADRP-annotated Capstone disassembly.
    • Zero-dependency cryptographic & compression constant scanner (AES/ChaCha20/SHA256/CRC32/SM4/TEA/Base64/Zstd/XZ).
    • Go .gopclntab function/package recovery and pure-Python Rust/Itanium C++ symbol demangling.
  • Verification Loop (verify/):
    • Unicorn function-level micro-emulator across x86 / x86_64 (SysV & Win64) / ARM64 (AAPCS64) on PE, ELF, and Mach-O, with pre_calls initializer chaining, coalesced .data/.bss write capture, and automatic SMC/OEP detection (stop_on_smc).
    • Cross-ABI libc/WinAPI stub engine (incl. GetCurrentProcess/GetCurrentThread/GetThreadContext/timing stubs + safe default logging fallback for unimplemented PE IAT slots) + synthetic Windows TEB/PEB (gs:[0x60] / fs:[0x30]) + dynamic LoadLibrary/GetProcAddress/dlsym stub slot allocation.
    • Automatic call-site argument recovery and batch micro-emulation string decryption (emulate_batch_decrypt).
    • Static (ROR13/ROR7/DJB2/SDBM/FNV1a/CRC32) and Unicorn dynamic custom-hash API resolution (resolve_api_hashes).
    • Optional angr/Z3 symbolic & SMT constraint solving with Unicorn deterministic cross-verification.
  • Token-Aware Graph & Live Overlay (graph/):
    • Call-graph slicing by seed functions, string anchors, suspicious API anchors (including MSVC direct-IAT call qword [iat_va] resolution), and detected crypto constants (AES/ChaCha20/SHA256/CRC32/SM4/TEA).
    • Explicit DecompileResult.output_kind ("pseudocode" vs "disassembly_fallback") and Rizin decompiler capability probing.
    • Persistent live overlay for rename, comment, decoded_value, tag, and type annotations.
    • Injection-safe two-way exporters for IDA Python, Ghidra, Rizin (.rz), and Markdown reports.
  • Pluggable Backends & Drop-In Live IDE Bridges (backends/, bridges/):
    • Headless Rizin and Ghidra backends backed by a persistent SQLite cache (backend_cache).
    • ExternalBridgeBackend + drop-in bridges/ida_rikune_bridge.py and bridges/ghidra_rikune_bridge.py scripts for live two-way GUI interop (push_annotations).
  • Security & Benchmarks:
    • Untrusted-binary prompt-injection detection and framing in ResponseGuard.
    • SHA-256 read-only sample vault with parent-child derivation lineage (sample_derive, unpack_sample).
    • Reproducible 8-case benchmark suite (benchmarks/runner.py) + LLM-in-the-loop agent eval harness (benchmarks/agent_eval.py).

Full Changelog: v2.6.0...v2.7.0