Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The snippet below shows sample code that creates two files in the external stora

1. Install an app on your device.
2. Execute `run_before.sh` which runs @MASTG-TOOL-0004.
3. Open an app and exercise it to trigger file creations.
3. Open and use the app to trigger file creations.
4. Execute `run_after.sh`.
5. Close the app once you finish testing.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The snippet below shows sample code that creates a file on the **internal storag

1. Install an app on your device.
2. Execute `run_before.sh` which runs @MASTG-TOOL-0004.
3. Open an app and exercise it to trigger file creations.
3. Open and use the app to trigger file creations.
4. Execute `run_after.sh`.
5. Close the app once you finish testing.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The following samples contain:
### Steps

1. Install the target app on your device.
2. Open the app and exercise it to trigger file creations.
2. Open and use the app to trigger file creations.
3. Execute `run.sh`.

{{ run.sh # ../../../../utils/mastg-android-backup-bmgr.sh }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This demo uses the sample from @MASTG-DEMO-0020.
### Steps

1. Install the target app on your device.
2. Open the app and exercise it to trigger file creations.
2. Open and use the app to trigger file creations.
3. Execute `run.sh`.

{{ run.sh # ../../../../utils/mastg-android-backup-adb.sh }}
Expand Down
2 changes: 1 addition & 1 deletion src/corellium/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ upload_image_from_local_path()
}

echo "${create_image_response}" | jq -r '.[0].id' || {
log_error 'Failed to parse JSON repsonse for image ID.'
log_error 'Failed to parse JSON response for image ID.'
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/corellium/src/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ upload_image_from_local_path()
}

echo "${create_image_response}" | jq -r '.[0].id' || {
log_error 'Failed to parse JSON repsonse for image ID.'
log_error 'Failed to parse JSON response for image ID.'
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests-beta/android/MASVS-NETWORK/MASTG-TEST-0233.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Additionally, complement this static inspection with dynamic testing methods:

- **Dynamic Analysis**: Use tools like Frida to hook into networking APIs at runtime. This can reveal how and when the HTTP URLs are used during execution. See @MASTG-TEST-0238 for more details.

- **Network Traffic Interception**: Capture and analyze network traffic using tools like Burp Suite, mitmproxy, or Wireshark. This approach confirms whether the app connects to the identified HTTP URLs during real-world usage but depends on the tester's ability to exercise the app's functionality comprehensively. See @MASTG-TEST-0236.
- **Network Traffic Interception**: Capture and analyze network traffic using tools like Burp Suite, mitmproxy, or Wireshark. This approach confirms whether the app connects to the identified HTTP URLs during real-world usage but depends on the tester's ability to test the app's functionality comprehensively. See @MASTG-TEST-0236.
2 changes: 1 addition & 1 deletion tests-beta/android/MASVS-PLATFORM/MASTG-TEST-0289.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This test verifies that the app hides sensitive content from the screen when it

## Steps

1. Exercise your app until you get to each of the screens identified as sensitive. While on each of those screens, move the app to the background (for example by pressing **Home** or opening the **Recents screen** and exiting it) and continue to the next screen.
1. Use the app until you get to each of the screens identified as sensitive. While on each of those screens, move the app to the background (for example by pressing **Home** or opening the **Recents screen** and exiting it) and continue to the next screen.
2. Once finished, use @MASTG-TECH-0002 to copy the screenshot taken by the system to your laptop for further analysis. The system stores the screenshots in their containers `/data/system_ce/0/snapshots` or `/data/system`.

## Observation
Expand Down
4 changes: 2 additions & 2 deletions tests-beta/android/MASVS-STORAGE/MASTG-TEST-0200.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ profiles: [L1, L2]

## Overview

The goal of this test is to retrieve the files written to the external storage (@MASTG-KNOW-0042) and inspect them regardless of the APIs used to write them. It uses a simple approach based on file retrieval from the device storage (@MASTG-TECH-0002) before and after the app is exercised to identify the files created during the app's execution and to check if they contain sensitive data.
The goal of this test is to retrieve the files written to the external storage (@MASTG-KNOW-0042) and inspect them regardless of the APIs used to write them. It uses a simple approach based on file retrieval from the device storage (@MASTG-TECH-0002) before and after the app is used to identify the files created during the app's execution and to check if they contain sensitive data.

## Steps

1. Make sure you have @MASTG-TOOL-0004 installed.
2. Install the app (@MASTG-TECH-0005).
3. Before running the app, get the current list of files (@MASTG-TECH-0002) in the external storage.
4. Exercise the app.
4. Use the app.
5. After running the app, retrieve the list of files in the external storage again.
6. Calculate the difference between the two lists.

Expand Down
2 changes: 1 addition & 1 deletion tests-beta/android/MASVS-STORAGE/MASTG-TEST-0207.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ profiles: [L2]

## Overview

The goal of this test is to retrieve the files written to the [internal storage](../../../Document/0x05d-Testing-Data-Storage.md/#internal-storage) and inspect them regardless of the APIs used to write them. It uses a simple approach based on file retrieval from the device storage (@MASTG-TECH-0002) before and after the app is exercised to identify the files created during the app's execution and to check if they contain sensitive data.
The goal of this test is to retrieve the files written to the [internal storage](../../../Document/0x05d-Testing-Data-Storage.md/#internal-storage) and inspect them regardless of the APIs used to write them. It uses a simple approach based on file retrieval from the device storage (@MASTG-TECH-0002) before and after the app is used to identify the files created during the app's execution and to check if they contain sensitive data.

## Steps

Expand Down
2 changes: 1 addition & 1 deletion tests-beta/ios/MASVS-PLATFORM/MASTG-TEST-0290.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This test verifies that the app hides sensitive content from the screen when it

## Steps

1. Exercise your app until you get to each of the screens identified as sensitive. While on each of those screens, move the app to the background (for example by pressing **Home** or opening the **App Switcher** and exiting it) and continue to the next screen.
1. Use the app until you get to each of the screens identified as sensitive. While on each of those screens, move the app to the background (for example by pressing **Home** or opening the **App Switcher** and exiting it) and continue to the next screen.
2. Once finished, use @MASTG-TECH-0053 to copy the snapshots taken by the system to your analysis workstation. The system stores them under `/var/mobile/Containers/Data/Application/<APP_ID>/Library/SplashBoard/Snapshots/sceneID:<APP_NAME>-default/`. Note that the exact path and structure may vary across iOS versions.

## Observation
Expand Down
2 changes: 1 addition & 1 deletion tests-beta/ios/MASVS-STORAGE/MASTG-TEST-0298.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This test logs every file written to the app's data container at `/var/mobile/Co
## Steps

1. Use runtime method hooking (see @MASTG-TECH-0095) and look for uses of file system APIs such as `open`, `fopen`, `NSFileManager`, or `FileHandle` that create or write files.
2. Exercise the app to trigger file creation and writing.
2. Use the app to trigger file creation and writing.

## Observation

Expand Down
2 changes: 1 addition & 1 deletion tests-beta/ios/MASVS-STORAGE/MASTG-TEST-0299.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This test retrieves the data protection classes of files (@MASTG-KNOW-0091) crea
## Steps

1. Ensure the device / simulator is in a clean state (no prior test artifacts). Terminate the app if running.
2. Launch and exercise the app to trigger typical workflows (authentication, profile loading, messaging, caching, offline usage, cryptographic operations).
2. Launch and use the app to trigger typical workflows (authentication, profile loading, messaging, caching, offline usage, cryptographic operations).
3. Retrieve the list of files from the app's private storage (sandbox) directory tree (`/var/mobile/Containers/Data/Application/<UUID>/`) including the data protection classes (@MASTG-TECH-0059).

## Observation
Expand Down
2 changes: 1 addition & 1 deletion tests-beta/ios/MASVS-STORAGE/MASTG-TEST-0301.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Note that some of the target APIs route I/O through system daemons or otherwise

1. Use runtime method hooking (see @MASTG-TECH-0095) and look for uses of file system APIs that create or write files.
2. Use runtime method hooking (see @MASTG-TECH-0095) and look for uses of Keychain APIs.
3. Exercise app features that could handle sensitive data (authentication flows, session establishment, offline caching, profile viewing/editing, cryptographic operations, secure messaging, payment, or token refresh logic).
3. Interact with the app features that could handle sensitive data (authentication flows, session establishment, offline caching, profile viewing/editing, cryptographic operations, secure messaging, payment, or token refresh logic).

## Observation

Expand Down
4 changes: 2 additions & 2 deletions tests-beta/ios/MASVS-STORAGE/MASTG-TEST-0302.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ best-practices: [MASTG-BEST-0024]

## Overview

This test is designed to complement @MASTG-TEST-0301. Instead of monitoring APIs during execution, it performs a differential analysis of the app's private storage (@MASTG-KNOW-0108) by comparing snapshots taken before and after exercising the app. It also enumerates Keychain items created or modified during the session.
This test is designed to complement @MASTG-TEST-0301. Instead of monitoring APIs during execution, it performs a differential analysis of the app's private storage (@MASTG-KNOW-0108) by comparing snapshots taken before and after using the app. It also enumerates Keychain items created or modified during the session.

The goal is to identify new or modified files and determine whether they contain sensitive data in plaintext or trivially encoded form, and to identify new Keychain entries that may contain sensitive data or keys used for file encryption.

Expand All @@ -21,7 +21,7 @@ The goal is to identify new or modified files and determine whether they contain
1. Ensure the device / simulator is in a clean state (no prior test artifacts). Terminate the app if running.
2. Take an initial snapshot of the app's private storage (sandbox) directory tree (@MASTG-TECH-0052).
3. Take an initial snapshot of the Keychain items (@MASTG-TECH-0061). Optionally record attributes (accessible class, access control flags, etc).
4. Exercise app features that could handle sensitive data (authentication flows, session establishment, offline caching, profile viewing/editing, cryptographic operations, secure messaging, payment, or token refresh logic).
4. Interact with the app features that could handle sensitive data (authentication flows, session establishment, offline caching, profile viewing/editing, cryptographic operations, secure messaging, payment, or token refresh logic).
5. Take a second snapshot of the private storage directory tree.
6. Diff the two private storage snapshots to identify new, deleted, and modified files. For modified files, determine whether content changes involve potential sensitive values.
7. Take a second snapshot of the Keychain items
Expand Down
2 changes: 1 addition & 1 deletion tests-beta/ios/MASVS-STORAGE/MASTG-TEST-0314.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This test complements @MASTG-TEST-0313. It monitors text inputs in the app at ru

1. Use @MASTG-TECH-0056 to install the app.
2. Use @MASTG-TECH-0067 to look for text input fields in the app's UI and identify those that use the relevant attributes.
3. Exercise the app thoroughly, entering realistic sensitive information (for example, usernames, passwords, email addresses, credit card numbers, recovery codes) into each identified input field.
3. Use the app thoroughly, entering realistic sensitive information (for example, usernames, passwords, email addresses, credit card numbers, recovery codes) into each identified input field.

## Observation

Expand Down