Bug Hunting Methodology - Android
Process
- Always decompile the app. You can use
apktool
to do this. - Search the
AndroidManifest.xml
for sensitive information. - Search for xml strings such as
res/values/strings.xml
for sensistive information. - Search for database files. They will normally be sqlite3.
Getting the APKs
- Search the APK on your with
adb shell pm list packages
. - Get the path to the apk with
adb shell pm path [package value from previous command]
- Get the APK with
adb pull [path from previous command]
.
Installing a trusted CA on your device
- You will need to root your device to do this. If you are using an emulator, you should get one that does not have the Google Play Store installed!
- You will also want to get an emulator/device with Android < 29 so that you can temporarily make
/system
temporarily writeable without many issues. - Start the emulator with a writeable system mount:
.\emulator.exe -avd $deviceName -writable-system
- Run the following to make
/system
writeable:
adb root
adb disable-verity
adb reboot
adb root
adb remount
adb shell mount -o rw,remount /
Then, to intercept traffic, depending on the UI, you might have to click and hold the network preferences in the wifi settings.