Intent Attack Surface

Introduction

An intent is an abstract description of an operation to be performed.

Starting Activities

// 1 way
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.package.test", "com.package.test.SecondActivity"));
startActivity(intent);
// 2 way
Intent intent = new Intent();
intent.setClassName("com.package.test", "com.package.test.SecondActivity");
startActivity(intent);

Incoming Intent

getIntent() is a method in Android used to retrieve the Intent.

Send intent with adb

# Syntax
adb shell am start -a <ACTION> -d <DATA> -n <PACKAGE>/<CLASS-COMPONENT>

# Example
adb shell am start -a com.package.action.GIVE_FLAG -d "https://test.com" -n com.package/com.package.test.MainActivity

Last updated