SlideShare a Scribd company logo
How iOS and Android Handle Security
Dan Cornell
@danielcornell
Dan’s Background
• Founder and CTO of Denim Group
• Software developer by background
• OWASP San Antonio
Denim Group Company Background
• Professional services firm that builds & secures
enterprise applications
• External application & network assessments
• Web, mobile, and cloud
• Software development lifecycle development (SDLC) consulting
• Secure development services:
• Secure .NET and Java application development & remediation
• Classroom secure developer training for PCI compliance
• Develop ThreadFix
Overview
• Challenges of secure mobile development
• Areas of concern:
• Basics of (secure) application development
• Secure data storage
• Secure data communication
• Mobile browsers
• Handling SMS and push messaging
• Licensing and in-app payments
• Questions and Answers
Secure Mobile Application Development
Reference
• Topics include:
• Overview of Application Development
• Overview of Secure Development
• Defeating Platform Environment Restrictions
• Installing Applications
• Application Permissions Model
• Local Storage
• Encryption APIs
• Network Communications
• Protecting Network Communications
• Application Licensing and Payments
• Mobile Browser
• Native Code Execution
• Browser URL Handling
• Mobile Application SMS/Push Update Handling
http://www.denimgroup.com/know_artic_secure_mobile_application_development_reference.html
Secure Mobile Application Development
Reference
• For developers:
• Learn the security capabilities of
your mobile development platform
• Get access to further learning
resources
• For security professionals:
• Learn the security capabilities of
the mobile development
platform(s) your organization is
targeting
http://www.denimgroup.com/know_artic_secure_mobile_application_development_reference.html
CHALLENGES OF SECURE MOBILE
DEVELOPMENT
How iOS and Android Handle Security
Mobile Application Threat Model
• More complicated than
standard web application
threat model
• Chess versus checkers
• Today we will focus on code
running on the mobile device
Generic Mobile Application Threat Model
9
Typical Mobile Threats
• Spoofing: Users to the Mobile Application
• Spoofing: Web Services to Mobile Application
• Tampering: Mobile Application
• Tampering: Device Data Stores
• Disclosure: Device Data Stores or Residual Data
• Disclosure: Mobile Application to Web Service
• Denial of Service: Mobile Application
• Elevation of Privilege: Mobile Application or Web Services
User
Local App
Storage
Mobile
Application
Mobile Web
Services
Device
Keychain
Main Site Pages
AREAS OF CONCERN
How iOS and Android Handle Security
Areas of Concern
• Basics of (Secure) Application Development
• Secure Data Storage
• Secure Data Communication
• Mobile Browsers
• Handling SMS and Push Messaging
• Licensing and In-App Payments
AREAS OF CONCERN
How iOS and Android Handle Security
Basics of (Secure) Application Development
Basics of (Secure) Application
Development
• Overview of Application Development
• Overview of Secure Development
• Defeating Platform Environmental Restrictions
• Installing Applications
• Application Permissions Model
• Native Code Execution
Overview of Application Development
iOS
• Objective-C is most common
• Swift for newer applications
• iOS Developer program allows
installing and testing applications to
developer phones
• Actual applications installed from
iTunes Store
Android
• Typically written in Java
• Previously: Dalvik and DEX
• More recently: Android Runtime
(ART)
• Applications installed from Android
Play store or side-loaded via USB
Overview of Secure Development
iOS
• Apple provides Secure Coding
Guide with both:
• General secure coding
recommendations
• iOS-specific recommendations
Android
• Google provides a Google Group
with secure Android coding
recommendations
• Many 3rd party resources available
as well
Defeating Platform Environmental
Restrictions
iOS
• iOS devices can be “jailbroken”
• Allows access to the device as the
root user
• Allows for loading of 3rd party
applications to be installed
• Allows for use of alternate app
stores
Android
• Android devices can be “rooted”
• Allows for root-level access to the
device
• Allows for custom kernels on many
devices
Installing Applications
iOS
• Non-jailbroken iOS devices:
• Apple iTunes Store
• Developers can install applications on
a set of test devices
• Alternate app stores for jailbroken
devices
Android
• Google Play store
• Side-loading applications
• For development/debugging
• For general usage
• Alternate app stores for rooted
devices
Application Permissions Model
iOS
• App asks for relevant permission
when needed
• Can allow or deny
• Can review permissions and which
applications are requesting them
Android
• Baked into AndroidManifest.xml
• Fairly fine-grained
• But must be accepted wholesale
• Take a look at what apps from the
app store ask for…
Native Code Execution
iOS
• Objective-C compiles to ARM
machine code
• Objective-C not safe by nature
(super)
• Swift offers much more protection
Android
• Dalvik/ART should provide memory
safety
• Can run code via the Native
Development Kit (NDK)
AREAS OF CONCERN
How iOS and Android Handle Security
Secure Data Storage
Secure Data Storage
• Local Storage
• Encryption APIs
Local Storage
iOS
• iOS (since 3.0) provides AES-
based full-disk encryption (hooray!)
• Based on a burned-in hardware
UID (hrm…)
• iOS 8 added a 5 second hardware
delay to passcode attempts for
newer hardware (hooray!) and
moved more data under default
protection mechanisms
Android
• Uses Linux user/group permissions
• Android 5.0 allows for full-disk
encryption based on PIN and
password (hooray!)
• Also can have hardware-backed
storage of the encryption key via
Trusted Execution Environment
(TEE)
Encryption APIs
iOS
• Provides access to a variety of
certificate and key management
functions
• iOS Keychain provides device-
supported encryption capabilities
Android
• Now has Keystore system
• Allows for more secure storage of
key materials to prevent
unauthorized use
• Provides access to javax.crypto
APIs
• Can also use 3rd party Java
libraries for encryption
• Like BouncyCastle (be careful of
vulnerable versions…)
AREAS OF CONCERN
How iOS and Android Handle Security
Secure Data Communication
Secure Data Communication
• Network Communications
• Protecting Network Communications
Network Communications
iOS
• Provides access to BSD sockets
• Provides implementations of many
higher-level protocols
Android
• Provides access to standard
java.net.* classes
• Provides access to a number of
Apache HTTP Utilities
• Provides some Android-specific
classes for HTTP/S, SIP, and WiFi
Protecting Network Communications
iOS
• Provides implementations of
common transport-layer security
protocols
• Default settings are not terrible
Android
• Provides access to javax.net.ssl
classes allowing for TLS network
communications
• Be careful using the
android.net.SSLCertificateSocketF
actory because they make it easy
to disable protections
AREAS OF CONCERN
How iOS and Android Handle Security
Mobile Browsers
Mobile Browsers
• Mobile Browser Basics
• Browser URL Handling
Mobile Browser Basics
iOS
• Mobile version of Safari browser
that uses the WebKit HTML
rendering engine
Android
• WebKit HTML rendering engine
and a version of the Chrome V8
JavaScript engine
Browser URL Handling
iOS
• Allows applications to register to
handle different URL schemes
• Apple applications are given
precedence for the schemes they
register for
• Developers should treat inputs as
untrusted
Android
• Allows applications to register to
handle events raised by the
browser for different protocols
• Uses the Android “intent” facility to
deliver
• Developers should treat inputs as
untrusted
AREAS OF CONCERN
How iOS and Android Handle Security
Handling SMS and Push Messaging
Handling SMS and Push Messages
iOS
• Allows applications to receive
pushed notifications so that they
can display a message or
download new data
• Must treat inputs from push
notifications as potentially
malicious
Android
• Cloud to Device Messaging
Framework (C2DM) has been
deprecated and replaced by
Google Cloud Messaging (GCM)
• Must treat inputs from push
notifications as potentially
malicious
AREAS OF CONCERN
How iOS and Android Handle Security
Licensing and In-App Payments
Application Licensing and Payments
iOS
• In-App purchases allow you to sell
items from within iOS applications
• StoreKit API allows for these
capabilities
Android
• In-App purchases allow you to sell
items from within Android
applications
• Billing API proxies communications
between your application and the
relevant Google Play services
• Supports purchases, subscriptions
and in-app products
So Where Do You Go From Here?
So What Should Security People Do?
• Understand the general mobile application threat model and
any peculiarities of platforms your organization supports
• Work with developers to set architecture, design, and coding
guidelines and standards
• Test the securing of mobile application systems – the entirety of
systems, not just code running on the device – taking into
account the security characteristics of your target platform
38
So What Should Developers Do?
• Threat model your mobile application prior to development
• Learn the security properties and capabilities of the platform(s)
you develop for
• Stay current as new security vulnerabilities and weaknesses
are discovered and as new security capabilities are added to
your target platform(s)
39
How Do iOS and Android Handle Security?
• Denim Group Secure Mobile Application Development Reference
• Overview of Application Development
• Overview of Secure Development
• Defeating Platform Environment Restrictions
• Installing Applications
• Application Permissions Model
• Local Storage
• Encryption APIs
• Network Communications
• Protecting Network Communications
• Application Licensing and Payments
• Mobile Browser
• Native Code Execution
• Browser URL Handling
• Mobile Application SMS/Push Update Handling
http://www.denimgroup.com/know_artic_secure_mobile_application_development_reference.html
QUESTIONS AND ANSWERS
How iOS and Android Handle Security
Dan Cornell
@danielcornell

More Related Content

PDF
Vulnerability Management In An Application Security World
PDF
Smart Phones Dumb Apps
PDF
Top Strategies to Capture Security Intelligence for Applications
PDF
Vulnerability Management In An Application Security World: AppSecDC
PDF
The Permanent Campaign
PDF
The Magic of Symbiotic Security
PDF
The Need For Open Software Security Standards In A Mobile And Cloudy World
PDF
Software Security for Project Managers: What Do You Need To Know?
Vulnerability Management In An Application Security World
Smart Phones Dumb Apps
Top Strategies to Capture Security Intelligence for Applications
Vulnerability Management In An Application Security World: AppSecDC
The Permanent Campaign
The Magic of Symbiotic Security
The Need For Open Software Security Standards In A Mobile And Cloudy World
Software Security for Project Managers: What Do You Need To Know?

What's hot (20)

PDF
What Permissions Does Your Database User REALLY Need?
PDF
Software Security: Is OK Good Enough? OWASP AppSec USA 2011
PDF
Social Networks and Security: What Your Teenager Likely Won't Tell You
PPTX
Building a Mobile Security Program
PDF
Monitoring Attack Surface to Secure DevOps Pipelines
PDF
Benchmarking Web Application Scanners for YOUR Organization
PDF
ThreadFix 2.4: Maximizing the Impact of Your Application Security Resources
PDF
Building Your Application Security Data Hub - OWASP AppSecUSA
PDF
Do You Have a Scanner or Do You Have a Scanning Program? (AppSecEU 2013)
PDF
SecDevOps: Development Tools for Security Pros
PDF
The ThreadFix Ecosystem: Vendors, Volunteers, and Versions
PDF
ThreadFix 2.2 Preview Webinar with Dan Cornell
PDF
ThreadFix 2.1 and Your Application Security Program
PDF
Running a Software Security Program with Open Source Tools
PDF
Managing Your Application Security Program with the ThreadFix Ecosystem
PDF
Developing Secure Mobile Applications
PDF
Secure DevOps with ThreadFix 2.3
PDF
Structuring and Scaling an Application Security Program
PDF
Using ThreadFix to Manage Application Vulnerabilities
PDF
Running a Software Security Program with Open Source Tools (Course)
What Permissions Does Your Database User REALLY Need?
Software Security: Is OK Good Enough? OWASP AppSec USA 2011
Social Networks and Security: What Your Teenager Likely Won't Tell You
Building a Mobile Security Program
Monitoring Attack Surface to Secure DevOps Pipelines
Benchmarking Web Application Scanners for YOUR Organization
ThreadFix 2.4: Maximizing the Impact of Your Application Security Resources
Building Your Application Security Data Hub - OWASP AppSecUSA
Do You Have a Scanner or Do You Have a Scanning Program? (AppSecEU 2013)
SecDevOps: Development Tools for Security Pros
The ThreadFix Ecosystem: Vendors, Volunteers, and Versions
ThreadFix 2.2 Preview Webinar with Dan Cornell
ThreadFix 2.1 and Your Application Security Program
Running a Software Security Program with Open Source Tools
Managing Your Application Security Program with the ThreadFix Ecosystem
Developing Secure Mobile Applications
Secure DevOps with ThreadFix 2.3
Structuring and Scaling an Application Security Program
Using ThreadFix to Manage Application Vulnerabilities
Running a Software Security Program with Open Source Tools (Course)
Ad

Viewers also liked (20)

PDF
C0c0n 2011 mobile security presentation v1.2
PDF
Mobile Security 101
PPTX
Mobile security
PDF
Mobile security - Intense overview
PDF
How to Secure Your iOs Device and Keep Client Data Safe
PPTX
Ios seminar
PPTX
InfoSec World 2014 Security Imperatives for IOS and Android
PDF
The fundamentals of Android and iOS app security
PDF
Android on Intel platforms : current state, near-future, future & developers ...
PDF
WebView security on iOS (EN)
PDF
600.250 UI Cross Platform Development and the Android Security Model
PPTX
Android vs iOS security
PDF
Android vs i os features
PPTX
Mobile security
PDF
Security Webinar: Harden the Heart of Your WordPress SiteSe
PDF
Android vs. iPhone for Mobile Security
PDF
Clear AppSec Visibility with AppSpider and ThreadFix
PDF
Android Security Overview and Safe Practices for Web-Based Android Applications
PPT
Android Security
PDF
Android Security - Common Security Pitfalls in Android Applications
C0c0n 2011 mobile security presentation v1.2
Mobile Security 101
Mobile security
Mobile security - Intense overview
How to Secure Your iOs Device and Keep Client Data Safe
Ios seminar
InfoSec World 2014 Security Imperatives for IOS and Android
The fundamentals of Android and iOS app security
Android on Intel platforms : current state, near-future, future & developers ...
WebView security on iOS (EN)
600.250 UI Cross Platform Development and the Android Security Model
Android vs iOS security
Android vs i os features
Mobile security
Security Webinar: Harden the Heart of Your WordPress SiteSe
Android vs. iPhone for Mobile Security
Clear AppSec Visibility with AppSpider and ThreadFix
Android Security Overview and Safe Practices for Web-Based Android Applications
Android Security
Android Security - Common Security Pitfalls in Android Applications
Ad

Similar to How iOS and Android Handle Security Webinar (20)

PDF
CNIT 128 8: Mobile development security
PDF
Designing Secure Mobile Apps
PPTX
19-f15-mobile-security.pptx
PDF
Security Best Practices for Mobile Development
PPTX
Virtue Security - The Art of Mobile Security 2013
PPTX
Security testing of mobile applications
PPTX
Mobile platform security models
PDF
CNIT 128 Ch 1: The mobile risk ecosystem
PDF
Security Best Practices for Mobile Development
PPTX
Untitled 1
PDF
Mobile Security Training, Mobile Device Security Training
PDF
Ios Application Security The Definitive Guide For Hackers And Developers Davi...
PPTX
[Wroclaw #2] iOS Security - 101
PPT
Security Testing for Mobile and Web Apps
PDF
Tips and Tricks for Building Secure Mobile Apps
PPTX
Mobile security
PDF
Tips and Tricks for Building Secure Mobile Apps
PPTX
Secure Your Mobile Apps
PPT
Mobile code mining for discovery and exploits nullcongoa2013
PDF
Mobile Application Security
CNIT 128 8: Mobile development security
Designing Secure Mobile Apps
19-f15-mobile-security.pptx
Security Best Practices for Mobile Development
Virtue Security - The Art of Mobile Security 2013
Security testing of mobile applications
Mobile platform security models
CNIT 128 Ch 1: The mobile risk ecosystem
Security Best Practices for Mobile Development
Untitled 1
Mobile Security Training, Mobile Device Security Training
Ios Application Security The Definitive Guide For Hackers And Developers Davi...
[Wroclaw #2] iOS Security - 101
Security Testing for Mobile and Web Apps
Tips and Tricks for Building Secure Mobile Apps
Mobile security
Tips and Tricks for Building Secure Mobile Apps
Secure Your Mobile Apps
Mobile code mining for discovery and exploits nullcongoa2013
Mobile Application Security

More from Denim Group (20)

PDF
Long-term Impact of Log4J
PDF
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
PDF
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
PDF
Optimizing Security Velocity in Your DevSecOps Pipeline at Scale
PDF
Application Asset Management with ThreadFix
PDF
OWASP San Antonio Meeting 10/2/20
PDF
AppSec Fast and Slow: Your DevSecOps CI/CD Pipeline Isn’t an SSA Program
PDF
Using Collaboration to Make Application Vulnerability Management a Team Sport
PDF
Managing Penetration Testing Programs and Vulnerability Time to Live with Thr...
PDF
Security Champions: Pushing Security Expertise to the Edges of Your Organization
PDF
The As, Bs, and Four Cs of Testing Cloud-Native Applications
PDF
An Updated Take: Threat Modeling for IoT Systems
PPTX
Continuous Authority to Operate (ATO) with ThreadFix – Bringing Commercial In...
PDF
A New View of Your Application Security Program with Snyk and ThreadFix
PDF
Enabling Developers in Your Application Security Program With Coverity and Th...
PDF
AppSec in a World of Digital Transformation
PDF
The As, Bs, and Four Cs of Testing Cloud-Native Applications
PDF
Enabling Developers in Your Application Security Program With Coverity and Th...
PDF
AppSec in a World of Digital Transformation
PDF
Enumerating Enterprise Attack Surface
Long-term Impact of Log4J
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Optimizing Security Velocity in Your DevSecOps Pipeline at Scale
Application Asset Management with ThreadFix
OWASP San Antonio Meeting 10/2/20
AppSec Fast and Slow: Your DevSecOps CI/CD Pipeline Isn’t an SSA Program
Using Collaboration to Make Application Vulnerability Management a Team Sport
Managing Penetration Testing Programs and Vulnerability Time to Live with Thr...
Security Champions: Pushing Security Expertise to the Edges of Your Organization
The As, Bs, and Four Cs of Testing Cloud-Native Applications
An Updated Take: Threat Modeling for IoT Systems
Continuous Authority to Operate (ATO) with ThreadFix – Bringing Commercial In...
A New View of Your Application Security Program with Snyk and ThreadFix
Enabling Developers in Your Application Security Program With Coverity and Th...
AppSec in a World of Digital Transformation
The As, Bs, and Four Cs of Testing Cloud-Native Applications
Enabling Developers in Your Application Security Program With Coverity and Th...
AppSec in a World of Digital Transformation
Enumerating Enterprise Attack Surface

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
PPTX
A Presentation on Artificial Intelligence
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Cloud computing and distributed systems.
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Modernizing your data center with Dell and AMD
PDF
cuic standard and advanced reporting.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Spectral efficient network and resource selection model in 5G networks
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
A Presentation on Artificial Intelligence
Review of recent advances in non-invasive hemoglobin estimation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Cloud computing and distributed systems.
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation_ Review paper, used for researhc scholars
NewMind AI Weekly Chronicles - August'25 Week I
Modernizing your data center with Dell and AMD
cuic standard and advanced reporting.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...

How iOS and Android Handle Security Webinar

  • 1. How iOS and Android Handle Security Dan Cornell @danielcornell
  • 2. Dan’s Background • Founder and CTO of Denim Group • Software developer by background • OWASP San Antonio
  • 3. Denim Group Company Background • Professional services firm that builds & secures enterprise applications • External application & network assessments • Web, mobile, and cloud • Software development lifecycle development (SDLC) consulting • Secure development services: • Secure .NET and Java application development & remediation • Classroom secure developer training for PCI compliance • Develop ThreadFix
  • 4. Overview • Challenges of secure mobile development • Areas of concern: • Basics of (secure) application development • Secure data storage • Secure data communication • Mobile browsers • Handling SMS and push messaging • Licensing and in-app payments • Questions and Answers
  • 5. Secure Mobile Application Development Reference • Topics include: • Overview of Application Development • Overview of Secure Development • Defeating Platform Environment Restrictions • Installing Applications • Application Permissions Model • Local Storage • Encryption APIs • Network Communications • Protecting Network Communications • Application Licensing and Payments • Mobile Browser • Native Code Execution • Browser URL Handling • Mobile Application SMS/Push Update Handling http://www.denimgroup.com/know_artic_secure_mobile_application_development_reference.html
  • 6. Secure Mobile Application Development Reference • For developers: • Learn the security capabilities of your mobile development platform • Get access to further learning resources • For security professionals: • Learn the security capabilities of the mobile development platform(s) your organization is targeting http://www.denimgroup.com/know_artic_secure_mobile_application_development_reference.html
  • 7. CHALLENGES OF SECURE MOBILE DEVELOPMENT How iOS and Android Handle Security
  • 8. Mobile Application Threat Model • More complicated than standard web application threat model • Chess versus checkers • Today we will focus on code running on the mobile device
  • 9. Generic Mobile Application Threat Model 9
  • 10. Typical Mobile Threats • Spoofing: Users to the Mobile Application • Spoofing: Web Services to Mobile Application • Tampering: Mobile Application • Tampering: Device Data Stores • Disclosure: Device Data Stores or Residual Data • Disclosure: Mobile Application to Web Service • Denial of Service: Mobile Application • Elevation of Privilege: Mobile Application or Web Services User Local App Storage Mobile Application Mobile Web Services Device Keychain Main Site Pages
  • 11. AREAS OF CONCERN How iOS and Android Handle Security
  • 12. Areas of Concern • Basics of (Secure) Application Development • Secure Data Storage • Secure Data Communication • Mobile Browsers • Handling SMS and Push Messaging • Licensing and In-App Payments
  • 13. AREAS OF CONCERN How iOS and Android Handle Security Basics of (Secure) Application Development
  • 14. Basics of (Secure) Application Development • Overview of Application Development • Overview of Secure Development • Defeating Platform Environmental Restrictions • Installing Applications • Application Permissions Model • Native Code Execution
  • 15. Overview of Application Development iOS • Objective-C is most common • Swift for newer applications • iOS Developer program allows installing and testing applications to developer phones • Actual applications installed from iTunes Store Android • Typically written in Java • Previously: Dalvik and DEX • More recently: Android Runtime (ART) • Applications installed from Android Play store or side-loaded via USB
  • 16. Overview of Secure Development iOS • Apple provides Secure Coding Guide with both: • General secure coding recommendations • iOS-specific recommendations Android • Google provides a Google Group with secure Android coding recommendations • Many 3rd party resources available as well
  • 17. Defeating Platform Environmental Restrictions iOS • iOS devices can be “jailbroken” • Allows access to the device as the root user • Allows for loading of 3rd party applications to be installed • Allows for use of alternate app stores Android • Android devices can be “rooted” • Allows for root-level access to the device • Allows for custom kernels on many devices
  • 18. Installing Applications iOS • Non-jailbroken iOS devices: • Apple iTunes Store • Developers can install applications on a set of test devices • Alternate app stores for jailbroken devices Android • Google Play store • Side-loading applications • For development/debugging • For general usage • Alternate app stores for rooted devices
  • 19. Application Permissions Model iOS • App asks for relevant permission when needed • Can allow or deny • Can review permissions and which applications are requesting them Android • Baked into AndroidManifest.xml • Fairly fine-grained • But must be accepted wholesale • Take a look at what apps from the app store ask for…
  • 20. Native Code Execution iOS • Objective-C compiles to ARM machine code • Objective-C not safe by nature (super) • Swift offers much more protection Android • Dalvik/ART should provide memory safety • Can run code via the Native Development Kit (NDK)
  • 21. AREAS OF CONCERN How iOS and Android Handle Security Secure Data Storage
  • 22. Secure Data Storage • Local Storage • Encryption APIs
  • 23. Local Storage iOS • iOS (since 3.0) provides AES- based full-disk encryption (hooray!) • Based on a burned-in hardware UID (hrm…) • iOS 8 added a 5 second hardware delay to passcode attempts for newer hardware (hooray!) and moved more data under default protection mechanisms Android • Uses Linux user/group permissions • Android 5.0 allows for full-disk encryption based on PIN and password (hooray!) • Also can have hardware-backed storage of the encryption key via Trusted Execution Environment (TEE)
  • 24. Encryption APIs iOS • Provides access to a variety of certificate and key management functions • iOS Keychain provides device- supported encryption capabilities Android • Now has Keystore system • Allows for more secure storage of key materials to prevent unauthorized use • Provides access to javax.crypto APIs • Can also use 3rd party Java libraries for encryption • Like BouncyCastle (be careful of vulnerable versions…)
  • 25. AREAS OF CONCERN How iOS and Android Handle Security Secure Data Communication
  • 26. Secure Data Communication • Network Communications • Protecting Network Communications
  • 27. Network Communications iOS • Provides access to BSD sockets • Provides implementations of many higher-level protocols Android • Provides access to standard java.net.* classes • Provides access to a number of Apache HTTP Utilities • Provides some Android-specific classes for HTTP/S, SIP, and WiFi
  • 28. Protecting Network Communications iOS • Provides implementations of common transport-layer security protocols • Default settings are not terrible Android • Provides access to javax.net.ssl classes allowing for TLS network communications • Be careful using the android.net.SSLCertificateSocketF actory because they make it easy to disable protections
  • 29. AREAS OF CONCERN How iOS and Android Handle Security Mobile Browsers
  • 30. Mobile Browsers • Mobile Browser Basics • Browser URL Handling
  • 31. Mobile Browser Basics iOS • Mobile version of Safari browser that uses the WebKit HTML rendering engine Android • WebKit HTML rendering engine and a version of the Chrome V8 JavaScript engine
  • 32. Browser URL Handling iOS • Allows applications to register to handle different URL schemes • Apple applications are given precedence for the schemes they register for • Developers should treat inputs as untrusted Android • Allows applications to register to handle events raised by the browser for different protocols • Uses the Android “intent” facility to deliver • Developers should treat inputs as untrusted
  • 33. AREAS OF CONCERN How iOS and Android Handle Security Handling SMS and Push Messaging
  • 34. Handling SMS and Push Messages iOS • Allows applications to receive pushed notifications so that they can display a message or download new data • Must treat inputs from push notifications as potentially malicious Android • Cloud to Device Messaging Framework (C2DM) has been deprecated and replaced by Google Cloud Messaging (GCM) • Must treat inputs from push notifications as potentially malicious
  • 35. AREAS OF CONCERN How iOS and Android Handle Security Licensing and In-App Payments
  • 36. Application Licensing and Payments iOS • In-App purchases allow you to sell items from within iOS applications • StoreKit API allows for these capabilities Android • In-App purchases allow you to sell items from within Android applications • Billing API proxies communications between your application and the relevant Google Play services • Supports purchases, subscriptions and in-app products
  • 37. So Where Do You Go From Here?
  • 38. So What Should Security People Do? • Understand the general mobile application threat model and any peculiarities of platforms your organization supports • Work with developers to set architecture, design, and coding guidelines and standards • Test the securing of mobile application systems – the entirety of systems, not just code running on the device – taking into account the security characteristics of your target platform 38
  • 39. So What Should Developers Do? • Threat model your mobile application prior to development • Learn the security properties and capabilities of the platform(s) you develop for • Stay current as new security vulnerabilities and weaknesses are discovered and as new security capabilities are added to your target platform(s) 39
  • 40. How Do iOS and Android Handle Security? • Denim Group Secure Mobile Application Development Reference • Overview of Application Development • Overview of Secure Development • Defeating Platform Environment Restrictions • Installing Applications • Application Permissions Model • Local Storage • Encryption APIs • Network Communications • Protecting Network Communications • Application Licensing and Payments • Mobile Browser • Native Code Execution • Browser URL Handling • Mobile Application SMS/Push Update Handling http://www.denimgroup.com/know_artic_secure_mobile_application_development_reference.html
  • 41. QUESTIONS AND ANSWERS How iOS and Android Handle Security Dan Cornell @danielcornell

Editor's Notes

  • #2: -Will look at the capabilities of the two platforms, as well as how those capabilities are implemented
  • #3: -My background is as a developer so when I look at the different mobile application platforms I want to know what their capabilities are, as well as how those capabilities are implemented so development teams know how to best use them
  • #4: Have done a tremendous amount of mobile testing for our clients, including Fortune 500 and sensitive Have assessed MDM systems And made recommendation to sensitive .gov and .mil clients surrounding application testing Also do secure mobile development and secure mobile application remediation Can also use ThreadFix to keep track of your mobile application security program
  • #5: -Looking at two mobile environments: iOS and Android -Those are the most dominant. We also do work with Window Mobile, Blackberry, etc – but the majority of the work we do is for iOS and Android -Story: “We should only develop for Blackberry because of the way they handle ephemeral crypto keys” BUT only 10% of their users were on Blackberry and that number was declining
  • #6: -This webinar is actually a concentrated version of Denim Group’s Secure Mobile Application Development Reference (available for download) -That guide has a more in-depth look at the topic as well as links to supporting resources
  • #7: -This webinar is actually a concentrated version of Denim Group’s Secure Mobile Application Development Reference (available for download) -That guide has a more in-depth look at the topic as well as links to supporting resources
  • #8: With apologies to folks with Windows Mobile, Blackberry, Tizen…
  • #10: -Hopefully most developers have a feel for the standard web application Thread Model (not really, but we can hope) -Smartphone applications have a different Thread Model and this has a huge impact on the security of the systems being created around them -Smartphone applications run on a device that can’t be trusted – it might have been jailbroken/rooted, it might have been stolen, code might be running in a debugger. Much like Rich Internet Applications (RIA) more code and data is running in an untrusted and unreliable environment -Also we’re talking about “interesting” smartphone applications. Not “make fart noise” or “shake the phone to throw the monkey” application. Instead we are talking about applications that use the capabilities of the device – GPS, camera, ability to make calls – and combine those capabilities with network services to do something cool and valuable -3rd party web services are often in use and their output should not be trusted -Enterprise services are often used for access to customer or transaction data and these will need to be protected -So smartphone application security isn’t just about the application on the smartphone, it is about the entire system that supports the smartphone application
  • #11: -Hopefully most developers have a feel for the standard web application Threat Model (not really, but we can hope) -Smartphone applications have a different Threat Model and this has a huge impact on the security of the systems being created around them -Smartphone applications run on a device that can’t be trusted – it might have been jailbroken/rooted, it might have been stolen, code might be running in a debugger. Much like Rich Internet Applications (RIA) more code and data is running in an untrusted and unreliable environment -Also we’re talking about “interesting” smartphone applications. Not “make fart noise” or “shake the phone to throw the monkey” application. Instead we are talking about applications that use the capabilities of the device – GPS, camera, ability to make calls – and combine those capabilities with network services to do something cool and valuable -3rd party web services are often in use and their output should not be trusted -Enterprise services are often used for access to customer or transaction data and these will need to be protected -So smartphone application security isn’t just about the application on the smartphone, it is about the entire system that supports the smartphone application
  • #12: So let’s drill in and look at different areas of concern, and how iOS and Android treat these areas. There are both similarities and differences, and if developers want to build secure applications they need to understand these fo
  • #14: So what are the basics of developing applications, and what resources are available for developers who want to build secure applications?
  • #19: -Most corporate environments will rely on users using the most basic installation cases – iTunes Store and Apple Play store -Other folks may have different use cases
  • #41: -This webinar is actually a concentrated version of Denim Group’s Secure Mobile Application Development Reference (available for download) -That guide has a more in-depth look at the topic as well as links to supporting resources