+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. Panoramica

Titolo Standard

1.1 Riferimenti

1.2 Requisiti identificati

1.3 Regolamentazioni correlate

2. Requisiti identificati

Requisiti
Fonte Requisito

3. Regolamentazioni correlate

Regolamentazioni
Fonte Regolamentazione

Ticket collegati

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