Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port MASTG-TEST-0024 (by @appknox) #3076

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
33 changes: 33 additions & 0 deletions tests-beta/android/MASVS-PLATFORM/MASTG-TEST-0x24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
platform: android
title: Testing for App Permissions
id: MASTG-TEST-0x24
---
cpholguera marked this conversation as resolved.
Show resolved Hide resolved

## Overview

Testing for app permissions in Android involves evaluating how an application requests, uses, and manages permissions to ensure they do not lead to security vulnerabilities. Proper permission management should protect sensitive user data and ensure that the application complies with Android's security model. The test aims to detect misconfigurations and unnecessary permissions.

## Steps

### Static analysis
ScreaMy7 marked this conversation as resolved.
Show resolved Hide resolved

1. Decompile the APK using tools like @MASTG-TOOL-0011.
2. Examine the `AndroidManifest.xml` file for declared permissions by searching for `<uses-permission` tags.
3. Review the permissions with the developer to identify the purpose of each permission set and remove unnecessary or dangerous permissions.

### Dynamic analysis

1. Permissions for installed applications can be retrieved with @MASTG-TOOL-0004.
2. Use the @MASTG-TOOL-0004 with the following command :
`$ adb shell dumpsys package sg.vp.owasp_mobile.omtg_android`

Please refer to this [permissions overview ↗](https://developer.android.com/guide/topics/permissions/overview#permission-groups "Table 1. Dangerous permissions and permission groups.") for descriptions of the listed permissions that are considered dangerous.
ScreaMy7 marked this conversation as resolved.
Show resolved Hide resolved

## Observation

The output shows the list of permissions used by the application.

## Evaluation

The test will fail if the correct permissions are used.
3 changes: 3 additions & 0 deletions tests/android/MASVS-PLATFORM/MASTG-TEST-0024.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ title: Testing for App Permissions
masvs_v1_levels:
- L1
- L2
status: deprecated
covered_by: [MASTG-TEST-0x24]
deprecation_note: New version available in MASTG V2
---

## Overview
Expand Down