Skip to content

Log and Camera permissions can be bypassed #9

@Lekensteyn

Description

@Lekensteyn

Recently I found out that blocking access to logs in pdroid is not secure. Going deeper in this, I found out that more permissions are affected by this. Once an application has been granted a certain permission by Android, it becomes a member of a group.

A list of permissions that are bound to a user ID can be found in https://github.com/android/platform_frameworks_base/blob/master/data/etc/platform.xml Run the following command in frameworks/base to get a list of permissions that are bound to a group:

grep -oP '<permission name="\K[^"]+permission[^"]+' data/etc/platform.xml

Result when doing this on branch cm-10.1:
android.permission.BLUETOOTH_ADMIN
android.permission.BLUETOOTH
android.permission.BLUETOOTH_STACK
android.permission.NET_TUNNELING
android.permission.INTERNET
android.permission.CAMERA
android.permission.READ_LOGS
android.permission.READ_EXTERNAL_STORAGE
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.WRITE_MEDIA_STORAGE
android.permission.ACCESS_MTP
android.permission.NET_ADMIN
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.DIAGNOSTIC
android.permission.READ_NETWORK_USAGE_HISTORY
android.permission.MODIFY_NETWORK_ACCOUNTING
com.tmobile.permission.ACCESS_DRM_THEME

Running the command grep -E "$(sed 's/\./\\./g' bar | tr '\n' '|' | sed 's/|$//') foo (with bar the above xml extract) on https://github.com/wsot/pdroid-manager gives a list of affected permissions:

  • android.permission.CAMERA
  • android.permission.READ_LOGS

I am mentioning it here so that nobody becomes surprised that this hole exist. From these two, the logs is the most severe issue here. It is trivial to execute logcat (reading /dev/log/ is trivial as well). I have not looked further at the camera, but with the right libraries it also becomes feasible to abuse the permission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions