Mobile Device Security
Portable threats
Paul Krzyzanowski
May 3, 2025
Introduction
Mobile phone security has evolved into a multi-layered system that combines hardware protections, operating system enforcement, and strict application controls. Initially, mobile phone security mechanisms were minimal. Early mobile phones had limited functionality and were not compelling targets for attackers; there simply wasn’t much incentive to break into them.
That changed with the emergence of smartphones, which increased the value of data stored and transmitted on mobile devices. The first wave of smartphones, including devices from BlackBerry, Nokia, Sharp, and IBM, had limited functionality and lacked support for third-party apps. Even when Apple introduced the iPhone in 2007, it did not support third-party applications; Steve Jobs initially expected users to rely on web apps.
This changed in 2008 with the launch of the Apple App Store, which allowed third-party apps to be installed on iPhones. That same year, the first Android device, the HTC Dream, was released, along with the Android Market (later renamed Google Play).
Since then, smartphone usage has exploded. There are now over 7 billion smartphone users globally. For many, the smartphone is their primary—and in some regions, their only—means of accessing the internet. As of today, Google Play hosts over 2 million apps, and Apple’s App Store has around 1.9 million. This massive user base and expansive app ecosystem create an enormous attack surface and many incentives for bad actors to get in.
Mobile platforms must defend against threats targeting both the operating system and the wide variety of third-party applications.
Because of this, mobile operating systems have been early adopters of certain security mechanisms at scale. For example, application sandboxing, a technique originally developed in 1993 to isolate faults, was first implemented at scale in Android, making it the first mainstream operating system to enforce full app-level isolation by default.
In the sections that follow, we’ll take a brief look at the key security mechanisms that emerged in mobile phones, with brief overviews on how they are implemented in modern iOS and Android systems. As a disclaimer, we’ll be taking broad strokes in this overview. There’s a lot of detail and a lot of nuance behind each of the items.
SIM-Based Network Authentication
SIM-based network authentication is a mechanism for verifying a device’s identity to the cellular network using a SIM card. The SIM card stores a unique secret key shared with the mobile carrier. When connecting to the network, the device performs a cryptographic challenge-response exchange using this key. This ensures that only valid subscribers can access the mobile network.
Both Android and iOS rely on the SIM card for cellular authentication and do not manage this process at the OS level; it is implemented at the baseband processor level and was standardized early in the history of mobile phones across GSM and LTE protocols.
Device Locking
Device locking restricts access to the phone’s user interface and stored data through mechanisms such as PINs, patterns, or biometrics. Initially, these locks only prevented interface access but did not protect stored data.
Modern phones tie device unlocking to cryptographic key release, enabling decryption of stored content. Both iOS and Android now support this model.
iOS integrates the lock mechanism with its Secure Enclave (we’ll discuss that) to release encryption keys upon successful authentication. Android uses a similar approach with keys stored in the TEE (we’ll discuss this along with the Secure Enclave) or hardware-backed keystore, especially in devices meeting Android’s hardware security requirements.
Application Sandboxing
Sandboxing isolates apps from one another and from system components. Each app runs in its own process space with distinct permissions.
On Android, this is enforced through Linux user IDs (UIDs), assigning each app a unique UID to enforce process and file separation.
iOS implements sandboxing using the App Sandbox, which relies on operating system sandboxing of system calls, entitlements that restrict operations that can be requested from system APIs, and a mandatory access control system to restrict file access and communication. While implementation differs, both platforms achieve strong app-level isolation to contain malicious behavior.
Code Signing
Code signing allows the system to verify the integrity and origin of executable code.
iOS requires all apps to be signed with a certificate from Apple. This prevents execution of unauthorized code and is enforced by the secure boot chain.
Android originally allowed self-signed apps, but now enforces stricter signing rules, particularly for apps in the Play Store. Modern Android versions validate app signatures during installation and verify updates against the same signature, ensuring app continuity and trust.
App Store Vetting and Controlled Distribution
Controlled app distribution reduces malware risk by vetting apps before users install them.
iOS enforces a strict model where all apps must come through the App Store and be signed by Apple.
Android uses Google Play Protect to scan apps submitted to the Play Store for malicious behavior and enforce policy compliance. While Android permits sideloading, it warns users of the associated risks and allows enterprises to control installation behavior.
Permissions Model
The permissions model governs app access to system resources like location, sensors, and user data.
Android originally required users to accept permissions at install time, which often led to overpermissioned apps. Since Android 6.0, apps must request permissions at runtime.
iOS has always enforced runtime permission requests for sensitive features. Both platforms now allow users to review, grant, and revoke individual permissions, increasing transparency and user control.
Full Disk and File-Based Encryption
Encryption ensures that user data is protected from unauthorized access.
iOS encrypts all data using keys derived from the hardware UID and passcode, supported by the Secure Enclave.
Android initially used full-disk encryption (FDE), where a single key protected the entire disk. Android 7 introduced file-based encryption (FBE), allowing different files to be encrypted with separate keys, some of which are only accessible after user authentication. Modern Android devices with hardware support store keys in the TEE.
Secure Boot and Verified Boot
Secure boot verifies each stage of the boot process using cryptographic signatures to ensure only trusted code runs.
iOS enforces this using a hardware root of trust that validates each boot component up to the kernel.
Android uses a similar process known as Verified Boot, which checks the bootloader, kernel, and system partitions, and may display warnings or block booting if tampering is detected. This prevents persistent low-level malware such as bootkits.
SELinux and Mandatory Access Controls (MAC)
Mandatory Access Control (MAC) systems enforce fine-grained access rules even for privileged processes. Android uses SELinux in enforcing mode since version 5.0, applying policies to limit the behavior of apps and system services. iOS uses a proprietary MAC system with similar goals, enforced through sandboxing and entitlements. These controls reduce the risk of privilege escalation and isolate system components.
Anti-Exploit Technologies
Anti-exploit mechanisms make successful attacks more difficult. Both iOS and Android implement Address Space Layout Randomization (ASLR), Data Execution Prevention (DEP), and stack canaries. Control Flow Integrity (CFI) is also used to prevent control flow hijacking. These features complicate the development of reliable exploits and reduce the success rate of common attack techniques like buffer overflows.
Trusted Execution Environment (TEE) / Secure Enclave
The TEE is a secure area of the main processor designed to execute sensitive code in isolation from the main OS. Android commonly uses ARM TrustZone to implement its TEE, while Apple uses the Secure Enclave, a separate coprocessor.
Both environments manage encryption keys, biometric data, and authentication processes.
Because they are isolated from the primary OS, a compromise of the main system does not expose secrets stored or processed in the TEE.
Hardware Key Attestation and Keystore
Hardware key attestation provides cryptographic proof that keys are generated and stored securely in hardware.
iOS uses the Secure Enclave to generate non-exportable keys accessible only to authorized processes. For public key algorithms, private keys will not leave the Secure Enclave while the corresponding public keys may be exported. Data streams are fed into the Secure Enclave or TEE for encryption, decryption, and signing.
Android exposes keystore APIs that leverage the TEE or secure element to generate and protect keys. Attestation allows apps to confirm that cryptographic operations are hardware-backed and not subject to tampering.
Biometric Authentication
Biometric authentication provides a convenient means of verifying the user’s identity using fingerprints or facial recognition.
iOS processes biometrics in the Secure Enclave, ensuring the biometric template never leaves the secure coprocessor.
Android devices with strong biometric implementations use the TEE or a secure element to process and store biometric data. In both cases, biometrics unlock encryption keys rather than authenticating directly to the OS, minimizing exposure.
Remote Wipe and Device Management
Remote wipe allows users or administrators to erase device data in case of loss or theft.
Apple’s Find My iPhone and Google’s Find My Device offer location tracking, remote lock, and wipe capabilities.
Both iOS and Android support enterprise-level Mobile Device Management (MDM), enabling administrators to enforce encryption, manage app installations, and apply security policies to enrolled devices.
Conclusion
Taken together, these security mechanisms form a comprehensive security architecture that protects mobile devices from a wide range of threats. By combining hardware-backed protections, strict OS controls, and tightly regulated app ecosystems, mobile platforms achieve a high standard of security compared to most traditional computing environments.