openSUSE Leap 16

OpenSCAP : インストール2025/12/10

 

SCAP (Security Content Automation Protocol) 標準に基づいたシステムのセキュリティ監査や脆弱性スキャンが可能な OpenSCAP のインストールです。

SCAP の概要は以下を参照ください。
⇒ https://www.ipa.go.jp/security/vuln/SCAP.html

OVAL  (Open Vulnerability and Assessment Language)
       ⇒ 脆弱性を評価するための標準化された仕様

XCCDF (Extensible Configuration Checklist Description Format)
       ⇒ XML フォーマットのセキュリティ設定チェックリスト

OCIL  (Open Checklist Interactive Language)
       ⇒ ユーザーとの質疑応答を解釈するフレームワーク

CPE   (Common Platform Enumeration)
       ⇒ ハードやソフト等を識別するための命名基準

CCE   (Common Configuration Enumeration)
       ⇒ 各セキュリティ項目にユニーク ID を割り当てる仕様

CVE   (Common Vulnerabilities and Exposures)
       ⇒ 個別製品の脆弱性に割り当てられた一意の識別番号

CVSS  (Common Vulnerability Scoring System)
       ⇒ 脆弱性を評価してスコアでランク付けするメトリクスシステム

[1] OpenSCAP コマンドラインツール および Linux 向けのセキュリティポリシーが定義された SCAP Security Guide をインストールします。
dlp:~ #
zypper -n install openscap openscap-utils openscap-content openscap-report
[2] SCAP Security Guide は [/usr/share/openscap] 配下にインストールされます。
dlp:~ #
ll /usr/share/openscap

total 68
drwxr-xr-x. 1 root root    96 Dec 10 10:37 cpe
lrwxrwxrwx. 1 root root    22 Jan  9  2025 scap-oval.xml -> scap-yast2sec-oval.xml
lrwxrwxrwx. 1 root root    23 Jan  9  2025 scap-xccdf.xml -> scap-yast2sec-xccdf.xml
-rw-r--r--. 1 root root 39063 Jan  9  2025 scap-yast2sec-oval.xml
-rw-r--r--. 1 root root 17766 Jan  9  2025 scap-yast2sec-xccdf.xml
drwxr-xr-x. 1 root root    62 Dec 10 10:37 schemas
drwxr-xr-x. 1 root root   648 Dec 10 10:37 xsl

# 各コンテンツの概要を表示するには以下

dlp:~ #
oscap info /usr/share/openscap/scap-yast2sec-xccdf.xml

Document type: XCCDF Checklist
Checklist version: 1.1
Imported: 2025-01-09T01:49:37
Status: draft
Generated: 2012-07-24
Resolved: false
Profiles:
        Title: Default vanilla kernel hardening
                Id: Default
Referenced check files:
        scap-yast2sec-oval.xml
                system: http://oval.mitre.org/XMLSchema/oval-definitions-5
[3] [oscap] コマンドでシステムをスキャンします。
結果は HTML 形式のレポートで出力可能なため、任意のコンピューターで内容を確認し、可能な限り [pass] できるよう対応するとよいでしょう。
# xccdf : [xccdf] モジュールを指定
# ⇒ 指定可能なモジュール : info, xccdf, oval, ds, cpe, cvss, cve, cvrf
# [--profile] : プロファイルを指定
# ⇒ 指定可能なプロファイルは [2] で確認した [Profiles] リスト
# [--report] : HTML レポートの出力先
dlp:~ #
oscap xccdf eval \
--profile Default \
--report xccdf-leap-16.html \
/usr/share/openscap/scap-yast2sec-xccdf.xml


--- Starting Evaluation ---

Title   sysctl net.ipv4.ip_forward must be 0
Rule    rule-sysctl-ipv4-forward
Result  pass

Title   sysctl net.ipv4.tcp_syncookies must be 1
Rule    rule-sysctl-ipv4-tcpsyncookies
Result  pass

Title   sysctl net.ipv6.conf.all.forwarding must be 0
Rule    rule-sysctl-ipv6-all-forward
Result  pass

Title   sysctl net.ipv6.conf.default.forwarding must be 0
Rule    rule-sysctl-ipv6-default-forward
Result  pass

Title   kernel config CONFIG_SYN_COOKIES must be y
Rule    rule-kernel-syncookies
Result  fail

Title   file /etc/login.defs must have a line that matches ^PASS_MAX_DAYS.*99999
Rule    rule-pwd-maxdays
Result  fail
.....
.....
関連コンテンツ