Android Permission Presenter: Zhengyang Qu.

Slides:



Advertisements
Similar presentations
Policy Weaving for Mobile Devices Drew Davidson. Smartphone security is critical – 1200 to 1400 US Army troops to be equipped with Android smartphones.
Advertisements

Android Security. N-Degree of Separation Applications can be thought as composed by Main Functionality Several Non-functional Concerns Security is a non-functional.
By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
AndroidCompiler. Layout Motivation Literature Review AndroidCompiler Future Works.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
The Most Dangerous Code in the Browser Stefan Heule, Devon Rifkin, Alejandro Russo, Deian Stefan Stanford University, Chalmers University of Technology.
AutoCog: Measuring the Description-to-permission Fidelity in Android Applications Zhengyang Qu1, Vaibhav Rastogi1, Xinyi Zhang1,2, Yan Chen1, Tiantian.
S.R.F.E.R.S. State, Regional, and Federal Enterprise Retrieval System Inter-Agency & Inter-State Integration Using GJXML.
CS 290C: Formal Models for Web Software Lecture 10: Language Based Modeling and Analysis of Navigation Errors Instructor: Tevfik Bultan.
Dept. of Computer Science & Engineering, CUHK1 Trust- and Clustering-Based Authentication Services in Mobile Ad Hoc Networks Edith Ngai and Michael R.
© 2009 Research In Motion Limited Methods of application development for mobile devices.
Mobile Application Development
Security of Mobile Applications Vitaly Shmatikov CS 6431.
WHYPER: Towards Automating Risk Assessment of Mobile Applications Rahul Pandita, Xusheng Xiao, Wei Yang, William Enck, and Tao Xie ♠ Department of Computer.
Tao Xie University of Illinois at Urbana-Champaign 0
Android Security Enforcement and Refinement. Android Applications --- Example Example of location-sensitive social networking application for mobile phones.
William Enck, Machigar Ongtang, and Patrick McDaniel.
Presentation By Deepak Katta
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,
Lei Wu, Michael Grace, Yajin Zhou, Chiachih Wu, Xuxian Jiang Department of Computer Science North Carolina State University CCS 2013.
Byron Alleman Will Galloway Jesse McCall. Permission Based Security Model Users can only use features for which their permissions grant them access Abstracts.
Authors: William Enck The Pennsylvania State University Peter Gilbert Duke University Byung-Gon Chun Intel Labs Landon P. Cox Duke University Jaeyeon Jung.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
1 NETE4631 Mobile Cloud Computing Lecture Notes #10.
Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and.
INTERPRETING IMPERATIVE PROGRAMMING LAGUAGES IN EXTENSIBLE STYLESHEET LANGUAGE TRANSFORMATIONS (XSLT) Authors: Ruhsan Onder Assoc.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
University of Central Florida TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones Written by Enck, Gilbert,
AppShield: A Virtual File System in Enterprise Mobility Management Zhengyang Qu 1 Northwestern University, IL, US,
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
CSCE 201 Web Browser Security Fall CSCE Farkas2 Web Evolution Web Evolution Past: Human usage – HTTP – Static Web pages (HTML) Current: Human.
NMD202 Web Scripting Week3. What we will cover today Includes Exercises PHP Forms Exercises Server side validation Exercises.
Procrastinator: Pacing Mobile Apps’ Usage of the Network mobisys 2014.
Interpretation Environments and Evaluation. CS 354 Spring Translation Stages Lexical analysis (scanning) Parsing –Recognizing –Building parse tree.
Page 1 Alliver™ Page 2 Scenario Users Contents Properties Contexts Tags Users Context Listener Set of contents Service Reasoner GPS Navigator.
Christopher Kruegel University of California Engin Kirda Institute Eurecom Clemens Kolbitsch Thorsten Holz Secure Systems Lab Vienna University of Technology.
Grid Operations Center Infrastructure Team Soichi Hayashi, Arvind Gopu.
Leave Me Alone: App- level Protection Against Runtime Information Gathering on Android NAN ZHANG, KAN YUAN, MUHAMMAD NAVEED†, XIAOYONG ZHOU AND XIAOFENG.
Mobile Application Security on Android Originally presented by Jesse Burns at Black Hat
User Profiling using Semantic Web Group members: Ashwin Somaiah Asha Stephen Charlie Sudharshan Reddy.
Android System Security Xinming Ou. Android System Basics An open-source operating system for mobile devices (AOSP, led by Google) – Consists of a base.
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
Wireless and Mobile Security
Android Permissions Demystified
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Cosc 4735 Primer: Marshmallow Changes and new APIs in android 6.0 (api 23)
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
1 An infrastructure for context-awareness based on first order logic 송지수 ISI LAB.
Security API discussion Group Name: SEC Source: Shingo Fujimoto, FUJITSU Meeting Date: Agenda Item: Security API.
AppContext: Differentiating Malicious and Benign Mobile App Behavior Under Contexts Tao Xie Joint Work w/ David Yang, Sihan Li (Illinois) Xusheng Xiao,
Nguyen Thi Thanh Nha HMCL by Roelof Kemp, Nicholas Palmer, Thilo Kielmann, and Henri Bal MOBICASE 2010, LNICST 2012 Cuckoo: A Computation Offloading Framework.
DeepDroid Dynamically Enforcing Enterprise Policy Manwoong (Andy) Choi
Analyzing Input Validation vulnerabilities in Android System Services NAMJUN PARK (NPAR350)
Android and IOS Permissions Why are they here and what do they want from me?
AppAudit Effective Real-time Android Application Auditing Andrew Jeong
WHAT THE APP IS THAT? DECEPTION AND COUNTERMEASURES IN THE ANDROID USER INTERFACE.
Facebook privacy policy
More Security and Programming Language Work on SmartPhones
Free for All! Assessing User Data Exposure to Advertising Libraries on Android Campbell Foskin.
TriggerScope: Towards Detecting Logic Bombs in Android Applications
Understanding Android Security
Static Detection of Cross-Site Scripting Vulnerabilities
Systematic Detection of capability leaks in stock android smartphones
Providing Secure Storage on the Internet
Technical Capabilities
Understanding Android Security
Presentation transcript:

Android Permission Presenter: Zhengyang Qu

Roadmap Background Related Topics VetDroid Whyper Conclusion

Background In Android, API allows the access to security- sensitive resource (e.g., location, address book). APIs are guarded by permissions Enforcement: User agreement upon installation API invocation calls permission check

Background In Android 4.2, there are 130 permissions: Normal permissions: control access to API calls that could annoy but not harm the user SET_WALLPAPER Dangerous permissions: control access to potentially harmful API calls CALL_PHONE Signature/System permissions: grant only to applications only signed with the device manufacturer’s certificate BRICK

Related Topics Overprivilege Confused Deputy Application requests permissions more than it needs by functionality (e.g., camera app requests calendar) Confused Deputy An application performs a sensitive action on behalf of a malicious application Invoke browser to download malicious malicious files (Lineberry et al., BlackHat 2010)

Related Topics Collusion Attack Privacy Leakage Divide necessary permissions among two (or more) malicious applications Privacy Leakage User is unaware of the action of sending user’s privacy to 3rd party Inferring user’s interest, identity … Monitor location, call history… Upload call recording

VetDroid Motivation Approach

Motivation Reconstruct Android application behavior to detect privacy leakage Limitation of traditional analysis techniques Mostly leverage system calls, limited by Android’s specific security model Android Framework Managed Resource: Applications do not directly use system calls to access system resources Binder Inter-Process Communication Event Trigger (e.g., callback for location change) Android Framework Managed Resource: Applications do not directly use system calls to access system resources. Instead, most system resources in Android are managed and protected by the Android framework, and the application-system interactions occur at a higher semantic level (such as accessing contacts, call history) than system calls at the Linux Kernel level. Instead, most system resources in Android are managed and protected by the Android framework, and the application-system interactions occur at a higher semantic level (such as accessing contacts, call history) than system calls at the Linux Kernel level. Binder IPC: First, traditional solutions would only intercept a lot of system calls used to interact with the Binder driver, hiding the real actions performed by the application. Second, the use of IPC in Android apps breaks the execution flow of an app into chains among multiple processes, making the evasion of traditional syscall-based behavior monitoring Event Trigger: Asynchronous feature: A key observation is that application registered callbacks are application code, so they could evade system call interception.

Motivation Not able to analyze app internal behavior logic in fine-granularity Where does the permission check happen and how is the privacy guarded by permission used. Extensibility Need to predefine which kind of privacy leakage to be monitor

Approach E-PUP Identification I-PUP Tracker Invocations of Android APIs calling permissions check I-PUP Tracker Delivery point for each resource requested at E-PUP I-PUP Tracker: permission based taint tracking

E-PUP Identification Incomplete (Felt et al. Stowaway) and Inaccurate (Au et al. PScout) Identify boundary between application code and system code, Intercept all calls to Android APIs Monitor permissions check events in permission enforcement system during execution of API Cover Java reflection and Java Native Interface Stowaway [27] uses Java reflection to execute Android APIs and monitors what permissions are checked by the system. To create appropriate arguments for each API, Stowaway uses API fuzzing to automatically generate test cases. Although Stowaway’s API-permission list is accurate, it is quite incomplete due to the fuzzer’s inability to generate complete inputs for all Android APIs. PScout [12] adopts static analysis to extract API-permission lists from Android source code. Although PScout’s API-permission list is relatively complete, it is not accurate enough, because an Android API could use different permissions at runtime according to its arguments. The application-system interface is recognized at every function call site by checking whether the caller is application code and the callee is system code. As Android apps are mostly developed in the Java language and run on the Dalvik virtual machine, we instrument Dalvik to monitor all function calls. In this example, App.getLastLocation() invokes getLastKnownLocation() API of LocationManagerService to get the last known location. Before invoking this API, VetDroid clears the permission check information in the thread-local storage using VetDroid.clearPermCheckTags(). During the execution of this API, Android’s permission enforcement system performs a permission check on ACCESS_FINE_LOCATION permission. At last, after the execution of getLastKnownLocation() API, VetDroid invokes VetDroid.getPermCheckTags() to propagate the permission check information from the enforcement system to the application side.

Acquire Permission Check Information Acquire permission check information to judge whether a callsite is an E-PUP and what permission is checked Android Permission Check Extend the Binder driver and protocol to propagate permission check information from Service Kernel Permission Check Instrument the GID isolation logic to record the checked GID into a kernel thread-local storage Two system calls are added to access and clear the checked GID in the kernel thread-local storage Acquire permission check information at the application side to judge whether a callsite is an E-PUP and what permission is used by an E-PUP. Figure 3 gives an example of AndPermChk. App_1 tries to acquire the current location by invoking an interface of LocationManagerService via Binder. LocationManagerService first checks whether App_1 has been granted ACCESS_FINE_LOCATION permission by invoking the general permission check interface of ActivityManagerService. The AndPermChk requests are finally redirected to PackageManagerService except the permission requests from the system itself are granted immediately. PackageManagerService handles the permission check request by looking up a table that records all the granted permissions for each application when it is installed. In Android, a unique GID is assigned to each kernel-enforced permission. An app is checked to verify whether it has the corresponding GID before accessing the protected resource. With a unique GID assigned to every kernel-enforced permission, KerPermChk is enforced by the GID isolation mechanism. We instrument the GID isolation logic to record the checked GID into a kernel thread-local storage.

I-PUP Tracker Recognize Resource Delivery Point Types of callbacks BroadcastReceiver, PendingIntent, Listener.BroadcastReceiver Monitor APIs register callbacks BroadcastReceiver: only one API could register or in AndroidManifest.xml PendingIntent, Listener.BroadcastReceiver, automated selection algorithm to find all potential APIs whose arguments may contain a PengdingIntent or a Listener Android’s programming model feature: Callbacks are source delivery points in application Since BroadcaseReceiver can be registered by the manifest file, we parse the manifest file of each analyzed app to collect declared BroadcastReceivers and mark their onReceive() functions as the resource delivery points. We observe that Listeners can be invoked from a separate/remote process, so they are Binder objects. Our selection algorithm first finds all the subclasses that extend android.os.Binder. As an API may declare an interface as the argument type, our algorithm further collects a list for the interfaces that each Binder subclass implements. At last, our filtering method looks up PScout’s API list to select those APIs with an argument type contained in the subclass list or the interface list.

Permission-based Taint Analysis Tag Allocation Automatic Data Tainting Add a wrapper around each registered callback to taint the delivered protected data Identify I-PUPs At function-level Tag of function is calculated by a bitwise OR operation on the taint tags of its parameter values Application Driver: Monkey & fake event injection A taint tag is allocated at each E-PUP to mark the requested resource with corresponding permission check information. information. The taint tag is represented as a 32-bit integer. The automatic data tainting occurs at the resource delivery point for each E-PUP. For APIs that register callbacks, a wrapper is added around each registered callback to taint the delivered protected data according to the concrete type of the callback so that the related data gets tainted only when the callback is triggered. For other APIs, two kinds of data are automatically tainted according to the signature of the API: 1) The return value of the API at each E-PUP should be tainted with the corresponding tag. 2) As Java is an object-oriented language, the state of an object may be modified by instance methods. For instance APIs, we also taint the invoked object with the tag allocated at the E-PUP

Whyper Motivation Problem Statement Approach Discussion

Motivation Rich techniques to detect misbehavior of application via static/run-time analysis. No way to evaluate whether application oversteps the user expectation. Bridge the gap between what user expects and what the application really does GPS Tracker: record and send phone’s geographic location to the network; Phone-Call Recorder: record audio the phone call

Problem Statement Where does the user’s expectation on an application come from? Google Play gives the metadata of application (description, requested permissions…) at download time. Description gives user a direct and easy access to the functionalities of the application. Implemented functionalities rely on permission. Validate whether the description state the need of the permission

Approach Limitation of keyword-based searching Confounding effect “Display user contacts” vs “contact me at ‘abc@xyz.com’” Leverage NLP techniques Semantic Inference “Share … with your friends via email, sms” Use API documents as a source of semantic information for identifying actions and resources related with a sensitive permission.

NLP Preprocessor Period handling Sentence boundaries Differentiate (1) decimal, (2) ellipsis, (3) shorthand notations (e.g., “Mr.”, “Dr.”) Sentence boundaries Enumeration list, placements of tabs, bullet points, “:”, “!” Named entity handling Maintain a static lookup table containing the entity phrases, such as “Google Maps” Sometimes a sequence of words correspond to the name of entities that have a specific meaning collectively. Further resolution of these phrases using grammatical syntax is unnecessary and would not bring forth any semantic value. Detecting such abbreviations is achieved by using the common structure of abbreviations and encoding such structures into regular expressions

NLP (cont’d) NLP Parser (Stanford Parser) Abbreviation handling “Instant Message (IM)” NLP Parser (Stanford Parser) Named entity recognition Stanford-Typed Dependencies Part-Of-Speech tagging, Logic dependencies among various parts of sentences Intermediate-Representation Generator The FOL representation helps us effectively deal with the problem of confounding effects of keywords as described before. Relation (dependent, governor)

Semantic Engine Given the Semantic Graph (SG) for one permission and FOL representation of sentence, Semantic Engine (SE) decides whether the sentence implies the permission. Example SG for ‘CONTACT’ Resource name with its synonym paired with actions (Use WordNet)

Semantic Engine (cont’d) Matching algorithm Check whether a leaf node of FOL representation is the resource name or its synonyms If no: return false If yes: Traverse the tree from the leaf node to root if either parent predicate or intermediate child predicate match with action in SG: return True return False

Semantic Graphic Leverage Android API documents Assumption: Mobile applications are predominantly thin clients, and actions and resources provided by API documents can cover most of the functionality performed by these thin clients Use output of PScout (Au et al.) to find API document of the class/interface mapping with each permission Find resource name by class name “CONTACTS” “ADDRESS BOOK” from ContactsContract.Contacts class

Semantic Graphic (cont’d) Extract noun phrases from member variables and investigate types for deciding whether they are resource names Member variable ‘email’ with type ‘ContactsContract,CommonDataKinds.Email’ Extract both noun phrases and verb phrases from API public methods (noun phrase  resource, verb phrase  action) ‘ContactsContract.Contacts’ defines Insert, Update, Delete…

Discussion Limitation: False negative: False Positive: Limited semantic information in API document “Blow into the mic to extinguish the flame like a real candle”  RECORD_AUDIO False Positive: Incorrect matching of semantic actions against a resource “You can now turn recordings into ringtones”  RECORD_AUDIO

Discussion (cont’d) Advantage over keyword-based matching Confounding effect: “Contact me if there is a bad translation or you’d like your language to be added” Name entity recognition: “To learn more, please visit our Checkmark Calendar web site” Context: “That’s what this app brings to you in addition to learning number!” Synonym: “address book”  “contact”, “mic”  “microphone”

Thank you!