Overview

This test verifies Android apps that use WebViews with legacy WebView-Native bridges do not expose native code to websites loaded inside the WebView.

These bridges are created by registering a Java object with the WebView through addJavascriptInterface. Public methods of that object that are annotated with @JavascriptInterface become callable from JavaScript running inside the WebView, using the provided name as the global JavaScript object.

For this mechanism to work, JavaScript execution must be enabled on the WebView by calling WebSettings.setJavaScriptEnabled(true)) (default is false), since the exposed interface is invoked from JavaScript code executed within the page.

Steps

  1. Use MASTG-TECH-0013 to reverse engineer the app.
  2. Use MASTG-TECH-0014 to look for the relevant APIs.

Observation

The output should contain any references to the relevant WebView APIs.

Evaluation

The test case fails if all the following are true:

Further Validation Required:

Inspect each reported code location using MASTG-TECH-0023 to determine whether the bridge is used in a security-relevant context:

Well-known Challenges when testing for WebView-Native bridges:

Tickets liés