Overview

This test evaluates whether an Android app uses checkServerTrusted(...) in an unsafe manner as part of a custom TrustManager, causing any connection configured to use that TrustManager to skip certificate validation.

Such unsafe implementations can allow an attacker to run a [MITM attack](../../../Document/0x04f-Testing-Network-Communication.md#intercepting-network-traffic-through-mitm) with a valid (or self-signed) certificate and intercept or tamper with the app's traffic.

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 a list of locations where checkServerTrusted(...) is used.

Evaluation

The test case fails if checkServerTrusted(...) is implemented in a custom X509TrustManager and does not properly validate server certificates.

Further Validation Required:

Inspect each reported code location using MASTG-TECH-0023, looking for cases such as:

Saincheisteanna nasctha