Repository navigation
Renef v0.4.0
Dynamic Instrumentation Toolkit for Android ARM64
What's New
-
Hook output on its own channel: what hooks and the syscall tracer print no longer ends up in front of the next command's reply. The server holds it until
watchoreventsasks; every other command prints only its own result.hooksshows ahits=counter per hook. -
Framed requests: replies end exactly where they end. Large scripts are delivered intact (the 64 KB limit is gone), late replies are no longer mixed up, and
exec/rpctake--timeout. -
Native hook engine reworked: one-instruction patch, correct relocation of PC-relative instructions, execute-only code, 128 hooks per session, and hooks on functions the agent itself uses (
malloc,write, ...). -
Java hooks rebuilt (Android 12+): a hooked method that throws, or a garbage collection at the wrong moment, no longer crashes the app.
float/doubleand stack arguments work, Java hooks are listed inhooksand removable withunhook. -
Python client rewritten: pure Python, talks to
renef_serverdirectly, no native library, works on macOS and Linux. -
New Lua APIs:
Interceptor.replace/Interceptor.revert,NativeFunctionwithfloat/double, async hooks,send(table)events,Module.disassemble,Process.enumerateRanges/enumerateThreads,Java.enumerateLoadedClasses, hooks on libraries that are not loaded yet. -
New commands:
rpc,events,exec --json,memdump(read a process without injecting),mcp,plugin/format,--headlessand--timeoutfor pipelines. -
Injection through a code cave: only one instruction of
malloc()changes while the agent loads. -
Plugins and recipes: new plugin types with JSON results, and ready-to-run scripts in
scripts/recipes/(SSL pinning, root / Frida / emulator detection, taint filter, engine capture, reflection dump). -
Fixed:
hookn,mson devices with Mali GPUs,watchunder continuous output,hookswith many hooks installed,Syscall.trace("openat"), commands containing//.
Full release notes and known limitations: https://renef.io (Release Notes, v0.4.0).
Commits
- Fix missing include and portable format specifiers in cmd_hookgen.cpp (3ea5171)
- Fix Java hook engine crash on hash-style=gnu-only libraries, add onLeave String replace (2b4151e)
- frida_labs: challenge_0xA uses NativeFunction (0.4.0); re-verified on 0.4.0 (fa5e320)
- examples: Renef Lua solutions for all 11 Frida_Labs challenges (dd40490)
- Release 0.4.0 (88728d2)
- Add pentest recipes, example plugins and test scripts (e92ac3d)
- Rewrite the Python client in pure Python (dfc2713)
- Rework the native hook engine, rebuild Java hooks, harden injection (cc52a88)
- Add framed requests, a separate channel for hook output and new commands (87ec335)
- List apps command fix (a99298b)
- Version bump (cdce38b)
- Memory allocation API added (alloc, allocStr, protect, free) (16df0e2)
- README updated (cffcd5f)
- Fixes (ea2748e)
- Macos and Android 11 fixes (23b3a2e)
- Android 11 fix (888b4ba)
- Pause mode changed with ptrace (cbca69e)
Downloads
Platform-specific releases:
renef-v0.4.0-linux-x64.tar.gz- Linux x64 client + scriptsrenef-v0.4.0-macos-x64.tar.gz- macOS Intel client + scriptsrenef-v0.4.0-macos-arm64.tar.gz- macOS Silicon client + scriptsrenef-v0.4.0-android-arm64.tar.gz- Android server + payload
All-in-one release:
renef-v0.4.0-all-platforms.tar.gz- All platforms + scripts
Verification
Verify downloads using SHA256 checksums in SHA256SUMS.txt
Quick Start
tar xzf renef-v0.4.0-linux-x64.tar.gz
cd renef-linux-x64
adb push ../renef-android-arm64/renef_server /data/local/tmp/
adb push ../renef-android-arm64/libagent.so /data/local/tmp/.r
adb shell chmod +x /data/local/tmp/renef_server
adb forward tcp:1907 localabstract:com.android.internal.os.RuntimeInit
adb shell /data/local/tmp/renef_server &
./renefDocumentation
System Requirements
Client:
- Linux (x64) or macOS (Intel/Silicon)
- libreadline (Linux/macOS)
Target Device:
- Android 5.0+ (API 21+)
- ARM64 architecture
- Root access (for injection)
Dependencies
Built with:
- Capstone 5.0.3
- Lua 5.4.7
- ASIO 1-30-2
- Android NDK r26b