M9: Insecure Mobile Data Storage

M9: Insecure Mobile Data Storage

A second-hand tablet still held a working session.

What Is M9: Insecure Mobile Data Storage?

A mobile app that keeps tokens and personal data in plain files hands them to whoever holds the device next. You'll watch an attacker read a session off an unwiped second-hand tablet and use it, then revoke the device's tokens, move the session into hardware-backed storage and stop storing the most dangerous data at all.

What You'll Learn in M9: Insecure Mobile Data Storage

M9: Insecure Mobile Data Storage — Training Steps

  1. A tablet with someone's work on it

    Quillmoor is a home-care company. Its carers visit clients at home and use the Quillmoor Visits app for their day's rota. Bob bought a cheap second-hand tablet online. The seller said it was 'returned by a contractor'. It was never wiped, the Quillmoor app is still on it, and its firmware lets the debug bridge run as root. Bob connects it to his laptop.

  2. Read it

    Android apps often keep small settings in a file called shared preferences. Bob opens the one he copied.

  3. Swap the token for a session

    A refresh token is worth more than the cached list: it asks the server for a fresh access token, as the carer the tablet belonged to.

  4. Today's rota, live

    Bob asks for what the app shows a carer each morning.

  5. Where the session came from

  6. A message from Nkechi

    Before the details land in her inbox, Nkechi Adeyemi messages Alice directly.

  7. A tablet that never came back

    Alice leads the Quillmoor Visits apps. The operations manager has written to her.

  8. Cut the tablet off

    Before anything else, the token on that tablet must stop working. Alice revokes every refresh token issued to the device.

  9. Look where the app keeps it

    Alice wants to see exactly what an unwiped tablet gives away. Her test phone runs a debug build, so she can read the app's private files without root.

  10. Open the session store

    Alice opens the code that saves the session after sign-in.

Security Framework Coverage

OWASP Mobile Top 10

  • M9:2024 Insecure Data Storage

OWASP MASVS

  • MASVS-STORAGE-1 The app securely stores sensitive data.

CWE

  • CWE-312 Cleartext Storage of Sensitive Information

MITRE ATT&CK

  • T1409 Stored Application Data

CIS Controls

  • CIS 16 Application Software Security

NIST CSF

  • PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
  • PR.PS Platform Security

NICE Framework

  • DD-WRL-003 Secure Software Development