<aside> 📌 Sommaire

</aside>

Android Static Analysis

The examples of this page are done on the training app https://github.com/B3nac/InjuredAndroid.git.

Retrieving an APK

Before trying to analyse anything, we need to retrieve the apk file of the target app. We first install the app on our emulator or connected phone. Then we can connect to it using adb with the command :

adb shell

Then, we look for information about the installed package using the pm command. We're looking for the package name and path.

pm list packages | grep <package name>
pm path <complete package name>

From there we go back to our machine and pull the apk file with adb :

adb pull <package path> <output file dot apk>

Finally, we can open it with either jadx or esptool and look for interesting data, more detailed folder architecture of application file in Work in progress.

jadx-gui <target.apk>
apktool d <target.apk>

Alternatively we can statically analyse the apk file with https://github.com/MobSF/Mobile-Security-Framework-MobSF . (Find more in the raw notes Automated Analysis using MobSF)

docker run -it --rm -p 8000:8000 opensecurity/mobile-security-framework-mobsf:latest

Android Manifest Analysis

Untitled

The Android Manifest contains information about the application itself. We may be interested in a few of them :