Samsung Galaxy - Open Activities Via Samsung Browser
-
Ken Gannon
- Published: 26 Mar 2021
CVE-2021-25354
Share
Type
Severity
Affected products
Remediation
Credits
02/11/2020 | Issue disclosed to Samsung Mobile Security |
02/11/2020 | Issue assigned to a Samsung Security Analyst |
12/01/2021 | Follow up sent to Samsung |
17/01/2021 | Samsung confirms the vulnerability and rates it as a moderate risk issue |
09/02/2021 | Patch released, Samsung initiates process for bug bounty reward |
12/03/2021 | Bug Bounty Paid |
25/03/2021 | CVE published by Samsung |
26/03/2021 | Advisory published |
F-Secure looked into exploiting the Samsung S20 device for Tokyo Pwn2Own 2020. An issue was discovered that allowed a specific browsable intent in Samsung Browser (com.sec.android.app.sbrowser) to either:
Note that while this issue was found on a Samsung Galaxy device, the Samsung Internet browser application is available on the Google Play store and can be installed on any Android device with access to said store. It was confirmed that this issue could be exploited on any Android device that had the Samsung Internet application installed
The issue is due to the class “com.sec.android.app.sbrowser.capsule.BixbySBrowserLauncherActivity” methods “handleIntent” and “handleShareVia”. First, “handleIntent” does the following:
private void handleIntent(final Intent intent) {
final String action = intent.getAction();
final Uri data = intent.getData();
int n = 1;
if (“android.intent.action.VIEW”.equals(action) && data != null) {
final String string = data.toString();
final List pathSegments = data.getPathSegments();
if ((this.mPathSegments = (List
Next, “handleShareVia” does the following:
private void handleShareVia() { String pathSegments = getPathSegments(1); if (pathSegments != null) { Intent createIntentWithTargetTask = createIntentWithTargetTask(“com.sec.android.app.sbrowser.INTENT_SHARE_VIA”); createIntentWithTargetTask.putExtra(“resultType”, pathSegments); if (“result_type_success”.equals(pathSegments)) { String pathSegments2 = getPathSegments(2); String pathSegments3 = getPathSegments(3); if (pathSegments2 != null && pathSegments3 != null) { if (pathSegments3.equals(“com.sec.android.app.sbrowser.ReceiveWeChatMomentActivity”) && !this.isWeChatAvailable()) { Log.d(“BixbyLauncherActivity”, “WeChat is not installed!”); createIntentWithTargetTask.putExtra(“resultType”, “result_type_fail”); } else { createIntentWithTargetTask.putExtra(“packageName”, pathSegments2); createIntentWIthTargetTask.putExtra(“activityName”, pathSegments3); } } else { return; } … try { getApplicationContext().startActivity(createIntentWithTargetTask); } catch (ActivityNotFoundException e) { Log.d(“BixbyLauncherActivity”, “[handleShareVia]” + e.toString()); } } }
Using this information, it is possible to create a custom intent that launches a specific activity:
intent://com.sec.android.app.sbrowser/ShareVia/result_type_success/
The following example browsable intent link will launch the non-exported component “com.sec.android.app.sbrowser/com.google.zxing.client.android.SecCaptureActivity” in the Samsung Browser application:
By replacing the appropriate fields, it is also possible to launch activities that are exported in other applications. The following browsable intent link will launch the exported component “com.sec.android.app.myfiles/com.sec.android.app.myfiles.external.ui.PickerActivity”: