Linux Kernel Security (SELinux vs AppArmor vs Grsecurity)

Linux Kernel Security (SELinux vs AppArmor vs Grsecurity)


参考文档:

SELinux Linux <wbr>Kernel <wbr>Security <wbr>(SELinux <wbr>vs <wbr>AppArmor <wbr>vs <wbr>Grsecurity)

https://www.nsa.gov/what-we-do/research/selinux/

https://github.com/SELinuxProject


AppArmor


grsecurity Linux <wbr>Kernel <wbr>Security <wbr>(SELinux <wbr>vs <wbr>AppArmor <wbr>vs <wbr>Grsecurity)

http://grsecurity.net


SELinux AppArmor grsecurity
Automated No (audit2allow and system-config-selinux) Yes (Yast wizard) Yes (auto traning / gradm)
Powerful policy setup Yes (very complex) Yes Yes
Default and recommended integration CentOS / RedHat / Debian Suse / OpenSuse Any Linux distribution
Training and vendor support Yes (Redhat) Yes (Novell) No (community forum and lists)
Recommend for Advanced user New / advanced user New users
Feature Pathname based system does not require labelling or relabelling filesystem Attaches labels to all files, processes and objects ACLs

PaX是针对linux kernel的一个加固版本的补丁,它让linux内核的内存页受限于最小权限原则,是这个星球上有史以来最极端和最优秀的防御系统级别0day的方案,第1版的设计和实现诞生于2000年,那可是一个没有ASLR/RELRO/NX/CANARY/FORITY/PIE都没有的年代,这些今天意义上的现代mitigation技术不管是linux/windows/macosx都多少抄袭和模仿了PaX的设计和实现,但有很多朋友会问:既然这东东这么厉害,为什么不在linux mainline里?当年Linux内核不收PaX进入upstream是因为很多人觉得PaX不是那么的好维护,之后linux内核推出了LSM( Linux Security Module),LSM利用了一堆CAPABILITY的 机制提供了一些限制用户态程序访问控制的接口,SELinux和Apparmor就是基于LSM开发的,注意LSM并不是一个传统意义上的linux kernel module,至少在2个地方不同于普通module:

1) 必须在bootloader启动内核时启动,不能在内核加载完后启动。
2) 不能同时启动2个LSM的实现。

原文地址:https://www.cnblogs.com/lixuebin/p/10814025.html