Android Application Penetration testing Part 3

[jpshare]With my last article(Android Application Penetration testing Part 1), (Android Application Penetration testing Part 2)we had look on basic architecture and penetration testing tools. Now Let’s dig dipper with ADB

Android Debug Bridge

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device

Adb install – It is used to install an apk file into an Emulated/Connected Device

Adb pull – It is used to fetch some data from Emulated device (remote) to local host (local).

Adb push – It is used to push some data from local host (local) to Emulated Device (remote).

Adb forward – Forwards socket connections from a specified local port to a specified remote port on the emulator/device instance.

Adb shell – Adb provides a UNIX shell that you can use to run a variety of commands on an emulator or connected device. In terminal you can use all adb commands

  • We can install applications via adb shell or directly by using app use dashboard

Some Important notes

  • UID– Every time a new application is initiated in the Android device, it is assigned a unique User ID
  • PID– As every application has its own process id
  • GID– group IDs of the application that owns that process

Dumpsys meminfo – All process details

Android Application Penetration testing Part 3

Dumpsys meminfo name of .apk

Android Application Penetration testing Part 3

Android Package (APK) is the default extension for the Android applications, which is just an archive file that contains all the necessary files and folders of the application.

All data of the application in the device can be found in /data/data directory.

All applications (apk files) in device can be found in /data/app directory

Android Application Penetration testing Part 3

Standard permissions granted to the shell can be found in /system/etc/permissions # cat platform.xml

Android Application Penetration testing Part 3

Android Application Penetration testing Part 3

Hacks via ADB:

We usually open our android device by unlocking various gesture pattern or password key

Android Application Penetration testing Part 3

If you remove gesture. Key or password. Key which located at data/system, you can bypass that lock.

Android Application Penetration testing Part 3

Another method

Try with Adb shell

Cd /data/data/com.android.providers.settings/databases

sqlite3 settings.db

Update system set value=0 where name='lock_pattern_autolock';

Update system set value=0 where name='lockscreen.lockedoutpermanently'; .quit

Reset your phone. Don’t worry try random pattern or pin or Password, you will bypass

Reference

https://www.howtogeek.com/125769/how-to-install-and-use-abd-the-android-debug-bridge-utility/

Also read