文章目录
CIS和SCAP
CIS(互联网安全中心)提供各种网络安全相关服务,它制作了各种安全基准以保护系统免受不断变化的安全威胁。这些基准以PDF的形式免费提供给CIS成员,PDF中的内容是可读的但不能直接被扫描工具使用。CIS为付费会员提供了一些XCCDF1格式的基准,可以被工具使用。不过这些基准不包含改变服务器状态以达到合规性所需的自动化和补救步骤。
为此Red Hat向用户生产“scap-security-guidelines”软件包,包含了基于SCAP的基准扫描合规性、自动化结果修复所需内容:
- openscap-scanner: 基于SCAP(安全内容自动化协议) 的扫描工具。
- scap-security-guide: 包含定义合规 Profile 以及补救修复所需的文件,如红帽Ansible自动化平台Playbook或Bash脚本。
- scap-workbench: 允许修改政策的图形用户界面。
运行以下命令可在安装 OpenSCAP环境。
yum install openscap-scanner scap-security-guide
也可从 https://access.redhat.com/downloads 中查找 “scap-security-guide” 相关的软件包。
另外还可从 https://github.com/ComplianceAsCode/content/releases 中下载
以下是用于自动化修复的脚本,提供了以Ansible、Shell和Anaconda方式修复。
ll /usr/share/scap-security-guide
total 12
drwxr-xr-x. 2 root root 4096 Feb 11 09:58 ansible
drwxr-xr-x. 2 root root 4096 Feb 11 09:58 bash
drwxr-xr-x. 2 root root 4096 Feb 11 09:58 kickstart
OpenSCAP支持检查合规基线的目标,其中除了RHEL 6/7/8外,还有JRE和Firefox。另外,每个文件名在 “ssg-XXXXXX” 后面是支持的合规规范类型。
ll /usr/share/xml/scap/ssg/content
total 186748
-rw-r--r--. 1 root root 591 Feb 17 2021 ssg-firefox-cpe-dictionary.xml
-rw-r--r--. 1 root root 3885 Feb 17 2021 ssg-firefox-cpe-oval.xml
-rw-r--r--. 1 root root 281907 Feb 17 2021 ssg-firefox-ds-1.2.xml
-rw-r--r--. 1 root root 281907 Feb 17 2021 ssg-firefox-ds.xml
-rw-r--r--. 1 root root 39214 Feb 17 2021 ssg-firefox-ocil.xml
-rw-r--r--. 1 root root 53469 Feb 17 2021 ssg-firefox-oval.xml
-rw-r--r--. 1 root root 181362 Feb 17 2021 ssg-firefox-xccdf.xml
-rw-r--r--. 1 root root 1231 Feb 17 2021 ssg-jre-cpe-dictionary.xml
-rw-r--r--. 1 root root 5862 Feb 17 2021 ssg-jre-cpe-oval.xml
-rw-r--r--. 1 root root 265498 Feb 17 2021 ssg-jre-ds-1.2.xml
-rw-r--r--. 1 root root 265498 Feb 17 2021 ssg-jre-ds.xml
-rw-r--r--. 1 root root 34732 Feb 17 2021 ssg-jre-ocil.xml
-rw-r--r--. 1 root root 42031 Feb 17 2021 ssg-jre-oval.xml
-rw-r--r--. 1 root root 181066 Feb 17 2021 ssg-jre-xccdf.xml
-rw-r--r--. 1 root root 6768 Feb 17 2021 ssg-rhel6-cpe-dictionary.xml
-rw-r--r--. 1 root root 93922 Feb 17 2021 ssg-rhel6-cpe-oval.xml
-rw-r--r--. 1 root root 22934702 Feb 17 2021 ssg-rhel6-ds-1.2.xml
-rw-r--r--. 1 root root 22935173 Feb 17 2021 ssg-rhel6-ds.xml
-rw-r--r--. 1 root root 733916 Feb 17 2021 ssg-rhel6-ocil.xml
-rw-r--r--. 1 root root 2335663 Feb 17 2021 ssg-rhel6-oval.xml
-rw-r--r--. 1 root root 7439626 Feb 17 2021 ssg-rhel6-xccdf.xml
-rw-r--r--. 1 root root 8141 Feb 17 2021 ssg-rhel7-cpe-dictionary.xml
-rw-r--r--. 1 root root 88026 Feb 17 2021 ssg-rhel7-cpe-oval.xml
-rw-r--r--. 1 root root 33638186 Feb 17 2021 ssg-rhel7-ds-1.2.xml
-rw-r--r--. 1 root root 33638657 Feb 17 2021 ssg-rhel7-ds.xml
-rw-r--r--. 1 root root 1444004 Feb 17 2021 ssg-rhel7-ocil.xml
-rw-r--r--. 1 root root 3773855 Feb 17 2021 ssg-rhel7-oval.xml
-rw-r--r--. 1 root root 10428165 Feb 17 2021 ssg-rhel7-xccdf.xml
-rw-r--r--. 1 root root 6427 Feb 17 2021 ssg-rhel8-cpe-dictionary.xml
-rw-r--r--. 1 root root 88026 Feb 17 2021 ssg-rhel8-cpe-oval.xml
-rw-r--r--. 1 root root 17084129 Feb 17 2021 ssg-rhel8-ds-1.2.xml
-rw-r--r--. 1 root root 17084455 Feb 17 2021 ssg-rhel8-ds.xml
-rw-r--r--. 1 root root 1517008 Feb 17 2021 ssg-rhel8-ocil.xml
-rw-r--r--. 1 root root 3877481 Feb 17 2021 ssg-rhel8-oval.xml
-rw-r--r--. 1 root root 10366637 Feb 17 2021 ssg-rhel8-xccdf.xml
参考
https://access.redhat.com/articles/6337261
https://access.redhat.com/sites/default/files/attachments/scap-security-guide-0.1.50-scap-1.3-rhel8.zip
https://github.com/ComplianceAsCode/content/releases
http://www.open-scap.org/security-policies/choosing-policy/
https://www.redhat.com/en/blog/center-internet-security-cis-compliance-red-hat-enterprise-linux-using-openscap
https://ncp.nist.gov/repository