Recent from talks
Nothing was collected or created yet.
System Integrity Protection
View on Wikipedia| System Integrity Protection | |
|---|---|
Security layers present in macOS | |
| Developer | Apple Inc. |
| Initial release | September 16, 2015 |
| Operating system | macOS |
| Included with | OS X El Capitan (OS X 10.11) and later |
| Type | Computer security software |
| Website | developer |
System Integrity Protection (SIP,[1] sometimes referred to as rootless[2][3]) is a security feature of Apple's macOS operating system introduced in OS X El Capitan (2015) (OS X 10.11). It comprises a number of mechanisms that are enforced by the kernel. A centerpiece is the protection of system-owned files and directories against modifications by processes without a specific "entitlement", even when executed by the root user or a user with root privileges (sudo).
Apple says that the root user can be a significant risk to the system's security, especially on a system with a single user account on which that user is also the administrator. SIP is enabled by default but can be disabled.[4][5]
Justification
[edit]Apple says that System Integrity Protection is a necessary step to ensure a high level of security. In one of the WWDC developer sessions, Apple engineer Pierre-Olivier Martel described unrestricted root access as one of the remaining weaknesses of the system, saying that "[any] piece of malware is one password or vulnerability away from taking full control of the device". He stated that most installations of macOS have only one user account that necessarily carries administrative credentials with it, which means that most users can grant root access to any program that asks for it. Whenever a user on such a system is prompted and enters their account password – which Martel says is often weak or non-existent – the security of the entire system is potentially compromised.[4] Restricting the power of root is not unprecedented on macOS. For instance, versions of macOS prior to Mac OS X Leopard enforce level 1 of securelevel, a security feature that originates in BSD and its derivatives upon which macOS is partially based.[6]
Functions
[edit]
System Integrity Protection comprises the following mechanisms:
- Protection of contents and file-system permissions of system files and directories;
- Protection of processes against code injection, runtime attachment (like debugging) and DTrace;
- Protection against unsigned kernel extensions ("kexts").
System Integrity Protection protects system files and directories that are flagged for protection. This happens either by adding an extended file attribute to a file or directory, by adding the file or directory to /System/Library/Sandbox/rootless.conf or both. Among the protected directories are: /System, /bin, /sbin, /usr (but not /usr/local).[8] The symbolic links from /etc, /tmp and /var to /private/etc, /private/tmp and /private/var are also protected, although the target directories are not themselves protected. Most preinstalled Apple applications in /Applications are protected as well.[1] The kernel, XNU, prevents processes without specific entitlements from modifying the permissions and contents of flagged files and directories and also prevents code injection, runtime attachment and DTrace with respect to protected executables.[9]
Since OS X Yosemite, kernel extensions, such as drivers, have to be code-signed with a particular Apple entitlement. Developers have to request a developer ID with such an entitlement from Apple.[10] The kernel refuses to boot if unsigned extensions are present, showing the user a prohibition sign instead. This mechanism, called "kext signing", was integrated into System Integrity Protection.[4][11]
System Integrity Protection will also sanitize certain environmental variables when calling system programs when SIP is in effect. For example, SIP will sanitize LD_LIBRARY_PATH and DYLD_LIBRARY_PATH before calling a system program like /bin/bash to avoid code injections into the Bash process.[12]
Configuration
[edit]The directories protected by SIP by default include:[13]
/System/sbin/bin/usr/Applications
/usr is protected with the exception of /usr/local subdirectory. /Applications is protected for apps that are pre-installed with macOS, such as Calendar, Photos, Safari, Terminal, Console, App Store, and Notes.[13]
System Integrity Protection can only be disabled (either wholly or partly) from outside of the system partition. To that end, Apple provides the csrutil command-line utility which can be executed from a Terminal window within the recovery system or a bootable macOS installation disk, which adds a boot argument to the device's NVRAM. This applies the setting to all of the installations of El Capitan or newer on the device.[4] Upon installation of macOS, the installer moves any unknown components within flagged system directories to /Library/SystemMigration/History/Migration-[UUID]/QuarantineRoot/.[1][4] By preventing write access to system directories, the system file and directory permissions are maintained automatically during Apple software updates. As a result, permissions repair is not available in Disk Utility[14] and the corresponding diskutil operation.
Reception
[edit]Reception of System Integrity Protection has been mixed. Macworld expressed the concern that Apple could take full control away from users and developers in future releases and move the security policy of macOS slowly toward that of Apple's mobile operating system iOS, whereupon the installation of many utilities and modifications requires jailbreaking.[2][15] Some applications and drivers will not work to their full extent or cannot be operated at all unless the feature is disabled, either temporarily or permanently. Ars Technica suggested that this could affect smaller developers disproportionately, as larger ones may be able to work with Apple directly. However, they also remarked that by far most users, including power users, will not have a reason to turn the feature off, saying that there are "almost no downsides" to it.[1]
See also
[edit]References
[edit]- ^ a b c d Cunningham, Andrew; Hutchinson, Lee (September 29, 2015). "OS X 10.11 El Capitan: The Ars Technica Review—System Integrity Protection". Ars Technica. Retrieved September 29, 2015.
- ^ a b Cunningham, Andrew (June 17, 2015). "First look: OS X El Capitan brings a little Snow Leopard to Yosemite". Ars Technica. Retrieved June 18, 2015.
- ^ Slivka, Eric (June 12, 2015). "OS X El Capitan Opens Door to TRIM Support on Third-Party SSDs for Improved Performance". MacRumors. Retrieved June 18, 2015.
- ^ a b c d e Martel, Pierre-Olivier (June 2015). "Security and Your Apps" (PDF). Apple Developer. pp. 8–54. Archived (PDF) from the original on April 23, 2016. Retrieved September 30, 2016.
- ^ "Configuring System Integrity Protection". Mac Developer Library. Apple. September 16, 2015. Archived from the original on August 17, 2016. Retrieved September 30, 2016.
- ^ Garfinkel, Simon; Spafford, Gene; Schwartz, Alan (2003). Practical UNIX and Internet Security. O'Reilly Media. pp. 118–9. ISBN 9780596003234.
- ^ "About the screens you see when your Mac starts up". Apple Support. August 13, 2015. Archived from the original on April 21, 2016. Retrieved September 30, 2016.
- ^ "About System Integrity Protection on your Mac". Apple Support. May 30, 2016. Archived from the original on March 20, 2016. Retrieved September 30, 2016.
- ^ "What's New In OS X - OS X El Capitan v10.11". Mac Developer Library. Apple. Archived from the original on March 4, 2016. Retrieved September 30, 2016.
Code injection and runtime attachments to system binaries are no longer permitted.
- ^ "Kernel Extensions". Mac Developer Library. Apple. September 16, 2015. Archived from the original on August 17, 2016. Retrieved September 29, 2016.
- ^ "Trim in Yosemite". Cindori. Retrieved June 18, 2015.
- ^ Walton, Jeffrey (March 28, 2020). "Nettle 3.5.1 and OS X 10.12 patch". nettle-bugs (Mailing list). Archived from the original on July 14, 2020. Retrieved 13 July 2020.
- ^ a b "How to Check if System Integrity Protection (SIP) is Enabled on Mac". OS X Daily. August 1, 2018. Retrieved March 6, 2021.
- ^ "OS X El Capitan Developer Beta 2 Release Notes". Mac Developer Library. Apple. June 22, 2015. At section Notes and Known Issues. Archived from the original on June 26, 2015. Retrieved June 29, 2015.
- ^ Fleishman, Glenn (July 15, 2015). "Private I: El Capitan's System Integrity Protection will shift utilities' functions". Macworld. Retrieved July 22, 2015.
External links
[edit]System Integrity Protection
View on Grokipedia/System, /usr, /bin, and /sbin, allowing changes only through Apple-signed processes with specific entitlements, like the Apple Installer or Software Update.[1][3]
The primary purpose of SIP is to protect against both accidental damage and malicious attacks, such as malware attempting to alter system binaries or inject code into protected processes, thereby enhancing overall system security without relying solely on user privileges or sandboxing.[2][3] It complements other macOS security mechanisms, including Kernel Integrity Protection on Apple silicon devices, by ensuring that critical components remain read-only and tamper-resistant across all processes, regardless of their privilege level or sandbox status.[2] Since macOS Catalina, SIP works alongside the Signed System Volume to enforce a read-only system partition.[4] This feature is enabled by default on all compatible systems and persists through OS upgrades, providing a robust defense that prevents unauthorized kernel extensions from loading unless they are properly signed with a Developer ID.[1][3]
SIP is configured via the Recovery OS using the csrutil command, with settings stored in NVRAM on Intel-based Macs and in the LocalPolicy on Apple silicon devices, which allows administrators to enable, disable, or partially relax protections for development purposes, though full disabling is discouraged outside controlled environments.[3][5] It also blocks runtime interventions, such as debugging attachments or code injections into system processes like launchd or WindowServer, while permitting third-party software to write to non-protected areas like /Applications and /usr/local.[1][3] SIP applies protections across the system or per macOS volume on Apple silicon; during OS upgrades, it may quarantine or block conflicting third-party extensions to maintain integrity.[2] Overall, SIP represents a foundational element of macOS security architecture, prioritizing immutability of system components to mitigate common exploit vectors.[1][2]
Introduction
Overview
System Integrity Protection (SIP) is a kernel-level security mechanism developed by Apple for macOS that restricts modifications to critical system files, directories, and processes, even by users with root privileges.[2][6] Introduced in OS X 10.11 El Capitan in 2015, SIP enforces read-only access to protected locations in the file system, preventing unauthorized alterations that could compromise system stability.[2][7] The primary goal of SIP is to safeguard macOS against malware, unauthorized code execution, and system tampering by mandating code signing and runtime protections for system components.[2][6] It applies universally to all processes, regardless of user privileges or sandboxing, ensuring that even elevated access cannot bypass these restrictions.[2] SIP integrates deeply with the macOS architecture, operating within the XNU kernel to implement mandatory access controls that complement features like Gatekeeper for app authorization and notarization for verifying developer-signed code.[2][6] Enabled by default on all compatible macOS systems since its introduction, SIP has become a foundational element of Apple's security model, extending protections across Intel and Apple silicon hardware.[2][7]History
System Integrity Protection (SIP) originated as Apple's response to the escalating malware threats targeting macOS in the early 2010s, exemplified by the widespread Flashback trojan in 2012, which infected over 600,000 Macs by exploiting Java vulnerabilities.[8] This surge in threats highlighted the limitations of existing protections such as code-signing and Gatekeeper, prompting Apple to develop more robust kernel-level safeguards. Building on prior security enhancements like mandatory kernel extension signing introduced in OS X Yosemite (2014), though details of early prototyping remain internal to Apple. The feature's first public disclosure occurred at Apple's Worldwide Developers Conference (WWDC) in June 2015, where it was presented as a cornerstone of upcoming system security.[9] SIP debuted in macOS 10.11 El Capitan, released on September 30, 2015, as a default-enabled feature on Intel-based Macs, restricting even the root user from modifying critical system files, directories, and processes to prevent malware persistence.[1] This marked a significant shift in Apple's security strategy, prioritizing immutability of core OS components over unrestricted administrative access. With the transition to Apple silicon, SIP was fully extended and integrated into macOS Big Sur (version 11), released in November 2020, leveraging the M1 chip's hardware security features like the Secure Enclave to enforce protections more seamlessly on ARM-based architecture.[6] Subsequent updates refined SIP's scope and resilience. In macOS Sierra (10.12), released in September 2016, enhancements strengthened code-signing requirements, particularly for kernel extensions, ensuring that only Apple-approved, signed drivers could load, thereby closing potential vectors for unsigned malicious code injection.[10] By macOS Ventura (13), launched in October 2022, SIP gained better integration with the Endpoint Security Framework, introduced earlier in Big Sur but expanded in Ventura to enable third-party security tools to monitor system events in user space without needing to bypass SIP restrictions. Most recently, macOS Sequoia 15.7.2, released on November 3, 2025, addressed a downgrade vulnerability (CVE-2025-43390) through additional code-signing restrictions on Intel-based systems, preventing attackers from reverting to insecure configurations.[11] By 2025, SIP is closely integrated with Secure Boot on Apple silicon Macs, where disabling it requires setting the Secure Boot policy to Permissive Security, which reduces overall hardware-level protections.[5] On Intel systems, it remains configurable but strongly recommended to keep enabled. In cloud computing contexts, such as AWS EC2 Mac instances launched in 2021, SIP offers optional configurations to accommodate development needs, with management tools updated in 2025 to support finer-grained controls for virtualized macOS environments.[12][13][14] These adaptations reflect Apple's ongoing commitment to balancing security with developer flexibility amid diverse deployment scenarios. As of November 2025, no further major updates to SIP have been announced.Technical Mechanisms
Core Functions
System Integrity Protection (SIP) enforces protections at the kernel level through the XNU kernel, which restricts the writability of critical system files and ensures that only trusted, cryptographically signed code can execute.[15] This enforcement relies on code-signing checks performed during secure boot and at runtime, where the kernel verifies signatures using trust caches and hashes of Mach-O binaries to confirm the integrity of platform binaries.[15] Thecs_enforcement flag specifically activates these runtime code-signing validations, blocking the execution of unsigned or tampered code in protected processes and maintaining the cryptographic integrity of the signed system volume.[15]
At runtime, SIP prevents modifications to system binaries, libraries, and configurations by designating protected areas as read-only, thereby safeguarding against malicious alterations even from processes with elevated privileges.[15] It also blocks the loading of third-party kernel extensions (kexts) unless they are explicitly approved, included in the Auxiliary Kernel Collection (AuxKC), or permitted via a designated exclude list, ensuring that only vetted extensions can interact with the kernel.[15]
SIP achieves process isolation by assigning elevated entitlements to signed system processes, which restrict access to protected directories such as /System and /usr, rendering them read-only for unauthorized entities.[15] These entitlements work in conjunction with Mandatory Access Control (MAC) policies to enforce sandboxing and fine-grained permissions, limiting the scope of process capabilities and preventing unauthorized interactions with sensitive system resources.[15]
SIP complements Gatekeeper by extending signature validation beyond initial app installation to ongoing enforcement of disk and in-memory integrity for system components, creating a layered defense where Gatekeeper handles notarization and basic app checks while SIP secures core system execution.[15] On Apple silicon Macs, these mechanisms integrate with hardware-based Kernel Integrity Protection to enhance overall runtime security.[15]
Protected Components
System Integrity Protection (SIP) safeguards key elements of the macOS operating system to maintain its stability and prevent unauthorized modifications, even by processes running with root privileges. These protections apply to critical file system locations, runtime processes, configuration data, and hardware components, ensuring that only Apple-signed software can alter them. By restricting write access and code injection, SIP helps isolate the core system from potential malware or misconfigurations.[1] The primary protected directories include /System (encompassing /System/Library and related subdirectories), /usr (including select paths like /usr/bin and /usr/share), /bin, and /sbin, which house essential system libraries, binaries, and utilities. These locations are rendered read-only, preventing any write operations or deletions by non-Apple processes, including root, to preserve the integrity of core system files. Additionally, portions of /var, such as /var/db, are shielded to protect databases and logs critical to system operation. This design ensures that modifications to these directories can only occur through official mechanisms like Apple Software Update or the Installer app.[1][3][2] System processes and binaries form another core area of protection, with SIP blocking runtime attachment, debugging, or code injection into critical daemons such as launchd, as well as kernel extensions and system-bundled applications in /Applications. Kernel extensions must be signed with a valid Developer ID for execution, preventing unsigned or tampered drivers from loading. This extends to pre-installed apps, where unauthorized overwrites or injections are denied, maintaining the trustworthiness of essential binaries regardless of sandboxing or privilege levels.[3][2][1] Certain configuration data, such as NVRAM variables related to security policies, is protected, persisting across installations and verifiable only through Recovery OS tools. These elements are shielded from unauthorized edits, ensuring that changes to system configurations require elevated, Apple-approved processes. Specific system databases in /var/db critical to operation are also secured.[3][2] On Apple Silicon Macs, SIP integrates with hardware-specific features, including Secure Enclave protections via System Coprocessor Integrity Protection (SCIP), which secures the coprocessor firmware in a locked memory region post-boot. This extends to boot chain integrity, where iBoot loads the kernel and Secure Enclave OS into protected areas, preventing reconfiguration or tampering during startup. These measures complement file-level safeguards by enforcing hardware-backed isolation for sensitive operations.[16][2]Configuration and Management
Enabling and Disabling
System Integrity Protection (SIP) has been enabled by default on all macOS installations since its introduction in OS X El Capitan, providing out-of-the-box security for system files and processes.[1] Users can verify the current status of SIP by opening the Terminal application in a standard macOS session and executing the commandcsrutil status, which outputs whether SIP is enabled, disabled, or in a partial configuration mode.[17]
Disabling SIP requires administrative privileges and involves booting the Mac into Recovery Mode—for Intel-based Macs, by restarting while holding the Command (⌘) and R keys until the Apple logo appears; for Apple Silicon Macs, by pressing and holding the power button until startup options appear, then selecting Options—then selecting the macOS Utilities window. From there, launch Terminal via the Utilities menu in the menu bar and run the command csrutil disable, followed by a restart to apply the changes. This process modifies security settings stored in NVRAM on Intel-based Macs or the LocalPolicy on Apple Silicon Macs, affecting all macOS volumes on the device.[6][17][18]
To re-enable SIP, follow the identical boot procedure into Recovery Mode, open Terminal, and execute csrutil enable before restarting. Apple advises against prolonged disabling of SIP, recommending it only for temporary scenarios like testing kernel extensions or low-level code, as it increases vulnerability to malicious modifications of critical system components.[6]
One specific, though strongly discouraged, use case for temporarily disabling SIP is to remove protected system applications, such as the Messages app located in /Applications. This practice risks introducing security vulnerabilities, system instability, and the deleted applications may reinstall during macOS updates due to the operating system's design to maintain integrity. The steps are as follows: boot into Recovery Mode (holding ⌘ + R for Intel-based Macs or the power button for Apple Silicon until startup options appear, then selecting Options); open Terminal and run csrutil disable; restart the Mac; in Terminal, execute sudo rm -rf /Applications/Messages.app to delete the app; reboot into Recovery Mode again, run csrutil enable, and restart. Apple strongly advises against this procedure, as it compromises system security.[6][19]
For verification beyond basic status and troubleshooting partial configurations, the csrutil command supports flags such as authenticated-root in macOS Ventura and later, which enables a mode allowing limited root volume modifications while retaining core SIP protections for the sealed system volume. Disabling or partially configuring SIP may lead to incompatibilities with applications, particularly legacy software needing write access to protected directories like /System or /usr.[20]
Customization Options
System Integrity Protection (SIP) provides partial configuration modes that allow selective disabling of specific protections while keeping others active, enabling targeted flexibility for development or specialized environments. For instance, the commandcsrutil enable --without debug in Recovery mode permits kernel debugging and task attachment (via entitlements like CSR_ALLOW_TASK_FOR_PID) without compromising broader system safeguards.[20] Similarly, csrutil enable --without kext relaxes kernel extension signing requirements to support third-party drivers, such as in legacy hardware integration scenarios, while preserving filesystem and runtime integrity.[20] Other options include --without nvram for unrestricted NVRAM variables and --without fs for filesystem modifications, which can be combined for granular control (e.g., csrutil enable --without debug --without kext).[20] These modes require booting into Recovery OS and are verifiable via csrutil status.[21]
Developers can request SIP exemptions for specific binaries through entitlement overrides during code signing. The codesign tool applies custom entitlements, such as com.apple.security.get-task-allow, to allow debugging on SIP-protected systems by bypassing certain process attachment restrictions.[22] These entitlements must be formatted as ASCII XML and submitted for Apple's notarization to validate the binary's integrity and ensure it meets security criteria before distribution.[22] Notarization confirms the absence of known malware and proper signing, granting the binary limited overrides without altering global SIP settings.[23]
In enterprise and cloud environments, SIP customization supports managed deployments, such as read-only root volumes via the csrutil authenticated-root enable flag, which enforces sealed system snapshots to prevent unauthorized modifications in corporate fleets.[21] For AWS EC2 Mac instances running macOS Sequoia or later, administrators configure partial SIP modes—including filesystem protections and kernel extension allowances—directly through the AWS Management Console or CLI, applying changes at the instance or volume level without manual Recovery mode intervention.[13] This setup is particularly useful for scalable cloud testing, where full SIP enablement balances with needs like custom kernel loads.[13]
As of 2025, macOS Sequoia enhancements for cloud instances introduce streamlined SIP tweaks, such as programmatic partial configurations via AWS commands like create-mac-system-integrity-protection-modification-task, allowing selective protections (e.g., disabling kext signing only) without requiring a complete SIP disable.[14] These updates, available since May 2025, facilitate enterprise automation for EC2 Mac fleets by integrating with existing management tools and reducing downtime for security adjustments.[14]