博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Mac OS X El Capitan系统完整性保护System Integrity Protection (SIP)
阅读量:6965 次
发布时间:2019-06-27

本文共 2163 字,大约阅读时间需要 7 分钟。

http://blog.csdn.net/yulimin/article/details/49992031

引言:前段时间经历了XCode编译器代码被注入的事件后,这次 Mac OS X El Capitan系统的升级,启用了更高的安全性保护机制:系统完整性保护System Integrity Protection (SIP),是By Design?还是巧合呢?

关于 系统完整性保护System Integrity Protection (SIP),可以从Apple官网下载下来学习,从第29页到54页 
关键点:
1、Security policy applying to every process, including privileged code running unsandboxed
2、Extends additional protections to system components on disk and at runtime
3、System binaries can only be modified by Apple Installer and Software Update, and no longer permit runtime attachment or code injection
实际上从Mac AppStore下载的应用是不受影响的;如果不是则可能会受影响,比如:
修改系统文件,安装文件到系统目录中,观察系统进程内存,注入代码到系统进程中等
内核会直接中断这些破坏性的工作,哈哈哈。
所以对于像 /System /bin /usr /sbin 仅仅供系统使用,开发者或者应用程序则无法直接使用,而使用 ~/Library /usr/local /Applications,升级之后,那些文件将被移出去。
注入代码到系统进程中等同于修改硬盘上的可执行文件,所以会进行各种安全检查确保安全可信,比如签名检查
整个机制主要从三方面入手:
1、文件系统保护(Filesystem protections)
2、运行时保护(Runtime protections)
3、内核扩展签名(Kernel extensions)
总结:
1、新的安全策略机制适用于每一个进程
2、默认下系统启用SIP系统完整性保护机制,无论是对于硬盘还是运行时的进程
     限制对系统目录的写操作
     阻止在运行时附加或注入代码到系统进程中
3、第三方安装的内容必须移入系统目录
4、SIP系统完整性保护机制可以在Recovery OS状态下进行更改,也就是留有余地啊哈哈
如何禁用SIP系统完整性保护机制?
1、重新启动操作系统;
2、按住Command + R键;
3、菜单“实用工具” ==>> "终端" ==>> 输入 csrutil disable 回车
    执行成功后,返回信息如下:
Successfully disabled System Integrity Protection. Please restart the machine for the changes to take effect.
4、这样,更改的配置保存到NVRAM中,对整台机器生效,重新启动即可
如何查看SIP系统完整性保护机制?
命令行终端
$ csrutil status
System Integrity Protection status: enabled.
$ csrutil clear / enable / disable 只能在 恢复模式下使用
在禁用掉SIP后,查看状态信息如下
$ csrutil status
System Integrity Protection status: enabled (Custom Configuration).
Configuration:
        Apple Internal: disabled
        Kext Signing: disabled
        Filesystem Protections: disabled
        Debugging Restrictions: disabled
        DTrace Restrictions: disabled
        NVRAM Protections: disabled
This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.
那么将之前升级而被移走的文件从 /Library/SystemMigration/History 对应移回到原来的目录下,应用程序就可以使用了。
如何对被移出的应用程序进行恢复?
比如Mobility Client,进入终端,并切换到 root 用户下,然后
su -
cd /Library/SystemMigration/History/Migration-*/QuarantineRoot/usr/libexec
mv MobilityClient/ /usr/libexec/
再启动 Mobility Client 就可以了,不需要重新安装,就这么简单!

你可能感兴趣的文章
python第五天
查看>>
curl 命令行下载工具使用方法小结
查看>>
How to install Apache, PHP 7.1 and MySQL on CentOS 7.3 (LAMP)
查看>>
哈佛图书馆墙上的训言
查看>>
appium安装部署第二季
查看>>
Cnyunwei-Cacti+Nagios安装说明
查看>>
使用Windows远程桌面(mstsc)通过RDP协议访问Ubuntu/Debian服务器
查看>>
用户第一次登录后要求修改密码
查看>>
Linux内核进程调度的时机和进程切换
查看>>
List使用实例
查看>>
“chaos”的算法---之哈希表(HASH)算法详解
查看>>
学习LINUX的几点注意事项
查看>>
.Net使用SignalR实现消息推送功能预研及Demo
查看>>
基于VMware vSphere 5.0的服务器虚拟化实践(9)
查看>>
2013年下半年信息系统项目管理师考试论文试卷
查看>>
从风投那里得到了了 $100W 的种子期投资且已到账,我该如何组建公司及团队?...
查看>>
每天laravel-20160814| Container -17
查看>>
Squid代理
查看>>
操作系统 地址 概念
查看>>
CentOS 7编译安装php7.0.7以及可能遇到的问题的解决方案
查看>>