|
| 1 | +--- |
| 2 | +title: Drozer - Basics |
| 3 | +author: Sujit Suryawanshi |
| 4 | +date: 2020-10-17 15:10:00 +0800 |
| 5 | +categories: [Android Application Pentesting, Dynamic Analysis] |
| 6 | +tags: [drozer] |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +<strong><span style="color:#ff5555">Introduction</span></strong> |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +Hi all, Hope everyone is good and doing well. In this blog we gonna look at one awesome framework which is really helpful in **Dynamic Runtime Analysis in Android Application Pentesting**. |
| 18 | + |
| 19 | +The Drozer ([Link to Download](https://labs.f-secure.com/tools/drozer/)) is application assessment framework for android created by MWR InfoSecurity. It is written in iPython and has modules to exploit android vulnerabilities such as Leaking Content Providers, LFI, Various Vulnerability Scanners, Reverse Shell etc. |
| 20 | + |
| 21 | +We can also write our own modules to automate, exploit things in android applications. |
| 22 | + |
| 23 | +To getting started with Drozer just install on your system and drozer-agent on android device then we need to do port forwarding to connect with drozer-agent. |
| 24 | +For port forwarding you can use <span style="color:#ff5555">adb forward tcp:31415 tcp:31415</span> command. By default Drozer use 31415 port so in my case I'm gonna use the same. |
| 25 | + |
| 26 | +After forwarding port, enter <span style="color:#ff5555">drozer console connect</span> to connect drozer server to drozer agent which is installed on android device. |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +PS. In my case I'm going to use multiple vulnerable applications such as DIVA, InsecureBank etc. |
| 31 | + |
| 32 | +<span style="color:#ff5555">This blog is meant for educational purposes only.</span> |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +<strong><span style="color:#ff5555">Basics of Drozer</span></strong> |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +Drozer has various collection of modules which are really helpful in Android Pentesting. To list down all modules of drozer just enter <strong><span style="color:#ff5555">ls or list</span></strong> command. |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +Let's go through below modules and see what they does exactly. |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +<strong><span style="color:#ff5555">app.package.list</span></strong> |
| 49 | + |
| 50 | +This module is used to get all applications (packages) installed on android device. |
| 51 | +It will show you package names along with application names. |
| 52 | + |
| 53 | +Command : <span style="color:#ff5555">run app.package.list</span> |
| 54 | + |
| 55 | +To find particular application we can use -f argument along with application name. |
| 56 | + |
| 57 | +Command : <span style="color:#ff5555">run app.package.list -f insecure</span> |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +<strong><span style="color:#ff5555">app.package.attacksurface</span></strong> |
| 62 | + |
| 63 | +The app.package.attacksurface module gives attack surface about particular android application in which it shows exported activities, broadcast receivers, content providers and services. |
| 64 | + |
| 65 | +Command : <span style="color:#ff5555">run app.package.attacksurface com.android.insecurebankv2</span> |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +<strong><span style="color:#ff5555">app.activity.info</span></strong> |
| 70 | + |
| 71 | +This module shows exported activities which can be vulnerable. |
| 72 | + |
| 73 | +Command : <span style="color:#ff5555">run app.activity.info -a com.android.insecurebankv2</span> |
| 74 | + |
| 75 | +To check if the activity is vulnerable, We can use below command. |
| 76 | + |
| 77 | +Command : <span style="color:#ff5555">run app.activity.start --component com.android.insecurebankv2 com.android.insecurebankv2.DoTransfer</span> |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +<span style="color:#ff5555">**Thanks for reading this writeup and all suggestions are welcome.**</span> |
0 commit comments