Введение
В RHEL поддержка безопасных и совместимых систем упрощается с помощью сканера openscap.
Что такое SCAP?
SCAP (Security Content Automation Protocol) – это проект NIST, который стандартизирует язык описания критериев и результатов оценки. Он также предоставляет систему оценки уязвимостей.
Критическими компонентами SCAP являются:
- XCCDF: Расширяемый формат описания списков конфигурации, предназначенный для описания контрольных списков безопасности.
- OVAL®: Open Vulnerability and Assessment Language – декларативный язык для создания логических утверждений о состоянии системы.
- CCE™: Common Configuration Enumeration
- CPE™: Common Platform Enumeration
- CVE®: Common Vulnerabilities and Exposures
- CVSS: Common Vulnerability Scoring System
OpenSCAP – проект, реализующий инструменты для проведения SCAP-сканирования и устранения обнаруженных уязвимостей.
Подробнее о проекте можно прочитать на http://www.open-scap.org/, а о репозитории инструментов и профилей на GitHub – на https://github.com/OpenSCAP/openscap/.
Red Hat поставляет содержимое SCAP в руководстве SCAP, но содержимое, используемое OpenSCAP, находится в активной разработке, и последнюю версию можно найти по адресу: http://www.github.com/ComplianceAsCode.
Установка Httpd и сканера OpenSCAP
Убедитесь, что Apache HTTPd, а также сканер OpenSCAP установлены, выполнив приведенную ниже команду; ее можно запускать даже в том случае, если эти пакеты уже существуют:
Пакет scap-security-guide содержит готовые системные профили для нескольких выпусков RHEL и типов систем; они устанавливаются в папку /usr/share/xml/scap/ssg/content.
Получить сводную информацию о профилях в данном файле определений можно с помощью следующей команды:
Вывод:
# oscap info --fetch-remote-resources /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml
Document type: Source Data Stream
Imported: 2021-04-28T13:42:03
Stream: scap_org.open-scap_datastream_from_xccdf_ssg-rhel7-xccdf-1.2.xml
Generated: (null)
Version: 1.3
Checklists:
Ref-Id: scap_org.open-scap_cref_ssg-rhel7-xccdf-1.2.xml
Downloading: https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml ... ok
Status: draft
Generated: 2021-04-28
Resolved: true
Profiles:
Title: NIST National Checklist Program Security Guide
Id: xccdf_org.ssgproject.content_profile_ncp
Title: DRAFT - ANSSI-BP-028 (high)
Id: xccdf_org.ssgproject.content_profile_anssi_nt28_high
Title: OSPP - Protection Profile for General Purpose Operating Systems v4.2.1
Id: xccdf_org.ssgproject.content_profile_ospp
Title: ANSSI-BP-028 (intermediary)
Id: xccdf_org.ssgproject.content_profile_anssi_nt28_intermediary
Title: Red Hat Corporate Profile for Certified Cloud Providers (RH CCP)
Id: xccdf_org.ssgproject.content_profile_rht-ccp
Title: ANSSI-BP-028 (enhanced)
Id: xccdf_org.ssgproject.content_profile_anssi_nt28_enhanced
Title: [DRAFT] DISA STIG for Red Hat Enterprise Linux Virtualization Host (RHELH)
Id: xccdf_org.ssgproject.content_profile_rhelh-stig
Title: CIS Red Hat Enterprise Linux 7 Benchmark
Id: xccdf_org.ssgproject.content_profile_cis
Title: Unclassified Information in Non-federal Information Systems and Organizations (NIS
T 800-171)
Id: xccdf_org.ssgproject.content_profile_cui
Id: xccdf_org.ssgproject.content_profile_e8
Title: ANSSI-BP-028 (minimal)
Id: xccdf_org.ssgproject.content_profile_anssi_nt28_minimal
Title: Health Insurance Portability and Accountability Act (HIPAA)
Id: xccdf_org.ssgproject.content_profile_hipaa
Title: DISA STIG for Red Hat Enterprise Linux 7
Id: xccdf_org.ssgproject.content_profile_stig
Title: PCI-DSS v3.2.1 Control Baseline for Red Hat Enterprise Linux 7
Id: xccdf_org.ssgproject.content_profile_pci-dss
Referenced check files:
ssg-rhel7-oval.xml
system: http://oval.mitre.org/XMLSchema/oval-definitions-5
ssg-rhel7-ocil.xml
system: http://scap.nist.gov/schema/ocil/2
security-data-oval-com.redhat.rhsa-RHEL7.xml
system: http://oval.mitre.org/XMLSchema/oval-definitions-5
Ref-Id: scap_org.open-scap_cref_ssg-rhel7-pcidss-xccdf-1.2.xml
Downloading: https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml ... ok
Status: draft
Generated: 2021-04-28
Resolved: true
Profiles:
Title: PCI-DSS v3.2.1 Control Baseline for Red Hat Enterprise Linux 7
Id: xccdf_org.ssgproject.content_profile_pci-dss_centric
Referenced check files:
ssg-rhel7-oval.xml
system: http://oval.mitre.org/XMLSchema/oval-definitions-5
ssg-rhel7-ocil.xml
system: http://scap.nist.gov/schema/ocil/2
security-data-oval-com.redhat.rhsa-RHEL7.xml
system: http://oval.mitre.org/XMLSchema/oval-definitions-5
Checks:
Ref-Id: scap_org.open-scap_cref_ssg-rhel7-oval.xml
Ref-Id: scap_org.open-scap_cref_ssg-rhel7-ocil.xml
Ref-Id: scap_org.open-scap_cref_ssg-rhel7-cpe-oval.xml
Ref-Id: scap_org.open-scap_cref_ssg-rhel7-oval.xml000
Ref-Id: scap_org.open-scap_cref_ssg-rhel7-ocil.xml000
Ref-Id: scap_org.open-scap_cref_security-data-oval-com.redhat.rhsa-RHEL7.xml
Dictionaries:
Ref-Id: scap_org.open-scap_cref_ssg-rhel7-cpe-dictionary.xml
Включение httpd для просмотра отчета о соответствии со сканера OpenSCAP
Выполните следующие действия, чтобы включить веб-сервер Apache и разрешить клиенту доступ к нему.
Выполните начальную проверку соответствия с помощью сканера openscap
Выполните базовую проверку соответствия с использованием профиля OSPP для RHEL 8, выполнив следующую команду; профиль задается с помощью поля Id
Команды выводят результат сканирования на соответствие требованиям в файл Asset Reporting Format (ARF) и формируют отчет в формате HTML.
По окончании выполнения команды откройте эту ссылку в другой вкладке, чтобы просмотреть полученный отчет:
http://master.unixcop.com/report.html
см. также:
- Захват трафика DNS: DNSCAP
- Использование Python для проведения тестирования на проникновение
- 😈 Изучение Unix через доступ к публичному бесплатному Unix-серверу (работает с 1987 года)
- ☸️ Vesta: Анализ конфигурации кластеров Docker и Kubernetes и анализ уязвимостей
- 🐳 Как создавать резервные копии томов Docker
- 🌐 Как заархивировать всю веб-страницу в одном HTML-файле