Java & The Android Stack: A Security Analysis Pragati Ogal Rai Mobile Technology Evangelist PayPal, eBay Java.

Slides:



Advertisements
Similar presentations
Towards Remote Policy Enforcement for Runtime Protection of Mobile Code Using Trusted Computing Xinwen Zhang Francesco Parisi-Presicce Ravi Sandhu
Advertisements

Introduction.  Professor  Adam Porter 
Android architecture overview
Introduction to Android Mohammad A. Gowayyed CS334-Spring 2014.
Java Applet Security Diana Dong CS 265 Spring 2004.
Java security (in a nutshell)
COEN 351: E-Commerce Security
Java Security CS-328. JDK 1.0 Security Model Sandbox Java Virtual Machine Local Code Remote Code Local Host System Resources (File System, Sockets, Printers…)
Dan Sedlacek CTO, Systems Management Group Sterling Software Java Security and Encryption.
Android Security. N-Degree of Separation Applications can be thought as composed by Main Functionality Several Non-functional Concerns Security is a non-functional.
Java Security Model Lab#1 I. Omaima Al-Matrafi. Safety features built into the JVM Type-safe reference casting Structured memory access (no pointer arithmetic)
LAB#2 JAVA SECURITY OVERVIEW Prepared by: I.Raniah Alghamdi.
DEPARTMENT OF COMPUTER ENGINEERING
Edward Tsai – CS 239 – Spring 2003 Strong Security for Active Networks CS 239 – Network Security Edward Tsai Tuesday, May 13, 2003.
Android An open handset alliance project Janice Garcia September 18, 2008 MIS 304.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Case study 2 Android – Mobile OS.
Page 1 Sandboxing & Signed Software Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
Understanding Android Security Yinshu Wu William Enck, Machigar Ongtang, and PatrickMcDaniel Pennsylvania State University.
Android Introduction Platform Overview.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Introduction to Android Swapnil Pathak Advanced Malware Analysis Training Series.
Authors: William Enck The Pennsylvania State University Peter Gilbert Duke University Byung-Gon Chun Intel Labs Landon P. Cox Duke University Jaeyeon Jung.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
APKInspector -Static Analysis of Android Applications Student: Yuan Tian Mentor: Cong Zheng Backup Mentor: Anthony Kara Jianwei 08/22/2012.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Security in Java Sunesh Kumra S
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Java Security Pingping Ma Nov 2 nd, Overview Platform Security Cryptography Authentication and Access Control Public Key Infrastructure (PKI)
Android for Java Developers Denver Java Users Group Jan 11, Mike
Basic Security: Java vs.NET Master Seminar Advanced Software Engineering Topics Prof. Jacques Pasquier-Rocha Software Engineering Group Department of Informatics.
Java Security Nathan Moore CS 665. Overview Survey of Java Inherent Security Properties Java Runtime Environment Java Virtual Machine Java Security Model.
Java 2 security model Valentina Casola. Components of Java the development environment –development lifecycle –Java language features –class files and.
Java Security Model For Mobile Code Abdo Achkar. Mobile Code A mobile object is a “self contained piece” of executable code. Definition:  Code that can.
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.
CT1513 Introduction To java © A.AlOsaimi.
Created By. Jainik B Patel Prashant A Goswami Gujarat Vidyapith Computer Department Ahmedabad.
Mobile Application Security on Android Originally presented by Jesse Burns at Black Hat
Wireless and Mobile Security
TCS Internal Security. 2 TCS Internal Objective Objective :  Android Platform Security Architecture.
1 Android Workshop Platform Overview. 2 What is Android?  Android is a software stack for mobile devices that includes an operating system, middleware.
Analysis And Research Of System Security Based On.
Introduction to Programming 1 1 2Introduction to Java.
 This work confers an application which makes possible to use a Bluetooth enabled mobile phone to remote control home appliances such electric fan, LEDs.
ANDROID OS Ravi Soni MTech (CS) III Sem. W HAT IS A NDROID ? Android is a software stack for mobile devices that includes an operating system, middleware.
The Ingredients of Android Applications. A simple application in a process In a classical programming environment, the OS would load the program code.
ANDROID ACCESS CONTROL Presented by: Justin Williams Masters of Computer Science Candidate.
Presented by: Saurabh Kumar Sinha (MRT07UGBIT 186) IT VII Semester, Shobhit University Meerut.
Google. Android What is Android ? -Android is Linux Based OS -Designed for use on cell phones, e-readers, tablet PCs. -Android provides easy access to.
Computer System Structures
Android Mobile Application Development
Visit for more Learning Resources
Understanding Android Security
ANDROID AN OPEN HANDSET ALLIANCE PROJECT
Android Runtime – Dalvik VM
chapter 6- Android Introduction
CASE STUDY 1: Linux and Android
Java security (in a nutshell)
Contents: Introduction Different Mobile Operating Systems
Topic: Java Security Models
CMPE419 Mobile Application Development
Mobile Handset Virtual Machine
Android Introduction Platform Mihail L. Sichitiu.
Understanding Android Security
Android Platform, Android App Basic Components
Emerging Platform#3 Android & Programming an App
CMPE419 Mobile Application Development
Presentation transcript:

Java & The Android Stack: A Security Analysis Pragati Ogal Rai Mobile Technology Evangelist PayPal, eBay Java Conference, Bangalore, Dec 8, 2012

Agenda  Java 2 Security Model  Android Security Model  Summarize

Java 2 Security Model

Java  Developed by Sun Microsystems in the early 1990s  Platform Independent  Compiled to bytecode that runs on a Virtual Machine  “Java is Secure”

Java 2 Security Model  Platform Security  Crypto APIs  Authentication & Access Control APIs  Secure Communication APIs  Key Management APIs

Java Language Security  Programs cannot access arbitrary memory locations  Variables cannot be used before initialization  Access methods are strictly adhered to  Entities declared final must not be changed  Objects cannot be arbitrarily cast into other objects  Array bounds must be checked on all array accesses

Java 2 Platform Security Model Remote Class FilesLocal Class FilesSigned Class Files Bytecode Verifier Class Loader Core API Class Files Core Java API Security Package Key Database Operating System Security Manager Access Controller

Java 2 Sandbox Model Fine grained access control Configurable Security Policy No built-in concept of trusted local code

Security Policy File Example // If the code is signed by ”Pragati", grant it read/write access to all //files in /tmp/pragati grant signedBy ”Pragati" { permission java.io.FilePermission "/tmp/pragati/*", "read,write"; }; // If the code is signed by ”John", grant it read/write access to all //files in /tmp/john grant signedBy ”John" { permission java.io.FilePermission "/tmp/john/*", "read,write”; }; // Grant everyone the following permission: grant { permission java.io.FilePermission "/tmp/pragati/*", "read"; }; ………….. ……….

Protection Domain Domain name “Pragati” Pragati’s certificate Read/write access to /temp/pragati/* Domain name “John” John’s certificate Read/write access to /temp/john/* Read access to /temp/pragati/* ………….. ………. Protection Domain = Code Source + Permission

Java 2 Security Model  All code runs in a sandbox  All classes are loaded with full bytecode verification  All classes are loaded with Java language features  Signed classes verify the integrity and origination of Java classes  Security policy provides fine-grained access  Crypto APIs

The Android Stack

Android  Open Platform  First phone based on Android came out in 2009  75% smartphone market share as of October 1 1: idc.com

Android Security Model  Platform Security  Crypto APIs  Secure Communication APIs  Key Management APIs

Install Time User Consent

Android OS Architecture

Linux Kernel  Unique UID and GID for each application at install time  Sharing can occur through component interactions  Linux Process Sandbox

Linux Kernel (Cont’d) include/linux/android_aid.h AID_NET_BT3002Can create Bluetooth Sockets AID_INET3003Can create IPv4 and IPv6 Sockets

Middleware  Libraries for code execution  Libraries for services  Take care of device specific issues  Compiled to machine language  Native and Java code

Java Virtual Machine?  There is no JVM in Android platform  No bytecode is executed  JAR file will not run on Android platform

Dalvik Virtual Machine  Dalvik does not align to Java SE or Java ME  Library built on a subset of the Apache Harmony Java  Highly optimized VM to support multiple VM instances  Register based architecture  Shared constant pool  Executes Dalvik executables (.dex)

Dalvik Virtual Machine  No security manager  Permissions are enforced in OS and not in VM  As of Android 2.2 Dalvik has a JIT compiler  Dalvik Bytecode verification mainly for optimization  GC for each VM instance

Android Application Structure  Application is made of components  Activity: Define screens  Service: Background processing  Broadcast Receiver: Mailbox for messages from other applications  Content Provider: Relational database for sharing information  Applications communicate through Intents  Secure RPC using Binder  AndroidManifest.xml defines policy for application

Permission Protection Levels  Normal android.permission.VIBRATE com.android.alarm.permission.SET_ALARM  Dangerous android.permission.SEND_SMS android.permission.CALL_PHONE  Signature android.permission.FORCE_STOP_PACKAGES android.permission.INJECT_EVENTS  SignatureOrSystem android.permission.ACCESS_USB android.permission.SET_TIME All components are secured by permissions Developers can define their own permissions as well

Application Layer Security  Permissions restrict component interaction  Permission labels defined in AndroidManifest.xml  Applications are self-signed; no CA required  Signatures define persistence and authorship

Android Security Model  Linux process sandbox  Permission based component interaction  Dalvik is not a security boundary  All applications need to be signed  Signature define persistence and authorship  Install time security decisions  Crypto APIs

Summary

Install Time Check Who are you? What do you want to do?

Sandbox Based on permissions, code sources, policy, keystore, protection domains Process Sandbox

Signature Identity and Trust Authorship and Persistence

Permissions Enforced by VM Enforced by OS

Protection Domain Code Sources + Permissions Process

Virtual Machine Is a security boundary Is NOT a security boundary

Thank