{"id":130323,"date":"2023-05-30T09:00:00","date_gmt":"2023-05-30T16:00:00","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/?p=130323"},"modified":"2025-06-18T04:52:31","modified_gmt":"2025-06-18T11:52:31","slug":"new-macos-vulnerability-migraine-could-bypass-system-integrity-protection","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/","title":{"rendered":"New macOS vulnerability, Migraine, could bypass System Integrity Protection"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A new vulnerability, which we refer to as \u201cMigraine\u201d for its involvement with macOS migration, could allow an attacker with root access to automatically bypass <a href=\"https:\/\/developer.apple.com\/documentation\/security\/disabling_and_enabling_system_integrity_protection\">System Integrity Protection<\/a> (SIP) in macOS and perform arbitrary operations on a device. We shared these findings with Apple through <a href=\"https:\/\/www.microsoft.com\/msrc\/cvd?rtc=1\">Coordinated Vulnerability Disclosure<\/a> (CVD) via <a href=\"https:\/\/www.microsoft.com\/msrc\/msvr\">Microsoft Security Vulnerability Research<\/a> (MSVR). A fix for this vulnerability, now identified as <a><\/a><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2023-32369\">CVE-2023-32369<\/a>, was included in the <a href=\"https:\/\/support.apple.com\/en-us\/HT213758\">security updates released by Apple<\/a> on May 18, 2023.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">SIP is a security technology in macOS that restricts a root user from performing operations that may compromise system integrity. Bypassing SIP could lead to serious consequences, such as increasing the potential for attackers and malware authors to successfully install rootkits, create persistent malware, and expand the attack surface for additional techniques and exploits. The technique uncovered in this blog post was discovered during routine malware hunting and is similar to the one used in the <a href=\"https:\/\/www.microsoft.com\/security\/blog\/2021\/10\/28\/microsoft-finds-new-macos-vulnerability-shrootless-that-could-bypass-system-integrity-protection\/\">Shrootless vulnerability<\/a> (CVE-2021-30892) that we published in 2021. By focusing on system processes that are signed by Apple and have the <em>com.apple.rootless.install.heritable<\/em> <a href=\"https:\/\/developer.apple.com\/documentation\/bundleresources\/entitlements\">entitlement<\/a>, we found two child processes that could be tampered with to gain arbitrary code execution in a security context that bypasses SIP checks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog post, we share some information about the relationship between SIP and entitlements, and we detail how the \u201cMigraine\u201d vulnerability could be exploited to bypass the SIP security enforcements. We\u2019re sharing this research with the larger security community to emphasize the importance of collaboration in the effort to secure platforms and devices.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sip-and-entitlements\">SIP and entitlements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As previously covered in our <a href=\"https:\/\/www.microsoft.com\/security\/blog\/2021\/10\/28\/microsoft-finds-new-macos-vulnerability-shrootless-that-could-bypass-system-integrity-protection\/\">Shrootless vulnerability blog post<\/a>, System Integrity Protection (SIP)\u2014also known as \u201crootless\u201d\u2014was first introduced by Apple in macOS Yosemite. SIP essentially locks down the system from root by leveraging the Apple sandbox to protect the entire platform, conceptually similar to how <a href=\"https:\/\/wikipedia.org\/wiki\/Security-Enhanced_Linux\">SELinux<\/a> protects Linux systems. One of the most dominant features of SIP is the filesystem restriction capability, which protects entire files and directories from being overridden. The files and directories that are protected by SIP by default are commonly ones that are related to the system\u2019s integrity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is no way to turn off SIP on a live system\u2014the user must use the recovery OS, which requires physical access to the device. A SIP bypass is a vulnerability that bypasses SIP restrictions, for example, bypassing restrictions to write to SIP-protected directories or create a SIP-protected file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another important macOS concept is entitlements. According to <a href=\"https:\/\/developer.apple.com\/documentation\/bundleresources\/entitlements\">documentation<\/a>, \u201can entitlement is a right or privilege that grants an executable particular capabilities\u201d. As entitlements take part in the app signing process, there is no legitimate way of forging them. Apple uses entitlements extensively to enforce security on macOS, and Apple grants internal entitlements to very specific processes. Specifically, certain processes are assigned entitlements that allow the process to bypass System Integrity Protection checks by design. One particularly interesting entitlement is the <em>com.apple.rootless.install.heritable<\/em> entitlement that allows the process and the entire process tree rooted under it to bypass filesystem-based System Integrity Protection security enforcements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"discovering-a-sip-bypass-by-design\">Discovering a SIP bypass by design<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Our research team regularly looks for malware and suspicious activity. During a routine malware hunt, we discovered the execution of a binary called <em>drop_sip<\/em> using the below <a href=\"https:\/\/learn.microsoft.com\/microsoft-365\/security\/defender\/advanced-hunting-overview?view=o365-worldwide\">advanced hunting<\/a> query in Microsoft 365 Defender:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\nDeviceProcessEvents\n| where FileName =~ \"drop_sip\"\n| project InitiatingProcessFileName, ProcessCommandLine, SHA256\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Thinking that we found an exploit in the wild, we found that it\u2019s an Apple-signed binary that resides natively under the <em>\/System\/Library\/PrivateFrameworks\/SystemMigrationUtils.framework\/Resources\/Tools\/drop_sip<\/em> path.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Upon analysis, the file appears to invoke the <em>csops<\/em> system call (undocumented, but available <a href=\"https:\/\/github.com\/apple\/darwin-xnu\/blob\/main\/bsd\/kern\/kern_proc.c\">here<\/a>) and starts a child process. The operation flag for the <em>csops<\/em> call is 12 (<em>CS_OPS_CLEARINSTALLER<\/em>), which <strong>re-enables SIP checks<\/strong> by clearing codesigning flags, specifically the <em>CS_EXEC_INHERIT_SIP<\/em> flag:<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-1.-drop_sips-functionality-is-to-change-the-code-signing-flags-and-execute-a-child-process.webp\" alt=\"Code displaying drop_sip&rsquo;s functionality \" class=\"wp-image-130326 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-1.-drop_sips-functionality-is-to-change-the-code-signing-flags-and-execute-a-child-process.webp\"><figcaption class=\"wp-element-caption\">Figure 1. <em>drop_sip<\/em>&rsquo;s functionality is to change the code signing flags and execute a child process<\/figcaption><\/figure>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-2.-Modification-of-the-p_csflags-member-as-a-result-of-the-csops-system-call-%E2%80%93-re-enables-SIP.webp\" alt=\"Code displaying re-enabling SIP\" class=\"wp-image-130327 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-2.-Modification-of-the-p_csflags-member-as-a-result-of-the-csops-system-call-&ndash;-re-enables-SIP.webp\"><figcaption class=\"wp-element-caption\">Figure 2. Modification of the <em>p_csflags<\/em> member as a result of the <em>csops <\/em>system call &ndash; re-enables SIP<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Because of this behavior, we concluded the <em>drop_sip<\/em> process assumes it can bypass SIP. However, since <em>drop_sip<\/em> is not entitled with any SIP-bypassing entitlements, we concluded that it must inherit that capability. We discovered its parent process is <em>systemmigrationd<\/em>, which is a daemon designed to handle migration scenarios, but most importantly, it\u2019s entitled with the <em>com.apple.rootless.install.heritable<\/em> entitlement that allows its child processes to bypass SIP security checks:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-3.-systemmigrationd-entitled-with-SIP-bypassing-capabilities-1024x269.webp\" alt=\"Code displaying systemmigrationd entitlements \" class=\"wp-image-130328 webp-format\" srcset=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-3.-systemmigrationd-entitled-with-SIP-bypassing-capabilities-1024x269.webp 1024w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-3.-systemmigrationd-entitled-with-SIP-bypassing-capabilities-300x79.webp 300w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-3.-systemmigrationd-entitled-with-SIP-bypassing-capabilities-768x201.webp 768w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-3.-systemmigrationd-entitled-with-SIP-bypassing-capabilities.webp 1430w\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-3.-systemmigrationd-entitled-with-SIP-bypassing-capabilities-1024x269.webp\"><figcaption class=\"wp-element-caption\">Figure 3. <em>systemmigrationd <\/em>entitled with SIP-bypassing capabilities<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"developing-a-migraine\">Developing a \u201cMigraine\u201d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After discovering the parent process of <em>drop_sip<\/em>, we wondered if there are any other child processes of <em>systemmigrationd<\/em>. Just as before, we used the below <a href=\"https:\/\/learn.microsoft.com\/microsoft-365\/security\/defender\/advanced-hunting-overview?view=o365-worldwide\">advanced hunting<\/a> query in Microsoft 365 Defender:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\nDeviceProcessEvents\n| where InitiatingProcessFileName =~ \"systemmigrationd\"\n| summarize Hits=count(), Cmdline=any(ProcessCommandLine) by FileName\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">We found two interesting child processes of <em>systemmigrationd<\/em>:<\/p>\n\n\n\n<figure class=\"wp-block-table table\"><table><tbody><tr><td><strong>FileName<\/strong><\/td><td><strong>Hits<\/strong><\/td><td><strong>Cmdline<\/strong><\/td><\/tr><tr><td><strong>bash<\/strong><\/td><td>498<\/td><td>\/bin\/bash \/System\/Library\/PrivateFrameworks\/SystemMigration.framework\/Resources\/MigrationData\/Scripts\/firstbootDirectoryServer<\/td><\/tr><tr><td><strong>perl<\/strong><\/td><td>171<\/td><td>\/usr\/bin\/perl \/usr\/libexec\/migrateLocalKDC &#8211;source &#8220;\/Volumes\/REDACTED\/Backups.backupdb\/REDACTED\/Macintosh HD &#8211; Data&#8221; &#8211;source-REDACTED<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The <em>bash <\/em>and <em>perl<\/em> binaries are interesting because they are both interpreters. Similar to how we <a href=\"https:\/\/www.microsoft.com\/security\/blog\/2021\/10\/28\/microsoft-finds-new-macos-vulnerability-shrootless-that-could-bypass-system-integrity-protection\/\">tampered<\/a> with the <a href=\"https:\/\/zsh.sourceforge.io\/Contrib\/startup\/std\/zshenv\"><em>zsh<\/em> codeflow<\/a> back in 2021, we found similar ways to tamper with the code flow of <em>bash<\/em> and <em>perl<\/em>:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-4.-The-bash-manual-page-states-BASH_ENV-as-a-way-to-run-arbitrary-commands-in-bash-instances-1024x120.webp\" alt=\"Code displaying running arbitrary commands in bash instances\" class=\"wp-image-130329 webp-format\" srcset=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-4.-The-bash-manual-page-states-BASH_ENV-as-a-way-to-run-arbitrary-commands-in-bash-instances-1024x120.webp 1024w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-4.-The-bash-manual-page-states-BASH_ENV-as-a-way-to-run-arbitrary-commands-in-bash-instances-300x35.webp 300w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-4.-The-bash-manual-page-states-BASH_ENV-as-a-way-to-run-arbitrary-commands-in-bash-instances-768x90.webp 768w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-4.-The-bash-manual-page-states-BASH_ENV-as-a-way-to-run-arbitrary-commands-in-bash-instances.webp 1430w\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-4.-The-bash-manual-page-states-BASH_ENV-as-a-way-to-run-arbitrary-commands-in-bash-instances-1024x120.webp\"><figcaption class=\"wp-element-caption\">Figure 4. The bash manual page states <em>BASH_ENV<\/em> as a way to run arbitrary commands in bash instances<\/figcaption><\/figure>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-5.-The-perlrun-manual-page-states-PERL5OPT-as-a-way-to-run-arbitrary-commands-in-perl-instances-1024x115.webp\" alt=\"Code displaying running arbitrary commands in perl instances\" class=\"wp-image-130330 webp-format\" srcset=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-5.-The-perlrun-manual-page-states-PERL5OPT-as-a-way-to-run-arbitrary-commands-in-perl-instances-1024x115.webp 1024w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-5.-The-perlrun-manual-page-states-PERL5OPT-as-a-way-to-run-arbitrary-commands-in-perl-instances-300x34.webp 300w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-5.-The-perlrun-manual-page-states-PERL5OPT-as-a-way-to-run-arbitrary-commands-in-perl-instances-768x86.webp 768w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-5.-The-perlrun-manual-page-states-PERL5OPT-as-a-way-to-run-arbitrary-commands-in-perl-instances.webp 1430w\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-5.-The-perlrun-manual-page-states-PERL5OPT-as-a-way-to-run-arbitrary-commands-in-perl-instances-1024x115.webp\"><figcaption class=\"wp-element-caption\">Figure 5. The &#8220;<em>perlrun<\/em>&#8221; manual page states <em>PERL5OPT <\/em>as a way to run arbitrary commands in perl instances<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Assuming an attacker first gains code execution capabilities as root, setting environment variables that affect <em>systemmigrationd<\/em> and its child processes is straightforward using the <a href=\"https:\/\/ss64.com\/osx\/launchctl.html\"><em>launchctl<\/em><\/a> utility. For instance, to make <em>perl<\/em> run our arbitrary code that resides under <em>\/private\/tmp\/migraine.sh<\/em>, we use:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\nlaunchctl setenv PERL5OPT '-Mwarnings;system(\"\/private\/tmp\/migraine.sh\")'\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">And indeed, after triggering <em>systemmigrationd<\/em> to run <em>perl,<\/em> we were able to bypass SIP:<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-6.-Creating-an-undeletable-file-due-to-its-SIP-protection.webp\" alt=\"Code displaying SIP protections making a file undeletable\" class=\"wp-image-130331 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-6.-Creating-an-undeletable-file-due-to-its-SIP-protection.webp\"><figcaption class=\"wp-element-caption\">Figure 6. Creating an undeletable file due to its SIP protection.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"exploitation-approach\">Exploitation approach<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Triggering migration normally requires using the Migration Assistant utility, which involves a complete sign-out from the system. While this works well for attackers with physical access (hands-on-keyboard), we wished to demonstrate that remote attackers can achieve a SIP bypass using this exploit. Therefore, we decided to research the migration flow and the interplay between the Migration Assistant and <em>systemmigrationd<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Migration is a complicated procedure that involves several components. Here is the flow of key events:<\/p>\n\n\n\n<ol style=\"list-style-type:1\" class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Migration Assistant uses a utility called Setup Assistant to help start migration. However, it does so indirectly by using <a href=\"https:\/\/developer.apple.com\/documentation\/xpc\">XPC<\/a> between itself and another process called <em>MBSystemAdministration<\/em>. It also signs out by invoking a method named <em>SACLOStartLogoutWithOptions<\/em>.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">The <em>MBSystemAdministration<\/em> utility proxies requests from Migration Assistant to Setup Assistant and also verifies that the caller (Migration Assistant) has the <em>com.apple.private.mbsystemadministration<\/em> entitlement. Otherwise, it refuses serving migration requests. Additionally, <em>MBSystemAdministration<\/em> runs as the hidden user <em>_mbsetupuser<\/em>, which allows migration to perform GUI interactions after sign out.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Setup Assistant gets requests through <em>MBSystemAdministration<\/em> and performs XPC to several Mach services that are served by the launch daemon <em>systemmigrationd<\/em>. The <em>systemmigrationd<\/em> daemon enforces that the caller (Setup Assistant) has the <em>com.apple.private.systemmigration.daemonclient<\/em> entitlement. Otherwise, it refuses serving migration requests. The <em>systemmigrationd<\/em> daemon uses the private framework <em>SystemMigration.framework<\/em> and listens to new migration requests by invoking a method called <em>startListeningForConnections<\/em>. Interestingly, the daemon examines the contents of the directory <em>\/<\/em><em>Library\/SystemMigration\/Queue<\/em> (which is protected by SIP)\u2014requests appear as files in that directory. Once a file is dropped, <em>systemmigrationd<\/em> renames the file to \u201cIn-Flight\u201d and serves it, including running required scripts, which can cause <em>perl<\/em> or <em>bash<\/em> to run.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This complex flow can be illustrated with the following schematic:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-7.-Migration-flow-diagram-1024x420.webp\" alt=\"Flow diagram of macOS migration\" class=\"wp-image-130332 webp-format\" srcset=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-7.-Migration-flow-diagram-1024x420.webp 1024w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-7.-Migration-flow-diagram-300x123.webp 300w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-7.-Migration-flow-diagram-768x315.webp 768w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-7.-Migration-flow-diagram-1536x630.webp 1536w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-7.-Migration-flow-diagram-2048x839.webp 2048w\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-7.-Migration-flow-diagram-1024x420.webp\"><figcaption class=\"wp-element-caption\">Figure 7. Flow diagram of the macOS migration<\/figcaption><\/figure>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-8.-systemmigrationd-using-the-private-SystemMigration-framework-to-listen-to-incoming-connections.webp\" alt=\"Code displaying systemmigrationd listening to incoming connections\" class=\"wp-image-130333 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-8.-systemmigrationd-using-the-private-SystemMigration-framework-to-listen-to-incoming-connections.webp\"><figcaption class=\"wp-element-caption\">Figure 8. <em>systemmigrationd <\/em>using the private <em>SystemMigration <\/em>framework to listen to incoming connections<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Our first attempt at automating the exploit focused on patching Migration Assistant to prevent user sign-out:<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-9.-Reverse-engineering-the-Migration-Assistant-reveals-the-SACLOStartLogoutWithOptions-function-which-signs-out.webp\" alt=\"Code displaying SACLOStartLogoutWithOptions \" class=\"wp-image-130334 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-9.-Reverse-engineering-the-Migration-Assistant-reveals-the-SACLOStartLogoutWithOptions-function-which-signs-out.webp\"><figcaption class=\"wp-element-caption\">Figure 9. Reverse engineering the Migration Assistant reveals the <em>SACLOStartLogoutWithOptions <\/em>function,c which signs out<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Simply patching Migration Assistant does not work due to codesign failure. Stripping the binary of signing information results in error (Figure 10) due to a kernel feature related to <a href=\"https:\/\/developer.apple.com\/documentation\/security\/preparing_your_app_to_work_with_pointer_authentication\">Pointer Authentication Codes<\/a> (PAC) that\u2019s available for the latest <a href=\"https:\/\/en.wikipedia.org\/wiki\/Apple_M1\">Apple Silicone<\/a> architecture. If an arm64e binary with pointer authentication is not a code-signed platform binary, the kernel prevents execution, as shown in Figure 9. Extracting, stripping, and patching the x64 portion of the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Fat_binary\">multiarchitecture binary<\/a> avoids the arm64e issue, but it\u2019s not functional due to losing the required entitlement (<em>com.apple.private.mbsystemadministration<\/em>).<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-10.-Pointer-Authentication-Code-requirements.webp\" alt=\"Code displaying PAC requirements\" class=\"wp-image-130335 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-10.-Pointer-Authentication-Code-requirements.webp\"><figcaption class=\"wp-element-caption\">Figure 10. Pointer Authentication Code requirements<\/figcaption><\/figure>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-11.-Attempting-to-patch-and-run-the-Migration-Assistant-fails.webp\" alt=\"Code displaying the failed patch and run attempt of the Migration Assistant\" class=\"wp-image-130336 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-11.-Attempting-to-patch-and-run-the-Migration-Assistant-fails.webp\"><figcaption class=\"wp-element-caption\">Figure 11. Attempting to patch and run the Migration Assistant fails<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After reaching an impasse with patching Migration Assistant, we wondered if we could initiate later stages in the flow diagram, thus avoiding user sign-out. We continued to map and reverse-engineer the system behavior, including using an in-house researcher tool which leverages the <a href=\"https:\/\/developer.apple.com\/documentation\/endpointsecurity\">Endpoint Security Framework<\/a> that logs all relevant process and file events during migration, inspired by Patrick Wardle\u2019s <a><\/a><a href=\"https:\/\/objective-see.org\/products\/utilities.html#FileMonitor\">FileMonitor<\/a> and <a href=\"https:\/\/objective-see.org\/products\/utilities.html#ProcessMonitor\">ProcessMonitor<\/a> tools for investigating system behaviors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While mapping the sequence of events for Migration Assistant, <em>MBSystemAdministration<\/em>, Setup Assistant, and <em>systemmigrationd<\/em>, we noticed <em>xpcproxy<\/em> executing Setup Assistant with the argument \u2011<em>MiniBuddyYes<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Running Setup Assistant with that argument had no effect on the UI layout or its functionality, but it did highlight the usage of arguments within Setup Assistant. Closely examining Setup Assistant, we discovered other interesting command-line arguments:<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-12.-Setup-Assistants-usage-of-MiniBuddyYes-within-useDebugParameters.webp\" alt=\"Code displaying Setup Assistant's usage of -MiniBuddyYes \" class=\"wp-image-130337 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-12.-Setup-Assistants-usage-of-MiniBuddyYes-within-useDebugParameters.webp\"><figcaption class=\"wp-element-caption\">Figure 12. Setup Assistant&#8217;s usage of <em>-MiniBuddyYes<\/em> within <em>useDebugParameters<\/em><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, we discovered a function called <em>useDebugParameters<\/em> that parses an interesting command-line parameter \u2011<em>MBDebug<\/em>.<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-13.-Setup-Assistant-%E2%80%93MBDebug.webp\" alt=\"Code displaying Setup Assistant &ndash;MBDebug\" class=\"wp-image-130338 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-13.-Setup-Assistant-&ndash;MBDebug.webp\"><figcaption class=\"wp-element-caption\">Figure 13. Setup Assistant <em>&ndash;MBDebug<\/em><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Running the Setup Assistant with the \u2011<em>MBDebug<\/em> parameter results in a successful migration with no sign out. We further used the <em>-ResumeBuddyYes<\/em> parameter in conjunction with <em>\u2011MBDebug<\/em> to automatically skip a few welcome screens.<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-14.-Running-a-migration-without-signing-out.webp\" alt=\"Successful migration run without signing out\" class=\"wp-image-130339 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-14.-Running-a-migration-without-signing-out.webp\"><figcaption class=\"wp-element-caption\">Figure 14. Running a migration without signing out<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Since performing migration requires UI interaction, but no sign-out, we used AppleScript to automate the exploit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our final exploit does the following:<\/p>\n\n\n\n<ol style=\"list-style-type:1\" class=\"wp-block-list\">\n<li class=\"wp-block-list-item\">Prepares a small 1GB Time Machine backup and attaches it with <em>hdiutil<\/em>.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Prepares an arbitrary payload that is designed to run without SIP filesystem restrictions.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Sets the environment variable <em>PERL5OPT<\/em> using <em>launchctl<\/em> to run the payload once <em>perl<\/em> starts.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Runs Setup Assistant with the <em>-MBDebug<\/em> and <em>-ResumeBuddyYes<\/em> command-line flags.<\/li>\n\n\n\n<li class=\"wp-block-list-item\">Uses AppleScript to automate the Setup Assistant screens to migrate \u201cFrom a Mac, Time Machine backup or Startup disk\u201d, followed by automatically clicking \u201ccontinue\u201d.<\/li>\n<\/ol>\n\n\n\n<div style=\"display: none;\" class=\"wp-block-msxcm-deprecated-red-tiger\">\n\t<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"implications-of-arbitrary-sip-bypasses\">Implications of arbitrary SIP bypasses<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The implications of arbitrary SIP bypasses are serious, as the potential for malware authors is significant. Code that maliciously bypasses SIP could have considerable consequences, such as:<\/p>\n\n\n\n<ol style=\"list-style-type:1\" class=\"wp-block-list\">\n<li class=\"wp-block-list-item\"><strong>Create undeletable malware<\/strong>: The most straight-forward implication of a SIP bypass is that, by assigning files with the <em>com.apple.rootless<\/em> extended attribute (or overriding existing ones), an attacker can create files that are protected by SIP and therefore undeletable by ordinary means. This is quite important for security solutions, such as <a href=\"https:\/\/learn.microsoft.com\/microsoft-365\/security\/defender-endpoint\/microsoft-defender-endpoint-mac?view=o365-worldwide\">Microsoft Defender for Endpoint<\/a>, that are required to quarantine malware but cannot quarantine files protected by SIP.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><strong>Expand the attack surface for userland and kernel attacker techniques<\/strong>: As pointed out by <a href=\"https:\/\/jhftss.github.io\/CVE-2022-26712-The-POC-For-SIP-Bypass-Is-Even-Tweetable\/\">Mickey Jin\u2019s blog post<\/a> on a different SIP bypass, it\u2019s possible for attackers to gain arbitrary kernel code execution. As Apple slowly disallows third party kernel extensions and transitions the Mac ecosystem towards their <a href=\"https:\/\/developer.apple.com\/documentation\/endpointsecurity\">Endpoint Security<\/a> framework, security solutions will no longer be able to monitor the kernel for malicious activity, including malicious code executions.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><strong>Tamper with the integrity of the system, effectively enabling rootkits<\/strong>: This is a derivation of arbitrary kernel code execution\u2014once kernel code execution is established by an attacker, certain <a href=\"https:\/\/attack.mitre.org\/techniques\/T1014\/\">rootkit techniques<\/a> are possible, such as hiding processes or files from all monitoring tools. These techniques might also include bypassing <a href=\"https:\/\/learn.microsoft.com\/microsoft-365\/security\/defender-endpoint\/tamperprotection-macos?view=o365-worldwide\">tamper protection<\/a>, which is important for Microsoft Defender for Endpoint to protect against threats.<\/li>\n\n\n\n<li class=\"wp-block-list-item\"><strong>Full TCC bypass<\/strong>: As pointed out by <a href=\"https:\/\/jhftss.github.io\/CVE-2022-26712-The-POC-For-SIP-Bypass-Is-Even-Tweetable\/\">Mickey Jin\u2019s blog post<\/a> on a different SIP bypass, attackers could replace databases that control Transparency, Consent, and Control (TCC) policies (<em>TCC.db<\/em>), effectively granting arbitrary applications access to private data and peripherals. For further explanation about the implications, we\u2019ve demonstrated a TCC bypass in the past called \u201c<a href=\"https:\/\/www.microsoft.com\/security\/blog\/2022\/01\/10\/new-macos-vulnerability-powerdir-could-lead-to-unauthorized-user-data-access\/\">Powerdir<\/a>\u201d.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"hardening-device-security-through-collaboration-and-research-driven-protection\">Hardening device security through collaboration and research-driven protection<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Attackers continue to seek new footholds into increasingly secure devices and networks, oftentimes by leveraging unpatched vulnerabilities and misconfigurations to access valuable systems and data. Gaining the ability to bypass SIP and similar security technology in macOS devices can be an attractive and even necessary capability for adversaries. Given SIP\u2019s position as both a device\u2019s built-in baseline protection and the last line of defense against malware and other threats, bypassing SIP can have considerable consequences for users. As such, it\u2019s crucial that we strive to enrich our protection technologies across platforms against such issues through research-driven protection and collaboration with partners, customers, and industry experts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This case displays how collaborative research and responsible vulnerability disclosure informs our comprehensive protection capabilities across platforms to provide organizations a complete picture of their security posture. <a href=\"https:\/\/learn.microsoft.com\/microsoft-365\/security\/defender-vulnerability-management\/defender-vulnerability-management?view=o365-worldwide\">Microsoft Defender Vulnerability Management<\/a> quickly discovers and remediates such vulnerabilities while <a href=\"https:\/\/www.microsoft.com\/security\/business\/endpoint-security\/microsoft-defender-endpoint\">Microsoft Defender for Endpoint<\/a> detects and alerts on anomalous device activities, including setting <em>perl<\/em> and <em>bash<\/em> environment variables through the <em>launchctl<\/em> utility, as shown below in Figure 15. Additionally, Defender for Endpoint has similar detections for sensitive file access, including system launch daemons, various sensitive configuration files, and many more.<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-15.-Microsoft-Defender-for-Endpoint-detecting-the-PERL5OPT-environment-variable-being-suspiciously-set-1024x486.webp\" alt=\"Microsoft Defender for Endpoint detecting the PERL5OPT environment variable being suspiciously set\" class=\"wp-image-130340 webp-format\" srcset=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-15.-Microsoft-Defender-for-Endpoint-detecting-the-PERL5OPT-environment-variable-being-suspiciously-set-1024x486.webp 1024w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-15.-Microsoft-Defender-for-Endpoint-detecting-the-PERL5OPT-environment-variable-being-suspiciously-set-300x142.webp 300w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-15.-Microsoft-Defender-for-Endpoint-detecting-the-PERL5OPT-environment-variable-being-suspiciously-set-768x365.webp 768w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-15.-Microsoft-Defender-for-Endpoint-detecting-the-PERL5OPT-environment-variable-being-suspiciously-set.webp 1219w\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Figure-15.-Microsoft-Defender-for-Endpoint-detecting-the-PERL5OPT-environment-variable-being-suspiciously-set-1024x486.webp\"><figcaption class=\"wp-element-caption\">Figure 15. Microsoft Defender for Endpoint detecting the <em>PERL5OPT <\/em>environment variable being suspiciously set<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This case further emphasizes the need for responsible vulnerability disclosures and expert cross-platform collaboration to mitigate issues such as <a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2023-32369\">CVE-2023-32369<\/a>, regardless of the vulnerable device or platform in use. We wish to thank the Apple product security team again for their efforts and responsiveness in addressing the issue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Defending against the evolving threat landscape requires the ability to protect and secure users\u2019 computing experiences, whatever the platform. As cross-platform threats continue to grow, we will continue to share vulnerability discoveries and threat intelligence in addition to working with the security community to improve upon solutions that protect users and organizations each day.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Jonathan Bar Or, Michael Pearse, Anurag Bohra<\/em><\/strong><strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Microsoft Threat Intelligence Community<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"references\">References&nbsp;&nbsp;&nbsp;<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/developer.apple.com\/documentation\/security\/disabling_and_enabling_system_integrity_protection\">https:\/\/developer.apple.com\/documentation\/security\/disabling_and_enabling_system_integrity_protection<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2023-32369\">https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2023-32369<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/support.apple.com\/en-us\/HT213758\">https:\/\/support.apple.com\/en-us\/HT213758<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/developer.apple.com\/documentation\/bundleresources\/entitlements\">https:\/\/developer.apple.com\/documentation\/bundleresources\/entitlements<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/wikipedia.org\/wiki\/Security-Enhanced_Linux\">https:\/\/wikipedia.org\/wiki\/Security-Enhanced_Linux<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/github.com\/apple\/darwin-xnu\/blob\/main\/bsd\/kern\/kern_proc.c\">https:\/\/github.com\/apple\/darwin-xnu\/blob\/main\/bsd\/kern\/kern_proc.c<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/zsh.sourceforge.io\/Contrib\/startup\/std\/zshenv\">https:\/\/zsh.sourceforge.io\/Contrib\/startup\/std\/zshenv<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/ss64.com\/osx\/launchctl.html\">https:\/\/ss64.com\/osx\/launchctl.html<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/developer.apple.com\/documentation\/xpc\">https:\/\/developer.apple.com\/documentation\/xpc<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/developer.apple.com\/documentation\/security\/preparing_your_app_to_work_with_pointer_authentication\">https:\/\/developer.apple.com\/documentation\/security\/preparing_your_app_to_work_with_pointer_authentication<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/wikipedia.org\/wiki\/Apple_M1\">https:\/\/wikipedia.org\/wiki\/Apple_M1<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/wikipedia.org\/wiki\/Fat_binary\">https:\/\/wikipedia.org\/wiki\/Fat_binary<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/developer.apple.com\/documentation\/endpointsecurity\">https:\/\/developer.apple.com\/documentation\/endpointsecurity<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/objective-see.org\/products\/utilities.html\">https:\/\/objective-see.org\/products\/utilities.html<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/jhftss.github.io\/CVE-2022-26712-The-POC-For-SIP-Bypass-Is-Even-Tweetable\/\">https:\/\/jhftss.github.io\/CVE-2022-26712-The-POC-For-SIP-Bypass-Is-Even-Tweetable\/<\/a><\/li>\n\n\n\n<li class=\"wp-block-list-item\"><a href=\"https:\/\/attack.mitre.org\/techniques\/T1014\/\">https:\/\/attack.mitre.org\/techniques\/T1014\/<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A new vulnerability, which we refer to as \u201cMigraine\u201d, could allow an attacker with root access to bypass System Integrity Protection (SIP) in macOS and perform arbitrary operations on a device.<\/p>\n","protected":false},"author":153,"featured_media":130343,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","ms-ems-related-posts":[],"footnotes":""},"post_tag":[3785],"threat-intelligence":[3739],"content-type":[3663],"job-role":[],"product":[3690,3694,3856],"topic":[3687],"coauthors":[3380],"class_list":["post-130323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-macos","threat-intelligence-vulnerabilities-and-exploits","content-type-research","product-microsoft-defender","product-microsoft-defender-for-endpoint","product-microsoft-defender-vulnerability-management","topic-threat-intelligence","review-flag-1694638265-576","review-flag-1-1694638265-354","review-flag-2-1694638266-864","review-flag-3-1694638266-241","review-flag-4-1694638266-512","review-flag-5-1694638266-171","review-flag-6-1694638266-691","review-flag-7-1694638266-851","review-flag-8-1694638266-352","review-flag-9-1694638266-118","review-flag-new-1694638263-340"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>New macOS vulnerability, Migraine, could bypass System Integrity Protection | Microsoft Security Blog<\/title>\n<meta name=\"description\" content=\"A new vulnerability could allow an attacker with root access to bypass SIP in macOS and perform arbitrary operations on a device.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New macOS vulnerability, Migraine, could bypass System Integrity Protection | Microsoft Security Blog\" \/>\n<meta property=\"og:description\" content=\"A new vulnerability could allow an attacker with root access to bypass SIP in macOS and perform arbitrary operations on a device.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Security Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-30T16:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-18T11:52:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Microsoft Threat Intelligence\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Threat Intelligence\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/\"},\"author\":[{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/author\/microsoft-security-threat-intelligence\/\",\"@type\":\"Person\",\"@name\":\"Microsoft Threat Intelligence\"}],\"headline\":\"New macOS vulnerability, Migraine, could bypass System Integrity Protection\",\"datePublished\":\"2023-05-30T16:00:00+00:00\",\"dateModified\":\"2025-06-18T11:52:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/\"},\"wordCount\":2462,\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg\",\"keywords\":[\"macOS\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/\",\"name\":\"New macOS vulnerability, Migraine, could bypass System Integrity Protection | Microsoft Security Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg\",\"datePublished\":\"2023-05-30T16:00:00+00:00\",\"dateModified\":\"2025-06-18T11:52:31+00:00\",\"description\":\"A new vulnerability could allow an attacker with root access to bypass SIP in macOS and perform arbitrary operations on a device.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#primaryimage\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg\",\"width\":1200,\"height\":800,\"caption\":\"a man sitting in front of a laptop\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New macOS vulnerability, Migraine, could bypass System Integrity Protection\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#website\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/\",\"name\":\"Microsoft Security Blog\",\"description\":\"Expert coverage of cybersecurity topics\",\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#organization\",\"name\":\"Microsoft Security Blog\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2018\/08\/cropped-cropped-microsoft_logo_element.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2018\/08\/cropped-cropped-microsoft_logo_element.png\",\"width\":512,\"height\":512,\"caption\":\"Microsoft Security Blog\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#\/schema\/person\/fa785acae88a9b0cfe278a692ce196f5\",\"name\":\"Microsoft Security Threat Intelligence\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/6da614d6e26efc7ec75a4b5a98d63c541af444fa76a10c41a66be5b3de0a63aa?s=96&d=microsoft&r=g430eaf64ccad6ceda364c6ea504461c5\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6da614d6e26efc7ec75a4b5a98d63c541af444fa76a10c41a66be5b3de0a63aa?s=96&d=microsoft&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6da614d6e26efc7ec75a4b5a98d63c541af444fa76a10c41a66be5b3de0a63aa?s=96&d=microsoft&r=g\",\"caption\":\"Microsoft Security Threat Intelligence\"},\"url\":\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/author\/v-katiemc\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New macOS vulnerability, Migraine, could bypass System Integrity Protection | Microsoft Security Blog","description":"A new vulnerability could allow an attacker with root access to bypass SIP in macOS and perform arbitrary operations on a device.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/","og_locale":"en_US","og_type":"article","og_title":"New macOS vulnerability, Migraine, could bypass System Integrity Protection | Microsoft Security Blog","og_description":"A new vulnerability could allow an attacker with root access to bypass SIP in macOS and perform arbitrary operations on a device.","og_url":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/","og_site_name":"Microsoft Security Blog","article_published_time":"2023-05-30T16:00:00+00:00","article_modified_time":"2025-06-18T11:52:31+00:00","og_image":[{"width":1200,"height":800,"url":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg","type":"image\/jpeg"}],"author":"Microsoft Threat Intelligence","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Microsoft Threat Intelligence","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#article","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/"},"author":[{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/author\/microsoft-security-threat-intelligence\/","@type":"Person","@name":"Microsoft Threat Intelligence"}],"headline":"New macOS vulnerability, Migraine, could bypass System Integrity Protection","datePublished":"2023-05-30T16:00:00+00:00","dateModified":"2025-06-18T11:52:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/"},"wordCount":2462,"publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#organization"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg","keywords":["macOS"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/","url":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/","name":"New macOS vulnerability, Migraine, could bypass System Integrity Protection | Microsoft Security Blog","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#primaryimage"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg","datePublished":"2023-05-30T16:00:00+00:00","dateModified":"2025-06-18T11:52:31+00:00","description":"A new vulnerability could allow an attacker with root access to bypass SIP in macOS and perform arbitrary operations on a device.","breadcrumb":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#primaryimage","url":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg","contentUrl":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2023\/05\/Migraine-featured-image.jpg","width":1200,"height":800,"caption":"a man sitting in front of a laptop"},{"@type":"BreadcrumbList","@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2023\/05\/30\/new-macos-vulnerability-migraine-could-bypass-system-integrity-protection\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/"},{"@type":"ListItem","position":2,"name":"New macOS vulnerability, Migraine, could bypass System Integrity Protection"}]},{"@type":"WebSite","@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#website","url":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/","name":"Microsoft Security Blog","description":"Expert coverage of cybersecurity topics","publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#organization","name":"Microsoft Security Blog","url":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2018\/08\/cropped-cropped-microsoft_logo_element.png","contentUrl":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2018\/08\/cropped-cropped-microsoft_logo_element.png","width":512,"height":512,"caption":"Microsoft Security Blog"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/#\/schema\/person\/fa785acae88a9b0cfe278a692ce196f5","name":"Microsoft Security Threat Intelligence","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6da614d6e26efc7ec75a4b5a98d63c541af444fa76a10c41a66be5b3de0a63aa?s=96&d=microsoft&r=g430eaf64ccad6ceda364c6ea504461c5","url":"https:\/\/secure.gravatar.com\/avatar\/6da614d6e26efc7ec75a4b5a98d63c541af444fa76a10c41a66be5b3de0a63aa?s=96&d=microsoft&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6da614d6e26efc7ec75a4b5a98d63c541af444fa76a10c41a66be5b3de0a63aa?s=96&d=microsoft&r=g","caption":"Microsoft Security Threat Intelligence"},"url":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/author\/v-katiemc\/"}]}},"bloginabox_animated_featured_image":null,"bloginabox_display_generated_audio":false,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Security Blog","distributor_original_site_url":"https:\/\/www.microsoft.com\/en-us\/security\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/posts\/130323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/users\/153"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/comments?post=130323"}],"version-history":[{"count":1,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/posts\/130323\/revisions"}],"predecessor-version":[{"id":139518,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/posts\/130323\/revisions\/139518"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/media\/130343"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/media?parent=130323"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/post_tag?post=130323"},{"taxonomy":"threat-intelligence","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/threat-intelligence?post=130323"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/content-type?post=130323"},{"taxonomy":"job-role","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/job-role?post=130323"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/product?post=130323"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/topic?post=130323"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-json\/wp\/v2\/coauthors?post=130323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}