what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Android 2.3.7 SQLite Disclosure

Android 2.3.7 SQLite Disclosure
Posted May 3, 2012
Authored by Roee Hay

SQLite databases stored on Android suffer from an insecure permission vulnerability. Version 2.3.7 is affected.

tags | advisory, info disclosure
SHA-256 | 84d02b3ee9f88069270f1d55a7a0419db6f4ee552b8001ed7d46641a2a66e816

Android 2.3.7 SQLite Disclosure

Change Mirror Download
1 Background
============
Android applications are executed in a sandbox environment, to ensure that no
application can access sensitive information held by another, without adequate
privileges. For example, The Browser application holds sensitive information
such as cookies, cache and history, and this cannot be accessed by third-party
apps, while the Google Talk application stores contacts and conversations. An
android app may request specific privileges during its installation; if granted
by the user, the app's capabilities are extended.

One mechanism which Android uses in order to implement the sandbox, is running
each application as a separate process, and as a Linux user which is private to
the application's package. Running applications as different users makes files
owned by one application inaccessible to another (unless explicitly allowed).

At the application deployment phase, Android allocates the application a data
directory, identified by the application's package, under the /data/data path.

Android provides support for SQLite databases. Applications can create a private
database identified by name. Once created, the database is stored under the
/data/data/<app package>/databases directory, with the chosen name as
a filename.

The SQLite database engine maintains a rollback journal. When an application
changes the database, the original unchanged database is first copied to the
journal, and in case of a crash or a ROLLBACK action, the database can be
recovered. The journal has the same filename as the database itself, but with
a -journal suffix.

2 Vulnerability
===============
The journal file of SQLite databases can be read by all applications:

* The application's data directory has execution rights for all users, up to the
root. This means that files with read or write permissions for all users, found
under the application's data directory are actually globally accessible.

* The /data/data/<app package>/databases directory is created with [rwxrwx--x]
permissions, meaning that files under that dir with global read or write
permissions, are globally readable or writable.

* The journal file is created under the databases directory with [-rw-r--r--]
permissions and therefore it can be read by all apps.

Conclusion: All databases maintained by Android's SQLite engine (unless named
with a random and unguessable string) can be leaked by malicious applications
without the need to declare adequate privileges. The databases can be leaked
during the lifetime of the journal file, (i.e. when the transaction is made).

3 Impact
========
A malicious app can eavesdrop on database activities performed by any other
application using SQLite, allowing unauthorized access to information such as
URL history, messages, and contacts.

4 Vulnerable versions
=====================
Android 2.3.7.

5 Non-vulnerable versions
=========================
Android 4.0.1.

6 Credit
========
Discovered by Roee Hay <roeeh@il.ibm.com>

7 Acknowledgments
=================
We would like to thank the Android Security Team for the efficient way in which
they handled this security issue.

8 References
============
* Full advisory with PoC. http://bit.ly/K0W0pT
* Blog post. http://bit.ly/JEThEf
* Video demonstration. http://youtu.be/oCXLHjmH5rY
Login or Register to add favorites

File Archive:

December 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Dec 1st
    0 Files
  • 2
    Dec 2nd
    41 Files
  • 3
    Dec 3rd
    25 Files
  • 4
    Dec 4th
    0 Files
  • 5
    Dec 5th
    0 Files
  • 6
    Dec 6th
    0 Files
  • 7
    Dec 7th
    0 Files
  • 8
    Dec 8th
    0 Files
  • 9
    Dec 9th
    0 Files
  • 10
    Dec 10th
    0 Files
  • 11
    Dec 11th
    0 Files
  • 12
    Dec 12th
    0 Files
  • 13
    Dec 13th
    0 Files
  • 14
    Dec 14th
    0 Files
  • 15
    Dec 15th
    0 Files
  • 16
    Dec 16th
    0 Files
  • 17
    Dec 17th
    0 Files
  • 18
    Dec 18th
    0 Files
  • 19
    Dec 19th
    0 Files
  • 20
    Dec 20th
    0 Files
  • 21
    Dec 21st
    0 Files
  • 22
    Dec 22nd
    0 Files
  • 23
    Dec 23rd
    0 Files
  • 24
    Dec 24th
    0 Files
  • 25
    Dec 25th
    0 Files
  • 26
    Dec 26th
    0 Files
  • 27
    Dec 27th
    0 Files
  • 28
    Dec 28th
    0 Files
  • 29
    Dec 29th
    0 Files
  • 30
    Dec 30th
    0 Files
  • 31
    Dec 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close