exploit the possibilities

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
MD5 | 64654c20829d05716e2aff1208cffd22

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


RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

June 2019

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

Top Authors In Last 30 Days

File Tags


packet storm

© 2019 Packet Storm. All rights reserved.

Security Services
Hosting By