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-0082 (by @appknox) #3097

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
24 changes: 24 additions & 0 deletions tests-beta/ios/MASVS-RESILIENCE/MASTG-TEST-0x82.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
platform: ios
title: Testing Whether the App is Debuggable
id: MASTG-TEST-0x82
type: [static, dynamic]
weakness: MASWE-0101
---

## Overview

The test evaluates whether an iOS application is configured to allow debugging. If an app is debuggable, attackers can leverage debugging tools to reverse-engineer the application, analyse its runtime behaviour, and potentially compromise sensitive data or functionality.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The test evaluates whether an iOS application is configured to allow debugging. If an app is debuggable, attackers can leverage debugging tools to reverse-engineer the application, analyse its runtime behaviour, and potentially compromise sensitive data or functionality.
The test evaluates whether an iOS application is configured to allow debugging. If an app is debuggable, attackers can leverage debugging tools (see @MASTG-TECH-0084) to analyse the runtime behaviour of the app, and potentially compromise sensitive data or functionality.


## Steps

1. Run a static analysis using @MASTG-TOOL-0111 to extract entitlements from the binary to check the value of the `get-task-allow` key and is set to `true`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to use the technique instead of specific tools in TESTS

https://mas.owasp.org/MASTG/techniques/ios/MASTG-TECH-0111/

Also, let's do the evaluation (check for true, in this case) later.

Suggested change
1. Run a static analysis using @MASTG-TOOL-0111 to extract entitlements from the binary to check the value of the `get-task-allow` key and is set to `true`.
1. Use @MASTG-TECH-0111 to extract entitlements from the binary and obtain the value of the `get-task-allow` key.

2. Run a [dynamic analysis](../../../techniques/ios/MASTG-TECH-0084.md) using @MASTG-TOOL-0057.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The static analysis step should be enough. However, you still can refer to this TECH. See overview


## Observation

The entitlement get-task-allow is false, and anti-reverse engineering measures prevent debugger attachment attempts.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The entitlement get-task-allow is false, and anti-reverse engineering measures prevent debugger attachment attempts.
The output contains the value of the `get-task-allow` entitlement.


## Evaluation

The test fails as the entitlement get-task-allow is true, allowing debugger attachment.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The test fails as the entitlement get-task-allow is true, allowing debugger attachment.
The test fails if the `get-task-allow` entitlement is `true`.

3 changes: 3 additions & 0 deletions tests/ios/MASVS-RESILIENCE/MASTG-TEST-0082.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ platform: ios
title: Testing whether the App is Debuggable
masvs_v1_levels:
- R
status: deprecated
covered_by: [MASTG-TEST-0x82]
deprecation_note: New version available in MASTG V2
---

## Overview
Expand Down
Loading