SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Mobile Application Security
Mobile Application SecurityMobile Application Security
Mobile Application SecurityIshan Girdhar
 
Android malware presentation
Android malware presentationAndroid malware presentation
Android malware presentationSandeep Joshi
 
Android Security & Penetration Testing
Android Security & Penetration TestingAndroid Security & Penetration Testing
Android Security & Penetration TestingSubho Halder
 
Mobile Device Security
Mobile Device SecurityMobile Device Security
Mobile Device SecurityNemwos
 
Android Hacking
Android HackingAndroid Hacking
Android Hackingantitree
 
Understanding Android Security
Understanding Android SecurityUnderstanding Android Security
Understanding Android SecurityAsanka Dilruk
 
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 solutionTandhy Simanjuntak
 
Android Malware Detection Mechanisms
Android Malware Detection MechanismsAndroid Malware Detection Mechanisms
Android Malware Detection MechanismsTalha Kabakus
 
Pentesting Android Applications
Pentesting Android ApplicationsPentesting Android Applications
Pentesting Android ApplicationsCláudio André
 
KHNOG 3: DDoS Attack Prevention
KHNOG 3: DDoS Attack PreventionKHNOG 3: DDoS Attack Prevention
KHNOG 3: DDoS Attack PreventionAPNIC
 
Security Testing Mobile Applications
Security Testing Mobile ApplicationsSecurity Testing Mobile Applications
Security Testing Mobile ApplicationsDenim Group
 
Android Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamAndroid Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamMohammed Adam
 
OWASP Secure Coding
OWASP Secure CodingOWASP Secure Coding
OWASP Secure Codingbilcorry
 
Introduction to Android ppt
Introduction to Android pptIntroduction to Android ppt
Introduction to Android pptTaha Malampatti
 

Mais procurados (20)

iOS Application Pentesting
iOS Application PentestingiOS Application Pentesting
iOS Application Pentesting
 
Mobile Application Security
Mobile Application SecurityMobile Application Security
Mobile Application Security
 
Android malware presentation
Android malware presentationAndroid malware presentation
Android malware presentation
 
Android Security & Penetration Testing
Android Security & Penetration TestingAndroid Security & Penetration Testing
Android Security & Penetration Testing
 
Mobile Device Security
Mobile Device SecurityMobile Device Security
Mobile Device Security
 
Android Hacking
Android HackingAndroid Hacking
Android Hacking
 
Understanding Android Security
Understanding Android SecurityUnderstanding Android Security
Understanding Android Security
 
Keyloggers.ppt
Keyloggers.pptKeyloggers.ppt
Keyloggers.ppt
 
Javacard
Javacard Javacard
Javacard
 
Pentesting Android Apps
Pentesting Android AppsPentesting Android Apps
Pentesting Android Apps
 
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
 
Android Malware Detection Mechanisms
Android Malware Detection MechanismsAndroid Malware Detection Mechanisms
Android Malware Detection Mechanisms
 
Hard Disk Encryptions
Hard Disk EncryptionsHard Disk Encryptions
Hard Disk Encryptions
 
Pentesting Android Applications
Pentesting Android ApplicationsPentesting Android Applications
Pentesting Android Applications
 
KHNOG 3: DDoS Attack Prevention
KHNOG 3: DDoS Attack PreventionKHNOG 3: DDoS Attack Prevention
KHNOG 3: DDoS Attack Prevention
 
Security Testing Mobile Applications
Security Testing Mobile ApplicationsSecurity Testing Mobile Applications
Security Testing Mobile Applications
 
Android Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed AdamAndroid Application Penetration Testing - Mohammed Adam
Android Application Penetration Testing - Mohammed Adam
 
OWASP Secure Coding
OWASP Secure CodingOWASP Secure Coding
OWASP Secure Coding
 
Introduction to Android ppt
Introduction to Android pptIntroduction to Android ppt
Introduction to Android ppt
 
mobile application security
mobile application securitymobile application security
mobile application security
 

Destaque

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 androidRavishankar Kumar
 
Testing Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam editionTesting Android Security Codemotion Amsterdam edition
Testing Android Security Codemotion Amsterdam editionJose Manuel Ortega Candel
 
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 systemSalma Begum
 
Data Storage In Android
Data Storage In Android Data Storage In Android
Data Storage In Android Aakash Ugale
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depthSander Alberink
 
Android security model
Android security modelAndroid security model
Android security modelrrand1
 
Mobile Application Security Code Reviews
Mobile Application Security Code ReviewsMobile Application Security Code Reviews
Mobile Application Security Code ReviewsDenim Group
 
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 ApplicationsBlrDroid
 
[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security Workshop[Wroclaw #1] Android Security Workshop
[Wroclaw #1] Android Security WorkshopOWASP
 
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 PermissionsHariharan Ganesan
 
Android seminar report
Android seminar reportAndroid seminar report
Android seminar reportdgpune
 
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...Cheng-Yi Yu
 
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...Consulthinkspa
 
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 Cheng-Yi Yu
 

Destaque (19)

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
 
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
 

Semelhante a 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 AnalysisPragati Rai
 
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 2017Satheesh Kumar V
 
Android Overview
Android OverviewAndroid Overview
Android OverviewRaju Kadam
 
Security testing of mobile applications
Security testing of mobile applicationsSecurity testing of mobile applications
Security testing of mobile applicationsGTestClub
 
Android security in depth - extended
Android security in depth - extendedAndroid security in depth - extended
Android security in depth - extendedSander Alberink
 
Getting started with Android pentesting
Getting started with Android pentestingGetting started with Android pentesting
Getting started with Android pentestingMinali Arora
 
Security framework for connected devices
Security framework for connected devicesSecurity framework for connected devices
Security framework for connected devicesHCL Technologies
 
Android security by ravi-rai
Android security by ravi-raiAndroid security by ravi-rai
Android security by ravi-raiRavi Rai
 
Android application fundamentals
Android application fundamentalsAndroid application fundamentals
Android application fundamentalsSteve Smith
 
Getting started with android
Getting started with androidGetting started with android
Getting started with androidVandana Verma
 
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 Dasnullowaspmumbai
 
Sandboxing (Distributed computing)
Sandboxing (Distributed computing)Sandboxing (Distributed computing)
Sandboxing (Distributed computing)Sri Prasanna
 
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.pptxArjayBalberan1
 
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 frameworkLalit Kale
 
Android development-tutorial
Android development-tutorialAndroid development-tutorial
Android development-tutorialilias ahmed
 

Semelhante a 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
 

Mais de Pragati Rai

Hard problems in mobile commerce
Hard problems in mobile commerceHard problems in mobile commerce
Hard problems in mobile commercePragati Rai
 
Mobile Commerce: A Security Perspective
Mobile Commerce: A Security PerspectiveMobile Commerce: A Security Perspective
Mobile Commerce: A Security PerspectivePragati Rai
 
Be Your Own Technology Brand Ambassador
Be Your Own Technology Brand AmbassadorBe Your Own Technology Brand Ambassador
Be Your Own Technology Brand AmbassadorPragati Rai
 
Mobile Payments revolution
Mobile Payments revolutionMobile Payments revolution
Mobile Payments revolutionPragati Rai
 
Android securitybyexample
Android securitybyexampleAndroid securitybyexample
Android securitybyexamplePragati Rai
 
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 analysisPragati Rai
 
The basics of mobile payments
The basics of mobile paymentsThe basics of mobile payments
The basics of mobile paymentsPragati Rai
 
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?Pragati Rai
 
Mobile payments 101
Mobile payments 101Mobile payments 101
Mobile payments 101Pragati 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
 
New Security Considerations for Mobile Commerce
New Security Considerations for Mobile CommerceNew Security Considerations for Mobile Commerce
New Security Considerations for Mobile CommercePragati Rai
 
Amphion Forum: Understanding Android Secuity
Amphion Forum: Understanding Android SecuityAmphion Forum: Understanding Android Secuity
Amphion Forum: Understanding Android SecuityPragati Rai
 
Understanding Mobile payments
Understanding Mobile paymentsUnderstanding Mobile payments
Understanding Mobile paymentsPragati Rai
 
Mobile Ecosystem
Mobile EcosystemMobile Ecosystem
Mobile EcosystemPragati Rai
 

Mais de 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
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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.pdfsudhanshuwaghmare1
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

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.