File tree Expand file tree Collapse file tree 8 files changed +89
-20
lines changed
Expand file tree Collapse file tree 8 files changed +89
-20
lines changed Original file line number Diff line number Diff line change 11* .swp
2+ .DS_Store
3+ JadxFindJNI.zip
Original file line number Diff line number Diff line change 1- ghidra :
2- install -d ${HOME} /ghidra_scripts/data
3- install -m 644 ghidra/jni_helper.py ${HOME} /ghidra_scripts/
4- install -m 644 headers/jni.h.gdt ${HOME} /ghidra_scripts/data/jni.h.gdt
1+ jni :
2+ make -C JadxFindJNI
53
6- ida :
7- echo " TODO "
4+ demo :
5+ make -C demo
86
9- r2 :
10- echo " TODO "
7+ dist : jni
8+ zip JadxFindJNI.zip JadxFindJNI/JadxFindJNI.jar JadxFindJNI/lib/ * .jar
119
12- .PHONY : ghidra
10+ clean :
11+ make -C JadxFindJNI clean
12+ make -C demo clean
13+ rm -rf JadxFindJNI.zip
14+
15+ .PHONY : jni demo clean dist
Original file line number Diff line number Diff line change 11JNI Helper
22===
33
4- Find JNI function signatures from APK and then load to your decompiler tools!
4+ Find JNI function signatures from APK and load to reverse tools.
55
66
77# Usage
88
9- 1 . use [ JadxFindJNI.jar] [ JadxFindJNI ] to generate signature.json
9+ 1 . use [ JadxFindJNI.jar] ( JadxFindJNI ) to generate signature.json
10102 . load signature.json into Ghidra/IDA/Radare2
1111
12- # Ghidra Plugin
12+ ## JadxFindJNI.jar
1313
14- Install :
15- ``` sh
16- $ make ghidra
14+ Build :
15+ ```
16+ $ make jni
1717```
1818
19- Load:
19+ Or you can just download the [ latest release] [ dist ] .
20+
21+ Usage:
22+ ``` sh
23+ $ java -jar JadxFindJNI/JadxFindJNI.jar
24+ Usage: JadxFindJNI.jar < file.apk> < output.json>
2025```
21- Window -> Script Manager -> Run Script jni_helper.py
26+
27+ ## Ghidra
28+
29+ See [ Ghidra] ( ./ghidra )
30+
31+ ## IDA
32+
33+ See [ IDA] ( ./ida )
34+
35+ ## Radare2
36+
37+ See [ Radare2] ( ./r2 )
38+
39+ # Demo
40+
41+ Tested with [ app-debug.apk] ( ./demo ) .
42+
43+ ``` sh
44+ $ make demo
2245```
46+
47+
48+ # TODO
49+
50+ - [x] support both C/C++ JNI functions
51+ - [ ] support [ env->RegisterNatives] [ reg ] JNI functions
52+
53+ # Thanks
54+
55+ - [ Ayrx/JNIAnalyzer] [ ayrx ]
56+
57+ [ reg ] : https://developer.android.com/training/articles/perf-jni#native-libraries
58+ [ ayrx ] : https://github.com/Ayrx/JNIAnalyzer
59+ [ dist ] : https://github.com/evilpan/jni_helper/releases
Original file line number Diff line number Diff line change 1+ app-debug.json
2+ lib
Original file line number Diff line number Diff line change 1+ all : app-debug.json lib
2+
3+ lib : app-debug.apk
4+ unzip $^ " lib*"
5+
6+ JadxFindJNI :
7+ make -C ../JadxFindJNI
8+
9+ app-debug.json : app-debug.apk JadxFindJNI
10+ java -jar ../JadxFindJNI/JadxFindJNI.jar $< $@
11+
12+ clean :
13+ rm -rf app-debug.json lib
14+ make -C ../JadxFindJNI clean
15+
16+ .PHONY : all lib clean JadxFindJNI
Original file line number Diff line number Diff line change 1+ Demo apk here
2+ ===
3+
4+ extract lib and json from apk:
5+ ``` sh
6+ $ make
7+ ```
Original file line number Diff line number Diff line change 11JNI Helper for Ghidra
22===
33
4- Install:
4+ # Install
5+
56``` sh
67$ make install
78```
89
9- Load:
10+ # Load
11+
1012```
11- Window -> Script Manager -> Run Script jni_helper.py
13+ Window -> Script Manager -> jni_helper.py (Run Script)
1214```
1315
1416Logging:
You can’t perform that action at this time.
0 commit comments