Documentation

Go to Portal Website

Storage Permission Hardening

PlanPlatformsMASVS
TeamAndroidMASVS-STORAGE-1

Overview

Storage Permission Hardening restricts Android app-private storage permissions so local files are not accidentally exposed through permissive file modes. It hardens the app's internal files directory and verifies SharedPreferences XML files are not world-readable or world-writable.

How It Works

When enabled, the Android runtime control performs two best-effort checks during initialization:

The control is idempotent and safe to call repeatedly. If a permission update is not accepted by the platform or filesystem, the control logs the condition and continues.

What Is Hardened

The control does not modify database contents, encrypt file contents, change cache behavior, or rewrite host app storage APIs.

Threats Mitigated

Caveats

Support Matrix

PlatformMinimum VersionNotes
AndroidAndroid 8.0+ (API 26)Matches the Android module minimum SDK

How to Enable the Control

Navigate to Preventative Controls from the AppTego portal, and expand the Data at Rest Protection section. Under this section you will find the Storage Permission Hardening control. Click Enable to enable it for the next build or for it to be applied with a live push (if enabled).

API Configuration Example

{
  "StoragePermissionHardeningPrevention": {
    "protection": true
  }
}
FieldPurpose
protectionEnables Android storage permission hardening.

SDK Usage

In Android library mode, enable the control after initializing MobileDefender:

MobileDefender.storagePermissionHardeningPrevention(true);