OWASP / MASTG-Hacking-Playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AndroidJava: OMTG_CODING_004_Code_Injection does not work as expected in Nexus5X 7.1.1 and genymotion 9.0

aoprea1982 opened this issue · comments

AndroidJava: OMTG_CODING_004_Code_Injection does not work as expected in Nexus5X 7.1.1 and genymotion 9.0

Followed the instructions: https://github.com/OWASP/MSTG-Hacking-Playground/wiki/Android-App#omtg_coding_004_code_injection

logcat

W System.err: java.lang.ClassNotFoundException: Didn't find class "com.example.CodeInjection" on path: DexPathList[[zip file "/storage/emulated/0/libcodeinjection.jar"],nativeLibraryDirectories=[/system/lib, /system/vendor/lib]]

externalStorage: libcodeinjection.jar is there

ls -alsrth /storage/emulated/0/libcodeinjection.jar 2.0K -rw-rw---- 1 root sdcard_rw 1.0K /storage/emulated/0/libcodeinjection.jar

The issue is similar for both physical device and emulator.

Physical device: use built CPU specific apk arm64-v8a.apk , emulator: built it

Please let me know if more information is needed.

Thanks,
Tsubasa

I resolved it.

disabling pre-dexing in the app build.gradle
dexOptions { preDexLibraries false }

Code Injection Library Constructor called. Class name: com.example.CodeInjection E Test : The class com.example.CodeInjection and it's method returnString was just called

Closed as resolved.