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:

March 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close