首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OpenSCAP裁剪-可以更改规则严重性

OpenSCAP裁剪-可以更改规则严重性
EN

Security用户
提问于 2022-04-07 09:15:59
回答 1查看 394关注 0票数 0

是否可以使用OpenSCAP裁剪/自定义文件更改规则的严重性?

更新(2022-04-13):

refine-rule似乎可以解决这个问题,但无法找到任何文档来说明您是否可以在自定义文件中使用该文件。

EN

回答 1

Security用户

发布于 2022-04-12 20:21:38

概要文件在存储库中定义:代码/内容

您可以将所需的配置文件复制到新文件(或从GitHub下载最新版本),然后根据需要编辑规则的严重性。

如果auditd服务在macOS上禁用,下面的示例将编辑严重性:

  • 在文件ssg-macos10-15-ds.xml上,可以找到下面一行:

  • 将严重性从high更改为low

注意,严重度值可以是unknowninfolowmediumhigh

  • 保存并使用修改后的配置文件:
代码语言:javascript
复制
 oscap xccdf eval --profile xccdf_org.ssgproject.content_benchmark_macOS-1015 --results-arf results.xml --report report.html /path/to/new/edited/ssg-macos10-15-ds.xml

其中:xccdf_org.ssgproject.content_benchmark_macOS-1015是配置文件:上定义的基准测试的id

更新

实际上,refine-rule可以用于更改规则的weightseverityrole

在保存“只定制”之后,您可以根据需要为每个规则添加refine-rule,从而编辑XML文件中的规则:

代码语言:javascript
复制
  1
  
    Unclassified Information in Non-federal Information Systems and Organizations (NIST 800-171) [CUST$
    From NIST 800-171, Section 2.2:
Security requirements for protecting the confidentiality of CUI in nonfederal
information systems and organizations have a well-defined structure that
consists of:

(i) a basic security requirements section;
(ii) a derived security requirements section.

... 

"

<#>结果

  • 不定制
  • 自定义

更多信息可在可扩展配置检查列表描述格式(XCCDF)版本1.2的规范6.5.3部分找到。

Debug

Testing配置文件

代码语言:javascript
复制
 oscap info --profile xccdf_org.ssgproject.content_profile_cui_customized ./ssg-rl8-ds-tailoring.xml
Document type: XCCDF Tailoring
Imported: 2022-04-18T06:04:53
Benchmark Hint: /tmp/scap-workbench-FGmUva/ssg-rl8-ds.xml
Profiles:
    Title: Unclassified Information in Non-federal Information Systems and Organizations (NIST 800-171) [CUSTOMIZED]
        Id: xccdf_org.ssgproject.content_profile_cui_customized

其中xccdf_org.ssgproject.content_profile_cui_customized是裁剪文件ssg-rl8-ds-tailoring.xml上的Profile-id

Generating指南

代码语言:javascript
复制
oscap xccdf generate guide --verbose INFO --fetch-remote-resources --profile xccdf_org.ssgproject.content_profile_cui_customized  --output guide-profile_cui_customized.html --tailoring-file ./ssg-rl8-ds-tailoring.xml ./ssg-rl8-ds-tailoring.xml

在生成的指南上,您可以验证规则是否与预期的一样,并且也可以用作自定义裁剪配置文件的引用。

票数 1
EN
页面原文内容由Security提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://security.stackexchange.com/questions/261004

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档