OWASP MASTG Explained: How to Use the Mobile Testing Guide
MASVS says what a secure mobile app must do. The MASTG shows how to test it. Here is how the guide is organised and how to use it without getting lost.
What the MASTG is
The OWASP Mobile Application Security Testing Guide (MASTG) is the testing companion to the OWASP MASVS. MASVS defines the security controls a mobile app should meet, such as MASVS-STORAGE-1. The MASTG explains how to check those controls on Android and iOS, with background knowledge, concrete tests, recommended fixes and working demos.
It is maintained by the OWASP Mobile Application Security (MAS) project and published at mas.owasp.org. It is free to use and is the reference most mobile assessments cite.
How the pieces fit together
MASVS: the requirement
Eight control groups: STORAGE, CRYPTO, AUTH, NETWORK, PLATFORM, CODE, RESILIENCE and PRIVACY. Each control states an outcome, not a test.
MASWE: the weakness
The Mobile Application Security Weakness Enumeration lists specific ways a control can fail, for example sensitive data written to logs. Weaknesses sit under the same MASVS groups and connect a control to the tests that look for it.
MASTG: the test
Tests (MASTG-TEST-xxxx) describe how to detect a weakness on Android or iOS. Knowledge pages (MASTG-KNOW) explain the platform behaviour behind them, best practices (MASTG-BEST) describe the fix, and demos (MASTG-DEMO) show a test run against sample code.
In a report, this chain lets you say exactly what a finding means: which control failed, which weakness it is and which test produced the evidence.
Testing profiles instead of levels
MASVS v1 had verification levels L1, L2 and R. Since MASVS v2.0 (2023), those levels are no longer part of the standard. They became MAS testing profiles applied to weaknesses and tests:
- MAS-L1: the baseline that applies to all mobile apps.
- MAS-L2: additional defence in depth for apps that handle sensitive data, such as banking or health apps.
- MAS-R: resilience against reverse engineering and tampering, for apps that need to protect their own code or business logic.
Pick the profile from the app's risk before testing starts and write it into the scope. Testing a simple content app against MAS-R wastes time; testing a payment app only against MAS-L1 leaves gaps.
A guide in transition
The MASTG is being reorganised. Older, broad tests are being split into smaller "atomic" tests linked to MASWE weaknesses, and some older tests are marked deprecated or pending an update. Before you cite a test ID in a report, open it on mas.owasp.org and check that it is current. Record the MASTG version or date you used so the report can be reproduced later.
Using the MASTG in an assessment
- Scope: agree the app, builds, backend hosts and testing profile in writing. See authorization and scope.
- Select: take the MASVS controls in scope and list the MASWE weaknesses and MASTG tests under each one.
- Static first: run the tests that inspect the package and code. Many storage, crypto and configuration weaknesses show up here.
- Runtime next: run the tests that need a device, a proxy or instrumentation on a device you are authorized to use.
- Report: for each finding, cite the control, weakness and test, attach the evidence, and list the tests that could not be run and why.
The MASVS checklist for an Android assessment turns this into a working checklist.
Related reading
- OWASP MASVS Explained: The Standard Behind Mobile Security Testing
- OWASP Mobile Top 10 (2024): The Risks and How to Test Them
- Android vs iOS OWASP MASVS security testing matrix
Originally published on appbreach.io.
原文:https://www.a8q9.cn/en/article/owasp-mastg-explained-how-to-use-the-mobile-testing-guide-ffa16c.html