MASTG-TEST-0253: Runtime Use of Local File Access APIs in WebViews
Content in BETA
This content is in beta and still under active development, so it is subject to change any time (e.g. structure, IDs, content, URLs, etc.).
Overview¶
This test is the dynamic counterpart to References to Local File Access in WebViews.
Steps¶
- Run a dynamic analysis tool like Frida for iOS and either:
- enumerate instances of
WebView
in the app and list their configuration values - or explicitly hook the setters of the
WebView
settings
- enumerate instances of
Observation¶
The output should contain a list of WebView instances and corresponding settings.
Evaluation¶
Fail:
The test fails if all of the following are true:
AllowFileAccess
istrue
.AllowFileAccessFromFileURLs
istrue
.AllowUniversalAccessFromFileURLs
istrue
.
Note: AllowFileAccess
being true
does not represent a security vulnerability by itself, but it can be used in combination with other vulnerabilities to escalate the impact of an attack. Therefore, it is recommended to explicitly set it to false
if the app does not need to access local files.
Pass:
The test passes if any of the following are true:
AllowFileAccess
isfalse
.AllowFileAccessFromFileURLs
isfalse
.AllowUniversalAccessFromFileURLs
isfalse
.
Mitigations¶
Demos¶
MASTG-DEMO-0031: Uses of WebViews Allowing Local File Access with Frida