1 / 12

第十八章 管理 SELinux

第十八章 管理 SELinux. 本章内容. 基本 SELinux 安全性概念 SELinux 模式 SELinux 脉络 SELinux 布尔值 监控 SELinux 冲突. SELinux 的基本概念. SELinux(Security-Enhanced Linux) 是美国国家安全局( NSA )对于强制访问控制的实现,是 Linux 上最杰出的新安全子系统。 NSA 是在 Linux 社区的帮助下开发了一种访问控制体系,在这种访问控制体系的限制下,进程只能访问那些在他的任务中所需要文件. SELinux 的介绍.

Download Presentation

第十八章 管理 SELinux

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第十八章 管理SELinux

  2. 本章内容 • 基本SELinux安全性概念 • SELinux模式 • SELinux脉络 • SELinux布尔值 • 监控SELinux冲突

  3. SELinux的基本概念 • SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux上最杰出的新安全子系统。 • NSA是在Linux社区的帮助下开发了一种访问控制体系,在这种访问控制体系的限制下,进程只能访问那些在他的任务中所需要文件

  4. SELinux的介绍 • SELinux是一组可确定哪个进程能访问文件、目录、端口等的安全规则 • SELinux标签有若干上下文,最关注类型上下文 • SELinux的目标是保护用户数据免受已泄露的系统服务的威胁

  5. SELinux模式 • 强制模式:Enforcing • 许可模式:Permissive • 禁用模式:Disabled

  6. SELinux的模式 Enforcing Permissive Disabled

  7. 显示和修改SELinux模式 • 修改/etc/sysconfig/selinux文件 • 显示当前SELinux模式:getenforce • 修改当前SELinux模式:setenforce

  8. 显示和修改 SELinux文件上下文 • 查看进程的SELinux上下文:ps -axZ • 查看文件的SELinux上下文:ls -lZ • 修改文件的SELinux上下文: chcon -t 上下文类型 文件名

  9. 管理SELinux布尔值 • SELinux布尔值是更改SELinux策略行为的开关 • SELinux布尔值是可以启用或者禁用的规则 • 显示布尔值:getsebool –a • 修改布尔值:setsebool –P 类型 on|off

  10. 监控SELinux 修改 • 安装setroubleshoot-server软件包,将消息发送给/var/log/messages文件,包括SELinux冲突的唯一标识符UUID • sealert –l UUID用于生成特定事件的报告 • sealert -a /var/log/audit/audit.log 用于在该文件中生成所有事件的报告

  11. 实验:管理 SELinux • 需求描述 • 在serverX上部署Web服务器。 • 安装mod_ssl包。 • 重新启动Web服务。 • 启用防火墙并允许HTTP和HTTPS端口。 • 创建/tmp/d.html并将其移动到Web服务器主目录 • 尝试显示http://serverX/d.html 应失败。 • 将d.html上的上下文更改为httpd_sys_content_t。 • 完成后,运行lab-grade-secure-web评估脚本以确定一切已正确完成。

  12. 实验:管理 SELinux • 需求描述 • 将web.content.tgz归档文件从192.168.0.254:/var/ftp/pub/materials复制到/tmp。 • 将归档文件提取到/rmp。 • 将提取的目录移至/var/www/html。 • 启动Web服务。 • 通过浏览器访问http://serverX/web_content,以尝试观察新目录。 • 从您的系统中搜索尝试浏览新安装的内容时可能生成的所有SELinux冲突的uuid。 • 生成冲突的文本报告。 • 按照报告的建议恢复新安装内容的SELinux上下文。 • 通过访问http://servcrX/web_content确认您可以通过Web浏览器查看资料

More Related