+MASTG-BEST-0024 Store Data Encrypted in App Sandbox Directory (iOS)

MASTG-BEST-0024 Store Data Encrypted in App Sandbox Directory (iOS)

Choose the right location for storing the app's and the user's data to the app sandbox: use Documents directory to store user-generated content and Library directory for app's internal data.

An app can be configured to make Documents directory accessible to the user in the Files app by setting UIFileSharingEnabled and LSSupportsOpeningDocumentsInPlace. Therefore, storing databases, config files, purchase state in this directory is highly dangerous because:

  • a user can tamper with internal app files
  • an attacker with a physical access to the device can copy content of Documents directory
  • other apps can access Documents directory of other apps with a document picker interface

Note: Storing data in the correct directory doesn't mean it's secure. For L2 profile apps, it's recommended to encrypt the files before storing them, and put the encryption key into the Keychain.

1. Oversigt

Titel Standard

1.1 Referencer

1.2 Identificerede krav

1.3 Relaterede reguleringer

2. Identificerede krav

Krav
Kilde Krav

3. Relaterede reguleringer

Reguleringer
Kilde Regulering

Linkede sager

  • OWASP -

    EN: Publications of the OWASP Foundation, https://owasp.org/. OWASP® is a registered trademark of the OWASP Foundation, Inc.; GRCA is not affiliated with, nor endorsed by, the OWASP Foundation. Only the versions published by OWASP are authoritative.

    DE: Veröffentlichungen der OWASP Foundation, https://owasp.org/. OWASP® ist eine eingetragene Marke der OWASP Foundation, Inc.; GRCA steht in keiner Verbindung zur OWASP Foundation und wird von ihr nicht unterstützt. Maßgeblich sind allein die von OWASP veröffentlichten Fassungen.