{"id":78,"date":"2020-03-14T19:23:44","date_gmt":"2020-03-14T10:23:44","guid":{"rendered":"https:\/\/erkanyildiz.me\/blog\/?p=78"},"modified":"2025-03-07T00:24:49","modified_gmt":"2025-03-06T15:24:49","slug":"what-happens-on-your-iphone-stays-on-your-iphone-really","status":"publish","type":"post","link":"https:\/\/erkanyildiz.me\/blog\/what-happens-on-your-iphone-stays-on-your-iphone-really\/","title":{"rendered":"&#8220;What happens on your iPhone, stays on your iPhone&#8221; really?"},"content":{"rendered":"<p>Even though Apple occasionally comes up with vulnerabilities that cause data leaks, it is generally known for attaching great importance to privacy policies in its products.<br \/>\nEspecially <a href=\"https:\/\/support.apple.com\/en-us\/HT210318\" title=\"Sign in with Apple\">Sign in with Apple<\/a> feature announced with iOS 13, is one of the latest examples of this.<br \/>\nHowever, when it comes to data security and privacy, not everything may go as Apple intended.<br \/>\nLet's touch upon what a malicious app developer or <a href=\"https:\/\/appfigures.com\/explorer\/mobile-sdks\" title=\"various SDKs\">various SDKs<\/a> innocently added to the apps can do without any permission from the user or abuse various permissions granted:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/user-images.githubusercontent.com\/1222652\/76614579-45a0ad80-6518-11ea-8083-ec3b92c5e1d3.JPG\" alt=\"What happens on your iPhone, stays on your iPhone.\" title=\"What happens on your iPhone, stays on your iPhone.\" \/><br \/>\n<sub><sup>Photo credit: <a href=\"https:\/\/twitter.com\/chrisvelazco\/status\/1081330848262062080\">Chris Velazco<\/a><\/sup><\/sub><\/p>\n<h3>Paste Board<\/h3>\n<p>Paste Board is the unit where copy-paste operations are managed on iOS.<br \/>\nAll apps can read copied text or images from here without any permission.<br \/>\nIt does not matter whether the app is actively on the screen or in the background, it just needs to be running.<br \/>\nAn explicit action such as &quot;paste&quot; command by the user is also not required.<br \/>\nSo, text or images copied by the users are vulnerable to abuse.<\/p>\n<p>In addition, apps can write their own text or images to the Paste Board, without user's consent.<br \/>\nThus, things that may put the user in a difficult situation can be placed to the Paste Board, as if the user copied them.<\/p>\n<p>For technical details, please see <a href=\"https:\/\/developer.apple.com\/documentation\/uikit\/uipasteboard?language=objc\">Apple's docs<\/a>.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2020, Apple announced that there will be a notification banner, if an app reads data from Paste Board on iOS 14+.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2022, Apple announced that there will be permission dialog, if an app attempts to read data from Paste Board on iOS 16+.<\/p>\n<h3>Photos<\/h3>\n<p>Apps that are granted photos access, along with all the photos, can also access the data embedded in these photos such as location and time.<br \/>\nHence, regardless of location permission, apps can obtain location info both retroactively and continuously as the user keeps taking photos.<\/p>\n<p>With iOS 11, Apple had announced a solution that could partially work.<br \/>\nA photo selection UI component called <code>UIImagePickerController<\/code>, designed to give only the selected photos to the app once, instead of granting access to all photos forever.<br \/>\nHowever, since Apple does not force the use of this component, it is not preferred by the app developers and the apps often require unnecessary full photos access.<\/p>\n<p>For technical details, please see <a href=\"https:\/\/github.com\/KrauseFx\/detect.location\/issues\/6\">this issue on GitHub<\/a>.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2020, Apple announced that there will be a Limited Photos Library Access mode (<code>PHAuthorizationStatusLimited<\/code>) on iOS 14+.<\/p>\n<h3>Microphone<\/h3>\n<p>Apps that are granted microphone access do not have to show any warning during voice recording.<br \/>\nIf the app is recording audio while in the background or making a voice call, iOS automatically changes the color of the status bar and notifies the user visually.<br \/>\nHowever, if the app is recording audio while actively on the screen, it may not always be possible to notice this.<br \/>\nFor example, an app like WhatsApp granted microphone access for voice calls, may be recording audio, not only during the voice calls, but also while text messaging or even on its settings screen.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2020 keynote, Apple announced that there will always be an indicator dot in the status bar, while an app is recording audio on iOS 14+.<\/p>\n<h3>Camera<\/h3>\n<p>Procedure of video recording with the camera is similar to the audio recording with the microphone.<br \/>\nApps with camera permission can secretly record video while actively on the screen without any indicators.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2020 keynote, Apple announced that there will always be an indicator dot in the status bar, while an app is recording video on iOS 14+.<\/p>\n<h3>Bluetooth<\/h3>\n<p>Until iOS 13, iOS apps that are actively running could scan the surrounding Bluetooth beacons without any permission.<br \/>\nThus, with the beacons placed in points with high pedestrian traffic such as shopping malls, stadiums and public transportation, it was possible to track how much time a user spends at an exact point, with exact day and time info.<br \/>\nWith iOS 13, Apple restricted this feature, and now requiring explicit user permission to use Bluetooth.<\/p>\n<p>For technical details, please see <a href=\"https:\/\/developer.apple.com\/documentation\/corebluetooth\/cbmanagerauthorization?language=objc\">Apple's docs<\/a>.<\/p>\n<h3>WiFi SSID and Local Network<\/h3>\n<p>WiFi SSID the device is connected to can be read by all apps without any permission.<br \/>\nThis may give a clue about the user's location, especially if it is a publicly available network.<br \/>\nAlso, all the devices connected to the same local network can be scanned without any permission.<\/p>\n<p>Apple first attempted to fix this flaw with an entitlement requirement on iOS 12, then further tightened the requirements with iOS 13.<br \/>\nAs of iOS 13, apps must have location permission or be capable of network settings, to access SSID information.<\/p>\n<p>For technical details, please see <a href=\"https:\/\/developer.apple.com\/documentation\/systemconfiguration\/1614126-cncopycurrentnetworkinfo\">Apple's docs<\/a>.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2020, Apple announced that there will be a new permission for local network access on iOS 14+.<\/p>\n<h3>URL Scheme<\/h3>\n<p>URL scheme, in simple terms, is the first part of a URL and specifies its type.<br \/>\nThe best known examples are such as <code>http:\/\/<\/code>, <code>ftp:\/\/<\/code>, <code>mailto:\/\/<\/code>.<\/p>\n<p>All apps can define their own URL schemes like <code>twitter:\/\/<\/code>, <code>instagram:\/\/<\/code> <code>youtube:\/\/<\/code>, <code>nflx:\/\/<\/code>.<br \/>\nIf a URL starts with a URL scheme defined by any app, iOS will open the URL with that associated app.<br \/>\nThis feature is very important for cross-app transitions, deep linking and 3rd party login features.<\/p>\n<p>However, all apps can discover which other apps are installed on a user's device by querying if some specific URL schemes are defined or not.<\/p>\n<p>Thus, fine targeted ads becomes possible via advanced segmentations such as 'Netflix and Amazon Prime Video apps are installed on this user's device, but not there are no social media apps'.<\/p>\n<p>Although Apple has introduced some restrictions for querying URL schemes with iOS 9, this method is still technically possible as of iOS 13.<\/p>\n<p>Another important point is that there are no restrictions on which app can define which URL schemes on iOS.<br \/>\nFor this reason, a completely irrelevant app can manage to open all the URLs that start with <code>youtube:\/\/<\/code> just by defining <code>youtube:\/\/<\/code> URL scheme.<br \/>\nThis may also allow various phishing attacks.<\/p>\n<p>For technical details, please see <a href=\"https:\/\/developer.apple.com\/documentation\/uikit\/uiapplication\/1622952-canopenurl?language=objc\">Apple's docs<\/a>.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2021, Apple announced that URL schemes to be queried will be limited to 50 on iOS 15+.<\/p>\n<h3>In-App Browser<\/h3>\n<p>In some apps, the links that are clicked by user can be opened with an interface component called <code>WKWebView<\/code> (or older <code>UIWebView<\/code>) within the app, without switching to Safari app.<br \/>\nAll browsing activity inside this in-app browser can be read by the app.<br \/>\nIt can be associated with previous or future browsing activities and may be used for profile linking.<\/p>\n<p>Apple introduced the component called 'SFSafariViewController' which could be the solution to this problem with iOS 9.<br \/>\nThe browsing activity under <code>SFSafariViewController<\/code> cannot be read by the apps.<br \/>\nBut, since Apple does not force the use of this component, there are still some apps that use 'WKWebView'.<\/p>\n<p>For technical details, please see <a href=\"https:\/\/developer.apple.com\/documentation\/safariservices\/sfsafariviewcontroller?language=objc\">Apple's docs<\/a>.<\/p>\n<h3>Fingerprinting<\/h3>\n<p>Although it is not only specific to iOS devices, it may be possible to detect and track the user by collecting all kinds of permanent or dynamic info that can be obtained from the device.<br \/>\nThis includes but not limited to; selected language and region settings, time zone, device model, storage capacity, percentage of free storage, battery percentage, whether the charging cable is connected or not, operator information, device name, Apple Watch pairing status, connection type, IP address and access permission states.<\/p>\n<h3>Device Name<\/h3>\n<p>The device name is the name of the device displayed in places such as iTunes, AirDrop and Find My iPhone.<br \/>\nGenerally, it is like &quot;John's iPhone&quot; or &quot;Jane's iPad&quot;, and it can give clues about the user's name and gender.<br \/>\nIt can be read by all apps running on the device without requiring any permission.<br \/>\nIt can be set from <code>Settings<\/code> &gt; <code>General<\/code> &gt; <code>About<\/code> screen of iOS.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2022, Apple announced that User Assigned Device Name entitlement will be required to access device name on iOS 16+.<\/p>\n<h3>Operator<\/h3>\n<p>The cellular service operator name and code can be read by all apps without permission.<br \/>\nThis can give a clue about the user's whereabouts.<br \/>\nIn addition, when the user visits another country and changes SIM card, this can give clues about which country the user is visiting, even if there is no internet connection or location permission.<\/p>\n<p>For technical details, please see <a href=\"https:\/\/developer.apple.com\/documentation\/coretelephony\/ctcarrier?language=objc\">Apple's docs<\/a>.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2022, Apple announced that carrier name is deprecated and will always return &quot;--&quot; on iOS 16+.<\/p>\n<h3>NSNull<\/h3>\n<p><code>NSNull<\/code> is a singleton instance representing null values on iOS.<br \/>\nHowever, the <code>NSNull<\/code> singleton remains in system-wide memory, not application-specific.<br \/>\nTherefore, if the pointer value is printed and examined from different applications, it can be observed that it is exactly the same address.<br \/>\nThis value will change only when the device is rebooted, otherwise it will stay the same.<\/p>\n<p>Exactly the same memory address values such as <code>0x1ebe1bc30<\/code> can allow user detection and tracking even among the apps that do not belong to the same developer.<\/p>\n<p>For technical details, please see <a href=\"https:\/\/developer.apple.com\/documentation\/foundation\/nsnull?language=objc\">Apple's docs<\/a>.<\/p>\n<h3>IDFA<\/h3>\n<p>Identifier for Advertisers (IDFA) is Apple's official way for app developers to track users and serve advertisements.<br \/>\nUnfortunately, as of iOS 13 it is still enabled by default, and can be opted-out using <code>Limit Ad Tracking<\/code> switch under <code>Settings<\/code> &gt; <code>Privacy<\/code> &gt; <code>Advertising<\/code> screen of iOS.<\/p>\n<p>Until iOS 10, IDFA value was accessible even for opted-out users, and app developers were just asked to respect users' preference about it, without further limitation.<br \/>\nBut with iOS 10, IDFA value was replaced with a hardcoded <code>00000000-0000-0000-0000-000000000000<\/code> value for all opted-out users.<\/p>\n<p>For technical details, please see <a href=\"https:\/\/developer.apple.com\/documentation\/adsupport\/asidentifiermanager?language=objc\">Apple's docs<\/a>.<\/p>\n<p><strong>Update:<\/strong> On WWDC 2020, Apple announced that there will be a new permission for tracking users or accessing their device's IDFA on iOS 14.5+.<\/p>\n<h3>Keychain - iCloud - GameCenter<\/h3>\n<p>Encrypted data store Keychain, cloud data service iCloud and online gaming service Game Center, may allow developers to identify the user even after the app is deleted and reinstalled.<\/p>\n<p>In some apps that require login, this can be a convenience for the user.<br \/>\nBut it can also be used for user detection and tracking before the user logs in, or even logs in with a different account.<\/p>\n<p>While the data stored in the local Keychain is cleared only when the device is reset, iCloud and Game Center data are accessible unless the user logs out from iOS Settings.<\/p>\n<h3>Summary<\/h3>\n<p>These are some of the examples of what a malicious app developer or various SDKs in the apps can do.<br \/>\nApple regularly removes some apps from the App Store, and even terminates Apple Developer Program memberships for violating its review guidelines.<br \/>\nBut, usually this happens only if the issue is reported by the users or detected by review team by chance.<br \/>\nSo, it is always better to know the systems we use everyday, and to err on the side of caution.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Even though Apple occasionally comes up with vulnerabilities that cause data leaks, it is generally known for attaching great importance to privacy policies in its products. Especially Sign in with Apple feature announced with iOS 13, is one of the latest examples of this. However, when it comes to data security and privacy, not everything [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-78","post","type-post","status-publish","format-standard","hentry","category-development"],"_links":{"self":[{"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/posts\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/comments?post=78"}],"version-history":[{"count":42,"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":162,"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/posts\/78\/revisions\/162"}],"wp:attachment":[{"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/media?parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/categories?post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/erkanyildiz.me\/blog\/wp-json\/wp\/v2\/tags?post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}