...
When sendBroadcast()
is used, normally any other application, including a malicious application, can receive the broadcast.
This facilitates intent sniffing, see [viaForensics 2014] 26. Android: avoid intent sniffing.
Therefore, receivers of broadcast intents should be restricted. One way to restrict receivers is to use an explicit intent. An explicit intent can specify a component (using setComponent(ComponentName)
) or a class (using setClass(Context, Class)
) so that only the specified component or class can resolve the intent.
...
[Chin 2011] | Analyzing Inter-Application Communication in Android |
4.2.2.5. When sending sensitive information with a broadcast, limit the receivable receiver | |
[viaForensics 2014] | 26. Android: avoid intent sniffing |
...