OWASP Mobile Top 10: M2 Insecure Data Storage

Null Bangalore Meet

30 August 2014

Abstract

This Session will focus on Mobile Top 10 2014-M2 : Insecure Data Storage. We will try to understand Insecure Data storage and how this affects the overall security of Mobile Devices. We will use some sample vulnerable application to understand the cause of the issues as well as what kind of protection can be applied.

Slides

AI Generated Summary

AI Generated Content Disclaimer

Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.

This presentation covers OWASP Mobile Top 10 2014 risk M2, Insecure Data Storage, explaining how mobile applications on both Android and iOS frequently store sensitive data in plaintext or trivially reversible formats. Using real-world examples including Google Authenticator and Microsoft Outlook, the deck shows how insecure storage practices lead to identity theft, fraud, and compliance violations, and provides practical guidance on detection and mitigation.

Summary

The deck opened with mobile storage architecture. On Android, application-specific data lives under /data/data/<app>, a section only the application and root can access, while /sdcard/ is external memory, generally FAT32 with no ACL, readable by all applications and externally by a card reader. On iOS, <Application_Home>/Documents/ is accessible only to the app and the root user, and there is no SD card equivalent.

Insecure data storage was defined as what happens when development teams assume users or malware will never access the device filesystem, and store sensitive information such as PII in data-stores in insecure formats: plain text or trivially reversible encodings like double ROT-13, ROT-n, or base64/32/128. The consequences run from identity theft, fraud, and reputation damage to external policy violations such as PCI, or material loss. The demo section showed Approtect and Google Authenticator, whose plaintext secret keys database was documented in a public issue tracker, and Microsoft Outlook for mobile, whose accessible email storage was documented by INCLUDE Security.

Detection focused on the formats data takes on the device: XML, Plist, SQLite databases, plain text config files, log files, and cookies stored by WebView components. The Android method: install the app, configure and run it for some time, extract /data/data/<app_name>, observe the change in /sdcard before and after installation, then identify files and their content for sensitive data. Mitigation closed the deck: don’t store data unless absolutely necessary, never store credentials on the phone file system, force authentication over HTTPS on each app opening with session timeouts at the bare minimum the user experience allows, use SQLCipher for SQLite encryption, be aware that NSManagedObjects write to an unencrypted database file, keep shared preferences out of MODE_WORLD_READABLE, keep PII off the SDCARD, avoid NSUserDefaults for sensitive values, and remember that Apple or Android keychains become readable once a device is jailbroken or rooted.

Key Themes

Notable Points

Notable Quotes

“It occurs when development teams assume that users or malware will not have access to a mobile device’s filesystem.”

“Never store credentials on the phone file system”

“don’t store data unless absolutely necessary”

“Apple or android keychains can be used but once jailbroken or rooted it can be easily read.”

“Ensure SDCARD storage is not used for PII or sensitive information of any sorts”

Social chatter