qiling icon indicating copy to clipboard operation
qiling copied to clipboard

Analyzing .so in android app using qiling

Open anaivebird opened this issue 3 years ago • 3 comments

Analyzing .so in app may be challenging due to mocking JNI functions behavior like FindClass(), GetMethodID(), RegisterNatives() is hard.

So any wordaround for qiling to overcome it? May be we need dynamic instrument module to parallel running with qiling. When jniEnv->RegisterNatives() is called, transfer control to real machine code and transfer back when RegisterNatives() returns.

image

image

anaivebird avatar Mar 20 '21 11:03 anaivebird

I can take a look, can you upload your binary & your code?

aquynh avatar Mar 20 '21 13:03 aquynh

All android app with so native code need these methods(not specific to some app). Refers to https://blog.quarkslab.com/android-native-library-analysis-with-qbdi.html

This method solves problem of mocking complex system call or framework lib call like java jni or android framework. Without this method, it will be hard to analysis android native so code in emulator like qiling.

Will qiling consider to add support to this?

anaivebird avatar Mar 20 '21 13:03 anaivebird

Many tools have used unicorn to run the Android JNI interface. For example,unidbg or AndroidNativeEmu, merging their code and scheme is worth doing.

backahasten avatar Apr 28 '22 09:04 backahasten

Will you be able to try the latest version of Qiling and see if you still face same issue. There is lots of rework since 2021. Feel free to open a new issue if you have any similar problem.

xwings avatar Oct 06 '22 03:10 xwings