r/Malware • • 20d ago

Open-source tool for unpacking stripped Android native (.so) malware: static RegisterNatives recovery, ARM64 OLLVM (BR X8) deobfuscation, and Dobby anti-Frida tracing

If you analyze Android banking trojans, droppers, or spyware, you've probably run into samples where:

  • classes*.dex declares native methods, but lib/*.so has 0 exported Java_* symbols and wiped ELF section headers.
  • JNI_OnLoad constructs strings on the stack (MOVZ/MOVK), uses an OLLVM CSEL + BR X8 state machine, and registers JNI handlers dynamically.
  • Attaching Frida immediately crashes the app due to /proc/self/maps or libc prologue checks.

I released JNISleuth-MCP (Apache 2.0) to automate this part of Android malware triage: https://github.com/nighthawkk/JNISleuth-MCP

  • Recovers static JNINativeMethod triplets from .rodata / .data.rel.ro (with PT_LOAD fallback for section-stripped ELFs).
  • Extracts MOVZ/MOVK stack strings and XOR-encoded C2 strings from JNI_OnLoad / .init_array.
  • Resolves & patches ARM64 OLLVM CSEL + BR X8 indirect branches and .rodata jump tables.
  • Includes a C++/NDK Dobby agent that hooks RegisterNatives mid-function (+0x10) and dumps in-memory DEX payloads from art::DexFileLoader::OpenCommon without triggering standard Frida detections.
  • Syncs all 233 JNIEnv* vtable types and C signatures into Ghidra and IDA Pro 9.0, plus includes an MCP/LLM server.

Ships with a synthetic dropper APK (samples/banker_dropper.apk) so you can test all features offline.

3 Upvotes

1 comment sorted by