88 points · by Cieplak · 10y ago · 65 comments
Most users never need any of the functionality restricted by SIP, and will benefit from the greater security it provides. Every step forward in exploit mitigation is usually a tradeoff - NX broke some programs. ASLR broke others. SIP is no different.
Takeaway: if you're following a OS X guide that involves sudo written before 10.11, keep SIP in mind or you might get burned.
Very few people should ever need to disable SIP – and that includes almost all developers! Are you building/running unsigned kexts? No? Then you almost certainly don't need to disable SIP.
Most instructions that no longer work with SIP enabled should be modified so they don't conflict with SIP. As a bonus: changes resulting from those instructions are far more likely to be preserved across OS X upgrades.
We archive our daily builds so we can regress problems to a specific check-in. Now I could just roll back my source and build from that, but that takes significantly longer than just copying the regression build from the server. (Not to mention that if the revision is old enough, I need to install an older OS and Xcode just to build it.)
But our archives are straight out of an Xcode development build - they contain separate libraries and frameworks that we build and that aren't moved into the executable like during an install. So to run them from a disk image you need to set DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH to get the OS to know where to look for them. But this doesn't work with SIP. This is not some low-level kext-related issue. This is pretty basic development stuff with Xcode.
Looking back, I think you are right, it would have been easier to just add a symlink under the /usr/local/bin folder. Though it didn't cross my mind at that point.
Wanting to do "system profiling" for your "apps" already makes you an expert compared to the regular user.
And there's nothing much complicated to disabling SIP, you can do it in 2 minutes with one reboot and a command line command.
If you know how to use iotop and iosnoop, you know how to do that.
First, most people do not need to use dtrace. Especially on system processes. They claim that this is bad for security researchers because they can't monitor the system anymore and they showed a screenshot of dtrace not working even with SIP "disabled". However, from the screenshot, we see that SIP is, in fact not disabled because of this line
> System Integrity Protection status: enabled.
You can see here http://internals.exposed/blog/dtrace-vs-sip.html that with SIP properly disabled, you can run dtrace on system processes. Yes, it's confusing that it says "DTrace restrictions: disabled", when it should say "some dtrace restrictions".
Also, no security researcher worth their salt would be stopped by this (and no "bad guy" would be stopped from debugging either). In fact, dtrace is only a convenience and one tool in a toolbox; you have VMs with kernel level debuggers. You have object code analysis. You have wireshark and so on. If Apple can't stop people from jailbreaking their iphones (where hardware enforces the lockdown), they won't stop people from debugging their PC's kernel.
Basically, SIP is good for users (the "Ultimately this means that Apple has replaced the 'be all and end all' security barrier of the root password, with the 'be all and end all' SIP protection mechanism." argument is the same as "we shouldn't outlaw guns because people will find other ways of killing each other") since it makes compromising a system all that harder. If it hinders ANY security research, I question the skills of that researcher.
> Disabling SIP tells all software, from both the bad guys and Apple, that this system is being watched. No more watching the watchers.
You're right, there are other tools. However, this definitely increases the barrier to entry for performing analysis of software.
It's a strawman argument because for security researchers, there is never a problem of "we can't let them know we're looking". There's also no evidence that Apple phones home the status either.
And re:"barrier of entry". Who should we be protecting? Amateur security researchers or mass users? As an amateur security researcher I'd happily allow my job to be 10x harder if it makes users even 2x safer.
How did you become a security researcher? If it was 10x harder to get started, perhaps you might've never started, or given up long ago. A future with fewer security researchers is not a good thing, wouldn't you agree?
And by your argument the safest user is one who cannot do anything even remotely unsafe, which is a deeply disturbing dystopian thought. SIP is just another step toward an environment in which users are not longer users - they're the ones being used.
But, hey, sure. Don't let that stop you from getting angry. Merry Christmas.
There should be a bingo card for this thread. "#doomed" "taking away freedoms". Free space is "What Steve would've done".
He also posted a handy screenshot that shows Dtrace not working on some binaries even with SIP completely off.
> System Integrity Protection status: enabled.
-– sas08
http://apple.stackexchange.com/questions/193368/what-is-the-...
On a side note, I've been developing on a Mac for years. Is there any Linux distributions with a UI and directory utilities as polished as OSX?
Even with all the random problems I had with the first version of El Capitan, I doubt that a linux distro can rival the polish of OsX though. Of course, I would love to be wrong.
Obviously: most users wont care or notice. But when you combine this with other changes apple has made; it's clear where they're taking OS X: just as unfriendly to tinkering and exploration as their hardware.
Point of clarification: only Apple-signed installers can modify system paths. (c.f. https://support.apple.com/en-us/HT204899) All other installers are subject to SIP restrictions.
And Apple only added a few simple steps for people eager to tinker: reboot and disable SIP. Or reboot into the installer for the other OS with which you prefer to tinker. Or create a VM with an experimental OS. Frankly, most of those steps existed before SIP.
Most users shouldn't care or notice, and will benefit from increased protection. People who want to tinker will (and can and should!) tinker.
First, they're taking away the "hard edges" from the system and helping create a generation of computer users who don't know how to tinker, how the inner bits work, or how to take responsibility for their own actions. If they download a virus, that's somehow Apple's fault for not developing a secure enough system. If they use an emoticon in their only root account password with FileVault enabled, it's Apple's fault that they are now locked out of their machine.
Second, and more worryingly, this works towards the "appification" of computers. The user's freedom to run whatever software they want on the desktop is a powerful check against the walled garden "app store" model where a central group (i.e. Apple) is responsible for determining what you're allowed to do. That's bad for innovation and freedom.
The famous Apple 1984 ad feels more ironic every year.
To (rather awkwardly) paraphrase an old proverb: Protect users from doing potentially risky things one day, and the next day they'll complain when they screw up; let them make mistakes, and they'll continue to learn from them.
Thus my disappointment at the "users will never learn, we've been trying for years, so might as well mollycoddle and protect, but not try to teach them" argument that gets brought up so often. It took centuries for basic literacy to become prevalent; perhaps we shouldn't think computer literacy would come so quickly and cripple this learning process in the name of security.
What about SIP stops a person from learning computer literacy? Also huge numbers of people want nothing to do with computers beyond their immediate tasks like email, browsers, etc.
Ok, so: if you look into who I am, you can rest guaranteed that I agree with your overall point and conclusion... but this amazingly-very-real?!?[1] emoji scenario you've described is absolutely "Apple's fault"... if Apple lets me type an emoticon into that password field, it had better well support it reasonably :/. This is a legitimate screw up in the abstraction provided by Apple, not an unavoidable tradeoff in the reality of using a computer.
[1]: http://apple.stackexchange.com/questions/202143/i-included-e...
We need to fight the arrogant nerd tyranny of "computer literacy."
The company that consistently respects the humanity of their users will wipe out many a competitor.
Apologists will complain that you can turn of SIP (or jailbreak your phone) to regain control over your computer, but that isn't possible for most people. Installing certain types of software went from "run the installer" to "follow these complicated technical instructions" (or worse).
What I find more worrying is how easily technical people are fooled into supporting this loss of freedom. Scream "security" and suddenly it's ok for Apple to have root but not the supposed "owner" of the device? Of course, they know how to disable the restrictions or install a jailbreak, so these problems don't apply to the technological priesthood - it's normal people that have to live with the restrictions.
Well, this hubris will not last - once Apple can starts using the new Trusted Computing[4] features on new CPUs (such as SGX[5]), good luck regaining control.
It would be nice if more people actually bothered thinking about long-term consequences.
[1] http://boingboing.net/2012/01/10/lockdown.html
[2] https://www.youtube.com/watch?v=nypRYpVKc5Y
[3] http://www.wired.com/2015/04/dmca-ownership-john-deere/
[4] one example: http://i.imgur.com/rjbzWyB.jpg
It seems the apocalypse came to pass a while back, with the Secure Enclave in Apple's A7 processors.
> Of course, they know how to disable the restrictions or install a jailbreak, so these problems don't apply to the technological priesthood - it's normal people that have to live with the restrictions.
Here's the funny thing: normal people benefit from those restrictions. Without them, their devices – the ones you insist they should own – would quickly become someone else's: the attacker's. It would be awesome if people started thinking about long-term consequences.
Honest question: do you hate root? Should all processes run with equal privileges? Does the kernel have an evil and undesired permissions level?
Of course not. Stop making up straw-man arguments.
> Without them, their devices – the ones you insist they should own – would quickly become someone else's: the attacker's
So users cannot run any program they download? Or are you claiming that programs that run as a user - with no intention of touching system files - cannot harm that same user? Many past exploits and trojans run entirely as the user.
SIP may protect the OS, but it will do very little to protect the user. Unfortunately, while this should be obvious, scaring people into giving up their freedom works, even when the "solution" doesn't actually do much (or anything) to prevent the supposed threat.
The key difference here is that root is well known to be the all-powerful user, the one that really owns the system, while SIP is Apple's attempt at removing the power that root should have.
Note, that I'm biased for SIP because I'm implementing it for FreeBSD, even though I know I will be turning it off because SIP impedes my fuzzer development.
No, you're saying only technical people are allowed to use a General Purpose Computer, and everyone should use an appliance.
You might want to consider what side you're fighting for in the War On General Purpose Computing.
Both systems offer ways to disable restrictions and reconfigure the systems for kernel development.
Not seeing the big deal with requiring developers to jump through a couple of hoops to disable security features that are genuinely useful for regular end users.
No. It's 10000× more. http://www.dtracebook.com/
What Apple have done here is not anything like the "dev mode" switch on Android, or the Gatekeeper "signed code only" setting. This change isn't another of the litany of changes that expand the gap between developers and regular users. This change is, instead, about creating a different model for how OS modifications happen.
For a while now, there have been two copies of OSX on a Mac: the "regular use" one, and the "recovery" partition. Both are full OSX, and can run arbitrary OSX software; it's basically like having a copy of the Linux Live CD you installed Linux from copied to your disk alongside the actual Linux install.
With SIP/rootless, Apple has effectively made it so that instead of the actively-running copy of the OS ever modifying itself, the OS will only ever modify the other copy of the OS on-disk. So you need to have the recovery OS running to modify the files of the "regular use" OS†; and you need to be running in the "regular use" OS to apply a recovery update (i.e. an update to the recovery OS.)
The procedures for getting around SIP by disabling it and then running things, are as arcane as they are because they're quite divorced from the reason for SIP. SIP isn't supposed to be a system for blocking and whitelisting kernel-hooking apps; it's a mechanism for making the OS into something more like CoreOS or the Wii's IOS: a system with two separate on-disc OS images, where at least one is always a Last-Known-Good configuration, and where you reboot into the "spare" one when you want to replace the previously-"active" one. You never fiddle with the "in-use" OS image; you consider it locked.
You still have root on the computer. You just have to be in OS-A to do root-level things to OS-B, and vice-versa.
An analogy: remember how it was impossible (and still is, on some OSes) to resize the boot partition you're running from, requiring you to instead boot from a USB to do that? That's basically what is happening here, except without the need for the USB. You can't do stupid things to the active OS; it's locked. You modify the OS by mounting it as a slave from another copy of the OS.
---
† I'm not actually sure how system updates from the "regular use" side work with SIP enabled. They could have a special exception in the SIP infrastructure, but I doubt it.
I would guess they work like iOS updates do: the update package gets downloaded by the running OS, and then a UEFI flag is written to tell the OS to reboot into the recovery OS in "update" mode. The recovery OS then unpacks and shoves the update, and reboots back.
If there is an exception in SIP for the Installer, it was likely considered more as an optimization over the above process—something to avoid making OSX feel like Windows XP, rebooting five times to get anything done.
Apple Signed (with Apple's special key) Installers are allowed to modify system paths, including the current running system to install updaets.
My suspicion is for anecdotal reasons: I recently Internet-restored my MBP. This pushed it back down to OSX 10.11.0, so it had quite a few OS point-updates to go install. But before I let it do any of those, I enabled FileVault2 and let it finish encrypting. I then had the "pleasure" of watching this sequence of events repeat itself several times, a sequence of events which had never occurred before El Capitan:
1. The OS asks to restart to install an update.
2. The OS reboots and sits at the (UEFI?) drive-unlock pretend-login screen until I enter my password.
3. The OS boots into something that looks like my "regular use" OS—the Menu Bar appears, the cursor appears and starts working, and my regular wallpaper is rendered—but the Finder doesn't start, nor do any of my account's Startup Items or LaunchAgents (not sure about global LaunchDaemons.)
4. The screen (still with HID cursor control enabled!) gets covered in a fullscreen window (not a fullscreened app taking up a Space; wrong transition effect) that has the appearance of a big black screen with an Apple logo and a progress bar. You know, like the boot screen, or iOS's update mode, or a Mac's UEFI firmware update mode. But it's definitely just an app, running within whatever instance of OSX this is.
5. Having completed the update, the computer reboots again, I enter my drive-unlock password again, and I'm back into my regular-use session.
---
Previous to El Capitan, OSX Update packages would trigger a much simpler process, equivalent to the process Windows currently goes through:
1. Ask the user to "reboot";
2. instead of rebooting, stop all userland processes and enter a single-user/maintenance runlevel;
3. run some special privileged (kext?) code that installs/unpacks/shoves the update and directly manipulates the framebuffer to render a progress bar;
4. actually reboot.
---
It wouldn't make sense to change from the old process to the current one if it was just for the sake of putting the system into an SIP-disabled mode. Like you said, Apple-signed installers can flout SIP restrictions.
It only makes sense to add the extra reboot to the process if you're rebooting into the recovery OS, because having the recovery OS do the work is itself the goal, rather than just an idea born out of necessity.
If you're wondering about the "still has my wallpaper" part, though: it's not unprecedented for the recovery OS to be "fed" data from the regular-use OS, so that there's a continuity of control when you reboot into the recovery OS. For example, the recovery OS will receive a copy of any wi-fi AP keys you entered into the System keychain in the regular-use OS, so that you can re-install OSX even if you don't remember your wi-fi password.
(I say "will receive a copy" instead of "accesses" because it gets these even if the regular-use OS is sitting in the FileVault2 "locked" state from the recovery OS's perspective—or has already been blown away entirely—where it couldn't possibly just mount the volume to read your System keychain. It seems to be more that the regular-use OS will push a copy of these thing over into the recovery OS when you update them.)
I guess it can be an issue if in the future Apple decides to no longer allow us to officially disable SIP.
Yeah, because this would work....
Stallman is right, but he doesn't seem to be the solution.
Lion pissed me off when they removed Spaces/Expose with that Mission Control rubbish. It's only gone downhill with each new release.
1. If it does not work (dr race), then why is it still present?
2. He states root is gone, but not gone; LOL please explain or give us a link with more details.
3. Even if this is true, it's not going to slow us down much. We will continue with business, as usual.