[CKS] 1-1. CIS Benchmarks

시스템 보안 강화를 위한 CIS 벤치마크 활용과 자동화된 보안 감사로 서버 및 K8s(kube-bench) 취약점을 점검하고 해결합니다.

[CKS] 1-1. CIS Benchmarks
Photo by Steve Johnson / Unsplash

개요

시스템 보안을 강화, 점검, 업데이트 하며 지속적인 운영을 위해 보안 벤치마크의 의미를 이해해야합니다.

Notion Image

Security Benchmark

  • 시스템에 대한 보안 감사 진행시 사용
  • 서버를 평가하는 많은 도구들이 있으며 일반적으로 사용되는 도구 중 하나가 CIS 벤치마킹 도구
    • Center of Internet Security
    • 커뮤니티 주도 비영리조직
  • Public Cloud Platform, OS, Mobile, Network, Desktop, Database, Server
    • 25개 이상의 공급업체에 대한 사이버 보안 벤치마크를 제공하고 있습니다.
  • 다양한 보안 권장 사항이 존재합니다.
    • 규정을 준수하지 않는 구성과 관련된 위협, 위험을 설명
    • 확인하기 위한 단계적인 지침과 필요한 명령어 제공
    • 문제 발생시 문제 해결을 위한 절차
  • 평가를 수행하고 문제를 해결하는데 도움이 되는 필요한 자동화 도구 또한 제공하고 있습니다.
    • CIS CAT (구성 평가 도구)는 서버 구성을 CIS 벤치마크와 비교하는 프로세스를 자동화하며 포괄적인 HTML 보고서를 생성

Hands-on

--------------------------------------------------------------------------------------
   ,o88888o.    8888    d888888o.          ,o88888o.           8.    8888888888888888 
  8888    `88.  8888  .`8888:' `88.       8888    `88.        .88.         8888       
,88888      `8. 8888  8.`8888.   Y8     ,88888      `8.      .8888.        8888       
888888          8888  `8.`8888.         888888              .`88888.       8888       
888888          8888   `8.`8888.   888  888888             .8.`88888.      8888       
888888          8888    `8.`8888.  888  888888            .8`8.`88888.     8888       
888888          8888     `8.`8888.      888888           .8' `8.`88888.    8888       
`88888      .8' 8888 8b   `8.`8888.     `88888      .8' .8'   `8.`88888.   8888       
  8888    ,88'  8888 `8b.  ;8.`8888       8888    ,88' .888888888.`88888.  8888       
   `888888P'    8888  `Y8888P ,88P'        `888888P'  .8'       `8.`88888. 8888       
--------------------------------------------------------------------------------------
         Welcome to CIS-CAT Pro Assessor; built on 11/20/2024 15:17 PM
--------------------------------------------------------------------------------------
  This is the Center for Internet Security Configuration Assessment Tool, v4.48.0
          At any time during the selection process, enter 'q!' to exit.
--------------------------------------------------------------------------------------

Verifying application

Configured report output directory to '/var/www/html/'
Configured report naming prefix to 'index'
Attempting to load the default sessions.properties, bundled with the application.
Started Assessment 1/1

Loading Benchmarks/Data-Stream Collections

Available Benchmarks/Data-Stream Collections:
 1. CIS Controls Assessment Module - Implementation Group 1 for Windows 10 v1.0.3
 2. CIS Controls Assessment Module - Implementation Group 1 for Windows Server v1.0.0
 3. CIS Google Chrome Benchmark v3.0.0
 4. CIS Microsoft Windows 10 Enterprise Benchmark v3.0.0
 5. CIS Microsoft Windows 10 Stand-alone Benchmark v3.0.0
 6. CIS Microsoft Windows 11 Enterprise Benchmark v3.0.0
 7. CIS Ubuntu Linux 20.04 LTS Benchmark v2.0.1
 > Select Content # (max 7): 7

Selected 'CIS Ubuntu Linux 20.04 LTS Benchmark'

Assessment File CIS_Ubuntu_Linux_20.04_LTS_Benchmark_v2.0.1-xccdf.xml has a valid Signature.
Profiles:
1. Level 1 - Server
2. Level 2 - Server
3. Level 1 - Workstation
4. Level 2 - Workstation
 > Select Profile # (max 4): 1

Selected Profile 'Level 1 - Server'

Obtaining session connection --> Local
Connection established.  
Selected Checklist 'CIS Ubuntu Linux 20.04 LTS Benchmark'
Selected Profile 'Level 1 - Server'

...
Starting Assessment
Notion Image
Notion Image

CIS Benchmark - Kubernetes

k8s를 사용하여 솔루션을 개발 배포, 평가하려는 사람들에게 마찬가지로 CIS Benchmark를 제공합니다.

다만 CIS Benchmark는 k8s를 평가하기 위해선 Pro 플랜이 필요합니다.

따라서 대체할 수 있는 방안을 정리하였습니다.

kube-bench

Aqua Security에서 제공하는 오픈 소스 도구로 k8s가 보안 모범 사례에 따라 배포되었는지 확인하기 위해 사용합니다. 자동화된 평가를 수행할 수 있습니다. Kube-Bench는 쿠버네티스 배포가 CIS 벤치마크에 명시된 모범 사례를 준수하는지 자동으로 검증하는 오픈소스 도구입니다.

Kube-Bench를 배포하고 실행하는 데 사용할 수 있는 방법은 여러 가지가 있습니다.

  • Docker 컨테이너:
    • Docker를 사용하여 Kube-Bench를 격리하여 실행합니다.
  • Kubernetes Job:
    • Kubernetes 클러스터 내에서 Kube-Bench를 Job으로 배포하여 규정 준수를 정기적으로 모니터링합니다.
  • Binary/Source file 에서 컴파일:
    • 도구를 마스터 노드에 직접 설치하거나 사용자 정의 사용을 위해 소스에서 컴파일합니다.