cis-benchmarks

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

CIS Benchmarks

CIS基准

Implement and audit CIS security benchmarks.
实施并审计CIS安全基准。

When to Use This Skill

何时使用此Skill

Use this skill when:
  • Assessing security compliance
  • Implementing security baselines
  • Meeting regulatory requirements
  • Hardening systems to standards
在以下情况下使用此skill:
  • 评估安全合规性
  • 实施安全基线
  • 满足监管要求
  • 将系统加固到标准

Assessment Tools

评估工具

OpenSCAP

OpenSCAP

bash
undefined
bash
undefined

Install

安装

apt install openscap-scanner scap-security-guide
apt install openscap-scanner scap-security-guide

Run CIS benchmark scan

运行CIS基准扫描

oscap xccdf eval
--profile xccdf_org.ssgproject.content_profile_cis
--results results.xml
--report report.html
/usr/share/xml/scap/ssg/content/ssg-ubuntu2204-ds.xml
undefined
oscap xccdf eval
--profile xccdf_org.ssgproject.content_profile_cis
--results results.xml
--report report.html
/usr/share/xml/scap/ssg/content/ssg-ubuntu2204-ds.xml
undefined

Lynis

Lynis

bash
undefined
bash
undefined

Install

安装

apt install lynis
apt install lynis

Run audit

运行审计

lynis audit system
lynis audit system

Generate report

生成报告

lynis audit system --report-file /tmp/lynis-report.dat
undefined
lynis audit system --report-file /tmp/lynis-report.dat
undefined

InSpec

InSpec

ruby
undefined
ruby
undefined

cis-profile/controls/ssh.rb

cis-profile/controls/ssh.rb

control 'cis-ssh-1' do impact 1.0 title 'Ensure SSH root login is disabled'
describe sshd_config do its('PermitRootLogin') { should eq 'no' } end end
control 'cis-ssh-2' do impact 0.7 title 'Ensure SSH password authentication is disabled'
describe sshd_config do its('PasswordAuthentication') { should eq 'no' } end end

```bash
control 'cis-ssh-1' do impact 1.0 title 'Ensure SSH root login is disabled'
describe sshd_config do its('PermitRootLogin') { should eq 'no' } end end
control 'cis-ssh-2' do impact 0.7 title 'Ensure SSH password authentication is disabled'
describe sshd_config do its('PasswordAuthentication') { should eq 'no' } end end

```bash

Run InSpec

运行InSpec

inspec exec cis-profile -t ssh://user@target
undefined
inspec exec cis-profile -t ssh://user@target
undefined

Kubernetes CIS

Kubernetes CIS

bash
undefined
bash
undefined

kube-bench

kube-bench

docker run --rm -v /etc:/etc:ro -v /var:/var:ro
aquasec/kube-bench:latest run --targets node
docker run --rm -v /etc:/etc:ro -v /var:/var:ro
aquasec/kube-bench:latest run --targets node

Check specific sections

检查特定部分

kube-bench run --targets master --check 1.1,1.2
undefined
kube-bench run --targets master --check 1.1,1.2
undefined

Remediation Workflow

修复工作流

yaml
workflow:
  1_scan:
    - Run automated assessment
    - Generate baseline report
    
  2_analyze:
    - Review findings
    - Identify false positives
    - Prioritize by risk
    
  3_remediate:
    - Apply fixes
    - Document exceptions
    - Verify changes
    
  4_validate:
    - Re-run assessment
    - Confirm remediation
    - Generate compliance report
yaml
workflow:
  1_scan:
    - Run automated assessment
    - Generate baseline report
    
  2_analyze:
    - Review findings
    - Identify false positives
    - Prioritize by risk
    
  3_remediate:
    - Apply fixes
    - Document exceptions
    - Verify changes
    
  4_validate:
    - Re-run assessment
    - Confirm remediation
    - Generate compliance report

Best Practices

最佳实践

  • Baseline before hardening
  • Document exceptions
  • Automate assessments
  • Track compliance over time
  • Regular re-assessment
  • Version control configurations
  • 加固前先建立基线
  • 记录例外情况
  • 自动化评估
  • 持续跟踪合规性
  • 定期重新评估
  • 版本控制配置

Related Skills

相关技能

  • linux-hardening - Linux security
  • vulnerability-scanning - Security scanning
  • linux-hardening - Linux安全
  • vulnerability-scanning - 安全扫描