Security Command Center 자세 위반 로그 수집
이 문서에서는 Cloud Storage를 사용하여 Security Command Center 자세 위반 로그를 Google Security Operations로 내보내고 수집하는 방법을 설명합니다. 파서는 발견 결과의 원시 JSON 데이터를 통합 데이터 모델 (UDM)로 변환합니다. 관련 필드를 추출하고, 데이터를 재구성하고, UDM 필드에 매핑하고, 데이터 품질과 일관성을 보장하기 위해 다양한 검증과 보강을 실행합니다.
시작하기 전에
다음 기본 요건이 충족되었는지 확인합니다.
- Google Cloud 환경에서 Security Command Center가 사용 설정되어 있습니다.
- Google SecOps 인스턴스
- Security Command Center 및 Cloud Logging에 대한 권한 있는 액세스 권한입니다.
Cloud Storage 버킷 만들기
- Google Cloud 콘솔에 로그인합니다.
Cloud Storage 버킷 페이지로 이동합니다.
만들기를 클릭합니다.
버킷 만들기 페이지에서 버킷 정보를 입력합니다. 다음 각 단계를 완료한 후 계속을 클릭하여 다음 단계로 진행합니다.
시작하기 섹션에서 다음을 수행합니다.
- 버킷 이름 요구사항을 충족하는 고유한 이름을 입력합니다(예: gcp-scc-posture-violation-logs).
계층적 네임스페이스를 사용 설정하려면 펼치기 화살표를 클릭하여 파일 지향 및 데이터 집약적인 워크로드에 최적화 섹션을 펼친 다음 이 버킷에서 계층적 네임스페이스 사용 설정을 선택합니다.
버킷 라벨을 추가하려면 펼치기 화살표를 클릭하여 라벨 섹션을 펼칩니다.
라벨 추가를 클릭하고 라벨의 키와 값을 지정합니다.
데이터 저장 위치 선택 섹션에서 다음을 수행합니다.
- 위치 유형을 선택합니다.
위치 유형 메뉴를 사용하여 버킷 내 객체 데이터가 영구적으로 저장될 위치를 선택합니다.
버킷 간 복제를 설정하려면 버킷 간 복제 설정 섹션을 펼칩니다.
데이터의 스토리지 클래스 선택 섹션에서 버킷에 기본 스토리지 클래스를 선택하거나, 버킷 데이터의 자동 스토리지 클래스 관리에 자동 클래스를 선택합니다.
객체 액세스를 제어하는 방식 선택 섹션에서 공개 액세스 방지를 적용하지 않음을 선택하고 버킷의 객체에 대한 액세스 제어 모델을 선택합니다.
객체 데이터 보호 방법 선택 섹션에서 다음을 수행합니다.
- 버킷에 설정할 데이터 보호 아래의 옵션을 선택합니다.
- 객체 데이터의 암호화 방법을 선택하려면 데이터 암호화라는 펼치기 화살표를 클릭하고 데이터 암호화 방법을 선택합니다.
만들기를 클릭합니다.
Security Command Center 로깅 구성
- Google Cloud 콘솔에 로그인합니다.
Security Command Center 페이지로 이동합니다.
조직을 선택합니다.
설정을 클릭합니다.
지속적 내보내기 탭을 클릭합니다.
내보내기 이름에서 Logging 내보내기를 클릭합니다.
싱크에서 발견 항목을 Logging에 로깅을 사용 설정합니다.
로깅 프로젝트에서 발견 항목을 로깅하려는 프로젝트를 입력하거나 검색합니다.
저장을 클릭합니다.
Security Command Center 자세 위반 로그 내보내기 구성
- Google Cloud 콘솔에 로그인합니다.
- 로깅 > 로그 라우터로 이동합니다.
- 싱크 만들기를 클릭합니다.
다음 구성 매개변수를 제공합니다.
- 싱크 이름: 의미 있는 이름을 입력합니다(예:
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"
내보내기 옵션 설정: 모든 로그 항목을 포함합니다.
- 싱크 이름: 의미 있는 이름을 입력합니다(예:
만들기를 클릭합니다.
Cloud Storage 권한 구성
- IAM 및 관리자 > IAM으로 이동합니다.
- Cloud Logging 서비스 계정을 찾습니다.
- 버킷에 대한 roles/storage.admin을 부여합니다.
피드 설정
피드를 구성하려면 다음 단계를 따르세요.
- SIEM 설정 > 피드로 이동합니다.
- 새 피드 추가를 클릭합니다.
- 다음 페이지에서 단일 피드 구성을 클릭합니다.
- 피드 이름 필드에 피드 이름을 입력합니다(예: Security Command Center 자세 위반 로그).
- 소스 유형으로 Google Cloud Storage V2를 선택합니다.
- 로그 유형으로 Security Command Center 자세 위반을 선택합니다.
- Chronicle 서비스 계정 필드 옆에 있는 서비스 계정 가져오기를 클릭합니다.
- 다음을 클릭합니다.
다음 입력 매개변수의 값을 지정합니다.
- 스토리지 버킷 URI: Cloud Storage 버킷 URL입니다(예:
gs://gcp-scc-posture-violation-logs/
). 이 URL은 후행 슬래시 (/)로 끝나야 합니다. 소스 삭제 옵션: 환경설정에 따라 삭제 옵션을 선택합니다.
최대 파일 기간: 지난 일수 동안 수정된 파일을 포함합니다. 기본값은 180일입니다.
- 스토리지 버킷 URI: Cloud Storage 버킷 URL입니다(예:
다음을 클릭합니다.
확정 화면에서 새 피드 구성을 검토한 다음 제출을 클릭합니다.
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 | 직접 매핑 |
생성 시간 | 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.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 ] |
직접 매핑 |
도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가로부터 답변을 받으세요.