Android Permissions Demystified

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Making the System Operational
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Configuration management
PScout: Analyzing the Android Permission Specification
Chrome Extentions Vulnerabilities. Introduction Google Chrome Browser Chrome OS Platform Chrome Web Store Applications Open Source Platform.
Presented By: Aniithaa Rajashekar 03/04/  Access to privacy- and security-relevant parts of the Android API is controlled with an install- time.
Android Security. N-Degree of Separation Applications can be thought as composed by Main Functionality Several Non-functional Concerns Security is a non-functional.
An Evaluation of the Google Chrome Extension Security Architecture
Lesson 17: Configuring Security Policies
GridRPC Sources / Credits: IRISA/IFSIC IRISA/INRIA Thierry Priol et. al papers.
Slide 1 Client / Server Paradigm. Slide 2 Outline: Client / Server Paradigm Client / Server Model of Interaction Server Design Issues C/ S Points of Interaction.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
1 Software Testing and Quality Assurance Lecture 30 – Testing Systems.
G Robert Grimm New York University Protection and the Control of Information Sharing in Multics.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
Android Security Enforcement and Refinement. Android Applications --- Example Example of location-sensitive social networking application for mobile phones.
Understanding Android Security Yinshu Wu William Enck, Machigar Ongtang, and PatrickMcDaniel Pennsylvania State University.
A METHODOLOGY FOR EMPIRICAL ANALYSIS OF PERMISSION-BASED SECURITY MODELS AND ITS APPLICATION TO ANDROID.
박 종 혁 컴퓨터 보안 및 운영체제 연구실 MobiSys '11 Proceedings of the 9th international conference on Mobile systems, applications,
박 종 혁 컴퓨터 보안 및 운영체제 연구실 Workshop on Mobile Security Technologies (MoST)
REFACTORING Lecture 4. Definition Refactoring is a process of changing the internal structure of the program, not affecting its external behavior and.
What is Sure BDCs? BDC stands for Batch Data Communication and is also known as Batch Input. It is a technique for mass input of data into SAP by simulating.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Permission Evolution in the Android Ecosystem Xuetao Wei, Lorenzo Gomez, Iulian Neamtiu, Michalis Faloutsos Department of Computer Science and Engineering.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 5 “Database and Cloud Security”.
A NDROID P ERMISSIONS D EMYSTIFIED Adrienne Porter Felt, Erika Chin, Steve Hanna, Dawn Song, David Wagner University of California ACM CCS /09/20.
Erika Chin Adrienne Porter Felt Kate Greenwood David Wagner University of California Berkeley MobiSys 2011.
CS378 - Mobile Computing Intents.
Secure Credential Manager Claes Nilsson - Sony Ericsson
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Android Security Model that Provide a Base Operating System Presented: Hayder Abdulhameed.
CE Operating Systems Lecture 21 Operating Systems Protection with examples from Linux & Windows.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Jini Architecture Introduction System Overview An Example.
Android System Security Xinming Ou. Android System Basics An open-source operating system for mobile devices (AOSP, led by Google) – Consists of a base.
Unix Security Assessing vulnerabilities. Classifying vulnerability types Several models have been proposed to classify vulnerabilities in UNIX-type Oses.
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
Michael Dalton, Christos Kozyrakis, and Nickolai Zeldovich MIT, Stanford University USENIX 09’ Nemesis: Preventing Authentication & Access Control Vulnerabilities.
Android Permissions Remystified: A Field Study on Contextual Integrity Presenter: Hongyang Zhao Primal Wijesekera (UBC) Arjun Baokar (UC Berkeley) Ashkan.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
Securing Web Applications Lesson 4B / Slide 1 of 34 J2EE Web Components Pre-assessment Questions 1. Identify the correct return type returned by the doStartTag()
CEN6502, Spring Understanding the ORB: Client Side Structure of ORB (fig 4.1) Client requests may be passed to ORB via either SII or DII SII decide.
Nguyen Thi Thanh Nha HMCL by Roelof Kemp, Nicholas Palmer, Thilo Kielmann, and Henri Bal MOBICASE 2010, LNICST 2012 Cuckoo: A Computation Offloading Framework.
Analyzing Input Validation vulnerabilities in Android System Services NAMJUN PARK (NPAR350)
Java & The Android Stack: A Security Analysis Pragati Ogal Rai Mobile Technology Evangelist PayPal, eBay Java.
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
LAN Switching Virtual LANs. Virtual LAN Concepts A LAN includes all devices in the same broadcast domain. A broadcast domain includes the set of all LAN-connected.
 1- Definition  2- Helpdesk  3- Asset management  4- Analytics  5- Tools.
Database and Cloud Security
Architecture Review 10/11/2004
More Security and Programming Language Work on SmartPhones
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Free for All! Assessing User Data Exposure to Advertising Libraries on Android Campbell Foskin.
Understanding Android Security
Types for Programs and Proofs
Introduction to Classes and Objects
Android System Security
Chapter 3: Using Methods, Classes, and Objects
Ch > 28.4.
Knowledge Byte In this section, you will learn about:
Page Replacement.
Introduction to Classes and Objects
Chapter 29: Program Security
Understanding Android Security
Presentation transcript:

Android Permissions Demystified Adrienne Porter Felt, Erika Chin, Steve Hanna, Dawn Song, David Wagner University of California

Outline A brief Introduction of Android permission system Detailed description of Android Permission System Permission system and Permission Enforcement Permission Testing Methodology API, Content provider, Intent Permission Map Result Coverage Comparison with Documentation Application Analysis Tool: Stowaway API, Content Provider and Intent Application Analysis Results Conclusion

Introduction Android supports third-party applications with an extensive API that provides them with access to phone hardware (e.g., the camera), WiFi and cellular networks, user data, and phone settings. Access to privacy- and security-relevant parts of Android's rich API is controlled by an install-time application permission system. Each application must declare upfront what permissions it requires, and the user is notified during installation about what permissions it will receive. User may grant a permission or can cancel the installation process. Install-time permission system is ineffective if developers routinely request more permissions than they require. Least or Over-privileged applications expose users to unnecessary permission warnings and increase the impact of a bug or vulnerability.

Android Permission System Android 2.2 defines 134 permissions Normal permissions Dangerous permissions Signature/System permissions Permission Enforcement API Content Providers Intent

The architecture of the Android platform 1 2 3 1.The application invokes the public API in the library. 2.The library invokes a private interface, also in the library. The private interface is an RPC stub. 3.The RPC stub initiates an RPC request with the system process that asks a system service to perform the desired operation.

Permission Enforcement (API) Various parts of the system invoke a permission validation mechanism(PVM) to check whether a given application has a specified permission. There is no centralized policy for checking permissions when an API is called. When necessary, the API implementation calls the PVM to check that the invoking application has the necessary permissions.

Permission Enforcement (Content Providers) System Content Providers are installed as standalone applications, separate from the system process and API library. They are protected with both static and dynamic permission checks. Static declarations assign separate read and write permissions to a given Content Provider. By default, these permissions are applied to all resources stored by the Content Provider. Content Providers can also enforce permissions programmatically.

Permission Enforcement (Intent) Android's Intent system is used extensively for inter- and intra-application communication. To prevent applications from mimicking system Intents, Android (Activity Manager Service)restricts who may send and receive certain Intents. Some Intents can only be sent by applications with appropriate permissions. Other system Intents can only be sent by processes whose UID matches the system's.

Android Permission System The problem unnecessary use of permissions The proposed solution static analysis of API calls Permission map identifies permissions for Intents, Content Provides, API calls I Stowaway tool determines if an app is over-privileged or not

Permission Testing Methodology (API) Construct a permission map that identifies the permissions required for each method in the Android API modified Android 2.2's permission verification mechanism to log permission checks as they occur. then generated unit test cases for API calls, Content Providers, and Intents.

PERMISSION TESTING METHODOLOGY Goal: Construct a permission map that identifies the permissions required for each method in the Android API Android 2.2's permission verification mechanism is used to log permission checks as they occur. Unit test cases were generated. Executing these tests allowed to observe the permissions required to interact with system APIs.

Permission Testing Methodology (API) API calls testing in three phases Feedback-directed testing Randoop Customizable test case generation Manual verification

Feedback-Directed Testing Randoop: An auto-mated, feedback-directed, object- oriented test generator for Java. Randoop was modified to run as an Android application and to log every method it invokes. These modifications to Android log every permission that is checked by the Android permission validation mechanism, which lets us deduce which API calls trigger permission checks. Randoop's goal is full coverage of the test space. Randoop takes a list of classes as input and searches the space of possible sequences of methods from these classes.

Customizable Test Case Generation A tool was built that accepts a list of method signatures as input, and outputs at least one unit test for each method. It maintains a pool of default input parameters that can be passed to methods to be called. If multiple values are available for a parameter, then this tool creates multiple unit tests for that method. It also generates tests using null values if it cannot find a suitable parameter.

Manual Verification Experimented with the ordering the arguments of the test cases to ensure permission checks were correctly matched to asynchronous API calls and identified the conditions of permission checks. Every test case both with and without their required permissions in order to identify API calls with multiple or substitutable permission requirements were run. If a test case throws a security exception without a permission but succeeds with a permission, then we know that the permission map for the method under test is correct. The rest two phases of testing generate a map of the per- mission checks performed by each method in the API. How- ever, these results contain three types of inconsistencies. That’s why manual verification of the correctness of the permission map is done. Testing The Internet Permission.

Permission Testing Methodology (Content Provider) Content Provider test application executes query, insert, update, and delete operations on Content Provider URIs associated with the Android system and pre-installed applications. URI are collected from: android.provider package to determine the core set of Content Providers to test. Also take URI’s that we discovered during other phases of testing.

Permission Testing Methodology (Intent) A pair of applications to send and receive Intents were built. Public API was scrapped to find string constants that could be the contents of an Intent. In order to test the permissions needed to receive system broadcast Intents, we triggered them. For all of these tests, whether permission checks occurred and whether the Intents were delivered or received successfully were recorded.

Permission Map Result attained 85% coverage of the Android API through two phases of testing. testing identified 1259 API calls with permission checks. Android 2.2 documentation specifies permission requirements for 78 methods.

Comparison With Documentation In Android 2.2 documentation it was found that it species permission requirements for 78 methods out of 16732 public and private methods. The documentation additionally lists permissions in several class descriptions, but it is not clear which methods of the classes require the stated permissions. Of the 78 permission our testing indicates that the doc for 6 API calls is incorrect. These discrepancies may be security errors. Android's documentation of permissions is limited, which is likely due to their lack of a centralized access control policy.

Permissions Distribution Number of Permissions Checks: 1244 API calls with permission checks, which is 6.45% of all API methods. 816 are methods of normal API classes, and 428 are methods of RPC stubs that are used to communicate with system services. Extra 15 API calls with permission checks were indentified in a supplementary part of the API added by a manufacturer. Signature/System Permissions: 12% of the normal API calls are protected with Signature/System permissions, and 35% of the RPC stubs are protected with Signature/System permissions. Unused Permissions: some permissions are defined by the platform but never used within the API. We examined the Android API to see how many methods and classes have permission checks.

Application Analysis Tool Stowaway, which analyzes an Android application and determines the maximum set of permissions it may require. API calls It parses the disassembled DEX(Dalvik executable) files and identify all calls to standard API methods. Content Providers Stowaway collects all strings that could be used as Content Provider URIs and links those strings to the Content Providers' permission requirements. Intent Use ComDroid to detect the sending and receiving of Intents that require permissions.

Application Analysis Results Applied Stowaway to 940 Android applications to identify the prevalence of over-privilege Manual Analysis 40 applications were selected from 940, out of which 18 are over privileged. Automated Analysis Over-all, Stowaway identified 323 out of 900 applications (35:8%) as having unnecessary permissions.

Common Developer Errors Permission Name: Developers sometimes request permissions with names that sound related to their applications‘ functionality, even if the permissions are not required. Related Methods: Applications that use unprotected methods but request permissions that are required for other methods in the same class. Copy and Paste: Popular message boards contain Android code snippets and advice about permission requirements. Sometimes this information is inaccurate, and developers who copy it will over- privilege their applications.

Conclusion Development of tools to detect over-privilege in Android applications. Stowaway, generates the maximum set of permissions needed for an application and compares them to the set of permissions actually requested. Stowaway was applied to 940 Android applications and found that about one-third of them are over- privileged. Our results show that applications generally are over-privileged by only a few permissions, and many extra permissions can be attributed to developer confusion.