-
-
Notifications
You must be signed in to change notification settings - Fork 255
update(blog)!: Add iOS vs Android Security article #3140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
friadev
wants to merge
70
commits into
privacyguides:main
Choose a base branch
from
friadev:iOS-vs-android
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
505fcd9
update(blog)!: Add iOS vs Android Security: What Each Can Learn from …
friadev 6d2c977
add app store
friadev f80d561
style: Shorten links
redoomed1 10d2844
add alternate OS support
friadev b25b9f4
update timestamp
jonaharagon 3b6d03b
Spell/grammar pass
jonaharagon 156e98d
add permissions
friadev 871960e
fix unfinished sentence
friadev 730ffd6
add ios security scoped files info
friadev 99279dd
update wired accessories for ios
friadev 6a31254
add apple security research device program
friadev 12192f1
change "root" to unlock bootloader
friadev 5530f65
add link for unlocking bootloader
friadev 109478a
add security research to android section
friadev 18fe537
add google play services
friadev ebc7c4e
add link to android full filesystem access
friadev ca3305e
Apply minor suggestions from code review
redoomed1 d27f271
style: Undo slight wording change
redoomed1 890795b
style: Fix typo
redoomed1 0e3553a
wording/capitalization
friadev 89c2650
wording
friadev 8a4bf22
wording
friadev 7815c9e
add profile info
friadev 64e7d6c
add insider attack resistance
friadev d90c3c7
add browser
friadev 4885fba
wording
friadev b0e0aa9
wording
friadev 5b87b21
wording
friadev 74866f9
wording
friadev 3d687ff
wording
friadev 4bdcdc1
wording
friadev ba36368
wording
friadev 5ffbd8d
link to android documentation for verified boot
friadev 3242e37
wording
friadev 20ecbd3
wording
friadev b729f43
wording
friadev cedcb1c
wording
friadev 82737a6
wording
friadev da03a71
wording
friadev d2be31d
wording
friadev 96bc36d
wording
friadev d71dfc6
wording
friadev 3880203
wording
friadev ad24f5e
wording
friadev 9fe5005
wording
friadev 4a10a72
wording
friadev cb7e57a
Merge branch 'privacyguides:main' into iOS-vs-android
friadev 6397966
add ios kernel
friadev 25f8665
add memory safety
friadev 8a481d3
add memory safety for linux
friadev da572b2
replace facebook with samsung notes
friadev e0f177b
fix typo
friadev d78aa38
add swift on server link
friadev 948a742
remove unnecessary line
friadev 78f32cf
add android release cycle notes
friadev ed92a35
elaborate on android release cycle
friadev 3652879
fix typo
friadev 6dd63b5
add mention of no alternate browser engines on ios
friadev 1cf5a7a
add app fingerprinting
friadev a935afe
add info about ios fingerprinting
friadev e8cc8d8
add more ios fingeprinting info
friadev 88e94a3
android app fingerprinting
friadev 90d5a01
fix typo
friadev b1d115d
add play protect info
friadev 27d8628
add advanced protection info
friadev e0e0ae1
add apple's app store whitepaper
friadev d6d7dbc
add play store criticism
friadev dbd6364
add more app store details
friadev 9a3f8f3
Merge branch 'main' into iOS-vs-android
friadev e9a7b9d
add optional app hardening
friadev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| --- | ||
| date: | ||
| created: 2025-05-19T20:15:00Z | ||
| categories: | ||
| - Opinion | ||
| authors: | ||
| - fria | ||
| tags: | ||
| - Security | ||
| - iOS | ||
| - Android | ||
| preview: | ||
| --- | ||
|
|
||
| # iOS vs Android Security: What Each Can Learn from the Other | ||
|
|
||
| Both Android and iOS run on the vast majority of our mobile devices, meaning they are entrusted with our most sensitive data. While they trade blows, there are areas where the two differ in security features and philosophy.<!-- more --> | ||
|
|
||
| ## Source Model | ||
|
|
||
| One of the most glaring differences is the source model of each operating system: iOS is *mostly* closed source while Android is *mostly* open source, I'll get to what I mean by that in a bit. | ||
|
|
||
| ### iOS | ||
|
|
||
| iOS is a closed-source operating system, but it's based on the open-source [XNU kernel](https://github.com/apple-oss-distributions/xnu). The kernel handles almost everything on the operating system, so it's good that such a vital component is openly available to examine and do what you want with. | ||
friadev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| It's important to note that being open-source doesn't [inherently make software secure](https://seirdy.one/posts/2022/02/02/floss-security/), but it can be helpful for anyone wanting to audit the code. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| I'd like to see Apple realease its entire operating system as open source in order to foster a spirit of openness and allow for [reproducible builds](https://reproducible-builds.org), allowing third parties to verify that the downloaded binaries match the released source code. As of now, that's impossible thanks to iOS's closed nature. A fully open-source iOS would also be the first step in third-party | ||
|
|
||
| ### Android | ||
|
|
||
| The beating heart of Android is the [Android Open Source Project](https://source.android.com) (AOSP). AOSP is essentially a complete open-source mobile operating system on its own. Android was designed from the beginning to be used by lots of different companies for their own mobile phone offerings, so the open nature is useful toward that goal. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| However, AOSP is only a barebones operating system. OEMs are expected to add their own proprietary components to make their own, custom user experience. This is why most Android phones you buy are full of proprietary software like Facebook and other OEM software; companies that sell Android phones mainly use AOSP as a secure base to then run on their phones with proprietary drivers and their own custom Android. While the openness of AOSP is great, the OEMs making the phones ultimately ruin it. | ||
|
|
||
| Because AOSP is open source though, non-OEM third parties such as [GrapheneOS](https://grapheneos.org) have made their own fully open-source Android operating systems. GrapheneOS supports [reproducible builds](https://grapheneos.org/build#reproducible-builds). | ||
friadev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Many custom AOSP operating systems, while being open source, actually reduce security from AOSP through delayed updates and not supporting important Android security features like [Verified Boot](https://source.android.com/docs/security/features/verifiedboot) (this problem applies to many open source Android operating systems, but not GrapheneOS as they explicitly aim to never downgrade security from AOSP). | ||
friadev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| A problem inherent to being downstream of AOSP, third-party operating systems also must wait for Google to [ship patches and updates](https://x.com/grapheneos/status/1964561043906048183) for them to apply. Ultimately they are up to the whims of the upstream project which is not ideal. | ||
friadev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Hardware | ||
|
|
||
| Hardware is vital to security. Modern smartphones are complicated, with lots of different processors and components, all runnng their own firmware and with their own potential security vulnerabilities. It's important to lock down these components as much as possible. | ||
|
|
||
| ### iOS | ||
|
|
||
| Apple makes their own SoC on their platforms, which affords them a lot of control over how it works. You can read about how they integrate their hardware tightly on their [Apple Platform Security](https://support.apple.com/guide/security/hardware-security-overview-secf020d1074/web) page. | ||
|
|
||
| Apple has started to replace other components as well, with their newest phones boasting their N1 wireless chip that handles WiFi, Bluetooth, and Thread connectivity as well as their in-house cellular modem. Apple has a lot of control over the components in their phones which avoids supply-chain issues that other OEMs run into, with each third-party component relying on a third party to [patch security vulnerabilities](https://www.binarly.io/blog/the-firmware-supply-chain-security-is-broken-can-we-fix-it) and fix bugs in their firmware. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|  | ||
|
|
||
| <small aria-hidden="true">Photo: [Binarly](https://www.binarly.io/blog/the-firmware-supply-chain-security-is-broken-can-we-fix-it)</small> | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Apple can deal with vulnerabilities themselves when they're reported instead of waiting for a third party to fix it. According to their [docs](https://support.apple.com/guide/security/peripheral-processor-security-seca500d4f2b/1/web/1): | ||
friadev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| >Whenever possible, Apple works to reduce the number of peripheral processors necessary and to avoid designs that require firmware. But when separate processors with their own firmware are required, efforts are taken to help ensure an attacker can’t persist on that processor. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| They take care to reduce attack surface by disabling debug interfaces and signing the firmware with keys stored in Apple's own hardware security modules. | ||
|
|
||
| Apple also supports all the important hardware security features you'd want, like a [Secure Element](https://support.apple.com/guide/security/secure-enclave-sec59b0b31ff/1/web/1) for secure cryptography and secret storage, secure [biometric hardware](https://support.apple.com/guide/security/biometric-security-sec067eb0c9e/1/web/1) including 3D face scans for Face ID, hardware-backed [indicator lights](https://theapplewiki.com/wiki/Secure_Indicator_Light) for camera and microphone, [hardware killswitches](https://support.apple.com/guide/security/hardware-microphone-disconnect-secbbd20b00b/1/web/1) for the microphone on iPads, and [MTE](https://security.apple.com/blog/memory-integrity-enforcement/) for their latest iPhones. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Processors that deal with networking are isolated via an [IOMMU](https://support.apple.com/guide/security/security-features-connecting-wireless-sec8a67fa93d/1/web/1#sec7e0184776) so that they can't access each others' memory. | ||
|
|
||
| Overall, Apple does an excellent job with hardware security, most Android OEMs could stand to learn from them. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Android | ||
|
|
||
| Because Android is used by so many different OEMs, you often don't know what you're getting in terms of hardware security. Android devices, particularly cheaper phones, often lack security features such as a [secure element](https://developer.android.com/privacy-and-security/keystore) or [MTE support](https://developer.android.com/ndk/guides/arm-mte#hwsupport). | ||
|
|
||
| There aren't really many examples in the Android world of an OEM with the same level of control over their hardware as Apple. Most Android OEMs are going to use third party SoC's and other components, which introduces possible supply chain issues with trusting third-party firmware and potential delays with security updates. | ||
|
|
||
| ## App Store | ||
|
|
||
| Android and iOS have very different approaches in terms of downloading and acquiring apps. | ||
|
|
||
| ### iOS | ||
|
|
||
| iOS restricts app downloads to their own App Store. Apple claims this is for security purposes, but it restricts user freedom and makes it possible for Apple to [censor](https://9to5mac.com/2024/09/28/apple-cooperating-with-russia-to-remove-vpn-apps-from-app-store/) apps in certain regions. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The App Store does enforce certain [security](https://support.apple.com/guide/security/about-app-store-security-secb8f887a15/1/web/1) properties, mainly through the App Review process. This process can't catch everything though, and [malware](https://securelist.com/sparkcat-stealer-in-app-store-and-google-play/115385/) still slips through the cracks. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The lack of third-party app store support means that it's not possible to use an app store with better security properties than the Apple App Store. For example, apps in the App Store have Apple's DRM, which makes reproducible builds [impossible](https://github.com/signalapp/Signal-iOS/issues/641#:~:text=So%20while%20truly%20reproducible%20builds%20are%20not%20possible). If one wanted to use an app store without this security regression, they'd be out of luck. | ||
|
|
||
| One positive of the App Store though is they enforce things like a [minimum SDK](https://developer.apple.com/app-store/submitting/) requirement. Apps built targetting earlier SDK's can be missing newer security improvements and potentially have access to more data. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| In the EU, Apple was forced to allow [third-party app stores](https://developer.apple.com/support/dma-and-apps-in-the-eu/) and sideloading in iOS. In order to accomodate the extra security risk, they implemented the same [notarization](https://developer.apple.com/documentation/Security/notarizing-macos-software-before-distribution) feature from macOS. It would be nice to see them roll this out globally, but it seems to be locked to the EU for now. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Android | ||
|
|
||
friadev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Android takes the opposite approach and lets you simply download and run apps from the internet. This gives you much more freedom as a user but could potentially open you up to more malicious apps, for example apps that abuse [accessibility permissions](https://blog.pradeo.com/accessibility-services-mobile-analysis-malware) to gain deep access to your device. | ||
redoomed1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The Google Play Store sets a strict [SDK level requirement](https://developer.android.com/google/play/requirements/target-sdk), but apps downaloaded outside the Google Play Store have much more leniency. Sideloaded apps can target very old SDK levels, which means they won't have the same security restrictions as apps targetting newer SDK's. The biggest restriction that seems to exist in the OS preventing running older SDK's is if an app targets an SDK at or below Android 5.1 (!?) you'll get a warning message. For reference, Android 5 came out in 2014. | ||
|
|
||
| I think Android could stand to enforce a higher SDK level and simply refuse to run apps that target lower than say a few versions ago. There's no reason to support apps that think they're on Android 5. | ||
|
|
||
| GrapheneOS raises the minimum SDK from AOSP. | ||
friadev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Because of Android's support for third-party app stores, it's possible to use an app store with superior security to the Google Play Store. [Accrescent](https://accrescent.app) is just such an example. | ||
redoomed1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Accrescent allows for developers to control their own signing keys, and doesn't require an account, among other improvements. This is an improvement over the Google Play Store where Google controls the signing keys and you need a Google account to use it. | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.