Repository navigation
Rikune v2.7.0
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, CLIrikune plugins, MCPplugin_manage):- Added 4 declarative
@runtime_checkableprotocols:InspectorPlugin,BackendPlugin,StubPlugin, andToolPlugin. - 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 viaimportlib.metadata.entry_points(group="rikune.plugins")and~/.rikune/plugins/*.pydrop-ins. - Strict trust boundary (never scans CWD or sample directories; kill switch
RIKUNE_DISABLE_PLUGINS=1), per-plugin fault isolation, automaticstatic_triagehook integration, andrikune plugins scaffoldtemplate generator.
- Added 4 declarative
- Zero-Dep AI/ML Model & Supply-Chain Security Auditor (
static/ai_artifact.py, CLIrikune ai-inspect, MCPai_inspect, auto-routed instatic_triage):- Read-only
pickletools.genopsstatic bytecode auditor for Python Pickle & PyTorch ZIP checkpoints (AST-verified zeropickle/eval/execcalls) catching dangerous globals (os.system,subprocess.*,builtins.eval, etc.). - Pure-Python Safetensors, GGUF v2/v3 (including
tokenizer.chat_templateJinja2 SSTI detection), and ONNX (opset/op histogram, custom op domains,external_datapath-traversal detection) parsers.
- Read-only
- Zero-Dep Kernel, Cloud-Native & Accelerator Bytecode Inspector (
static/kernel_ir.py, CLIrikune kernel-ir, MCPkernel_ir_inspect, auto-routed instatic_triage):- Pure-Python Linux eBPF ELF (
EM_BPF) ISA disassembler (~85 Linux BPF helper names + privileged helper findings) and full.BTFtype-graph walker. - LLVM Bitcode (
.bc) raw/wrapper parser and CUDA Fatbin (0xBA55ED50, standalone & embedded.nv_fatbin) / PTX inspector with zlib/LZ4 decompression,sm_XXextraction, and GPU kernel name recovery.
- Pure-Python Linux eBPF ELF (
- Native RISC-V / Win32 PEB / macOS
objc_msgSendEmulation & Clang OLLVM Hardening (verify/unicorn_emu.py,graph/deobf_cfg.py):- Wired RISC-V 32/64 (
UC_ARCH_RISCV+ Linuxecall), Win32 x86 PEB/TEB + WinINet/WinHTTP/Crypt32/Advapi32 IOC recording, and macOS ARM64_objc_msgSendFoundation stubs directly intoemulate_function. - Hardened
deobf_cfg.pyfor prologue-hoisted 32-bit state constants, shared latch blocks, andin_degree >= 2varying-register dispatchers.
- Wired RISC-V 32/64 (
- 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.
- Added Homebrew formula (
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, CLIrikune types, MCPrecover_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 Pythonidc.add_strucsnippets.
- Tracks x86_64/ARM64 argument pointers (including register copies & stack spills), infers field sizes and semantic C types (
- Whole-Binary Semantic Patch Audit (
graph/patch_diff.py, CLIrikune diff --audit, MCPbinary_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, CLIrikune link-project, MCPlink_project):- Connects Android APK/DEX
nativemethods &System.loadLibraryto.soJNIJava_*/JNI_OnLoadexports, JS/Electron ASAR references to.wasmexports &.nodelibraries, and native imports to shared library exports.
- Connects Android APK/DEX
- Defensive Static Source-to-Sink Data-Flow Auditor (
graph/taint_audit.py, CLIrikune taint-audit, MCPtaint_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, CLIrikune trace-slice, MCPslice_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
ecalltable, Win32 (x86) PEB/TEB + WinINet/Crypt32/Registry stub recorder, and macOS ARM64objc_msgSendselector logger & Foundation stubs.
- Evidence-Backed Audit Reports, Validated YARA Synthesizer & Smart Triage Routing (
static/report_yara.py, CLIrikune report, MCPaudit_report, integrated instatic_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_stepsinsidestatic_triageto guide analysts and AI agents accurately across 48 primitives.
- Generates self-contained Markdown and XSS-escaped single-file HTML audit reports combining fingerprints, lineage,
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, CLIrikune win-inspect, MCPwin_inspect, auto-surfaced instatic_triage):- Offline Win32/NT API-hash resolver & PE cluster scanner supporting ROR13 (ASCII + Stephen Fewer / Cobalt Strike
dll+funcUTF-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 (0x33far jump /retf), and direct/indirect NT syscalls (Hell's/Halo's Gate / SysWhispers SSN extraction). - PE Overlay & high-entropy
.rsrcpayload inspection with--derive-overlayextraction directly into the workspace lineage tree.
- Offline Win32/NT API-hash resolver & PE cluster scanner supporting ROR13 (ASCII + Stephen Fewer / Cobalt Strike
- macOS / iOS Mach-O Objective-C 2.0, Swift 5+ & Code-Signature Inspector (
static/macho_meta.py, CLIrikune macho-meta, MCPmacho_inspect, auto-surfaced instatic_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
__cfstringliterals, Swift 5+__swift5_types/__swift5_fieldmd/$ssymbol demangling, andLC_CODE_SIGNATURECodeDirectory + XML Entitlements. - Fixed macOS SIP-protected system binary ingestion in
core/workspace.py(shutil.copyfileinstead ofshutil.copy2to avoidchflagsEPERMon/usr/bin/*and/System/Applications/*).
- Pure-Python 64-bit Mach-O & Universal Fat binary parser supporting modern arm64e / dyld4 chained fixups, PAC pointer unmasking, and relative ObjC method lists (
- Cross-Platform App Bundle & Bytecode Unpacker (
static/app_bundle.py, CLIrikune bundle, MCPbundle_inspect, auto-detected instatic_triage):- Supports PyInstaller (
MEIv2.0/v2.1 CArchive TOC + zlib extraction + version-independent safe.pycmarshal string &disinspection), Electron ASAR (Chrome Pickle manifest + path-traversal-safe--deriveextraction), React Native Hermes (.hbc), and Flutter Dart AOT (libapp.so) snapshots.
- Supports PyInstaller (
- Native OLLVM CFG Deobfuscator (
graph/deobf_cfg.py, CLIrikune deobf-cfg&decompile --deobf, MCPdeobf_cfg&function_decompile(deobf=True)):- Cross-platform x86_64 & ARM64 OLLVM Control-Flow Flattening (CFF) dispatcher detection & edge reconstruction (
cmp/sub/BST spines,cmov/cselconditional transitions), static opaque-predicate & dead-block pruning (including classic(x*(x±1)) & 1 == 0), and fixed-point MBA algebraic simplification on lifted pseudocode.
- Cross-platform x86_64 & ARM64 OLLVM Control-Flow Flattening (CFF) dispatcher detection & edge reconstruction (
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
syscallBackdoor Detector (static/heuristics.py): Detects genuine x86_64 inlinesyscall(0f 05) instructions in dynamically linked non-Go ELF executables using Capstone backward-alignment verification (eliminating false positives from displacement bytes insidelea/je) and infers Linux syscall numbers/names (SYS_execve, etc.), emitting aHIGHinline_raw_syscalltriage finding. - Lifter Empty-CFG Fallback (
engine.py): Whendecompile --lifthits a huge unrolled function where the primary backend's CFG (agfj) returns 0 blocks, automatically falls back toFastNativeBackend.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-2015KUZNYECHIK_SBOXrecognition across plaintext, single-byte XOR (kuznyechik_sbox_single_xor_*), and adjacent two-shareconstxor(kuznyechik_sbox_xor_masked) tables. - Commercial JS Protector Signal Extraction &
String.fromCharCodeFolding (static/js_deobf.py): Added staticString.fromCharCode(...)folding pass plusexported_symbols(module.exports/exports.*/ ESMexport) andfunction_outlineextraction 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, CLIrikune diff --semantic, MCPbinary_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).
- Upgraded zero-dep CFG pseudocode lifter with intra/cross-block register & expression tracking (
- Offline Android
JNIEnv*/JavaVM*Emulator (verify/jni.py, CLIrikune jni, MCPemulate_jni):- Synthetic 64-bit ARM64 & x86_64
JNIEnv*(235-slotJNINativeInterface) andJavaVM*(GetEnvslot 6) vtables in Unicorn, with automatic Pythonstr/bytes↔jstring/jbyteArraymarshaling, offlineJNI_OnLoadRegisterNativescapture, andJava_*static JNI export decoding.
- Synthetic 64-bit ARM64 & x86_64
- JS Control-Flow Unflattening & Pure-Python WebAssembly 1.0 Disassembler + Interpreter (
static/js_deobf.py,static/wasm_disasm.py, CLIrikune wasm, MCPwasm_inspect):- Added lexical-safe object literal proxy folding and
switch-whilecontrol-flow unflattening tojs_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), andi32/i64arithmetic/bitwise ops.
- Added lexical-safe object literal proxy folding and
- Unicorn Coverage-Guided Function Micro-Fuzzer (
verify/microfuzz.py, CLIrikune fuzz, MCPmicrofuzz_function):- Added
UC_HOOK_BLOCKbasic-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.
- Added
2.3.3 — Official PyPI OIDC Trusted Publishing Release
- PyPI Publish CI (
.github/workflows/release.yml): Stripdist/SHA256SUMS.txtbeforepypa/gh-action-pypi-publishsorikunepublishes 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(sorikune/verify/data/api_names.txtis bundled into single-file executables) and normalize Windows--namewithout double.exesuffix.
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/ARM64cmp/test/cbzpredicates, 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/x86TypeDescriptor+CompleteObjectLocator+ vtable method pointers), surfaced automatically instatic_triage.
- Added zero-dep structured CFG pseudocode lifter (
- Wave B — Mobile (Android APK/AXML/DEX) & .NET CIL RE (
static/axml.py,static/dex_disasm.py,static/dotnet_il.py, CLIrikune managed, MCPmanaged_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, andinvoke-*method resolution, plus APKlib/*.solineage derivation for Unicorn ARM64 JNI emulation. - Pure-Python .NET
MethodDef& Tiny/Fat CIL/MSIL disassembler with#USuser-string andMemberReftoken resolution.
- Zero-JDK binary
- Wave C — Frontend JavaScript & Mini-Program Deobfuscation (
static/js_deobf.py, CLIrikune js-deobf, MCPjs_deobfuscate):- Safe offline pure-Python deobfuscator (zero Node.js, zero
eval): lexical-safe beautifier,\xNN/\uNNNN/\u{...}unescaping, constant folding, bracket-to-dot normalization, staticobfuscator.iostring-array/rotation/Base64 decoding, business signal extraction (endpoints, headers, crypto/key/IV candidates), and--derivelineage support.
- Safe offline pure-Python deobfuscator (zero Node.js, zero
- Wave D — Binary Wire Protocols & Optional Runtime Bridge (
static/protocol.py,bridges/frida_rikune_bridge.py, CLIrikune protocol, MCPprotocol_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.
- Added cross-platform single-file executable builds (
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, CLIrikune crypto, MCPcrypto_transform):- Added 33rd executable MCP primitive and
rikune crypto encrypt|decryptCLI supporting FIPS/RFC-verifiedaes-ecb/cbc/ctr(128/192/256),sm4-ecb/cbc,chacha20(IETF & DJB),rc4,xtea-ecb/cbc,tea-ecb,rc5-ecb/cbc, andxorwith zero new external dependencies.
- Added 33rd executable MCP primitive and
- Large-Function Disassembly Digest & Budget Cap (
engine.py,cli.py):- Automatically prepends a compact structural digest (
Calls,Key Immediatesprioritizing 64-bit inline IVs/magics, andData/String Refs) to largedisassembly_fallbackoutputs (>6 KB), plus--max-charsonrikune decompileto prevent LLM context dilution.
- Automatically prepends a compact structural digest (
- Business-Code Function Filtering (
engine.py,cli.py,mcp_server.py):- Added
--exclude-stdliband--regextofunctions_list/rikune functionsto strip Go/C++/CRT stdlib noise when auditing 50 MB+ binaries.
- Added
- Controlled A/B Verification (
deepseek-v4.1-flash-fast):- Cut average wall time across 4 hard
CREBenchtasks (AES-constxor,RC5-constxor,XTEA-constxor,RC4-O3) by 1.82× (148.0svs269.6s) and total tokens by 28.5% (1.53Mvs2.14M) under strictly symmetricrun_pythonparity.
- Cut average wall time across 4 hard
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
.gopclntabRecovery (static/lang_symbols.py): Raised defaultparse_go_pclntabcap from2,000to100,000functions and prioritized main/third-party module packages ahead of Go stdlib (verified on a 50 MB stripped Go 1.25Caddybinary: all 62,449 functions indexed in1.9svia--backend fast, instantly surfacingcaddyhttp.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 (baselinevs.rikune) to measure true Harness Uplift independent of frontier model strength; fixed stale expected token inbenchmarks/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 viaemulate_functioninstead 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 0x80emulation (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.
- 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
- Zero-Subprocess
FastNativeBackend(backends/fast_native.py,engine.py):- Added
--backend fastpowered 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
aaawait) and acts as an always-available fallback backend on hosts without Rizin or Ghidra.
- Added
- 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, andCPIOSVR4 archive file listings (with ELF member tagging), surfaced directly instatic_triage.
- Added zero-dependency inspection of
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 mappingNOBITSsections (.bss) to overlapping.comment/.shstrtabfile offsets (raw_size=0, raw_offset=0, entropy=0.0), and annotate RIP-relative.bssreferences 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 (constxorAES/SM4 S-Box, FK, CK), and inline.text32-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), andCPIO(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.init0never hijacks user functions. - Use exact PE64
.pdataspans in Capstone fallback so tail-jumpedWinMainfunctions are never truncated. - Reverse-index
callrefs+axtjfallback inRizinBackend.xrefsso PLT imports (e.g.sym.imp.execl) report all calling functions. - Support
.pdataand explicit-address seeds incall_graph_slice. - Prioritize non-executable data sections (
.rdata/.rodata/.data) over.textopcode noise in defaultstrings_search, and downgrade standard MinGW CRT TLS callbacks toinfo.
- Prefer exact start-address match (then narrowest enclosing span) in Rizin target resolution so overlapping
- Unicorn PIE ELF &
@argNReads (verify/stubs.py,verify/unicorn_emu.py): Add fortified glibc_chkstubs (__printf_chk,__fprintf_chk,__sprintf_chk,__snprintf_chk), mount safe default fallback stubs on unimplemented ELF GOT/PLT function slots (preventing jumps to0x0into\x7fELF), and snapshot initial ABI argument registers so--read-mem out:@arg0:16survives caller-saved clobbering. - CLI & MCP Parity (
cli.py,engine.py,mcp_server.py): Addrikune xrefs,rikune cfg,functions --sort score|addr|size --min-addr --max-addr, positional length inrikune mem <sample> <addr> [len], positional seed inrikune slice <sample> [seed], and--length/--sizealiases onrikune 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-bitULONGmasking (verify/peb.py): Mask 32-bitULONG/DWORDstack/register parameters (cbSecret,cbInput,cbOutput,dwFlags,cbBuffer) with& 0xFFFFFFFFso 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 x64ntdll.dllsyscall prologues (4c 8b d1 b8 <ssn>), bump stub/trampoline stride to 32 bytes with pure0x90NOP padding (zero0xCC), populateKUSER_SHARED_DATAInterruptTime/SystemTimeand PEBProcessHeap/NumberOfHeaps/ProcessHeaps, and addTerminateProcess/TerminateThread/NtGetContextThread/NtContinue/RtlPcToFileHeader/HeapFree/Fls*/RaiseExceptionstubs. - Slicer, Xrefs & Rizin Fixes (
graph/slicer.py,static/pattern.py,backends/rizin.py): Register syntheticcode_*/pdata_*string-anchor seeds intoby_addrsoslice --string-anchornever returns empty; expanddata_xrefsbudget to 12 MiB with entry-point resync inside large encrypted sections; filteraddr == 0noise from Rizin xrefs. - CLI & Trace Parity (
cli.py,verify/trace.py): Addrikune diff,rikune trace --manual-iat, segment registers (cs/ss/ds/es/fs/gs) intrace --regs, and documenttypeinrikune 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 andplan-onlystubs with 27 direct, real executable MCP tools (includingmemory_read,function_cfg,solve_z3, and advisorytool_search), 3 MCP prompts (triage-binary,decrypt-and-verify,diff-security-patch), 3 read-only MCP resources, and matchingrikuneCLI commands (--json+ Rich tables). - Modern Binary Static Analysis (
static/):- Unified LIEF PE/ELF/Mach-O parsing (PE IAT VA normalization + PE64
.pdataRUNTIME_FUNCTIONrecovery), VA/offsetmemory_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
.gopclntabfunction/package recovery and pure-Python Rust/Itanium C++ symbol demangling.
- Unified LIEF PE/ELF/Mach-O parsing (PE IAT VA normalization + PE64
- Verification Loop (
verify/):- Unicorn function-level micro-emulator across x86 / x86_64 (SysV & Win64) / ARM64 (AAPCS64) on PE, ELF, and Mach-O, with
pre_callsinitializer chaining, coalesced.data/.bsswrite 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]) + dynamicLoadLibrary/GetProcAddress/dlsymstub 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/Z3symbolic & SMT constraint solving with Unicorn deterministic cross-verification.
- Unicorn function-level micro-emulator across x86 / x86_64 (SysV & Win64) / ARM64 (AAPCS64) on PE, ELF, and Mach-O, with
- 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, andtypeannotations. - Injection-safe two-way exporters for IDA Python, Ghidra, Rizin (
.rz), and Markdown reports.
- Call-graph slicing by seed functions, string anchors, suspicious API anchors (including MSVC direct-IAT
- Pluggable Backends & Drop-In Live IDE Bridges (
backends/,bridges/):- Headless Rizin and Ghidra backends backed by a persistent SQLite cache (
backend_cache). ExternalBridgeBackend+ drop-inbridges/ida_rikune_bridge.pyandbridges/ghidra_rikune_bridge.pyscripts for live two-way GUI interop (push_annotations).
- Headless Rizin and Ghidra backends backed by a persistent SQLite cache (
- 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).
- Untrusted-binary prompt-injection detection and framing in
Full Changelog: v2.6.0...v2.7.0