Cloud Security Command Center 상태 위반 로그 수집

다음에서 지원:

이 문서에서는 Cloud Storage를 사용하여 Security Command Center 상태 위반 로그를 내보내고 Google Security Operations로 수집하는 방법을 설명합니다. 파서는 결과의 원시 JSON 데이터를 통합 데이터 모델 (UDM)로 변환합니다. 관련 필드를 추출하고, 데이터를 재구성하고, UDM 필드에 매핑하고, 다양한 유효성 검사 및 보강을 실행하여 데이터 품질과 일관성을 보장합니다.

시작하기 전에

  • Google Cloud 환경에서 Security Command Center가 사용 설정되어 Google Cloud 있는지 확인합니다.
  • Google SecOps 인스턴스가 있는지 확인합니다.
  • Security Command Center 및 Cloud Logging에 대한 액세스 권한이 있는지 확인합니다.

Cloud Storage 버킷 만들기

  1. Google Cloud 콘솔에 로그인합니다.
  2. Cloud Storage 버킷 페이지로 이동합니다.

    버킷으로 이동

  3. 만들기를 클릭합니다.

  4. 버킷 만들기 페이지에서 버킷 정보를 입력합니다. 다음 단계를 완료할 때마다 계속을 클릭하여 다음 단계로 진행합니다.

    1. 시작하기 섹션에서 다음을 수행합니다.

      1. 버킷 이름 요구사항을 충족하는 고유한 이름을 입력합니다(예: gcp-scc-posture-violation-logs).
      2. 계층적 네임스페이스를 사용 설정하려면 펼치기 화살표를 클릭하여 파일 지향 및 데이터 집약적인 워크로드에 최적화 섹션을 펼친 다음 이 버킷에서 계층적 네임스페이스 사용 설정을 선택합니다.

      3. 버킷 라벨을 추가하려면 펼치기 화살표를 클릭하여 라벨 섹션을 펼칩니다.

      4. 라벨 추가를 클릭하고 라벨의 키와 값을 지정합니다.

    2. 데이터 저장 위치 선택 섹션에서 다음을 수행합니다.

      1. 위치 유형을 선택합니다.
      2. 위치 유형 메뉴를 사용하여 버킷 내 객체 데이터가 영구적으로 저장될 위치를 선택합니다.

      3. 버킷 간 복제를 설정하려면 버킷 간 복제 설정 섹션을 펼칩니다.

    3. 데이터의 스토리지 클래스 선택 섹션에서 버킷의 기본 스토리지 클래스를 선택하거나, 버킷 데이터의 자동 스토리지 클래스 관리에 자동 클래스를 선택합니다.

    4. 객체 액세스를 제어하는 방식 선택 섹션에서 아니요를 선택하여 공개 액세스 방지를 적용하고 버킷의 객체에 대한 액세스 제어 모델을 선택합니다.

    5. 객체 데이터 보호 방법 선택 섹션에서 다음을 수행합니다.

      1. 데이터 보호에서 버킷에 설정할 옵션을 선택합니다.
      2. 객체 데이터를 암호화하는 방법을 선택하려면 데이터 암호화라는 펼치기 화살표를 클릭하고 데이터 암호화 방법을 선택합니다.
  5. 만들기를 클릭합니다.

Security Command Center 로깅 구성

  1. Google Cloud 콘솔에 로그인합니다.
  2. Security Command Center 페이지로 이동합니다.

    Security Command Center로 이동

  3. 조직을 선택합니다.

  4. 설정을 클릭합니다.

  5. 지속적 내보내기 탭을 클릭합니다.

  6. 내보내기 이름에서 Logging 내보내기를 클릭합니다.

  7. 싱크에서 발견 항목을 Logging에 로깅을 사용 설정합니다.

  8. Logging 프로젝트에서 발견 항목을 로깅하려는 프로젝트를 입력하거나 검색합니다.

  9. 저장을 클릭합니다.

구성 Google Cloud Security Command Center Posture Violation 로그 내보내기

  1. Google Cloud 콘솔에 로그인합니다.
  2. 로깅 > 로그 라우터로 이동합니다.
  3. 싱크 만들기를 클릭합니다.
  4. 다음 구성 매개변수를 제공합니다.

    • Sink Name(싱크 이름): 의미 있는 이름을 입력합니다(예: scc-posture-violation-logs-sink).
    • 싱크 대상: Cloud Storage 저장소를 선택하고 버킷의 URI(예: gs://gcp-scc-posture-violation-logs)를 입력합니다.
    • 로그 필터:

      logName="projects/<your-project-id>/logs/cloudsecurityscanner.googleapis.com%2Fposture_violations"
      resource.type="cloud_security_center_posture_violation"
      
    • 내보내기 옵션 설정: 모든 로그 항목을 포함합니다.

  5. 만들기를 클릭합니다.

Cloud Storage 권한 구성

  1. IAM 및 관리자 > IAM으로 이동합니다.
  2. Cloud Logging 서비스 계정을 찾습니다.
  3. 버킷에 roles/storage.admin을 부여합니다.

Google Cloud Security Command Center 상태 위반 로그를 수집하도록 Google SecOps에서 피드 구성

  1. SIEM 설정 > 피드로 이동합니다.
  2. 새로 추가를 클릭합니다.
  3. 피드 이름 필드에 피드 이름을 입력합니다(예: Google Cloud Security Command Center Posture Violation Logs).
  4. 소스 유형으로 Google Cloud Storage를 선택합니다.
  5. 로그 유형으로 Security Command Center Posture Violation을 선택합니다.
  6. Chronicle 서비스 계정 필드 옆에 있는 서비스 계정 가져오기를 클릭합니다.
  7. 다음을 클릭합니다.
  8. 다음 입력 매개변수의 값을 지정합니다.

    • 스토리지 버킷 URI: Cloud Storage 버킷 URL입니다(예: gs://gcp-scc-posture-violation-logs).
    • URI Is A: 하위 디렉터리가 포함된 디렉터리를 선택합니다.
    • 소스 삭제 옵션: 원하는 삭제 옵션을 선택합니다.

    • 애셋 네임스페이스: 애셋 네임스페이스입니다.

    • 수집 라벨: 이 피드의 이벤트에 적용된 라벨입니다.

  9. 다음을 클릭합니다.

  10. 확정 화면에서 새 피드 구성을 검토한 다음 제출을 클릭합니다.

UDM 매핑 표

로그 필드 UDM 매핑 논리
카테고리 read_only_udm.metadata.product_event_type 직접 매핑
changed_policy read_only_udm.security_result.rule_name 직접 매핑
cloudProvider read_only_udm.target.resource.attribute.cloud.environment 직접 매핑
createTime read_only_udm.security_result.detection_fields[createTime] 직접 매핑
finding.risks.riskCategory read_only_udm.security_result.detection_fields[risk_category] 직접 매핑
mute read_only_udm.security_result.detection_fields[mute] 직접 매핑
name read_only_udm.metadata.product_log_id 직접 매핑
originalProviderId read_only_udm.target.resource.attribute.labels[original_provider_id] 직접 매핑
parent read_only_udm.target.resource_ancestors[0].name 직접 매핑
parentDisplayName read_only_udm.metadata.description 직접 매핑
propertyDataTypes.changed_policy.primitiveDataType read_only_udm.security_result.rule_labels[changed_policy_primitive_data_type] 직접 매핑
propertyDataTypes.policy_drift_details.listValues.propertyDataTypes[0].structValue.fields.drift_details.structValue.fields.detected_configuration.primitiveDataType read_only_udm.security_result.rule_labels[detected_configuration_primitive_data_type] 직접 매핑
propertyDataTypes.policy_drift_details.listValues.propertyDataTypes[0].structValue.fields.drift_details.structValue.fields.expected_configuration.primitiveDataType read_only_udm.security_result.rule_labels[expected_configuration_primitive_data_type] 직접 매핑
propertyDataTypes.policy_drift_details.listValues.propertyDataTypes[0].structValue.fields.field_name.primitiveDataType read_only_udm.security_result.rule_labels[field_name_primitive_data_type] 직접 매핑
propertyDataTypes.posture_deployment_name.primitiveDataType read_only_udm.security_result.detection_fields[posture_deployment_name_primitiveDataType] 직접 매핑
propertyDataTypes.posture_deployment_resource.primitiveDataType read_only_udm.security_result.detection_fields[posture_deployment_resource_primitiveDataType] 직접 매핑
propertyDataTypes.posture_name.primitiveDataType read_only_udm.security_result.detection_fields[posture_name_primitiveDataType] 직접 매핑
propertyDataTypes.posture_revision_id.primitiveDataType read_only_udm.security_result.detection_fields[posture_revision_id_primitiveDataType] 직접 매핑
resource.cloudProvider read_only_udm.target.resource.attribute.cloud.environment 직접 매핑
resource.displayName read_only_udm.target.resource.attribute.labels[resource_displayName] 직접 매핑
resource.gcpMetadata.organization read_only_udm.target.resource.attribute.labels[resource_organization] 직접 매핑
resource.gcpMetadata.parent read_only_udm.target.resource.attribute.labels[resource_parent] 직접 매핑
resource.gcpMetadata.parentDisplayName read_only_udm.target.resource.attribute.labels[resource_parentDisplayName] 직접 매핑
resource.gcpMetadata.project read_only_udm.target.resource.attribute.labels[resource_project] 직접 매핑
resource.gcpMetadata.projectDisplayName read_only_udm.target.resource.attribute.labels[resource_projectDisplayName] 직접 매핑
resource.organization read_only_udm.target.resource.attribute.labels[resource_organization] 직접 매핑
resource.resourcePath.nodes.displayName read_only_udm.target.resource_ancestors.name 직접 매핑
resource.resourcePath.nodes.id read_only_udm.target.resource_ancestors.product_object_id 직접 매핑
resource.resourcePath.nodes.nodeType read_only_udm.target.resource_ancestors.resource_subtype 직접 매핑
resource.resourcePathString read_only_udm.target.resource.attribute.labels[resource_path_string] 직접 매핑
resource.service read_only_udm.target.resource_ancestors[10].name 직접 매핑
resource.type read_only_udm.target.resource.attribute.labels[resource_type] 직접 매핑
resourceName read_only_udm.target.resource.name 직접 매핑
securityPosture.changedPolicy read_only_udm.security_result.rule_labels[changed_policy] 직접 매핑
securityPosture.name read_only_udm.security_result.detection_fields[security_posture_name] 직접 매핑
securityPosture.policyDriftDetails[0].detectedValue read_only_udm.security_result.rule_labels[policy_drift_details_detected_value] 직접 매핑
securityPosture.policyDriftDetails[0].expectedValue read_only_udm.security_result.rule_labels[policy_drift_details_expected_value] 직접 매핑
securityPosture.policyDriftDetails[0].field read_only_udm.security_result.rule_labels[policy_drift_details_field] 직접 매핑
securityPosture.policySet read_only_udm.security_result.rule_set 직접 매핑
securityPosture.postureDeployment read_only_udm.security_result.detection_fields[posture_deployment] 직접 매핑
securityPosture.postureDeploymentResource read_only_udm.security_result.detection_fields[posture_deployment_resource] 직접 매핑
securityPosture.revisionId read_only_udm.security_result.detection_fields[security_posture_revision_id] 직접 매핑
줄이는 것을 read_only_udm.security_result.severity 직접 매핑
sourceProperties.categories[0] read_only_udm.security_result.detection_fields[source_properties_categories] 직접 매핑
sourceProperties.changed_policy read_only_udm.security_result.rule_name 직접 매핑
sourceProperties.name read_only_udm.target.application 직접 매핑
sourceProperties.policy_drift_details[0].drift_details.detected_configuration read_only_udm.security_result.rule_labels[policy_drift_details_detected_configuration] 직접 매핑
sourceProperties.policy_drift_details[0].drift_details.expected_configuration read_only_udm.security_result.rule_labels[policy_drift_details_expected_configuration] 직접 매핑
sourceProperties.policy_drift_details[0].field_name read_only_udm.security_result.rule_labels[policy_drift_details_field_name] 직접 매핑
sourceProperties.posture_deployment read_only_udm.security_result.detection_fields[source_properties_posture_deployment_name] 직접 매핑
sourceProperties.posture_deployment_name read_only_udm.security_result.detection_fields[source_properties_posture_deployment_name] 직접 매핑
sourceProperties.posture_deployment_resource read_only_udm.security_result.detection_fields[source_properties_posture_deployment_resource] 직접 매핑
sourceProperties.posture_name read_only_udm.target.application 직접 매핑
sourceProperties.posture_revision_id read_only_udm.security_result.detection_fields[source_properties_posture_revision_id] 직접 매핑
sourceProperties.revision_id read_only_udm.security_result.detection_fields[source_properties_posture_revision_id] 직접 매핑
state read_only_udm.security_result.detection_fields[state] 직접 매핑
read_only_udm.metadata.vendor_name 파서는 정적 값 Google를 매핑합니다.
read_only_udm.metadata.product_name 파서는 정적 값 Security Command Center를 매핑합니다.
read_only_udm.target.resource.resource_type 파서는 정적 값 CLUSTER를 매핑합니다.
read_only_udm.security_result.about.investigation.status 파서는 정적 값 NEW를 매핑합니다.
read_only_udm.security_result.alert_state 파서는 정적 값 ALERTING를 매핑합니다.
read_only_udm.is_alert 파서는 정적 값 true를 매핑합니다.
read_only_udm.is_significant 파서는 정적 값 true를 매핑합니다.
read_only_udm.metadata.event_type 파서는 기본값으로 GENERIC_EVENT에 매핑합니다. 'category' 필드가 'SECURITY_POSTURE_DRIFT'와 같고 'client_device_present' 및 'token_target.application'이 비어 있지 않으면 'SERVICE_MODIFICATION'에 매핑됩니다. 'category' 필드가 'SECURITY_POSTURE_POLICY_DRIFT', 'SECURITY_POSTURE_POLICY_DELETE', 'SECURITY_POSTURE_DETECTOR_DRIFT' 또는 'SECURITY_POSTURE_DETECTOR_DELETE'이고 'network_edr_not_present'가 false이고 'client_device_present'가 true이면 'SCAN_UNCATEGORIZED'로 매핑됩니다. 'token_metadata.event_type' 필드가 'GENERIC_EVENT'이고 'network_edr_not_present'가 false이고 'client_device_present'가 true이면 'STATUS_UPDATE'에 매핑됩니다.
read_only_udm.target.resource_ancestors[1].resource_type 파서는 정적 값 CLOUD_PROJECT를 매핑합니다.
read_only_udm.target.resource.product_object_id 파서는 'parent' 필드에서 두 번째와 세 번째 '/' 문자 사이의 값을 추출합니다.
read_only_udm.target.resource_ancestors[1].name 파서는 'resourceName' 필드에서 네 번째와 다섯 번째 '/' 문자 사이의 값을 추출합니다.
read_only_udm.security_result.url_back_to_product 파서는 로그에서 추출된 조직, 소스, 발견 ID를 사용하여 URL을 동적으로 빌드합니다.
securityMarks.name read_only_udm.security_result.detection_fields[securityMarks_name] 직접 매핑

변경사항

2025-02-07

  • security_result.url_back_to_product UDM 필드의 매핑을 업데이트했습니다. 원시 로그 필드 값 resource.projectDisplayName의 프로젝트 ID 값을 접두사 ;?project=와 함께 security_result.url_back_to_product UDM 필드에 매핑된 URL 끝에 추가했습니다.

2024-11-21

  • SCC API의 v2 버전 지원을 추가했으며 다음 필드가 업데이트의 일부로 포함됩니다.
  • resource.gcpMetadata.project
  • resource.gcpMetadata.projectDisplayName
  • resource.gcpMetadata.parent
  • resource.gcpMetadata.parentDisplayName
  • resource.gcpMetadata.folders.resourceFolder
  • resource.gcpMetadata.folders.resourceFolderDisplayName
  • resource.gcpMetadata.organization

2024-03-20

  • 파서를 새로 만들었습니다.

도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가의 답변을 받으세요.