πŸ’₯
Android Penetration Testing
WEBSITEGITHUBLINKDININSTAGRAM
  • πŸ•΅οΈβ€β™‚οΈOWASP Mobile Top 10
    • OWASP Mobile Top 10 2014
    • OWASP Mobile Top 10 2016
    • OWASP Mobile Top 10 2023
      • Insecure Authentication/Authorization
      • Insecure Communication
      • Inadequate Supply Chain Security
      • Inadequate Privacy Controls
      • Insufficient Input/Output Validation
      • Security Misconfiguration
      • Insufficient Cryptography
      • Insecure Data Storage
      • Insufficient Binary Protections
  • "Let's Dive into the Theory"
  • 😍Theory of Android Penetration Testing
    • πŸ‘‘Basic - Advance
    • πŸ’₯Professional - Expert
    • 🟧Types of Mobile Applications
    • 🟣Android Architecture
    • 🟦Android Show
    • πŸš€Secrets of Android App Creation
    • ♦️Android's Data Treasure Chests
    • πŸ›‘Mysterious .apk File:
    • 🏹Android Pentesting with Cutting-Edge Tools
    • ⬛Android File System
  • "Let's Dive into the Practical"
  • πŸ˜‡Vulnerable Android Application with Practical.
    • πŸ˜‰InsecureShop
      • 😁Vulnerability #1: Insecure Logging
      • πŸ˜‚Vulnerability #2: Hardcoded Credentials
      • πŸ˜†Vulnerability #3: Insecure Data Storage
      • 🀣Vulnerability #4: Lack of SSL Certificate Validation
      • 😍Vulnerability #5: Insufficient URL Validation
      • πŸ˜„Vulnerability #6: Weak Host Validation
      • 😘Vulnerability #7: AWS Cognito Misconfiguration
      • πŸ˜ƒVulnerability #8: Insecure Broadcast Receiver
      • πŸ˜›Vulnerability #9: Use of Implicit intent to send a broadcast with sensitive data
      • 😎Vulnerability #10: Using Components with Known Vulnerabilities
      • 😜Vulnerability #11: Intent Redirection (Access to Protected Components)
      • πŸ˜‚Vulnerability #12: Insecure Webview Properties Enabled
      • πŸ˜†Vulnerability #13: Intercepting Implicit intent to load arbitrary URL
      • πŸ™ƒVulnerability #14: Insecure Content Provider
      • πŸ₯°Reading Material
  • "Let's Dive into the Interview Questions"
  • 😎Important Interview Questions for Android Application Penetration Testing.
    • πŸ₯‡Part - 1
    • πŸ₯ˆPart - 2
    • πŸ₯‰Part - 3
    • πŸ…Part - 4
    • πŸŽ–οΈPart - 5
  • 😘Notes
    • Tools to use
    • Important Reports from Hackerone
Powered by GitBook
On this page
  1. Vulnerable Android Application with Practical.
  2. InsecureShop

Vulnerability #8: Insecure Broadcast Receiver

PreviousVulnerability #7: AWS Cognito MisconfigurationNextVulnerability #9: Use of Implicit intent to send a broadcast with sensitive data

Last updated 1 year ago

Exported activities are some possible attack vectors to look out for in the android manifest. In the target application, one such activity that has the attribute android:exported='true' is com.insecureshop.AboutUsActivity.

This is the activity that is opened when we try to click the about option in the pop-up menu. Seems innocent, but when we review the underlying code in jadx-gui we see the following:

Upon onCreate, the activity registers a new CustomReceiver() which listens for the intent com.insecureshop.CUSTOM_INTENT

When it receives a broadcast with the custom intent filter, the CustomReceiver retrieves the value of the string extra web_url from the broadcasted intent, passes it as a url extra for the new intent then starts the following activity: WebView2Activity which just opens the url in a webview.

This is vulnerable since the activity + receiver being exported means that attackers can send a com.insecureshop.CUSTOM_INTENT broadcast and open up an attacker-controlled url/content.

C:\Users\Aniket\Downloads\InsecureShop-Writeup>adb shell am start -n com.insecureshop/.AboutUsActivity
Starting: Intent { cmp=com.insecureshop/.AboutUsActivity }

C:\Users\Aniket\Downloads\InsecureShop-Writeup>adb shell am broadcast -a com.insecureshop.CUSTOM_INTENT --es web_url https://secuna.io
Broadcasting: Intent { act=com.insecureshop.CUSTOM_INTENT flg=0x400000 (has extras) }
Broadcast completed: result=0

In case I haven’t mentioned it yet on part 1, you’ll be reading about intents a lot. Basically, intents are what allows different android app components to interact with each other. Read more about it from the

πŸ˜‡
πŸ˜‰
πŸ˜ƒ
documentation