Easy Dynamic Analysis for Android with Drozer

Stavro XhardhaStavro Xhardha
3 min read

Dynamic analysis is a crucial part of my everyday work, whether it’s for a bug bounty program or a client security audit. In fact, it provides a broader perspective than static analysis. Static analysis helps me understand each feature in isolation, while dynamic analysis gives me the "bigger picture"—the forest for the trees. It’s that aha moment that answers the "why" behind questions I might have had earlier.

As an experienced Android engineer, I’ve never been a fan of testing things in isolation. I always strive to test the system as a whole—that’s where you uncover the most significant logical and security flaws.

Drozer is one of the first tools I reach for once an .apk qualifies as the system under test. At its core, it’s just ADB commands, Package Manager queries, and Binder-based IPC calls that interact with the target .apk. It follows a client-server architecture:

  • The client is the terminal that crafts commands.

  • The server is a remote app installed on the same device as the .apk under test.

This setup saves me from writing long ADB commands or Googling the correct syntax for intent fuzzing. Establishing a connection between the computer and the device is handled by ADB (which should already be installed on the tester’s machine). Drozer, as an extra step, simply establishes a connection to its remote server—nothing more.

adb forward tcp:31415 tcp:31415
drozer console connect

The app interface looks like this (and nothing more there). The default port is 31415 as mentioned earlier, and it can be easily changed through the app's settings menu.

So what can Drozer do for you?

In my opinion, it's the perfect tool for fuzzing all exported Android components: Activities, Services, Content Providers, and Broadcast Receivers. With just one command, you can quickly map out the entire attack surface of an app.

run app.package.attacksurface <package name>

I always start with Content Providers - there's nothing like the thrill of discovering a SQL injection or an exploitable query vulnerability right out of the gate.


    run app.provider.info -a <package name>
    run scanner.provider.finduris -a <package name>
    run app.provider.query <uri>
    run app.provider.update <uri> --selection <conditions> <selection arg> <column> <data>
    run scanner.provider.sqltables -a <package name>
    run scanner.provider.injection -a <package name>
    run scanner.provider.traversal -a <package name>

The other Android components follow similar testing patterns.

Drozer isn't just a dynamic analysis tool - it's a methodology framework for approaching any Android app assessment. You immediately get the fundamentals for each component: intent filters, actions, permissions, and more. From there, you can probe, fuzz, or monitor these components, making it invaluable for reconnaissance.

But Drozer adds more value. It bridges the gap for pentesters coming from other platforms. Android can be really challenging as a black box, but Drozer effectively maps an .apk's attack surface even if you're still learning Android internals.

For accelerating dynamic analysis, I can't recommend Drozer enough. For bug bounty hunters, here is that tool that can help you grab that low-hanging fruit. For experts like myself, it's ADB on steroids - speeding up my whole workflow. For newcomers, it's the perfect guide to understand app behavior and develop testing strategies.

Security Check:
Have you ever checked if your Android app has security flaws? If you want to avoid situations like data breach scandals, theft of your users' identities, denial of service, and more - I can gladly help with that. In fact, that's exactly why I started APKSherlock: to help businesses audit their Android apps before or after start of production.

This won't just add monetary value to your company, but also improve safety and satisfaction for your end users.

Ready to discuss? You can:

0
Subscribe to my newsletter

Read articles from Stavro Xhardha directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Stavro Xhardha
Stavro Xhardha

Experienced Android Developer with high focus on security topics. Diving into bug bounty or security audits for Android Apps.