Skip to content

Commit 4cce45a

Browse files
committed
MASTG-TEST for dynamic analysis
1 parent c801172 commit 4cce45a

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

demos/android/MASVS-CODE/MASTG-DEMO-0x36/MASTG-DEMO-0x36.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ platform: android
33
title: Enforced Immediate Updates with Play Core API detected using semgrep
44
id: MASTG-DEMO-0x36
55
code: [kotlin]
6-
test: MASTG-TEST-0x336
6+
test: MASTG-TEST-0x36
77
---
88

99
### Sample
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Verifying Mandatory In-App Update Enforcement using MITM Proxy
3+
platform: android
4+
id: MASTG-TEST-0x36-1
5+
type: [dynamic]
6+
weakness: MASWE-0075
7+
profiles: [L2]
8+
---
9+
10+
## Overview
11+
12+
The goal of the test is to verify whether the app properly enforces mandatory updates, When using a MITM proxy to send a version that the backend considers unsupported and verify if the app correctly blocks access and requires the user to update before continuing.
13+
14+
## Steps
15+
16+
1. Set up a MITM proxy using @MASTG-TECH-0011 to intercept network traffic. Launch the app and identify API calls that transmit version information (e.g., `X-App-Version`, `version`, `build`, `minVersion` in headers, parameters, or request body).
17+
2. Modify the intercepted request to indicate that the current app version is unsupported (e.g., change `version` to an older version or set `minVersion` to a value higher than the current version). Forward the modified request to the backend.
18+
19+
## Observation
20+
21+
The output should contain the app's response when an unsupported version is sent to the backend:
22+
23+
- The backend's response indicating the version is outdated (e.g., a response code, JSON field, or message stating the update is required).
24+
- Whether the app displays a blocking dialog or screen that prevents further use until the update is completed.
25+
- Whether the app calls Google Play or the in-app update API to enforce the mandatory update.
26+
- Whether the user can dismiss the update prompt and continue using the app, or if the app completely blocks access to functionality.
27+
28+
## Evaluation
29+
30+
The test case fails if:
31+
32+
- The app does not block access to its main functionality when the backend indicates the version is unsupported.
33+
- The app does not trigger a mandatory update flow through either the backend-gated mechanism or the Play In-App Updates API.
34+
- The app proceeds normally without any enforcement action when presented with an unsupported version.

tests-beta/android/MASVS-CODE/MASTG-TEST-0x36.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ The output should contain the locations where `startUpdateFlowForResult` with `A
2121

2222
## Evaluation
2323

24-
The test fails if the app does not enforce updates and still allows users to skip or ignore them.
24+
The test fails if the app does not implement enforced updating uisng Play In-App Updates API.

0 commit comments

Comments
 (0)