SELinux

Creator
Creator
Seonglae Cho
Created
Created
2020 Jan 10 13:49
Editor
Edited
Edited
2024 Mar 22 5:34
Refs
Refs
NSA
에서 처음 개발되었고
Mandatory Access Control
를 위해 시작되었. NSA가 제공한 리눅스 커널에 강제 액세스 제어 기능을 추가한 기능으로 프로세스에서 수행 할 수있는 작업을 제한한다.
SELinux는 프로세스마다 액세스 제한을 거는 TE(Type Enforcement)와 root 를 포함한 모든 사용자에게 제어를 거는 RBAC(Role-based Access Control) 등으로 root 에게 권한이 집중되는 것을 막아줌
SELinux Usages
 
 

A mix of DAC + multiple MACs + others

notion image

disable

sudo nano /etc/selinux/config # SELINUX=disabled reboot getenforce # Disabled

http issue

chcon -R -t httpd_sys_rw_content_t /var/www/myweb audit2why < /var/log/audit/audit.log semanage fcontext -l|grep html|grep httpd_sys_rw_content_t setsebool -P httpd_unified 1
 
 

http

 
 
 

Recommendations