Hey Everyone, In this post, we will be seeing about Drozer and how it can be used to pen-test the android application. So for that, we need following things:
A mobile device/Emulator (Rooted preferred) and with debugging mode on.
Drozer agent needed to be installed in Device. (Drozer Agent link).
Drozer Framework can be any source (Windows/Linux). I used Android Tamer (contain all tool for penetration testing of mobile).
Visit https://sourceforge.net/projects/androidtamer/files/latest/download to download android tamer and install it in Virtual box.
A Vulnerable Android App to test it. I took DIVA Android – Damn Insecure and vulnerable App for Android, we can download it from https://github.com/payatu/diva-android.
Now we need to start the Android Tamer in virtual box and connect our device to it, after connecting check the connection by typing adb devices
now you will be able to see your device number and name on the screen.
Steps to Proceed Further in analyses of android application.
Start drozer agent in mobile and turn it on (there is the option to turn on the server in the app).
Now we need to move to android tamer and open the terminal and execute following commands:
adb forward tcp:31415 tcp:31415
to connect mobile and drozer server.
drozer console connect
to open the drozer console and work on it.
list
to list drozer modules.
run app.package.list
to list all application installed on the mobile device.
run app.package.list -f diva
to search app using string, here diva is app name.
run app.package.info -a jakhar.aseem.diva
to see package information, here jakhar.aseem.diva is the package name.
run app.package.attacksurface jakhar.aseem.diva
to identify attack surface.
run app.activity.info -a jakhar.aseem.diva
to check activity whether they are exported or not.
run app.activity.start --component (package name) (component name)
to start the activity on mobile.
run app.activity.start --component jakhar.aseem.divajakhar.aseem.diva.APICredsActivity
There we have multiple commands in drozer using which we could exploit application more. Surf for more commands.