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

What's hot (20)

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

Viewers also liked (20)

PDF
C0c0n 2011 mobile security presentation v1.2
Santosh Satam
 
PDF
Mobile Security 101
Lookout
 
PPTX
Mobile security
home
 
PDF
Mobile security - Intense overview
PrivateWave Italia SpA
 
PDF
How to Secure Your iOs Device and Keep Client Data Safe
Rocket Matter, LLC
 
PPTX
Ios seminar
Kurikkal Ashique
 
PPTX
InfoSec World 2014 Security Imperatives for IOS and Android
Symosis Security (Previously C-Level Security)
 
PDF
The fundamentals of Android and iOS app security
NowSecure
 
PDF
Android on Intel platforms : current state, near-future, future & developers ...
BeMyApp
 
PDF
WebView security on iOS (EN)
lpilorz
 
PDF
600.250 UI Cross Platform Development and the Android Security Model
Michael Rushanan
 
PPTX
Android vs iOS security
Sumanth Veera
 
PDF
Android vs i os features
Guang Ying Yuan
 
PPTX
Mobile security
priyanka pandey
 
PDF
Security Webinar: Harden the Heart of Your WordPress SiteSe
WP Engine
 
PDF
Android vs. iPhone for Mobile Security
CloudCheckr
 
PDF
Clear AppSec Visibility with AppSpider and ThreadFix
Denim Group
 
PDF
Android Security Overview and Safe Practices for Web-Based Android Applications
h4oxer
 
PPT
Android Security
Suminda Gunawardhana
 
PDF
Android Security - Common Security Pitfalls in Android Applications
BlrDroid
 
C0c0n 2011 mobile security presentation v1.2
Santosh Satam
 
Mobile Security 101
Lookout
 
Mobile security
home
 
Mobile security - Intense overview
PrivateWave Italia SpA
 
How to Secure Your iOs Device and Keep Client Data Safe
Rocket Matter, LLC
 
Ios seminar
Kurikkal Ashique
 
InfoSec World 2014 Security Imperatives for IOS and Android
Symosis Security (Previously C-Level Security)
 
The fundamentals of Android and iOS app security
NowSecure
 
Android on Intel platforms : current state, near-future, future & developers ...
BeMyApp
 
WebView security on iOS (EN)
lpilorz
 
600.250 UI Cross Platform Development and the Android Security Model
Michael Rushanan
 
Android vs iOS security
Sumanth Veera
 
Android vs i os features
Guang Ying Yuan
 
Mobile security
priyanka pandey
 
Security Webinar: Harden the Heart of Your WordPress SiteSe
WP Engine
 
Android vs. iPhone for Mobile Security
CloudCheckr
 
Clear AppSec Visibility with AppSpider and ThreadFix
Denim Group
 
Android Security Overview and Safe Practices for Web-Based Android Applications
h4oxer
 
Android Security
Suminda Gunawardhana
 
Android Security - Common Security Pitfalls in Android Applications
BlrDroid
 
Ad

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

PDF
Pentesting Mobile Applications (Prashant Verma)
ClubHack
 
PPTX
Mobile platform security models
Prachi Gulihar
 
PDF
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
Felipe Prado
 
PPTX
Mobile Application Development Unit 1.pptx
DheekshithaPasala
 
PPT
Mobile code mining for discovery and exploits nullcongoa2013
Blueinfy Solutions
 
PPT
Android Application Development Training by NITIN GUPTA
NITIN GUPTA
 
PDF
Android Seminar BY Suleman Khan.pdf
NomanKhan869872
 
PPT
Android ppt
blogger at indiandswad
 
PPT
Android ppt
Indumathy Mayuranathan
 
PPT
Android Applications
Nazeer Hussain University
 
PPT
Android
Tapan Khilar
 
PPT
CROSS PLATFORM APPLICATIONS DEVELOPMENT
Kongu Engineering College, Perundurai, Erode
 
PPTX
Virtue Security - The Art of Mobile Security 2013
Virtue Security
 
PPTX
Android Security Humla Part 1
Nikhil Kulkarni
 
PPTX
Android introduction
perpetrotech
 
PPTX
MobApp 01- Mobile Application Development Platform (1).pptx
MUHAMMADAHMAD173574
 
PPTX
Android Security and Peneteration Testing
Surabaya Blackhat
 
PPTX
MobApp development 01 application platform.pptx
sanaiftikhar23
 
PPT
Mobile appliaction w android week 1 by osama
Osama Ghandour Geris
 
PPT
Analysis and research of system security based on android
Ravishankar Kumar
 
Pentesting Mobile Applications (Prashant Verma)
ClubHack
 
Mobile platform security models
Prachi Gulihar
 
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
Felipe Prado
 
Mobile Application Development Unit 1.pptx
DheekshithaPasala
 
Mobile code mining for discovery and exploits nullcongoa2013
Blueinfy Solutions
 
Android Application Development Training by NITIN GUPTA
NITIN GUPTA
 
Android Seminar BY Suleman Khan.pdf
NomanKhan869872
 
Android Applications
Nazeer Hussain University
 
Android
Tapan Khilar
 
CROSS PLATFORM APPLICATIONS DEVELOPMENT
Kongu Engineering College, Perundurai, Erode
 
Virtue Security - The Art of Mobile Security 2013
Virtue Security
 
Android Security Humla Part 1
Nikhil Kulkarni
 
Android introduction
perpetrotech
 
MobApp 01- Mobile Application Development Platform (1).pptx
MUHAMMADAHMAD173574
 
Android Security and Peneteration Testing
Surabaya Blackhat
 
MobApp development 01 application platform.pptx
sanaiftikhar23
 
Mobile appliaction w android week 1 by osama
Osama Ghandour Geris
 
Analysis and research of system security based on android
Ravishankar Kumar
 
Ad

More from Denim Group (20)

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

Recently uploaded (20)

PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
July Patch Tuesday
Ivanti
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Top Managed Service Providers in Los Angeles
Captain IT
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 

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