security best practices for mobile development
DESCRIPTION
In the enterprise, mobile devices and mobile apps need to be secure. A lost or stolen phone or tablet can mean your company data falling into the wrong hands. Join us to explore the security features available on iOS and Android. Learn how app data can be compromised and learn best practices for the development of secure enterprise apps on both platforms.TRANSCRIPT
![Page 1: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/1.jpg)
Security Best Practices for Mobile DevelopmentMobile SDK Entity Framework and SmartStore
Tom Gersic, Salesforce.comDirector, Mobile Services Delivery@tomgersic
![Page 2: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/2.jpg)
Safe HarborSafe 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.
![Page 3: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/3.jpg)
Tom GersicDirector, Mobile Services Delivery@tomgersic
![Page 4: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/4.jpg)
Agenda• Fundamental Principles• What iOS and Android Share• iOS Specific Characteristics• Android Specific Characteristics• Salesforce Mobile Offerings
![Page 5: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/5.jpg)
Who thinks the data on their phone is secure?
![Page 6: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/6.jpg)
Fundamental Security Principles
![Page 7: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/7.jpg)
![Page 8: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/8.jpg)
Vulnerability
![Page 9: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/9.jpg)
Threat
![Page 10: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/10.jpg)
Consequence
![Page 11: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/11.jpg)
Mitigation
![Page 12: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/12.jpg)
Separation of Concerns – Principle of Least Privilege
![Page 13: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/13.jpg)
Security Stack
![Page 14: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/14.jpg)
Real life examples
![Page 15: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/15.jpg)
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
![Page 16: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/16.jpg)
ASLR (PIE) and DEP
![Page 17: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/17.jpg)
iOS 7 Lock Screen Bypass
![Page 18: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/18.jpg)
Fingerprint Hacking
![Page 19: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/19.jpg)
“Bluebox Uncovers Android Master Key -- 2013”
![Page 20: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/20.jpg)
Concatenated SMS Exploit – Charlie Miller
![Page 21: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/21.jpg)
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.
![Page 22: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/22.jpg)
NFC Exploit
![Page 23: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/23.jpg)
But most of the time…
![Page 24: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/24.jpg)
Data Security – Hardware EncryptionRequires PIN/Passcode on both iOS and AndroidOn iOS, apps opt-inSupported 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.
![Page 25: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/25.jpg)
Is Facebook.app Secure?
![Page 26: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/26.jpg)
App Security
![Page 27: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/27.jpg)
Layers of Defense
![Page 28: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/28.jpg)
Application Signing
![Page 29: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/29.jpg)
Application Sandboxing
![Page 30: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/30.jpg)
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.
![Page 31: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/31.jpg)
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)
![Page 32: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/32.jpg)
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
![Page 33: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/33.jpg)
iOS 7 Backgrounding
![Page 34: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/34.jpg)
Background Processes / App Interaction
![Page 35: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/35.jpg)
Types of Android Components
▪ Activities▪ Intent▪ Service▪ Content Provider▪ Broadcast Receiver
![Page 36: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/36.jpg)
Public / Private Components
![Page 37: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/37.jpg)
But what about custom keyboards?
![Page 38: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/38.jpg)
Keyboard Security Risks
![Page 39: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/39.jpg)
Except Passwords?
https://github.com/tomgersic/AndroidKeyLogger
![Page 40: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/40.jpg)
Permissions
![Page 41: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/41.jpg)
Mitigation
![Page 42: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/42.jpg)
Static Analysis Tools
![Page 43: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/43.jpg)
Application Encryption• Encrypt your data yourself using PIN / Passcode• CoreData/SQLCipher
▪ NSIncrementalStore▪ Good Dynamics
• FMDB/SQLCipher▪ Salesforce Smartstore
![Page 44: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/44.jpg)
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
![Page 45: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/45.jpg)
In-App Encryption
![Page 46: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/46.jpg)
SmartStore Stack
![Page 47: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/47.jpg)
Enable ASLR in Your App• ASLR: Address Space Layout Randomization
![Page 48: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/48.jpg)
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
![Page 49: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/49.jpg)
Hide Data from App Snapshot Images
![Page 50: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/50.jpg)
Who STILL thinks the data on their phone is secure?
![Page 51: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/51.jpg)
Tom Gersic
Director, Mobile Services Delivery@tomgersic
![Page 52: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/52.jpg)
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
![Page 53: Security Best Practices for Mobile Development](https://reader034.vdocument.in/reader034/viewer/2022051411/5457c430b1af9fba5d8b4a33/html5/thumbnails/53.jpg)
@tomgersic