О сканере OpenSCAP
В этой статье расскажем, как можно проводить проверку на уязвимости с помощью сканера OpenSCAP.
Что такое OpenSCAP
OpenSCAP — сканер, который реализует инструменты для проведения SCAP-сканирования и устранения обнаруженных уязвимостей.
Подробнее можно почитать здесь → http://www.open-scap.org/ А вот репозиторий инструментов и профилей на GitHub → https://github.com/OpenSCAP/openscap/
Установка Httpd и сканера OpenSCAP
Убеждаемся, что Apache HTTPd, а также сканер OpenSCAP установлены:
sudo yum install -y httpd openscap-scanner scap-security-guide2. Получить информацию о профилях можно с помощью следующей команды:
oscap info --fetch-remote-resources /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xmlВывод:
# 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 и разрешить клиенту доступ к нему:
2. Выполняем начальную проверку соответствия с помощью OpenSCAP
Используем профиль OSPP для RHEL 8 с помощью следующей команды. Профиль задается с помощью поля Id:
3. Команды выводят результат сканирования на соответствие требованиям в файл Asset Reporting Format (ARF) и формируют отчет в формате HTML.
4. По окончании выполнения команды открываем ссылку в новой вкладке, чтобы просмотреть отчет → http://master.unixcop.com/report.html
Last updated