Daoyuan Wu, Ximing Liu*, Jiayun Xu*, David Lo, and Debin Gao

Slides:



Advertisements
Similar presentations
Chrome Extentions Vulnerabilities. Introduction Google Chrome Browser Chrome OS Platform Chrome Web Store Applications Open Source Platform.
Advertisements

System Center Configuration Manager Push Software By, Teresa Behm.
What is a Programming Language? The computer operates using binary numbers. The computer only knows about 1’s and 0’s. Humans can also use 1’s and 0’s,
DT228/3 Web Development Introduction to Java Server Pages (JSP)
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Efficient Privilege De-Escalation for Ad Libraries in Mobile Apps Bin Liu (SRA), Bin Liu (CMU), Hongxia Jin (SRA), Ramesh Govindan (USC)
Jarhead Analysis and Detection of Malicious Java Applets Johannes Schlumberger, Christopher Kruegel, Giovanni Vigna University of California Annual Computer.
Android Introduction Platform Overview.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
1 Modular Software/ Component Software 2 Modular Software Code developed in modules. Modules can then be linked together to produce finished product/program.
Arpit Jain Mtech1. Outline Introduction Dalvik VM Java VM Examples Comparisons Experimental Evaluation.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
 To explain the importance of software configuration management (CM)  To describe key CM activities namely CM planning, change management, version management.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Android Security Model that Provide a Base Operating System Presented: Hayder Abdulhameed.
ANDROID BY:-AANCHAL MEHTA MNW-880-2K11. Introduction to Android Open software platform for mobile development A complete stack – OS, Middleware, Applications.
Presentation Name / 1 Visual C++ Builds and External Dependencies NAME.
Module 8 : Configuration II Jong S. Bok
Protecting Browsers from Extension Vulnerabilities Paper by: Adam Barth, Adrienne Porter Felt, Prateek Saxena at University of California, Berkeley and.
Android Permissions Demystified
ITP 109 Week 2 Trina Gregory Introduction to Java.
Introduction to Programming 1 1 2Introduction to Java.
Android. Android An Open Handset Alliance Project A software platform and operating system for mobile devices Based on the Linux kernel Developed by Google.
Best Way to Learn Selenium Course in Online. Looking to learn best testing tool? If your preference is selenium testing then your choice is perfect. The.
What mobile ads know about mobile users
Android Mobile Application Development
Lecture 1b- Introduction
More Security and Programming Language Work on SmartPhones
Android Mobile Application Development
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Unit Testing.
Free for All! Assessing User Data Exposure to Advertising Libraries on Android Campbell Foskin.
Security and Programming Language Work on SmartPhones
What is Apertis? Apertis is a versatile open source infrastructure tailored to the automotive needs and fit for a wide variety of electronic devices.
Done By: Ashlee Lizarraga Ricky Usher Jacinto Roches Eli Gomez
Web Application.
Obtaining the Required Tools
Implementation of Embedded OS
Android Runtime – Dalvik VM
Introduction to Advanced Java Programming
Chapter 18 Maintaining Information Systems
On the road: Test automation in practice for a BMW map update service
WELCOME Mobile Applications Testing
Computer System Laboratory
Chapter 7 Installing Program &Backup Tool
The GoogleMap API By Cody Littley.
The Improvement of PaaS Platform ZENG Shu-Qing, Xu Jie-Bin 2010 First International Conference on Networking and Distributed Computing SQUARE.
Spyridon (Spyros) Mastorakis University of California, Los Angeles
Target Fragmentation in Android Apps
Analyzing WebView Vulnerabilities in Android Applications
Design and Programming
Top Reasons to Choose Android Today. Over the years the Android OS has progressed largely by acquiring major percent of global market share. A number.
Top Reasons to Choose Android Today. Over the years the Android OS has progressed largely by acquiring major percent of global market share. A number.
CVE.
An Introduction to Software Architecture
Android Developer Fundamentals V2
How to Improve Releasing Efficiency via i18N/L10n Test Automation.
Software Verification, Validation, and Acceptance Testing
Module P4 Identify Data Products and Views So Their Requirements and Attributes Can Be Controlled Learning Objectives: Understand the value of data. Understand.
CS 240 – Advanced Programming Concepts
Android Platform, Android App Basic Components
Emerging Platform#3 Android & Programming an App
David Cleverly – Development Lead
Vulnerability in an Android App I Found last November - Attack and Countermeasure - Ken Okuyama Sony Digital Network Applications.
Exploring DOM-Based Cross Site Attacks
SPL – PS1 Introduction to C++.
Consistent Offline Update of Suspended Virtual Machines in Clouds
Eurostat Unit B3 – IT and standards for data and metadata exchange
Presentation transcript:

Measuring the Declared SDK Versions and Their Consistency with API Calls in Android Apps Daoyuan Wu, Ximing Liu*, Jiayun Xu*, David Lo, and Debin Gao School of Information Systems Singapore Management University *: co-second author.

a modern software mechanism The fast-evolving Android has multiple platform versions active in the market! Android has been the most popular smartphone system, with multiple platform versions active in the market. However, it is thus difficult for developers to manage their applications’ compatibility with multiple platform versions. Developers may feel confused. To help developers overcome the app compatibility problem, Android allows apps to declare the supported platform SDK versions in their manifest files, like this. This kind of declared SDK version is a modern software mechanism. In this work, we aim to make a first study on the effectiveness of this modern software mechanism. Declare the supported platform SDK versions An Android App a modern software mechanism Image source: http://olx.uz/obyavlenie

The Declared SDK (DSDK) Versions in Android Apps It is different from the traditional compiling SDK (CSDK). DSDK records the supported platform SDK versions, which are for the runtime Android system to check apps’ compatibility. Unlike the CSDK for the compiling purpose, DSDK … This figure shows how to declare the supported SDK versions in Android apps’ manifest files. It has three attributes. Or in Android terminology, the minimum platform API level. An important implication of this attribute is that the Android system will enable backward-compatible behaviors of the corresponding target SDK version, even when the app is running on a higher version of the Android platform. As I will show later, it may cause some security risks. Note that Android does not encourage developers to claim this attribute. The maxSdkVersion integer specifies the maximum platform SDK version on which the app can run. The minSdkVersion integer specifies the minimum platform SDK version required for the app to run. The targetSdkVersion integer designates the platform SDK version that the app targets at. “backward-compatible”

Does this software mechanism work as Google thought Does this software mechanism work as Google thought? (Is it a silver bullet?) Could developers declare the supported platform SDK versions correctly? Given this modern software mechanism, it is natural to think that … In particular, …

First, we show that in theory, this software mechanism do have side effects.

Inappropriate DSDK Versions and Two Side Effects Added APIs Removed APIs A patched API minSDK targetSDK maxSDK From app manifest: minLevel maxLevel From app API calls: Let me use this slide to explain … The first side effect is easy to understand, so we elaborate more on the second effect Crash Less secure Crash Android platforms:

Examples of the Side Effect II: Making Apps Fail to Get Secure Content provider component is by default exported prior to Android 4.2. Caused a number of vulnerable apps in year 2011-12. Android changed this policy since 4.2 (API level 17). However, developers need to set targetSdkVersion >= 17. Otherwise, Android still uses the old policy, even on higher versions of platforms. addJavascriptInterface remote code execution via Java reflection Android 4.2 disables such Java reflection based attacks. Similarly, developers need to upgrade targetSdkVersion. The second side effect is that because of the inappropriate targetSDK version, apps fail to get secure that they originally should be able to.

How about the reality? Do real-world apps suffer from these two side effects? Then the problem is whether …

The Objectives of Our Study Android App Manifest <uses-sdk> Dex bytecodes 2 “Consistency” 1 More specifically, we have two objectives … The current practice of DSDK versions in real apps

Methodology Three-dimensional analysis: Google Play level Crawled Android Apps Google Play Websites Android API Documents Google Play Analysis Document Analysis Three-dimensional analysis: Google Play level Android Document level Android App level Filtered multiple-apk apps API-SDK mapping Single-apk Apps Manifest Bytecode aapt dexdump Now let me introduce the methodology of our study. This right-hand figure gives an overview of …. It perform analysis at three dimensions. First, …, which I will introduce in next slide. Min/Target/Max DSDK versions API calls and their SDK versions Comparison App Analysis Characteristic Results Consistency Results

Android Document Analysis All added APIs are given by api-versions.xml The removed APIs can be got from the api_diff directory included in the Android Doc. Now we comes to the …

The Result of Document Analysis A total of 30,083 APIs are added 794 deprecated APIs 190 removed APIs among all the 23 versions However, we found that such document-based analysis initially proposed by an ICSM’13 work [1] has problems: The deprecated and removed lists are not accurate. [1] T. McDonnell, B. Ray, and M. Kim, An Empirical Study of API Stability and Adoption in the Android Ecosystem, In Proc. IEEE ICSM, 2013.

So We Focus on Added APIs Distribution of the versions of added APIs APIs added in version 1 and APIs added later Distribution of APIs added in the versions >1

The dataset of our study All apps were crawled in July 2015. Our analysis was finished in April 2016, when Android 6.0 was the latest version. Here is the dataset of … Finally, among the 24426 apps, we find that 1301 apps provide multiple-apk and the rest of apps only have single-apk. This is our final dataset. The following experiments are based on this dataset.

Android App Analysis We wrote python scripts to drive aapt (Android Asset Packaging Tool) and dexdump tools. These two are more robust than apktool and dex2jar. All succeed for aapt; Only two failed for dexdump. “2/23,125” API-SDK mapping Single-apk Apps Manifest Bytecode aapt dexdump Min/Target/Max DSDK versions API calls and their SDK versions In the third module, … Comparison App Analysis Consistency Results In contrast, the failure rate of apktool is 6/1,000.

Retrieving Declared SDK Versions Observed and handled two kinds of special cases: Some apps define minSdkVersion multiple times, for which we only extract the first value. We apply the by-default rules for the non-defined minSdkVersion and targetSdkVersion.

Extracting API Calls Whether clsName covers pkgName (1) Also locate the “class” line (for excluding the library code) (1) Locate the “invoke” lines (2) Extract the API portion (3) Remove the redundancy

Computing the Levels of API Calls minLevel maxLevel From app API calls: API added in v1 API added in v5 API never removed API removed in v17 API added in v1 API added in v9 API never removed API removed in v19 minLevel = 9 maxLevel = 17

Evaluation Research Questions Key Findings RQ1: What are the characteristics of the DSDK versions in real-world apps? RQ2: Could we identify the inconsistency between DSDK versions and API calls in real apps? In particular, could we discover crash bugs and potential security vulnerabilities? Out of 23,125 apps we analyzed: Around 17% apps do not claim the targeted DSDK versions or declare them inappropriately. Around 1.8K apps under-set the minimum DSDK versions, causing them to crash when running on lower platforms. Over 400 apps under-claim the targeted DSDK versions, making them potentially exploitable by remote code execution.

Not all apps define the minSdkVersion and targetSdkVersion attributes, and 16.5% apps do not claim the targetSdkVersion attributes.

The minimal platform versions most apps support are Android 2. 3 and 2 The minimal platform versions most apps support are Android 2.3 and 2.2, whereas the most targeted platform versions are Android 4.4 and 5.0. (for our dataset in July 2015) Android 4.4 Android 2.3 Android 5.0 Android 2.2

Around 1.8K apps under-set the minSdkVersion value, causing them to crash on lower platforms. 2 1 minLevel > minSdkVersion apiOverNum >=5: 1 – 60% = 40% = 1,750 1 apiOverNum >=10: 1 – 84% = 16% = 692 2 5 10

909 apps call the addJavascriptInterface() API Around 400 apps fail to update their targetSdkVersion values, making them potentially exploitable by remote code execution. 909 apps call the addJavascriptInterface() API Based on all API calls for app codes. 413 apps are potentially vulnerable, Because their targetSdkVersion < 17 (Android 4.2) Interestingly, 238 of them do not define the targetSdkVersion attribute (i.e., it is null).

Conclusions and Takeaways We are the first to systematically measure the declared SDK versions (a modern software mechanism) and their consistency with API calls in Android apps. Two key findings (out of 23,125 apps we analyzed): Around 1.8K apps under-set the minimum DSDK versions, causing them to crash on lower platforms; Over 400 apps under-claim the targeted DSDK versions, making them potentially exploitable on all platforms. Contact: Daoyuan Wu (dywu.2015@smu.edu.sg)

Backup Slides

Google Play Analysis To filter multiple-apk apps (e.g., Facebook) We wrote python scripts based on Selenium, a web browser automation tool. From google play webpage, we estimate whether this app provides multiple-apk from these three values. We also collect the downloads value of each app.

The download distribution of multiple-apk apps This slide lists … We can infer that popular apps are much more likely to publish multiple-apk apps.

The api_diff is not accurate One example on a “removed” API: android/accounts/AccountManager/removeAccount(Account;AccountManagerCallback;Handler) We will use Soot to build an accurate API-SDK mapping by directly analyzing each SDK jar file.