Android Intent Redirection

Detects Android intent redirection vulnerabilities where attacker-controlled intents are re-sent or forwarded, enabling privilege escalation.

zakirkun e03a023 2 files · 3.0 KB Updated

File contents

Android Intent Redirection

Overview

Intent redirection occurs when an exported component receives an Intent from an untrusted source and forwards it to another component (potentially a private one). This allows attackers to:

  • Access private Activities, Services, or ContentProviders
  • Bypass permission requirements
  • Escalate privileges

Common vulnerable pattern:

// Exported component receives intent with embedded redirect
Intent redirectIntent = (Intent) getIntent().getParcelableExtra("extra_intent");
startActivity(redirectIntent); // Attacker controls redirectIntent!

Remediation

  • Validate Intent targets before forwarding
  • Reject Intents with FLAG_GRANT_READ_URI_PERMISSION or FLAG_GRANT_WRITE_URI_PERMISSION if not expected
  • Do not forward attacker-controlled Intents to sensitive components

zakirkun/ice-tea/tree/main/skills/android/intent-redirection commit e03a023399

Frequently asked questions

npx skillmds@latest add zakirkun/android-intent-redirection