Mobile applications security Android OS (case study) Maciej Olewiński. Cryptographic Seminar 16.05.2012r.



Similar documents
Hacking your Droid ADITYA GUPTA

Lecture 17: Mobile Computing Platforms: Android. Mythili Vutukuru CS 653 Spring 2014 March 24, Monday

An Introduction to Android

ANDROID BASED MOBILE APPLICATION DEVELOPMENT and its SECURITY

Creating and Using Databases for Android Applications

Review On Google Android a Mobile Platform

Smartphone market share

Introduction to Android

Android Geek Night. Application framework

Overview of CS 282 & Android

Graduate presentation for CSCI By Janakiram Vantipalli ( Janakiram.vantipalli@colorado.edu )

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

Android Security. Device Management and Security. by Stephan Linzner & Benjamin Reimold

ANDROID PROGRAMMING - INTRODUCTION. Roberto Beraldi

Android Developer Fundamental 1

Introduction to Android

Introduction to Android Development. Jeff Avery CS349, Mar 2013

Android Security. Giovanni Russello

Workshop on Android and Applications Development

TUTORIALS AND QUIZ ANDROID APPLICATION SANDEEP REDDY PAKKER. B. Tech in Aurora's Engineering College, 2013 A REPORT

Analysis of advanced issues in mobile security in android operating system

Android 5.0: Lollipop OS

Basic Trends of Modern Software Development

Building an Android client. Rohit Nayak Talentica Software

Android Application Development

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

ITG Software Engineering

Mobile Phones Operating Systems

Understanding Android s Security Framework

Android v ios Mobile Operating Systems

Android Operating System

ANDROID PROGRAMMING - INTRODUCTION. Roberto Beraldi

Lecture 3 Mobile App Development (Android, ios, BlackBerry, Windows Mobile) <lecturer, date>

Research and Design of Universal and Open Software Development Platform for Digital Home

Android Application Development. Daniel Switkin Senior Software Engineer, Google Inc.

RoverPal - A Mobile Payment Application

Introduction to Android

Synthesis for Developing Apps on Mobile Platforms

Android Programming and Security

A Short Introduction to Android

OpenCV on Android Platforms

Issues in Android on Mobile Platform and Their Resolution

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

ANDROID OPERATING SYSTEM

An Introduction to Android. Huang Xuguang Database Lab. Inha University

An Android-based Instant Message Application

imaginea white paper

Android Architecture. Alexandra Harrison & Jake Saxton

Here to take you beyond Mobile Application development using Android Course details

Android Fundamentals 1

Android Malware for Pen-testing. IOAsis San Fransicso 2014

Presenting Android Development in the CS Curriculum

Android in opposition to iphone

APPLICATION SECURITY: FROM WEB TO MOBILE. DIFFERENT VECTORS AND NEW ATTACK

Android For Java Developers. Marko Gargenta Marakana

Introduction to Android

Developing Google Android Mobile Clients for Web Services: a Case Study

Mobile Platform Architecture Review: Android, iphone, Qt

Mobile Operating Systems. Week I

Frameworks & Android. Programmeertechnieken, Tim Cocx

Basics. Bruce Crawford Global Solutions Manager

ECE 455/555 Embedded System Design. Android Programming. Wei Gao. Fall

Android Basics. Xin Yang

BYOD: End-to-End Security

Mobile Application Development 2014

PROFILEDROID: MULTI-LAYER PROFILING OF ANDROID APPLICATIONS XUETAO WEI LORENZO GOMEZ UNIVERSITY OF CALIFORNIA, RIVERSIDE PROFESSOR IULIAN NEAMTIU

Introduction to Android. Sean Sullivan October 27, 2008

What else can you do with Android? Inside Android. Chris Simmonds. Embedded Linux Conference Europe Copyright 2010, 2net Limited.

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months

The Behavioral Analysis of Android Malware

Introduction to Android: Hello, Android! 26 Mar 2010 CMPT166 Dr. Sean Ho Trinity Western University

3. Software Installation. 4. Introduction to Android OS. 5. Using Android OS / Devices. 6. Eclipse debug with Android app. 8. Units of measurement

Security within a development lifecycle. Enhancing product security through development process improvement

OMX, Android, GStreamer How do I decide what to use? 15 July 2011

Adobe Flash Player and Adobe AIR security

A Review of Different Comparative Studies on Mobile Operating System

Android (Basic + Advance) Application Development

How To Develop Android On Your Computer Or Tablet Or Phone

Development. SriSeshaa Technologies. Table of Contents

INTERMEDIATE ANDROID DEVELOPMENT Course Syllabus

Table of Contents. Adding Build Targets to the SDK 8 The Android Developer Tools (ADT) Plug-in for Eclipse 9

Research on Situation and Key Issues of Smart Mobile Terminal Security

Student Attendance Through Mobile Devices

Berlin Institute of Technology FG Security in Telecommunications

Overview. The Android operating system is like a cake consisting of various layers.

Praktikum Entwicklung Mediensysteme (für Master)

Multi-core Programming System Overview

Programming with Android

Introduction to IBM Worklight Mobile Platform

Publishing to TIZEN Using the Automated Conversion/Repackaging of Existing Android Apps. Hyeokgon Ryu, Infraware Technology, Ltd.

Mobile Devices - An Introduction to the Android Operating Environment. Design, Architecture, and Performance Implications

Android Development Tools for Eclipse

Android app development course

CS378 -Mobile Computing. Android Overview and Android Development Environment

INTRODUCTION TO ANDROID CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 11 02/15/2011

Introduction to Android SDK Jordi Linares

Android Application Development

Introduction to Android Programming (CS5248 Fall 2015)

l What is Android? l Getting Started l The Emulator l Hello World l ADB l Text to Speech l Other APIs (camera, bitmap, etc)

Basic Android Setup Windows Version

Transcription:

Mobile applications security Android OS (case study) Maciej Olewiński Cryptographic Seminar 16.05.2012r.

Presentation s schedule Mobile devices market Smartphone s domination is coming Android basics Main facts Architecture model Applications security On lower architectural layers Essential principles of higher layers design Android runtime as local web services environment Explicit data sharing Permissions mechanism Known vulnerabilities Appendix Summary 2/18

Market share Maciej Olewiński Android OS mobile applications security model Smartphone s growth Smartphone s on their way for mobile world domination Huge popularity grow Popularization of mobile applications Smartphones replaces more and more devices: mp3 players, simple cameras etc. More and more sensitive data in small, portable devices Main smartphone s mobile platforms Google Android Symbian ios (Apple) BlackberryOS Windows Mobile/Windows Phone Bada 100% 80% 60% 40% 20% 0% Others Windows Mobile/Phone Apple ios Blacberry OS Symbian Google Android 2010 2011 2012 2015 Mobile platforms market share in years 2010-2015 (prediction) - Gartner 3/18

What is Android? Android is a software stack for mobile devices that includes an operating system, middleware and key applications Created by Android Inc., a company acquired by Google in 2005 Developed under supervision of Open Handset Alliance (OHA) Released and open-sourced in 2008 Based on popular technologies Linux Kernel Not a typical Linux distribution Java language Not a typical Java platform The most popular smartphone s OS in 2011 Also the fastest growing 4/18

Android architecture the model 5/18

Android architecture basic facts All applications are equal (with small exceptions for Phone application) System applications have no precedence over 3rd party software (with small exception for safe-mode) All Android applications are written in Java programming language Android SDK Android is not a typical Java platform; it only uses the language Custom implementation of Virtual Machine Dalvik VM (non-compliant with any Sun/Oracle solutions) Totally redesigned application lifecycle mechanisms, user interface principles and more Main packages set derived from Java SE platform (not from Java ME!) Removed desktop-typical packages (e.g. Swing, AWT etc.) Added mobile-typical packages (for telephony, location-based services, user interface and more) Possibility to use native code in Android applications Compiled C/C++ libraries can be used by Android applications using NDK (JNI) All Android security model principles are also applied to those libraries Custom security model Defined across the all architectural layers 6/18

Applications security lower layers A central design point of the Android security architecture is that no application, by default, has permission to perform any operations that would adversely impact other applications, the operating system, or the user Android Developers Android extensively use Linux-level security mechanisms Even though each application package has its own instance of Dalvik Virtual Machine, it also gets its own Linux User ID (UID) and works in its own process Any data used by application is assigned to package s UID and is not accessible for other packages For any data sharing higher-level (Android specific) mechanisms should be used (full protection on Linux level); exposing all application data for other applications must be done explicitly Applications signing for secure updates Each application must be signed by developer s certificate Certificate can be self-signed as it is only used to distinguish if the newer version of application can work under the same UID 7/18

Applications the essentials (1) All Android applications are build of 4 types of basic components Activities Main user interface containers - an Activity represents one single screen visible by user Services Used for performing long-running, background operations Content Providers Used for sharing data between application explicit way for fully manageable exposing the data Broadcast Receivers Used for receiving broadcasts (something like Java listeners, but on higher level) Querying Content Provider uses URI s and MIME types for RESTful-like interface Interaction between Activities, Services and Broadcast Receivers is driven by Intents Intents are kind of asynchronous messages used for components activation 8/18

Applications the essentials (2) Intents the heart of Android Intents can call specific components explicitly by defining target component s class The real power lies in the fact that they can also define only required action and (optionally) data description (with MIME and URI), calling the components implicitly Runtime binding between components based on so called Intent Filters Android Applications are typically not solid Extensive use of runtime binding between components instead of compilation time binding (with Intents) Application are typically a set of independent components, rather than homogenous entity Anyway, it is possible to build solid application by using explicitly defined Intent targets Android OS flexible, extensible environment of cooperating, distributed components Typically, on almost all popular platforms one application can call another application On Android, because of Intents, one application s part can call a part of another application Applications don t have to be aware of each other; an OS resolves Intents dynamically Many Intent Filters defined by system applications 9/18

Android runtime local web services" Loosely coupled components works together by specifying contracts The same idea that is used in web services and SOA principle All components and their capabilities of specific applications are described in AndroidManifest.xml file (mandatory application descriptor for OS) <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.android.notepad"> <application android:icon="@drawable/app_notes" android:label="@string/app_name" > [...] <activity android:name="noteslist" android:label="@string/title_notes_list"> [...] <intent-filter> <action android:name="android.intent.action.view" /> [...] <data android:mimetype="vnd.android.cursor.dir/vnd.google.note" /> </intent-filter> [...] </activity> [...] </application> </manifest> Where is the security? Is the security of lower Android architecture s layers spoiled by higher layers? 10/18

Android permissions Permissions as the security boundary between components All basic applications components (Activities, Services, Content Providers and Broadcast Services) can define specific permission that another component must have granted to use them Every application that uses components with defined permissions must have explicit admission granted by user during application s installation Components define permissions that they require in AndroidManifest.xml <permission android:name="com.example.android.notepad.permission.reading_notes" android:label="czytanie danych notatek" android:description="umożliwia czytanie danych notatek. Złośliwe aplikacje mogą wysłać te dane osobom trzecim" android:protectionlevel="dangerous" /> Application that want to use components which require permission declares that it uses permission in its AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.app.otherapp" > [...] <uses-permission android:name="com.example.android.notepad.permission.reading_notes" /> [...] </manifest> 11/18

How do permissions work? Application s A component declares in its AndroidManifest.xml that it requires permission Application can not to define uses-permission data, but it will cause runtime security error while trying to access protected components Application B which wants to use application s A component declare in its AndroidManifest.xml file that it uses permissions During installation of application B, OS reads its AndroidManifest.xml file looking for uses-permission declarations. If found, it asks user for granting permission OS shows permission description defined in application A In case of users refusal, OS stops an installation In case of user s acceptance, application is installed and can use capabilities that has just got granted Problem no control if application uses it in secure way (driving licencse and no road police?) Result: with user s acceptance even the malicious software can be installed But it can also be easily uninstalled 12/18

Permissions summary Easy and extensible mechanism for creating security boundary in distributed environment of application s components Android is very security-strict in its lower layers Even though its higher layers define rich environment of independent, cooperating components Fully Optional for exposing data/functionality Strictly required for using permissions-protected data/functionality Very convenient to use Applications developer don t have to create any additional code Declaring permission name and description is sufficient Android OS is responsible for forcing security contract keeping Perfect solution? 13/18

Priviledge escalation attack (1) Problem: Android OS does not provide transitive permissions checking Attack scenario (technical view) Application A exposes data/functionality and requires permission P Application B uses A s data/functionality and has permission P granted (it declares its usage in AndroidManifest.xml and user has accepted it during B s installation) In the same time, application B exposes data/functionality that uses permissions-protected applications A data/functionality inside and does not require any permissions Application C does not have permission P to use applications A data/functionality directly Anyway, application C can use data/functionality exposed by application B because B does not require any permissions Application C can use application s A data functionality indirectly with no permissions granted! Attack scenario (real-life view) An attacker offer useful application X that uses sensitive data/functionality User grants all permissions to application X; he/she does not know that application X exposes the data/functionality further without requiring any permissions An attacker encourage user to install another application Y that does not need any permissions to be granted User accepts application Y; after installation it can stole/corrupt data 14/18

Priviledge escalation attack (2) Solution (official) Android designers has known about this problem Explicit, runtime checking permissions mechanism is also present in Android platform Checking must be done by application that uses and exposes data/functionality in the same time (it means application B in naming convention used in this presentation) Very, very bad solution when we expose data/functionality in our application, we must trust the developers of external applications They must not to expose our data/functionality further, or they must check in runtime if other applications using their interfaces has the permission to our application granted We don t have any control of this! Solution (good practices) The main cause of described problem lies outside of our application; though, we must rely on a good design of external applications which may be (intentionally or not) spoiled The most obvious tip: we should not to expose any data/functionality if we really don t have to We can use android:exported property to all application components in our AndroidManifest.xml If set to false for a specific component, it disables external access to this component We can resign for dynamic Intents resolving, defining target components explicitly by class name Conclusion Event though there are some traps, building secure Android applications is possible 15/18

Security appendix Cryptography in Android Full standard packages set from Java SE ready to use with Android SDK Two independent sets of HTTP packages: native Java SE and taken from Apache Foundation All good security coding practices from Java SE can be directly used in Android Java SE cryptography code is fully portable (only performance aspects should be considered) BouncyCastle for Java SE can also be used directly by importing it to project No need for any changes in library no need for separate Android version Android and malware Most of the malware must be explicitly installed by user (psychology aspects important for attackers) Only a few vulnerabilities caused by errors in platform itself Unfortunately, updates are Achilles heel of Android There is always the possibility to simply uninstall the whole application (in worst case with safe mode) The biggest question Google and privacy Gmail, Calendar, Contacts synchronized with Google Account by default Rich location-based services Voice recognition mechanisms, Face Unlock etc. 16/18

Summary Mobile devices are becoming more and more popular In the same time, they store more and more sensitive, personal data They are very attractive as an attack target Conflicting requirements: environment flexibility, convenient usage and strict security Android is designed to face those problems and it does it All applications are sandboxed Very strict security solutions on lower architecture layers Rich, flexible and distributed environment of higher levels Security requirements are met because of two basic mechanisms Explicit data sharing Permissions Even though there are some known issues, building secure applications are possible and easy 17/18

Thank you for your attention Questions, comments?