Your Apps and the Future of macos Security

Similar documents
What s New in Xcode App Signing

TRANSPARENCY, CONSENT, AND CONTROL

Seamless Linking to Your App

Introduction to Siri Shortcuts

Your Apps and Evolving Network Security Standards

Getting the Most Out of HealthKit

Introducing Password AutoFill for Apps

Using and Extending the Xcode Source Editor

What s New in Testing

What s New in Core Data?

Extending Your Apps with SiriKit

Content Protection for HTTP Live Streaming

Integrating Apps and Content with AR Quick Look

Enabling Your App for CarPlay

Vision Framework. Building on Core ML. Media #WWDC17. Brett Keating, Apple Manager Frank Doepke, He who wires things together

Understanding Undefined Behavior

Managing Documents In Your ios Apps

Advances in AVFoundation Playback

Mastering Xcode for iphone OS Development Part 1. Todd Fernandez Sr. Manager, IDEs

This guide illustrates how to set up an Apple device for deployment, and deploy an application. It covers how to:

Media and Gaming Accessibility

What's New in macos Mojave

What s New in watchos

Data Delivery with Drag and Drop

Monetize and Promote Your App with iad

What s New in tvos #WWDC16. App Frameworks. Session 206. Hans Kim tvos Engineer

What s New in CloudKit

Mobile Speech Recognizer

Validating HTTP Live Streams

Building for Voice with Siri Shortcuts

Finding Bugs Using Xcode Runtime Tools

Using Grouped Notifications

What s New in Core Location

Building Watch Apps #WWDC15. Featured. Session 108. Neil Desai watchos Engineer

Power, Performance, and Diagnostics

How to Join Skype Meetings

Easy Worklog for JIRA. User Manual

We need a browser that just works with modern web sites and services. I m worried about Internet security threats and the risk to my business

SureClose Product Line

Mastering Xcode for iphone OS Development Part 2. Marc Verstaen Sr. Manager, iphone Tools

Automatic Strong Passwords and Security Code AutoFill

Introducing the Modern WebKit API

Creating Audio Apps for watchos

Distributing ZENworks Mobile Management for ios as an Enterprise Application

WinPak 2 & 2005 Quick Reference

Building Faster in Xcode

Enhancing your apps for the next dimension of touch

Manual Uninstall Chrome Mac Os X Lion Google

What s New in Audio. Media #WWDC17. Akshatha Nagesh, AudioEngine-eer Béla Balázs, Audio Artisan Torrey Holbrook Walker, Audio/MIDI Black Ops

MarkLogic Server. Information Studio Developer s Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

ios 12 beta Release Notes

What s New in Device Configuration, Deployment, and Management

Localization Best Practices on tvos

iphone Development Setup Instructions Nikhil Yadav Pervasive Health Fall 2011

Installation Guide - Windows

Localizing with Xcode 9

Introducing MusicKit. Media #WWDC17. Tim Parthemore, MusicKit Services Joel Lopes Da Silva, ios Music

Policy Settings for Windows Server 2003 (including SP1) and Windows XP (including SP2)

Colligo Briefcase. for Good Technology. Administrator Guide

Distributing ZENworks Mobile Management for ios as an Enterprise Application

Core ML in Depth. System Frameworks #WWDC17. Krishna Sridhar, Core ML Zach Nation, Core ML

Salesforce.com Winter 18 Release

Introducing SiriKit. Hey Siri, say hello to apps #WWDC16. App Frameworks. Session 217

Introducing Metal 2. Graphics and Games #WWDC17. Michal Valient, GPU Software Engineer Richard Schreyer, GPU Software Engineer

Advanced Debugging and the Address Sanitizer

Xcode Release Notes. Apple offers a number of resources where you can get Xcode development support:

What s New in imessage Apps

Cloud Security Whitepaper

Advances in TVMLKit. App Frameworks #WWDC17. Trevor Cortez, Localization Engineer Parry Panesar, tvos Engineer Jeremy Foo, tvos Engineer

Mac Shutdown 4.0 User Guide

Introducing the Photos Frameworks

Integration Service. Admin Console User Guide. On-Premises

What s New in Laserfiche Web Access 10

Developing Android applications in Windows

Sophos SafeGuard File Encryption for Mac Quick startup guide. Product version: 7

Akamai Bot Manager. Android and ios BMP SDK

Start Here. Accessing Cisco Show and Share. Prerequisites CHAPTER

MOUNTAIN LION. A Quick Introduction

Creating Extensions for Safari

Mastering Drag and Drop

Getting to Know Swift Package Manager

Managing Devices and Corporate Data on ios

What's New in Core Spotlight

RUNTIME PERMISSIONS IN ANDROID 6.0 Lecture 10a

WatchKit In-Depth, Part 2

Integration Service. Admin Console User Guide. On-Premises

Apple Inc. Apple ios 11 Safari on iphone and ipad Common Criteria Configuration Guide. November Version 1.2

End User Manual. December 2014 V1.0

Engineering for Testability

Remote Deposit Capture Member User Guide. RDC Brought to you by Sprig

User Scripting April 14, 2018

Youth Stat & VEOCI Tutorials

What s New in SpriteKit

Adobe Sign for Microsoft Dynamics

Thread Sanitizer and Static Analysis

Designing Great Apple Watch Experiences

Security Philosophy. Humans have difficulty understanding risk

Salesforce1 Mobile Security White Paper. Revised: April 2014

VMware AirWatch Integration with Apple Configurator 2 Guide Using Apple Configurator 2 and AirWatch to simplify mass deployments

e180 Privacy Policy July 2018

Transcription:

#WWDC18 Your Apps and the Future of macos Security Pierre-Olivier Martel, Security Engineering Manager Kelly Yancey, OS Security Garrett Jacobson, Trusted Execution 2018 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

System Security Improvements User Consent for Data Access Enhanced Runtime Protections Developer ID and Notarized Apps

System Security Improvements

System Security Improvements Extension to System Integrity Protection Stronger code signing enforcement for platform binaries Libraries/Frameworks/Plugins loaded by system processes must be signed by Apple Exceptions for legacy system extension points

Trusted Event Dispatching Most security decisions are made through system UI User intent (open/save dialogs, drag and drop) User consent (security dialogs, configuration changes) Need to differentiate between the user deciding and software impersonating them New approval mechanism for users to enable software controlling the UI on their behalf Configurable in the Security and Privacy preference pane, in the Accessibility list

Trusted Event Dispatching

Trusted Event Dispatching Impacted APIs IOHIDPostEvent( ); IOHIDSetMouseLocation(io_connect_t connect, int x, int y); CGEvent.post(tap: CGEventTapLocation) CGEventTap.tapCreate(, options: CGEventTapOptions, ) // when called without.listenonly

Safari / WebKit Safari Sandbox adoption for the app and satellite processes WebKit Audit and removal of risky dependencies from existing sandboxes Heap and JIT hardening (isolated heaps, ) What s New in Safari and WebKit Executive Ballroom Friday 2:00PM

User Consent Enhanced Runtime Notarized Apps

User Consent for Data Access Kelly Yancey, OS Security

User Data Protections Prompting categories Location Services Contacts Calendars Reminders Photos

User Data Protections Prompting categories Location Services Contacts Calendars Reminders Photos

User Data Protections Prompting categories Location Services Contacts Calendars Reminders Photos

// User Data Protections - Prompting on Filesystem Access let picturesurl = try FileManager.default.url(for:.picturesDirectory, in:.userdomainmask, appropriatefor: nil, create: false) if let enumerator = FileManager.default.enumerator(atPath: picturesurl.path) { enumerator.foreach({ (entry) in guard let path = entry as? String else { return }... }) }

// User Data Protections - Prompting on Filesystem Access let picturesurl = try FileManager.default.url(for:.picturesDirectory, in:.userdomainmask, appropriatefor: nil, create: false) if let enumerator = FileManager.default.enumerator(atPath: picturesurl.path) { enumerator.foreach({ (entry) in guard let path = entry as? String else { return }... }) }

User Data Protections Pre-approval NEW

User Data Protections Prompting with purpose

User Data Protections Prompting with purpose

User Data Protections Info.plist keys NSLocationUsageDescription NSCalendarsUsageDescription NSContactsUsageDescription NSRemindersUsageDescription NSPhotoLibraryUsageDescription

User Data Protections Prompting categories Location Services Contacts Calendars Reminders Photos

User Data Protections All data categories Location Services Mail Contacts Messages Calendars Safari Browsing History Reminders HTTP Cookies Photos Call History itunes Backups Time Machine Backups

User Data Protections All data categories NEW Location Services Mail Contacts Messages Calendars Safari Browsing History Reminders HTTP Cookies Photos Call History itunes Backups Time Machine Backups

User Data Protections All data categories Location Services Mail Contacts Messages Calendars Safari Browsing History Reminders HTTP Cookies Photos Call History itunes Backups Time Machine Backups

User Data Protections Accessing mail data tell application "Mail"... App Mail App X Mail Data

User Data Protections Accessing mail data tell application "Mail"...? App Mail App X Mail Data

User Data Protections Accessing Mail data tell application "Mail"...? App Mail App X Mail Data

User Data Protections Automation NEW User authorization required to automate other apps via Apple Events Exceptions, including: NSWorkspace.shared.openFile( /var/log/system.log ) NSWorkspace.shared.open(URL(string:"https://developer.apple.com/wwdc/")!) NSWorkspace.shared.launchApplication("TextEdit") Manageable via the Security and Privacy preference pane

User Privacy Camera and microphone NEW

User Privacy Camera and microphone Initiating capture requires user authorization similar to ios Applies to devices supported by built-in drivers AVFoundation provides API for querying authorization status let status = AVCaptureDevice.authorizationStatus(for:.video) let status = AVCaptureDevice.authorizationStatus(for:.audio)

User Privacy Camera and microphone public enum AVAuthorizationStatus : Int { case notdetermined case restricted case denied } case authorized

User Privacy Camera and microphone AVFoundation provides API to pre-flight authorization AVCaptureDevice.requestAccess(for:.video) { (authorized) in } //... AVCaptureDevice.requestAccess(for:.audio) { (authorized) in } //...

User Privacy Info.plist keys NSCameraUsageDescription NSMicrophoneUsageDescription

User Data and Privacy Protections Recap Location Services Mail Camera Contacts Messages Microphone Calendars Safari Browsing History Automation Reminders HTTP Cookies Photos Call History itunes Backups Time Machine Backups

User Data and Privacy Protections Recap Location Services Mail Camera Contacts Messages Microphone Calendars Safari Browsing History Automation Reminders HTTP Cookies Photos Call History itunes Backups Time Machine Backups

User Data and Privacy Protections Recap Location Services Mail Camera Contacts Messages Microphone Calendars Safari Browsing History Automation Reminders HTTP Cookies Photos Call History itunes Backups Time Machine Backups

User Data and Privacy Protections Testing your apps tccutil reset Calendars tccutil reset Contacts tccutil reset Reminders tccutil reset Photos tccutil reset AppleEvents tccutil reset Camera tccutil reset Microphone tccutil reset All

User Data and Privacy Protections Summary Ensure approval prompts are presented in context Add Info.plist keys explaining the reason your app needs the user's data Access approval-gated resources from threads other than the main thread Gracefully handle failure to access approval-gated resources Be responsible with the user's personal data

Enhanced Runtime Protections Pierre-Olivier Martel, Security Engineering Manager

Enhanced Runtime NEW New opt-in mechanism available with the 10.14 SDK Enables additional protections similar to those enabled on system binaries Configurable with unrestricted entitlements Manageable from Xcode Safe to enable on binaries deployed on older versions of macos Versioning scheme in place to support future revisions of the policies

Enhanced Runtime Code signing All executable pages must be backed by a valid code signature com.apple.security.cs.allow-jit Enable access to a JIT region (MAP_JIT) com.apple.security.cs.allow-unsigned-executable-memory Enable executable mapping without a signature com.apple.security.cs.disable-executable-page-protection Disable all code signing protection

Enhanced Runtime Library validation The signature for all libraries, frameworks, and plugins validated at runtime By default, only code signed by Apple or by the same Team ID is allowed com.apple.security.cs.disable-library-validation Allow loading of libraries signed by different Team IDs

Enhanced Runtime Debugging Applications cannot debug other apps or be debugged themselves unless they explicitly declare that capability com.apple.security.get-task-allow Allow your app to be debugged com.apple.security.cs.debugger Allow your app to debug other apps com.apple.security.cs.allow-dyld-environment-variables Enable DYLD variables for your apps

Enhanced Runtime Resource access Attempts to access protected resources without predeclaring intent will result in a crash Add the appropriate entitlement for each protected resource that your apps needs to access Access still subject to user approval

Enhanced Runtime Resource access com.apple.security.device.audio-input Audio input and microphone com.apple.security.device.camera Any camera exposed via AVFoundation com.apple.security.personal-information.location Location com.apple.security.personal-information.addressbook Contacts com.apple.security.personal-information.calendars Calendars and Reminders com.apple.security.personal-information.photos-library Apple Photos library com.apple.security.automation.apple-events Sending Apple Events to other apps

Developer Workflow Xcode

Developer Workflow Xcode

// Developer Workflow Terminal # Signature $> codesign --sign Developer ID --options runtime WatchGrassGrow.app WatchGrassGrow.app: signed app bundle with Mach-O thin (x86_64) [com.acme.watchgrassgrow] # Verification $> codesign --display --verbose=2 WatchGrassGrow.app Executable=WatchGrassGrow.app/Contents/MacOS/WatchGrassGrow Identifier=com.acme.WatchGrassGrow Format=app bundle with Mach-O thin (x86_64) CodeDirectory v=20500 size=566 flags=0x10000(runtime) hashes=11+3 location=embedded Signature size=4605 Info.plist entries=22 TeamIdentifier=XXXXXXXXXX Runtime Version=10.14.0 Sealed Resources version=2 rules=13 files=20 Internal requirements count=0 size=12

Developer ID and Notarized Apps Garrett Jacobson, Trusted Execution

Identify and Block Malicious Software

App Notarization Block malicious software before distribution Keep the flexibility of the Developer ID program

Notary Service NEW Performs automated security checks on Developer ID content Optional extension to Developer ID program Developers upload distribution-ready content Development workflow prior to distribution is unchanged

Not an App Review

Development Process Local development Distribution signing and testing Distribute via website, etc

Development Process Apple Notary Service 0100 1011 NEW Local development Distribution signing and testing Distribute via website, etc

Security Requirements For new apps No malicious software All executables properly signed Opted into the enhanced runtime

Notarizing Applications Xcode

Notarizing Applications Xcode

Notarizing Applications Xcode

Notarizing Applications Xcode

Notarizing Applications Xcode

Notarizing Applications Xcode

Notarizing Applications Xcode

Notarizing Applications Xcode

Notarizing Applications Upload Notary service accepts zip files, packages, and disk images # From Terminal $> xcrun altool --eval-app Watch Grass Grow.dmg --primary-bundle-id com.acme.watchgrassgrow -u developer@acme.com -p @keychain:appleidaccount... RequestUUID = 892d6d9e-2f64-495e-b027-8e7bd73fa674. $>

Notarizing Applications Status Status output includes a log URL with helpful details # From Terminal $> xcrun altool --eval-info --uuid <UUID> -u developer@acme.com -p @keychain:appleidaccount RequestUUID: 892d6d9e-2f64-495e-b027-8e7bd73fa674 Status: 0 StatusStr: success LogFileURL: <very long link> $>

Notarizing Applications Stapling Staple tickets directly to applications, disk images, and installer packages Stapler combines ticket retrieval and attaching in one step # From Terminal $> xcrun stapler staple Watch Grass Grow.dmg... The staple and validate action worked! $>

First Launch Developer ID App Notarized Developer ID App

First Launch Developer ID App Notarized Developer ID App

First Launch Malicious App

Notarization Timeline Today Soon Mojave Future Start uploading Signing issues will Gatekeeper Gatekeeper requires your apps become errors highlights notarized notarized applications applications by default

Summary Test your app against the new user data protections Be transparent to the user about the data you need to access Adopt the new hardened runtime for additional protection Start submitting your apps to the notary service today!

More Information https://developer.apple.com/wwdc18/702 Security Lab Technology Lab 1 Tuesday 3:00PM Security Lab Technology Lab 2 Wednesday 9:00AM Signing and Distribution Lab Technology Lab 10 Thursday 9:00AM