SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Understanding Android Security Model Pragati Ogal Rai MTS1, Software Engineer, PayPal Mobile Pragati.Rai@paypal.com SV Android Dev Camp March 04, 2011
Agenda Why should I understand Android’s Security Model? What is Android’s security model? Architecture			 Components Intents Permissions AndroidManifest.xml Application Signing System Packages External Storage Files Binders
Why should I understand Android’s Security Model? Smart(er) Phones Mail, calendar, Facebook, Twitter Open Platform Open sourced Well documented YOU control your phone
Architecture http://developer.android.com/guide/basics/what-is-android.html
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_BT	3002	Can create Bluetooth Sockets AID_INET	3003	Can create IPv4 and IPv6 Sockets
Middleware Dalvik VM is not a security boundary No security manager Permissions are enforced in OS and not in VM Bytecode verification for optimization Native vs. Java code
Binder Component Framework BeOS, Palm, Android Applications are made of various components Applications interact via components
Application Layer Permissions restrict component interaction Permission labels defined in AndroidManifest.xml MAC enforced by Reference Monitor PackageManager and ActivityManager enforce permissions
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
User Defined Permissions 	Developers can define own permissions <permission android:name="com.pragati.permission.ACCESS_DETAILS" android:label="@string/permlab_accessDetails" android:description="@string/permdesc_accessDetails" android:permissionGroup="android.permission-group.COST_MONEY" android:protectionLevel=“signature" />
Components Activity: Define screens Service: Background processing Broadcast Receiver: Mailbox for messages from other applications Content Provider: Relational database for sharing information All components are secured with permissions
Activity Often run in their UID Secured using Permissions android:exported=true  Badly configured data can be passed using Intent Add categories to Intent Filter Do not pass sensitive data in intents
Service Started with Intent Permissions can be enforced on Service Called can “bind” to service using bindService() Binder channel to talk to service Check permissions of calling component against PERMISSION_DENIED or PERMISSION_GRANTED getPackageManager().checkPermission( 	permToCheck, name.getPackageName())
Broadcasts Sending Broadcast Intents For sensitive data, pass manifest permission name Receiving Broadcast Intents Validate input from intents Intent Filter is not a security boundary Categories narrow down delivery but do not guarantee security android:exported=true Sticky broadcasts stick around Need special privilege BROADCAST_STICKY
Content Provider Allow applications to share data Define permissions for accessing <provider> Content providers use URI schems Content://<authority>/<table>/[<id>]
Binder Synchronous RPC mechanism Define interface with AIDL Same process or different processes transact() and Binder.onTransact() Data sent as a Parcel Secured by caller permission or identity checking
Intents Inter Component Interaction Asynchronous IPC Explicit or implicit intents Do not put sensitive data in intents Components need not be in same application startActivity(Intent), startBroadcast(Intent)
Intent Filters Activity Manager matches intents against Intent Filters <receiver android:name=“BootCompletedReceiver”> <intent-filter> <action android:name=“android.intent.action.BOOT_COMPLETED”/> </intent-filter> </receiver> Activity with Intent Filter enabled becomes “exported” Activity with “android:exported=true” can be started with any intent Intent Filters cannot be secured with permissions Add categories to restrict what intent can be called through android.intent.category.BROWSEABLE
Pending Intent Token given to a foreign application to perform an action on your application’s behalf Use your application’s permissions Even if its owning application's process is killed, PendingIntent itself will remain usable from other processes  Provide component name in base intent PendingIntent.getActivity(Context, int, Intent, int)
AndroidManifest.xml Application Components Rules for auto-resolution Permissions Access rules Runtime dependencies Runtime libraries
AndroidManifest.xml http://www.cse.psu.edu/~enck/cse597a-s09/slides/cse597a-android.pdf
External Storage Starting API 8 (Android 2.2) APKs can be stored on external devices APK is stored in encrypted container called asec file Key is randomly generated and stored on device Dex files, private data, native shared libraries still reside on internal memory External devices are mounted with “noexec” VFAT does not support Linux access control Sensitive data should be encrypted before storing
Application Signature Applications are self-signed; no CA required Signature define persistence Detect if the application has changed  Application update Signatures define authorship Establish trust between applications  Run in same Linux ID
Application Upgrade Applications can register for auto-updates Applications  should have the same signature No additional permissions should be added Install location is preserved
System Packages Come bundled with ROM Have signatureOrSystem Permission Cannot be uninstalled /system/app
Files and Preferences Applications have own area for files Files are protected by Unix like file permissions Different modes: world readable, world writable, private, append File = openFileOutput(“myFile”, 		Context.MODE_WORLD_READABLE); SharedPreferences is system feature with file protected with permissions
Summary Linux process sandbox  Permission based component interaction Permission labels defined in AndroidManifest.xml Applications need to be signed Signature define persistence and authorship Install time security decisions
References http://developer.android.com Jesse Burns http://www.isecpartners.com/files/iSEC_Securing_Android_Apps.pdf William Enck, MachigarOngtang, and Patrick McDaniel, Understanding Android Security. IEEE Security & Privacy Magazine, 7(1):50--57, January/February, 2009.
Thank You! Pragati.Rai@paypal.com

Weitere ähnliche Inhalte

Was ist angesagt?

AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSFAppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
Ajin Abraham
 
Android Malware Detection Mechanisms
Android Malware Detection MechanismsAndroid Malware Detection Mechanisms
Android Malware Detection Mechanisms
Talha Kabakus
 

Was ist angesagt? (20)

Permission in Android Security: Threats and solution
Permission in Android Security: Threats and solutionPermission in Android Security: Threats and solution
Permission in Android Security: Threats and solution
 
Mobile Security
Mobile SecurityMobile Security
Mobile Security
 
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSFAppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
 
Android Malware Detection Mechanisms
Android Malware Detection MechanismsAndroid Malware Detection Mechanisms
Android Malware Detection Mechanisms
 
Application Security
Application SecurityApplication Security
Application Security
 
Computer security
Computer securityComputer security
Computer security
 
Mobile security
Mobile securityMobile security
Mobile security
 
Application Attacks & Application Layer Attacks
Application Attacks & Application Layer AttacksApplication Attacks & Application Layer Attacks
Application Attacks & Application Layer Attacks
 
Security and Linux Security
Security and Linux SecuritySecurity and Linux Security
Security and Linux Security
 
Android Hacking + Pentesting
Android Hacking + Pentesting Android Hacking + Pentesting
Android Hacking + Pentesting
 
Mobile security
Mobile securityMobile security
Mobile security
 
Android Security & Penetration Testing
Android Security & Penetration TestingAndroid Security & Penetration Testing
Android Security & Penetration Testing
 
Android Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamAndroid Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed Adam
 
Cybersecurity - Mobile Application Security
Cybersecurity - Mobile Application SecurityCybersecurity - Mobile Application Security
Cybersecurity - Mobile Application Security
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
 
Mobile security
Mobile securityMobile security
Mobile security
 
Android pentesting
Android pentestingAndroid pentesting
Android pentesting
 
Android pentesting
Android pentestingAndroid pentesting
Android pentesting
 
Symantec Endpoint Protection Enterprise Edition Best Practices Guidelines
Symantec Endpoint Protection Enterprise Edition Best Practices GuidelinesSymantec Endpoint Protection Enterprise Edition Best Practices Guidelines
Symantec Endpoint Protection Enterprise Edition Best Practices Guidelines
 
Application security
Application securityApplication security
Application security
 

Andere mochten auch

Analysis and research of system security based on android
Analysis and research of system security based on androidAnalysis and research of system security based on android
Analysis and research of system security based on android
Ravishankar Kumar
 
Android security model
Android security modelAndroid security model
Android security model
rrand1
 

Andere mochten auch (20)

Android sandbox
Android sandboxAndroid sandbox
Android sandbox
 
Analysis and research of system security based on android
Analysis and research of system security based on androidAnalysis and research of system security based on android
Analysis and research of system security based on android
 
Brief Tour about Android Security
Brief Tour about Android SecurityBrief Tour about Android Security
Brief Tour about Android Security
 
Android ppt
Android ppt Android ppt
Android ppt
 
Testing Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam editionTesting Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam edition
 
Objective briefing on the current mobile threat 2010/2011
Objective briefing on the current mobile threat 2010/2011Objective briefing on the current mobile threat 2010/2011
Objective briefing on the current mobile threat 2010/2011
 
Presentation on Android operating system
Presentation on Android operating systemPresentation on Android operating system
Presentation on Android operating system
 
Data Storage In Android
Data Storage In Android Data Storage In Android
Data Storage In Android
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depth
 
Android security model
Android security modelAndroid security model
Android security model
 
Mobile Application Security Code Reviews
Mobile Application Security Code ReviewsMobile Application Security Code Reviews
Mobile Application Security Code Reviews
 
Android Data Persistence
Android Data PersistenceAndroid Data Persistence
Android Data Persistence
 
Android Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android ApplicationsAndroid Security - Common Security Pitfalls in Android Applications
Android Security - Common Security Pitfalls in Android Applications
 
[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop
 
Understanding Android Security
Understanding Android SecurityUnderstanding Android Security
Understanding Android Security
 
Security threats in Android OS + App Permissions
Security threats in Android OS + App PermissionsSecurity threats in Android OS + App Permissions
Security threats in Android OS + App Permissions
 
Android seminar report
Android seminar reportAndroid seminar report
Android seminar report
 
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
Android Security Development - Part 2: Malicious Android App Dynamic Analyzi...
 
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...Consulthink @ GDG Meets U -  L'Aquila2014  - Codelab: Android Security -Il ke...
Consulthink @ GDG Meets U - L'Aquila2014 - Codelab: Android Security -Il ke...
 
2015.04.24 Updated > Android Security Development - Part 1: App Development
2015.04.24 Updated > Android Security Development - Part 1: App Development 2015.04.24 Updated > Android Security Development - Part 1: App Development
2015.04.24 Updated > Android Security Development - Part 1: App Development
 

Ähnlich wie Understanding android security model

Java & The Android Stack: A Security Analysis
Java & The Android Stack: A Security AnalysisJava & The Android Stack: A Security Analysis
Java & The Android Stack: A Security Analysis
Pragati Rai
 
Security testing of mobile applications
Security testing of mobile applicationsSecurity testing of mobile applications
Security testing of mobile applications
GTestClub
 
Android application fundamentals
Android application fundamentalsAndroid application fundamentals
Android application fundamentals
Steve Smith
 
Sandboxing (Distributed computing)
Sandboxing (Distributed computing)Sandboxing (Distributed computing)
Sandboxing (Distributed computing)
Sri Prasanna
 
SDP Glossary v2.0
SDP Glossary v2.0 SDP Glossary v2.0
SDP Glossary v2.0
Shamun Mahmud
 

Ähnlich wie Understanding android security model (20)

Java & The Android Stack: A Security Analysis
Java & The Android Stack: A Security AnalysisJava & The Android Stack: A Security Analysis
Java & The Android Stack: A Security Analysis
 
Introduction to Android Application Security Testing - 2nd Sep 2017
Introduction to Android Application Security Testing - 2nd Sep 2017Introduction to Android Application Security Testing - 2nd Sep 2017
Introduction to Android Application Security Testing - 2nd Sep 2017
 
Android Overview
Android OverviewAndroid Overview
Android Overview
 
Securing android applications
Securing android applicationsSecuring android applications
Securing android applications
 
Untitled 1
Untitled 1Untitled 1
Untitled 1
 
Security testing of mobile applications
Security testing of mobile applicationsSecurity testing of mobile applications
Security testing of mobile applications
 
Android security in depth - extended
Android security in depth - extendedAndroid security in depth - extended
Android security in depth - extended
 
Getting started with Android pentesting
Getting started with Android pentestingGetting started with Android pentesting
Getting started with Android pentesting
 
Security framework for connected devices
Security framework for connected devicesSecurity framework for connected devices
Security framework for connected devices
 
Android security by ravi-rai
Android security by ravi-raiAndroid security by ravi-rai
Android security by ravi-rai
 
Android application fundamentals
Android application fundamentalsAndroid application fundamentals
Android application fundamentals
 
Getting started with android
Getting started with androidGetting started with android
Getting started with android
 
Android(1)
Android(1)Android(1)
Android(1)
 
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat DasNull Mumbai Meet_Android Reverse Engineering by Samrat Das
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
 
Sandboxing (Distributed computing)
Sandboxing (Distributed computing)Sandboxing (Distributed computing)
Sandboxing (Distributed computing)
 
Week Topic Code Access vs Event Based.pptx
Week Topic Code Access vs Event Based.pptxWeek Topic Code Access vs Event Based.pptx
Week Topic Code Access vs Event Based.pptx
 
Implementing application security using the .net framework
Implementing application security using the .net frameworkImplementing application security using the .net framework
Implementing application security using the .net framework
 
Android development-tutorial
Android development-tutorialAndroid development-tutorial
Android development-tutorial
 
SDP Glossary v2.0
SDP Glossary v2.0 SDP Glossary v2.0
SDP Glossary v2.0
 
Firewalls
FirewallsFirewalls
Firewalls
 

Mehr von Pragati Rai

Mobile Commerce: A Security Perspective
Mobile Commerce: A Security PerspectiveMobile Commerce: A Security Perspective
Mobile Commerce: A Security Perspective
Pragati Rai
 
Enhancing your mobile commerce apps with eBay Inc.
Enhancing your mobile commerce apps with eBay Inc.Enhancing your mobile commerce apps with eBay Inc.
Enhancing your mobile commerce apps with eBay Inc.
Pragati Rai
 

Mehr von Pragati Rai (14)

Hard problems in mobile commerce
Hard problems in mobile commerceHard problems in mobile commerce
Hard problems in mobile commerce
 
Mobile Commerce: A Security Perspective
Mobile Commerce: A Security PerspectiveMobile Commerce: A Security Perspective
Mobile Commerce: A Security Perspective
 
Be Your Own Technology Brand Ambassador
Be Your Own Technology Brand AmbassadorBe Your Own Technology Brand Ambassador
Be Your Own Technology Brand Ambassador
 
Mobile Payments revolution
Mobile Payments revolutionMobile Payments revolution
Mobile Payments revolution
 
Android securitybyexample
Android securitybyexampleAndroid securitybyexample
Android securitybyexample
 
From java to android a security analysis
From java to android  a security analysisFrom java to android  a security analysis
From java to android a security analysis
 
The basics of mobile payments
The basics of mobile paymentsThe basics of mobile payments
The basics of mobile payments
 
How are mobile devices changing face of payments?
How are mobile devices changing face of payments?How are mobile devices changing face of payments?
How are mobile devices changing face of payments?
 
Mobile payments 101
Mobile payments 101Mobile payments 101
Mobile payments 101
 
Enhancing your mobile commerce apps with eBay Inc.
Enhancing your mobile commerce apps with eBay Inc.Enhancing your mobile commerce apps with eBay Inc.
Enhancing your mobile commerce apps with eBay Inc.
 
New Security Considerations for Mobile Commerce
New Security Considerations for Mobile CommerceNew Security Considerations for Mobile Commerce
New Security Considerations for Mobile Commerce
 
Amphion Forum: Understanding Android Secuity
Amphion Forum: Understanding Android SecuityAmphion Forum: Understanding Android Secuity
Amphion Forum: Understanding Android Secuity
 
Understanding Mobile payments
Understanding Mobile paymentsUnderstanding Mobile payments
Understanding Mobile payments
 
Mobile Ecosystem
Mobile EcosystemMobile Ecosystem
Mobile Ecosystem
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Understanding android security model

  • 1. Understanding Android Security Model Pragati Ogal Rai MTS1, Software Engineer, PayPal Mobile Pragati.Rai@paypal.com SV Android Dev Camp March 04, 2011
  • 2. Agenda Why should I understand Android’s Security Model? What is Android’s security model? Architecture Components Intents Permissions AndroidManifest.xml Application Signing System Packages External Storage Files Binders
  • 3. Why should I understand Android’s Security Model? Smart(er) Phones Mail, calendar, Facebook, Twitter Open Platform Open sourced Well documented YOU control your phone
  • 5. Linux Kernel Unique UID and GID for each application at install time Sharing can occur through component interactions Linux Process Sandbox
  • 6. Linux Kernel (Cont’d) include/linux/android_aid.h AID_NET_BT 3002 Can create Bluetooth Sockets AID_INET 3003 Can create IPv4 and IPv6 Sockets
  • 7. Middleware Dalvik VM is not a security boundary No security manager Permissions are enforced in OS and not in VM Bytecode verification for optimization Native vs. Java code
  • 8. Binder Component Framework BeOS, Palm, Android Applications are made of various components Applications interact via components
  • 9. Application Layer Permissions restrict component interaction Permission labels defined in AndroidManifest.xml MAC enforced by Reference Monitor PackageManager and ActivityManager enforce permissions
  • 10. 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
  • 11. User Defined Permissions Developers can define own permissions <permission android:name="com.pragati.permission.ACCESS_DETAILS" android:label="@string/permlab_accessDetails" android:description="@string/permdesc_accessDetails" android:permissionGroup="android.permission-group.COST_MONEY" android:protectionLevel=“signature" />
  • 12. Components Activity: Define screens Service: Background processing Broadcast Receiver: Mailbox for messages from other applications Content Provider: Relational database for sharing information All components are secured with permissions
  • 13. Activity Often run in their UID Secured using Permissions android:exported=true Badly configured data can be passed using Intent Add categories to Intent Filter Do not pass sensitive data in intents
  • 14. Service Started with Intent Permissions can be enforced on Service Called can “bind” to service using bindService() Binder channel to talk to service Check permissions of calling component against PERMISSION_DENIED or PERMISSION_GRANTED getPackageManager().checkPermission( permToCheck, name.getPackageName())
  • 15. Broadcasts Sending Broadcast Intents For sensitive data, pass manifest permission name Receiving Broadcast Intents Validate input from intents Intent Filter is not a security boundary Categories narrow down delivery but do not guarantee security android:exported=true Sticky broadcasts stick around Need special privilege BROADCAST_STICKY
  • 16. Content Provider Allow applications to share data Define permissions for accessing <provider> Content providers use URI schems Content://<authority>/<table>/[<id>]
  • 17. Binder Synchronous RPC mechanism Define interface with AIDL Same process or different processes transact() and Binder.onTransact() Data sent as a Parcel Secured by caller permission or identity checking
  • 18. Intents Inter Component Interaction Asynchronous IPC Explicit or implicit intents Do not put sensitive data in intents Components need not be in same application startActivity(Intent), startBroadcast(Intent)
  • 19. Intent Filters Activity Manager matches intents against Intent Filters <receiver android:name=“BootCompletedReceiver”> <intent-filter> <action android:name=“android.intent.action.BOOT_COMPLETED”/> </intent-filter> </receiver> Activity with Intent Filter enabled becomes “exported” Activity with “android:exported=true” can be started with any intent Intent Filters cannot be secured with permissions Add categories to restrict what intent can be called through android.intent.category.BROWSEABLE
  • 20. Pending Intent Token given to a foreign application to perform an action on your application’s behalf Use your application’s permissions Even if its owning application's process is killed, PendingIntent itself will remain usable from other processes Provide component name in base intent PendingIntent.getActivity(Context, int, Intent, int)
  • 21. AndroidManifest.xml Application Components Rules for auto-resolution Permissions Access rules Runtime dependencies Runtime libraries
  • 23. External Storage Starting API 8 (Android 2.2) APKs can be stored on external devices APK is stored in encrypted container called asec file Key is randomly generated and stored on device Dex files, private data, native shared libraries still reside on internal memory External devices are mounted with “noexec” VFAT does not support Linux access control Sensitive data should be encrypted before storing
  • 24. Application Signature Applications are self-signed; no CA required Signature define persistence Detect if the application has changed Application update Signatures define authorship Establish trust between applications Run in same Linux ID
  • 25. Application Upgrade Applications can register for auto-updates Applications should have the same signature No additional permissions should be added Install location is preserved
  • 26. System Packages Come bundled with ROM Have signatureOrSystem Permission Cannot be uninstalled /system/app
  • 27. Files and Preferences Applications have own area for files Files are protected by Unix like file permissions Different modes: world readable, world writable, private, append File = openFileOutput(“myFile”, Context.MODE_WORLD_READABLE); SharedPreferences is system feature with file protected with permissions
  • 28. Summary Linux process sandbox Permission based component interaction Permission labels defined in AndroidManifest.xml Applications need to be signed Signature define persistence and authorship Install time security decisions
  • 29. References http://developer.android.com Jesse Burns http://www.isecpartners.com/files/iSEC_Securing_Android_Apps.pdf William Enck, MachigarOngtang, and Patrick McDaniel, Understanding Android Security. IEEE Security & Privacy Magazine, 7(1):50--57, January/February, 2009.