CSEC3616Cybersecurity Engineering

    macOS, Windows, iOS and Android

    How four real operating systems enforce access control: Unix permissions and TrustedBSD on macOS, the Security Reference Monitor on Windows, the Biba-like sensor rule and trust-on-first-use on iOS, and UID isolation and manifest permissions on Android.

    • State each platform's core access-control mechanism: TrustedBSD, the Security Reference Monitor, per-service capability grants, and Linux UID isolation.
    • Explain the Biba-like read-only rule for iOS sensor data.
    • Describe trust-on-first-use and why Android adopted it in version 6.
    • Explain why developers misusing Android public storage compromises confidentiality.

    20 min read

    Intuition

    Every operating system in this module answers the same question: which principal may do what to which resource. Four platforms, macOS, Windows, iOS and Android, answer it with four different mechanisms, shaped by each one’s own history and threat model. A phone’s biggest risk is a malicious app; a shared workstation’s biggest risk is another logged-in user. The mechanisms below follow directly from which risk each platform was built to manage.

    Mechanism

    macOS is built on FreeBSD, so its file-level permissions are close to standard Unix, with files additionally carrying attributes and ACLs. A separate BSD layer enforces memory protection between applications, which is why a wedged app can be force-quit without rebooting the whole system. macOS also has Keychain, which stores extra passwords and some ACLs, and built-in network authentication support such as Kerberos. The root account is disabled by default; users in the wheel group can su to root and are prompted for the root password when they install software. Since version 10.5 (Leopard), macOS has been built on TrustedBSD, a BSD variant that adds mandatory access control mechanisms specifically to protect core system components from tampering by malware, a real-world instance of the MAC model from the earlier topic in this module.

    Mechanism

    Windows replaces Unix’s three rwx bits with a much larger, finer-grained permission set, including things like Traverse Folder/Execute File, List Folder/Read Data, and Read Attributes. The unit’s own sources disagree on the exact count: the notes say 13 kinds, the slides say “15-16 (!)”. Both agree on the consequence: that much granularity, however secure the defaults, creates more surface for a configuration error to slip through unnoticed. Windows enforces this model through the Security Reference Monitor (SRM), a trusted component responsible for making the fine-grained checks.

    Mechanism

    iOS is Unix-based. Apps request a capability to access a device service, the mobile network, the phone, SMS, the camera, the first time they actually try to use it, and the request is granted only if the user consents. Sensor values are read-only to apps, “reflecting principles similar to the Biba model”: an app can read a sensor’s current value but never alter it, the same one-directional flow Biba’s integrity rules enforce, without iOS running a formal Biba policy. iOS backs this with hardware support, signed software and encryption, and sandboxes each app so it cannot reach another app’s files. Apps run in a non-privileged mode, and the OS itself is read-only to them.

    Mechanism

    Android is Linux-based, and its enforcement mechanism is the same UID isolation covered on the Unix permissions page: each app runs under its own user ID, so the ordinary Linux file-permission machinery keeps one app from reading another’s data and bounds how much shared memory or CPU any single app can consume. Permissions in the manifest function as capabilities, granting access to device services such as SMS, the camera and the address book. Apps ship as signed .apk packages; where Apple signs iOS apps itself, Android’s verification keys are self-signed certificates that identify the developer rather than a central authority, supporting update integrity while keeping the ecosystem open.

    Exam detail

    Android’s permission model changed shape in version 6. Earlier versions asked for every declared permission, dangerous or not, all at once at install, and in practice most users just clicked through: the lecture’s own example is a flashlight app demanding address-book access purely because that data could be sold. Android 6 moved to trust on first use, described in the lecture as “the Apple model”: an app requesting one of the “dangerous” permissions, those able to spend money or compromise personal data, is prompted only at the moment it first tries to use that capability. Apps compiled for earlier API levels still demand everything up front at install.

    Threat

    Android storage comes in two forms, app-internal and public, and the lecture points to evidence that developers misuse the public form for data that should stay private. Public storage is easier to work with precisely because it grants write access to everyone, but that same openness means everyone can also read from it. Data placed there for convenience is exposed to every other app on the device, not just the one that wrote it.

    Control

    The fix available to a developer is simply to use app-internal storage for anything sensitive, keeping it outside any other app’s reach. At the platform level, the dangerous-permission consent model and trust-on-first-use give a user visibility into what an app is asking for and a chance to refuse before it gets device-wide capabilities, and Google Play screens apps for malware as a backstop, even though its review is looser than Apple’s.

    Compare

    Apps are sandboxed from each other by the OS directly: no access to another app’s files, non-privileged execution, the OS itself read-only to apps. Apps are signed by Apple, and sensor data is read-only to every app.

    Apps are isolated by the same mechanism that separates human Unix users: each app is its own UID, so ordinary Linux file permissions do the separating. Apps carry self-signed certificates identifying the developer, not Apple or Google, as the signer.

    Pitfall

    “Capability” means two different things across this module. Here, on iOS and Android, it names one specific permission grant, camera access, SMS access, and so on. Earlier in the module it names a way of storing the whole access matrix, by subject rather than by object. An app’s full set of granted permissions is, in that earlier sense, exactly its capability-list row, but a question about the access matrix wants that storage-level meaning, not “which device features can this app use.”

    Recall

    Which mobile platform's approach did Android version 6 adopt for requesting dangerous permissions, and what actually changed?

    Android adopted trust on first use, the model the lecture attributes to Apple’s iOS: a dangerous permission is now requested at the moment an app first tries to use the corresponding service, rather than all permissions being approved in one step at install time.

    Aside

    macOS’s move to TrustedBSD is a genuine real-world example of mandatory access control from the earlier DAC/MAC topic in this module: it exists specifically so malware cannot tamper with core system components, a guarantee that has to hold regardless of what any individual user, or even an admin account, tries to do.