JNIAnalyzer | Analysis scripts for Ghidra to work with Android NDK | Reverse Engineering library
kandi X-RAY | JNIAnalyzer Summary
kandi X-RAY | JNIAnalyzer Summary
This Ghidra extension contains various scripts that assists in analyzing Android NDK applications. A Binary Ninja version of this plugin is also available.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Main entry point
- Converts a primitive argument to its corresponding string representation
- Obtain the primitive signature for a primitive type
- Convert an array type to an array type
- Parses the given apk file
- Generate a native method name for the given method
- Apply the signature of a method
- Mangles unicode characters to unicode
- Apply JNI - Load signature to JNI
- Parse the argument signature
- Convert argument type to javadoc type
JNIAnalyzer Key Features
JNIAnalyzer Examples and Code Snippets
Community Discussions
Trending Discussions on JNIAnalyzer
QUESTION
I'm trying to understand an Android app which contains a native method named foo
in class com.app.Bar
Inside class Bar
there is a static clause that loads a shared object System.loadLibrary("libfoo.so")
which I assume is build with -fvisibility=hidden because the only export is JNI_OnLoad
, no JNIEXPORT void JNICALL Java_com_app_Bar_foo
which means public native int foo
does not follow the naming convention.
- What is the process when
foo
is invoked ? - How can I extract the address of
foo
? I'm familiar with Frida - Is there a way to output all
JNINativeMethod[] methods
?
What have I tried so far ?
JNIAnalyzer outputs 13K lines that look like
JNI_OnLoad@@Base+0x712e
Frida script to try to find
foo
address (did not work)
ANSWER
Answered 2019-Nov-06 at 10:30I've solved it using Frida
Hooking art::JNI::RegisterNativeMethods(_JNIEnv*, _jclass*, JNINativeMethod const*, int, bool)
and art::JNI::FindClass
after libart.so
module is loaded.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install JNIAnalyzer
In the cloned repository folder, use the command gradle -PGHIDRA_INSTALL_DIR=<YOUR GHIDRA INSTALLATION DIRECTORY>; specifying your Ghidra installation directory
In Ghidra, at the Projects window, click File -> Install Extensions... and chose the .zip file present in the JNIAnalyzer/dist folder
Restart Ghidra
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page