+MASTG-BEST-0014 Preventing Screenshots and Screen Recording (Android)

MASTG-BEST-0014 Preventing Screenshots and Screen Recording (Android)

  • Platform: Android

Ensure the app hides sensitive content, such as card numbers and passcodes, from screenshots, screen recording, nonsecure displays, task switcher thumbnails, and remote screen sharing. Malware may capture screen output and extract confidential information. Protect on screen keyboards or custom keypad views as they may leak keystrokes from passcode fields. Screenshots can be saved in locations accessible to other apps or a local attacker.

Setting FLAG_SECURE on the window prevents screenshots (or appear black), blocks screen recording, and hides content on nonsecure displays and in the system task switcher.

<div style="display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start; margin:16px 0;">
<figure style="flex:1 1 220px; margin:0; text-align:center;">
<img src="Images/Chapters/0x05d/task-switcher-without-flag-secure.png" width="200" alt="Task switcher without FLAG_SECURE">
<figcaption>Without FLAG_SECURE</figcaption>
</figure>
<figure style="flex:1 1 220px; margin:0; text-align:center;">
<img src="Images/Chapters/0x05d/task-switcher-with-flag-secure.png" width="200" alt="Task switcher with FLAG_SECURE">
<figcaption>With FLAG_SECURE</figcaption>
</figure>
</div>

You can follow the official documentation to implement FLAG_SECURE in your app, see "Secure sensitive activities".

1. Resumen

Título Estándar

1.1 Referencias

1.2 Requisitos identificados

1.3 Regulaciones relacionadas

2. Requisitos identificados

Requisitos
Fuente Requisito

3. Regulaciones relacionadas

Regulaciones
Fuente Regulación

Incidencias vinculadas

  • 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.