OWASP / owasp-mastg

The Mobile Application Security Testing Guide (MASTG) is a comprehensive manual for mobile app security testing and reverse engineering. It describes the technical processes for verifying the controls listed in the OWASP Mobile Application Security Verification Standard (MASVS).
https://mas.owasp.org/
Creative Commons Attribution Share Alike 4.0 International
11.43k stars 2.26k forks source link

New Risk - Backup Unencrypted [backup-unencrypted] #2541

Open cpholguera opened 5 months ago

cpholguera commented 5 months ago

Description

Create a new risk for "Backup Unencrypted (MASVS-STORAGE-2)" using the following information:

The app may not encrypt sensitive data in backups, which may compromise data confidentiality.

Create "risks/MASVS-STORAGE/2-***-****/backup-unencrypted/risk.md" including the following content:

---
title: Backup Unencrypted
alias: backup-unencrypted
platform: [android]
profiles: [L2]
mappings:
  masvs-v1: [MSTG-STORAGE-8]
  masvs-v2: [MASVS-STORAGE-2, MASVS-PRIVACY-1]
  mastg-v1: [MASTG-TEST-0058, MASTG-TEST-0009]

---

## Overview

## Impact

## Modes of Introduction

## Mitigations

To complete the sections follow the guidelines from Writing MASTG Risks & Tests

Use at least the following references:

When creating the corresponding tests, use the following areas to guide you:

MASTG v1 Refactoring:

If the risk has a MASVS v1 ID, you can use it to search for related tests in the MASTG and use them as input to define your risks and associated tests.

Acceptance Criteria

cpholguera commented 5 months ago

@e-a-security

e-a-security commented 4 months ago

First run-through:

Overview

Applications commonly store data for use, whether locally on the device, within external storage, or remotely in cloud storage. When stored data relates to sensitive information, such as a user's personal data or authentication keys and passwords, additional security measures can be applied to prevent the leaking of this sensitive data if the backup is accessed by someone other than the intended user.

Impact

An attacker with access to an application's backup file can retrieve any unencrypted data that the application has backed up. As a result, any sensitive data exposed can be used by the attacker in future attacks or be readily exploited.

Modes of Introduction

Migration:

Additional Nodes

Prerequisites --> identify-sensitive-data CVEs --> Off a couple google searches, found just this one so far, will locate more; I don't see many options based on some searching here: https://cve.mitre.org/cve/search_cve_list.html

Tests brainstorming:

e-a-security commented 3 months ago

Complete. Just waiting to see best way to upload files / which branch / version we want these to go into.

Structure Overview

Removing these 2:

Originally these show how secure encrypted backup is done which is the opposite of the unencrypted code - it feels redundant with the unencrypted code

iOS Unencrypted Rules

Patterns of Concern

Android Unencrypted Rules

e-a-security commented 2 months ago

PR https://github.com/e-a-security/owasp-mastg/pull/1 https://github.com/e-a-security/owasp-mastg/tree/backup-unencrypted/risks/MASVS-STORAGE/backup-unencrypted

cpholguera commented 2 months ago

@e-a-security could you please open the PR against our master branch? Thank you!

e-a-security commented 2 months ago

@cpholguera Gotcha, done here: https://github.com/OWASP/owasp-mastg/pull/2604 Let me know if I should change anything else. Thank you very much :)

cpholguera commented 2 weeks ago

NEW! Please review and include info and reference: https://developer.android.com/privacy-and-security/risks/backup-leaks