SlideShare a Scribd company logo
Security Best Practices for Mobile
Development
Mobile SDK Entity Framework and SmartStore
Tom Gersic, Salesforce.com
Director, Mobile Services Delivery
@tomgersic
Safe Harbor
Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties
materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results
expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be
deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other
financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any
statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new
functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our
operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any
litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our
relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our
service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to
larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is
included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent
fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor
Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently
available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions
based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these
forward-looking statements.
Tom Gersic
Director, Mobile Services Delivery
@tomgersic
Agenda
• Fundamental Principles
• What iOS and Android Share
• iOS Specific Characteristics
• Android Specific Characteristics
• Salesforce Mobile Offerings
Who thinks the data on their phone is secure?
Fundamental Security Principles
Security Best Practices for Mobile Development
Vulnerability
Threat
Consequence
Mitigation
Separation of Concerns – Principle of Least Privilege
Security Stack
Real life examples
Libtiff Image Exploit / Jailbreak
• iPhone 1 – patched in 1.1.2
• Tiff buffer overflow
• No DEP/ASLR – nothing to
prevent executing code on the heap
• Gained root access from viewing an
image on the web
ASLR (PIE) and DEP
iOS 7 Lock Screen Bypass
Fingerprint Hacking
“Bluebox Uncovers Android Master Key -- 2013”
Concatenated SMS Exploit – Charlie Miller
Concatenated SMS Exploit
• Takes 519 SMS messages – all but 1 is invisible
• Send message -1 of X to underflow the array buffer
• Can’t be stopped by the user
• Used to write an entire binary executable to the heap, and run
it, taking over the phone.
NFC Exploit
But most of the time…
Data Security – Hardware Encryption
Requires PIN/Passcode on both iOS and Android
On iOS, apps opt-in
Supported on
▪ iPhone 3GS w/ iOS v4+ (AES 256 bit)
▪ Android Honeycomb+ (AES 128 bit)
• Some manufacturers increase to AES 256 bit (Samsung SAFE)

SD Card encryption on Android is manufacturer specific.
Is Facebook.app Secure?
App Security
Layers of Defense
Application Signing
Application Sandboxing
iOS Sandbox
• All apps (Apple’s and App Store) run as “mobile” user.
• Sandboxing is bolted on -- handled via XNU Sandbox
“Seatbelt” kernel extension.
• Applications run in separate subdirectories of
/private/var/mobile/Applications
• Any app in this directory is loaded with “container”
(sandboxed) profile.
Android Sandbox
• Uses underlying Linux security model
• Every app runs as a separate user
• Apps signed by the same developer can run as the same user, if
desired (not the default, though)
• Every app runs in its own instance of the Android Runtime (Dalvik
Virtual Machine)
• Like iOS, every app has its own directory structure
• SD Card, though, is generally public – accessible to all apps and
unencrypted unless manufacturer has added encryption (Samsung
SAFE)
Background Processing
• iOS 6:
• Audio Streaming (Spotify, Pandora)
• GPS / Navigation
• VOIP
• Newsstand app content downloading
• Hardware integrations (bluetooth, other external accessories)

• iOS 7
• 10 3 minute window after app closes to finish any task.
• Background Fetch
• Remote Notifications
• Background Transfer Service
iOS 7 Backgrounding
Background Processes / App Interaction
Types of Android Components

▪ Activities
▪ Intent
▪ Service
▪ Content Provider
▪ Broadcast Receiver
Public / Private Components
But what about custom keyboards?
Keyboard Security Risks
Except Passwords?

https://github.com/tomgersic/AndroidKeyLogger
Permissions
Mitigation
Static Analysis Tools
Application Encryption
• Encrypt your data yourself using PIN / Passcode
• CoreData/SQLCipher
▪ NSIncrementalStore
▪ Good Dynamics

• FMDB/SQLCipher
▪ Salesforce Smartstore
Jailbreak Detection
• Sandbox integrity check: fork() should fail
• Check for jailbreak files:
▪ /Applications/Cydia.app
▪ /Library/MobileSubstrate/MobileSubstrate.dylib
▪ /var/cache/apt
▪ /bin/sh
▪ /bin/bash
In-App Encryption
SmartStore Stack
Enable ASLR in Your App
• ASLR: Address Space Layout Randomization
Stack Canaries
• AKA Stack Smashing Protection
• Protect against buffer overflows
• Places random known value (canary) before local variables
• Use Apple LLVM – won’t work with LLVM GCC
Hide Data from App Snapshot Images
Who STILL thinks the data on their phone is secure?
Tom Gersic
Director, Mobile Services Delivery
@tomgersic
We want to hear
from YOU!
Please take a moment to complete our
session survey
Surveys can be found in the “My Agenda”
portion of the Dreamforce app
@tomgersic

More Related Content

PDF
Secure Salesforce: Hardened Apps with the Mobile SDK
PDF
Secure Salesforce: Hardened Apps with the Mobile SDK
PPTX
Backstage Tour of Identity - London Identity Summit
PDF
Android Q & iOS 13 Privacy Enhancements
PDF
Appaloosa & AppDome: deploy & protect mobile applications
PDF
FIDO & The Mobile Network Operator - Goode Intelligence & Nok Nok Labs
PPT
You Can't Spell Enterprise Security without MFA
PDF
Mobile App Security Predictions 2019
Secure Salesforce: Hardened Apps with the Mobile SDK
Secure Salesforce: Hardened Apps with the Mobile SDK
Backstage Tour of Identity - London Identity Summit
Android Q & iOS 13 Privacy Enhancements
Appaloosa & AppDome: deploy & protect mobile applications
FIDO & The Mobile Network Operator - Goode Intelligence & Nok Nok Labs
You Can't Spell Enterprise Security without MFA
Mobile App Security Predictions 2019

What's hot (20)

PDF
SecuSUITE for Enterprise Brochure
PPTX
Managing Identity without Boundaries
PDF
Nexsign Biometric Authentication
PDF
HYPR: The Leading Provider of True Passwordless Security®
PDF
Google Case Study - Towards simpler, stronger authentication
PDF
Hitchhikers Guide to the Identiverse - How Federated Business will Rule the W...
PDF
SYPHERSAFE
PPTX
Connecting The Real World With The Virtual World
PPTX
Identity Beyond Employees: How Customer Experience Impacts Your IAM Practices
PDF
Beyond username and password it's continuous authorization webinar
PDF
2014 IoT Forum_ Fido Alliance
PPTX
CIS 2013 Ping Identity Chalktalk
PDF
The Password Is Dead: An Argument for Multifactor Biometric Authentication
PDF
Sydney Identity Unconference Introduction and Highlights
PDF
Google FIDO Authentication Case Study
PDF
Argentinian Security Services Company Relies On BES10 For Secure Cross-Platfo...
PDF
Major Spanish Risk-Prevention Consultancy Relies On BlackBerry To Safeguard M...
PDF
White Paper: Balance Between Embedded Operating System Security Features and ...
PPTX
Passwordless auth
PDF
Local Government Balances Security, Flexibility and Productivity with BlackBe...
SecuSUITE for Enterprise Brochure
Managing Identity without Boundaries
Nexsign Biometric Authentication
HYPR: The Leading Provider of True Passwordless Security®
Google Case Study - Towards simpler, stronger authentication
Hitchhikers Guide to the Identiverse - How Federated Business will Rule the W...
SYPHERSAFE
Connecting The Real World With The Virtual World
Identity Beyond Employees: How Customer Experience Impacts Your IAM Practices
Beyond username and password it's continuous authorization webinar
2014 IoT Forum_ Fido Alliance
CIS 2013 Ping Identity Chalktalk
The Password Is Dead: An Argument for Multifactor Biometric Authentication
Sydney Identity Unconference Introduction and Highlights
Google FIDO Authentication Case Study
Argentinian Security Services Company Relies On BES10 For Secure Cross-Platfo...
Major Spanish Risk-Prevention Consultancy Relies On BlackBerry To Safeguard M...
White Paper: Balance Between Embedded Operating System Security Features and ...
Passwordless auth
Local Government Balances Security, Flexibility and Productivity with BlackBe...
Ad

Similar to Security Best Practices for Mobile Development (20)

PPT
Security Best Practices for Mobile Development @ Dreamforce 2013
PDF
Security Best Practices for Mobile Development
PDF
Building secure mobile apps
PDF
Creating HTML5 Applications with jQuery Mobile, Ruby and Database.com
PDF
Creating HTML5 Applications with jQuery Mobile, Ruby and Database.com
PPTX
Salesforce.com Mobile Dev Week Chicago DUG
PPTX
Mobile architecture overview
PPTX
Creating HTML5 Applications with jQuery Mobile, Ruby and Database.com
PPTX
Salesforce Mobile architecture introduction
PDF
Mobile SSO: Give App Users a Break from Typing Passwords
PPTX
Modev presentation
PPTX
Con8896 securely enabling mobile access for business transformation - final
PPT
Mobile code mining for discovery and exploits nullcongoa2013
PPT
Don't Risk Your Reputation or Your Mainframe: Best Practices for Demonstratin...
PDF
120019_top5_security
PDF
API Design for Your Packaged App
PDF
Developing Offline-Capable Apps with the Salesforce Mobile SDK and SmartStore
PDF
API Design for Your Packaged App
PDF
MobileIron's Enterprise Solution for Mobile Web Browsing
PPTX
Location-aware Mobile Apps with Chatter & iBeacon
Security Best Practices for Mobile Development @ Dreamforce 2013
Security Best Practices for Mobile Development
Building secure mobile apps
Creating HTML5 Applications with jQuery Mobile, Ruby and Database.com
Creating HTML5 Applications with jQuery Mobile, Ruby and Database.com
Salesforce.com Mobile Dev Week Chicago DUG
Mobile architecture overview
Creating HTML5 Applications with jQuery Mobile, Ruby and Database.com
Salesforce Mobile architecture introduction
Mobile SSO: Give App Users a Break from Typing Passwords
Modev presentation
Con8896 securely enabling mobile access for business transformation - final
Mobile code mining for discovery and exploits nullcongoa2013
Don't Risk Your Reputation or Your Mainframe: Best Practices for Demonstratin...
120019_top5_security
API Design for Your Packaged App
Developing Offline-Capable Apps with the Salesforce Mobile SDK and SmartStore
API Design for Your Packaged App
MobileIron's Enterprise Solution for Mobile Web Browsing
Location-aware Mobile Apps with Chatter & iBeacon
Ad

More from Salesforce Developers (20)

PDF
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
PDF
Maximizing Salesforce Lightning Experience and Lightning Component Performance
PDF
Local development with Open Source Base Components
PPTX
TrailheaDX India : Developer Highlights
PDF
Why developers shouldn’t miss TrailheaDX India
PPTX
CodeLive: Build Lightning Web Components faster with Local Development
PPTX
CodeLive: Converting Aura Components to Lightning Web Components
PPTX
Enterprise-grade UI with open source Lightning Web Components
PPTX
TrailheaDX and Summer '19: Developer Highlights
PDF
Live coding with LWC
PDF
Lightning web components - Episode 4 : Security and Testing
PDF
LWC Episode 3- Component Communication and Aura Interoperability
PDF
Lightning web components episode 2- work with salesforce data
PDF
Lightning web components - Episode 1 - An Introduction
PDF
Migrating CPQ to Advanced Calculator and JSQCP
PDF
Scale with Large Data Volumes and Big Objects in Salesforce
PDF
Replicate Salesforce Data in Real Time with Change Data Capture
PDF
Modern Development with Salesforce DX
PDF
Get Into Lightning Flow Development
PDF
Integrate CMS Content Into Lightning Communities with CMS Connect
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Local development with Open Source Base Components
TrailheaDX India : Developer Highlights
Why developers shouldn’t miss TrailheaDX India
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Converting Aura Components to Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
TrailheaDX and Summer '19: Developer Highlights
Live coding with LWC
Lightning web components - Episode 4 : Security and Testing
LWC Episode 3- Component Communication and Aura Interoperability
Lightning web components episode 2- work with salesforce data
Lightning web components - Episode 1 - An Introduction
Migrating CPQ to Advanced Calculator and JSQCP
Scale with Large Data Volumes and Big Objects in Salesforce
Replicate Salesforce Data in Real Time with Change Data Capture
Modern Development with Salesforce DX
Get Into Lightning Flow Development
Integrate CMS Content Into Lightning Communities with CMS Connect

Recently uploaded (20)

PPTX
sap open course for s4hana steps from ECC to s4
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
Teaching material agriculture food technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
sap open course for s4hana steps from ECC to s4
“AI and Expert System Decision Support & Business Intelligence Systems”
The Rise and Fall of 3GPP – Time for a Sabbatical?
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Teaching material agriculture food technology
Unlocking AI with Model Context Protocol (MCP)
20250228 LYD VKU AI Blended-Learning.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation_ Review paper, used for researhc scholars
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...
Understanding_Digital_Forensics_Presentation.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Programs and apps: productivity, graphics, security and other tools
Review of recent advances in non-invasive hemoglobin estimation
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Security Best Practices for Mobile Development

  • 1. Security Best Practices for Mobile Development Mobile SDK Entity Framework and SmartStore Tom Gersic, Salesforce.com Director, Mobile Services Delivery @tomgersic
  • 2. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 3. Tom Gersic Director, Mobile Services Delivery @tomgersic
  • 4. Agenda • Fundamental Principles • What iOS and Android Share • iOS Specific Characteristics • Android Specific Characteristics • Salesforce Mobile Offerings
  • 5. Who thinks the data on their phone is secure?
  • 12. Separation of Concerns – Principle of Least Privilege
  • 15. Libtiff Image Exploit / Jailbreak • iPhone 1 – patched in 1.1.2 • Tiff buffer overflow • No DEP/ASLR – nothing to prevent executing code on the heap • Gained root access from viewing an image on the web
  • 17. iOS 7 Lock Screen Bypass
  • 19. “Bluebox Uncovers Android Master Key -- 2013”
  • 20. Concatenated SMS Exploit – Charlie Miller
  • 21. Concatenated SMS Exploit • Takes 519 SMS messages – all but 1 is invisible • Send message -1 of X to underflow the array buffer • Can’t be stopped by the user • Used to write an entire binary executable to the heap, and run it, taking over the phone.
  • 23. But most of the time…
  • 24. Data Security – Hardware Encryption Requires PIN/Passcode on both iOS and Android On iOS, apps opt-in Supported on ▪ iPhone 3GS w/ iOS v4+ (AES 256 bit) ▪ Android Honeycomb+ (AES 128 bit) • Some manufacturers increase to AES 256 bit (Samsung SAFE) SD Card encryption on Android is manufacturer specific.
  • 30. iOS Sandbox • All apps (Apple’s and App Store) run as “mobile” user. • Sandboxing is bolted on -- handled via XNU Sandbox “Seatbelt” kernel extension. • Applications run in separate subdirectories of /private/var/mobile/Applications • Any app in this directory is loaded with “container” (sandboxed) profile.
  • 31. Android Sandbox • Uses underlying Linux security model • Every app runs as a separate user • Apps signed by the same developer can run as the same user, if desired (not the default, though) • Every app runs in its own instance of the Android Runtime (Dalvik Virtual Machine) • Like iOS, every app has its own directory structure • SD Card, though, is generally public – accessible to all apps and unencrypted unless manufacturer has added encryption (Samsung SAFE)
  • 32. Background Processing • iOS 6: • Audio Streaming (Spotify, Pandora) • GPS / Navigation • VOIP • Newsstand app content downloading • Hardware integrations (bluetooth, other external accessories) • iOS 7 • 10 3 minute window after app closes to finish any task. • Background Fetch • Remote Notifications • Background Transfer Service
  • 34. Background Processes / App Interaction
  • 35. Types of Android Components ▪ Activities ▪ Intent ▪ Service ▪ Content Provider ▪ Broadcast Receiver
  • 36. Public / Private Components
  • 37. But what about custom keyboards?
  • 43. Application Encryption • Encrypt your data yourself using PIN / Passcode • CoreData/SQLCipher ▪ NSIncrementalStore ▪ Good Dynamics • FMDB/SQLCipher ▪ Salesforce Smartstore
  • 44. Jailbreak Detection • Sandbox integrity check: fork() should fail • Check for jailbreak files: ▪ /Applications/Cydia.app ▪ /Library/MobileSubstrate/MobileSubstrate.dylib ▪ /var/cache/apt ▪ /bin/sh ▪ /bin/bash
  • 47. Enable ASLR in Your App • ASLR: Address Space Layout Randomization
  • 48. Stack Canaries • AKA Stack Smashing Protection • Protect against buffer overflows • Places random known value (canary) before local variables • Use Apple LLVM – won’t work with LLVM GCC
  • 49. Hide Data from App Snapshot Images
  • 50. Who STILL thinks the data on their phone is secure?
  • 51. Tom Gersic Director, Mobile Services Delivery @tomgersic
  • 52. We want to hear from YOU! Please take a moment to complete our session survey Surveys can be found in the “My Agenda” portion of the Dreamforce app