Security Mechanisms for iOS

Source: Internet
Author: User

Security Mechanisms for iOS

iOS is an operating system developed by Apple for the iphone. It's mostly for iphone, IPod Touch and ipad. Just like its Mac OS X operating system, it is based on Darwin. Originally called the iphone OS, the system was renamed iOS at the WWDC Convention on June 7, 2010. The system architecture of iOS is divided into four levels: Core OS layer (the core OS layers), key service tier (the core services layer), media layer, and touch layers (the Cocoa touch layer) 。 System operation takes up about 240MB of memory space.

iOS mainly uses the following security mechanisms:

    1. Smaller attack surface
    2. Streamlined operating system
    3. Permission separation
    4. Code signing mechanism
    5. Dep
    6. Aslp
    7. Sandbox mechanism

One, the smaller attack surface

Attack Surface: The attack surface refers to the code that handles the input provided by the attacker.

Even if there is a loophole in some of Apple's code, if the attacker has no access to the code, or if Apple does not include the code in iOS, then the attacker will not be able to attack the vulnerabilities. Therefore, the key approach is to minimize the amount of code that an attacker can access, especially remotely.

For example, iOS does not support Java and Flsah, and cannot process. psd files. Apple's own. mov format is also supported only by iOS, so many. mov files that can be played on Mac OS X cannot be played on iOS. Although iOS native supports. pdf files, it only resolves some of the features of the file format.

The fewer defects, the less chance an attacker can exploit a vulnerability.

Second, the streamlined operating system

In addition to reducing the number of code that could be exploited by attackers, Apple has streamlined several applications to prevent attackers from exploiting and succeeding with exploits.

For example: There is no shell (/bin/sh) on the iOS device;

Iii. Separation of authority

iOS separates processes using user, group, and other traditional UNIX file permissions mechanisms;

For example, many applications that users can access directly, such as Web browsers, mail clients, or third-party applications, are run as user mobile. Most important system processes run as a privileged user root. Other system processes run with users such as _wireless and _mdnsresponder. With this model, the code executed by an attacker who fully controls a process such as a Web browser is limited to running as user mobile.

Apps from the App Store are limited in their behavior because they are also executed as user mobile.

Iv. Code Signing mechanism

All binary and class libraries must be signed by a trusted authority (such as Apple) before being allowed to execute by the kernel. In addition, only pages from the signed source will be executed in memory. This means that the app cannot dynamically change behavior or complete its own upgrade. This is done to prevent users from downloading and executing random files from the Internet. All apps must be downloaded from Apple's App Store (unless the device is configured to accept other sources).

V. DEP

Dep:data execution prevention, data execution protection;

The processor can distinguish which part of the memory is the executable code and which part of the memory is the data. DEP does not allow data execution, only code execution is allowed.

When a vulnerability attack attempts to run a payload, it injects the payload into the process and executes the payload. DEP does not work because the payload is recognized as data, not code.

The code signing mechanism in iOS works similar to Dep.

Liu, ASLP

Aslp:address Space layout randomization, address space allocation randomization.

In iOS, the locations of binaries, library files, dynamic link files, stacks, and heap memory addresses are all random. When the system has both DEP and ASLR mechanisms, the general method of writing the exploit code for the system is completely invalid. In practice, this usually means that an attacker would need two vulnerabilities, one for code execution, and another to acquire memory addresses to perform ROP, or an attacker would need an extremely special vulnerability to do the two points.

Seven, sandbox mechanism

The last loop of the iOS defense mechanism is the sandbox. The sandbox provides finer-grained control over the actions that the process can perform, compared to the UNIX privilege system mentioned earlier.

For example: Ms Apps and Web browsers run as user mobile, but they perform very different actions. The SMS app may not need to access the Web browser's cookie, and the Web browser does not need to access the SMS. Third-party apps from the App Store should not have access to cookies and text messages.

First, it limits the damage that malware causes to the device. Imagine that even if malware passes through the App Store review process and is downloaded to the device and started executing, the app will still be restricted by sandbox rules. It may steal all of the photos and address book information on the device, but it can't do anything like texting or making a phone call that will use the phone directly. Sandboxing also makes it more difficult to exploit attacks. Even if an attacker finds a vulnerability on a reduced attack surface and executes code bypassing ASLR and DEP, the payload is still restricted to the content that is accessible in the sandbox. All in all, although not all of these protection mechanisms will completely eliminate malware and vulnerability attacks, but also greatly increased the difficulty of the attack.

Eight, iOS jailbreak

a). through OTA ( not IOS upgraded via iTunes on PC ) upgrade to iOS7 device jailbreak is easy to appear in white apples. It is recommended that users update to the latest iOS7 system via iTunes and then jailbreak.  
b). escaped from prison after Cydia Some of the plugins installed ( such as some input methods or plugins that modify system themes ) , due to iOS7 Incompatibility causes the white Apple to appear easily, it is recommended to install and update such jailbreak plugins with caution.    
c) . Some applications do not adapt or compatibility tests for jailbreak iOS7, may also cause system crashes and white apple phenomena, and it is recommended that you carefully install optimized system settings and system-level related applications.   

However, the jailbreak will destroy all security mechanisms.

Security Mechanisms for iOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.