Symantec Web Security Service(WSS) 로그 수집
이 문서에서는 Cloud Storage를 사용하여 Symantec Web Security Service(WSS) 로그를 Google Security Operations로 수집하는 방법을 설명합니다. 파서는 먼저 로그 메시지를 JSON으로 파싱하려고 시도합니다. 이 작업이 실패하면 점점 더 구체적인 grok 패턴을 사용하여 원시 텍스트에서 필드를 추출하고, 최종적으로 추출된 데이터를 통합 데이터 모델(UDM)에 매핑합니다. Symantec Web Security Service(WSS)는 멀웨어, 피싱, 데이터 손실을 비롯한 웹 기반 위협에 대한 실시간 보호 기능을 제공하는 클라우드 기반 웹 보안 솔루션입니다.
시작하기 전에
다음 기본 요건이 충족되었는지 확인합니다.
- Google SecOps 인스턴스
- Cloud Storage API가 사용 설정된 Google Cloud 프로젝트
- Cloud Storage 버킷을 만들고 관리할 수 있는 권한
- Cloud Storage 버킷에서 Identity and Access Management(IAM) 정책을 관리할 수 있는 권한
- Cloud Run 서비스, Pub/Sub 주제, Cloud Scheduler 작업을 만들 수 있는 권한
- Symantec Web Security Service 포털에 대한 권한 있는 액세스
Symantec WSS API 사용자 인증 정보 수집
Symantec WSS 사이트 URL 가져오기
- Symantec Web Security Service 포털에 로그인합니다.
- 브라우저 주소 표시줄에서 포털 URL을 확인합니다.
- 형식:
https://portal.threatpulse.com또는 조직별 URL - 예:
https://portal.threatpulse.com/reportpod에서 WSS에 액세스하는 경우 사이트 URL은https://portal.threatpulse.com입니다.
- 형식:
API 사용자 인증 정보 만들기
- 관리자로 Symantec Web Security Service Portal에 로그인합니다.
- 계정 > API 사용자 인증 정보로 이동합니다.
- API 사용자 인증 정보 추가를 클릭합니다. 포털에 자동 생성된 사용자 이름 및 비밀번호가 포함된 API 사용자 인증 정보 추가 대화상자가 표시됩니다.
사용자 이름과 비밀번호를 복사하여 안전하게 저장합니다.
API 만료 옵션을 선택합니다.
- 시간 기반: 이 토큰이 만료되는 날짜와 시간을 정의합니다.
- 만료되지 않음: 토큰이 무기한 유효합니다(프로덕션에 권장됨).
액세스 옵션에서 보고 액세스 로그를 선택합니다.
저장을 클릭합니다.
권한 확인
계정에 필요한 권한이 있는지 확인하려면 다음 안내를 따르세요.
- Symantec Web Security Service Portal에 로그인합니다.
- 계정 > API 사용자 인증 정보로 이동합니다.
- 액세스가 보고 액세스 로그로 설정된 상태에서 생성한 API 사용자 인증 정보가 표시되면 필요한 권한이 있는 것입니다.
- 이 옵션이 표시되지 않으면 관리자에게 문의하여 보고 액세스 로그 권한을 부여해 달라고 요청하세요.
테스트 API 액세스
통합을 진행하기 전에 사용자 인증 정보를 테스트합니다.
# Replace with your actual credentials WSS_USERNAME="your-api-username" WSS_PASSWORD="your-api-password" WSS_SYNC_URL="https://portal.threatpulse.com/reportpod/logs/sync" # startDate must be within the last 7 days. This requests logs from the start of the current hour. START_MS=$(( $(date +%s) / 3600 * 3600 * 1000 )) curl -sS -o wss-test.zip -w "HTTP %{http_code}\n" \ -H "X-APIUsername: ${WSS_USERNAME}" \ -H "X-APIPassword: ${WSS_PASSWORD}" \ "${WSS_SYNC_URL}?token=none&startDate=${START_MS}&maxmb=10" # The sync status is appended to the end of the response, after the ZIP data tail -c 300 wss-test.zip | strings | grep -i "X-sync" # List the log files in the archive unzip -l wss-test.zip
예상 결과:
HTTP 200개- 두 줄
X-sync-token: ...및X-sync-status: done(또는more) .log.gz파일 목록(예:cloud_<tenant_ID>_<timestamp>.log.gz) 현재 시간에 대한 로그가 아직 없으면 목록이 비어 있습니다.
Cloud Storage 버킷 만들기
- Google Cloud 콘솔로 이동합니다.
- 프로젝트를 선택하거나 새 프로젝트를 만듭니다.
- 탐색 메뉴에서 Cloud Storage > 버킷으로 이동합니다.
- 버킷 만들기를 클릭합니다.
다음 구성 세부정보를 제공합니다.
설정 값 버킷 이름 지정 전역적으로 고유한 이름(예: symantec-wss-logs)을 입력합니다.위치 유형 필요에 따라 선택(리전, 이중 리전, 멀티 리전) 위치 위치를 선택합니다(예: us-central1).스토리지 클래스 표준(자주 액세스하는 로그에 권장) 액세스 제어 균일(권장) 보호 도구 선택사항: 객체 버전 관리 또는 보관 정책 사용 설정 만들기를 클릭합니다.
Cloud Run 함수의 서비스 계정 만들기
Cloud Run 함수에는 Cloud Storage 버킷에 쓰고 Pub/Sub에서 호출할 수 있는 권한이 있는 서비스 계정이 필요합니다.
서비스 계정 만들기
- Google Cloud 콘솔에서 IAM 및 관리자 > 서비스 계정으로 이동합니다.
- 서비스 계정 만들기를 클릭합니다.
- 다음 구성 세부정보를 제공합니다.
- 서비스 계정 이름:
symantec-wss-collector-sa을 입력합니다. - 서비스 계정 설명:
Service account for Cloud Run function to collect Symantec WSS logs을 입력합니다.
- 서비스 계정 이름:
- 만들고 계속하기를 클릭합니다.
- 이 서비스 계정에 프로젝트에 대한 액세스 권한 부여 섹션에서 다음 역할을 추가합니다.
- 역할 선택을 클릭합니다.
- 스토리지 객체 관리자를 검색하여 선택합니다.
- + 다른 역할 추가를 클릭합니다.
- Cloud Run 호출자를 검색하여 선택합니다.
- + 다른 역할 추가를 클릭합니다.
- Cloud Functions 호출자를 검색하여 선택합니다.
- 계속을 클릭합니다.
- 완료를 클릭합니다.
이러한 역할은 다음 작업에 필요합니다.
- 스토리지 객체 관리자: Cloud Storage 버킷에 로그를 쓰고 상태 파일을 관리합니다.
- Cloud Run 호출자: Pub/Sub가 함수를 호출할 수 있도록 허용합니다.
- Cloud Functions 호출자: 함수 호출을 허용합니다.
Cloud Storage 버킷에 IAM 권한 부여
서비스 계정에 Cloud Storage 버킷에 대한 쓰기 권한을 부여합니다.
- Cloud Storage > 버킷으로 이동합니다.
- 버킷 이름을 클릭합니다.
- 권한 탭으로 이동합니다.
- 액세스 권한 부여를 클릭합니다.
- 다음 구성 세부정보를 제공합니다.
- 주 구성원 추가: 서비스 계정 이메일(예:
symantec-wss-collector-sa@PROJECT_ID.iam.gserviceaccount.com)을 입력합니다. - 역할 할당: 스토리지 객체 관리자를 선택합니다.
- 주 구성원 추가: 서비스 계정 이메일(예:
- 저장을 클릭합니다.
Pub/Sub 주제 만들기
Cloud Scheduler가 게시하고 Cloud Run 함수가 구독할 Pub/Sub 주제를 만듭니다.
- Google Cloud 콘솔에서 Pub/Sub > 주제로 이동합니다.
- 주제 만들기를 클릭합니다.
- 다음 구성 세부정보를 제공합니다.
- 주제 ID:
symantec-wss-trigger를 입력합니다. - 다른 설정은 기본값으로 둡니다.
- 주제 ID:
- 만들기를 클릭합니다.
로그를 수집하는 Cloud Run 함수 만들기
Cloud Run 함수는 Cloud Scheduler의 Pub/Sub 메시지에 의해 트리거되어 Symantec WSS Sync API에서 로그를 가져와 Cloud Storage에 기록합니다.
Sync API는 gzip으로 압축된 로그 파일의 ZIP 파일을 반환합니다. 피드는 ZIP 파일 내의 로그 파일을 읽을 수 없으므로 이 함수는 보관 파일을 추출하고 각 .log.gz 파일을 별도의 객체로 버킷에 씁니다. 이 함수는 API에서 반환한 동기화 토큰을 상태 파일에 저장하므로 각 실행은 이전 실행이 중지된 지점에서 정확히 계속됩니다.
- Google Cloud 콘솔에서 Cloud Run으로 이동합니다.
- 함수 작성을 클릭합니다.
구성 섹션에서 다음 구성 세부정보를 제공합니다.
설정 값 서비스 이름 symantec-wss-collector리전 Cloud Storage 버킷과 일치하는 리전을 선택합니다(예: us-central1).런타임 Python 3.12 이상을 선택합니다. 트리거 섹션에서 트리거 추가를 클릭하고 Pub/Sub 트리거를 선택합니다.
Eventarc 트리거 창에서 다음 구성 세부정보를 제공합니다.
- 트리거 이름: 생성된 이름을 유지하거나 트리거 이름을 입력합니다.
- 트리거 유형: Google 소스를 선택합니다.
- 이벤트 제공자: Pub/Sub를 선택합니다.
- 이벤트 유형: google.cloud.pubsub.topic.v1.messagePublished를 선택합니다.
- Cloud Pub/Sub 주제 선택:
symantec-wss-trigger주제를 선택합니다. - 리전: 함수와 동일한 리전을 선택합니다.
- 서비스 계정: 서비스 계정
symantec-wss-collector-sa를 선택합니다.
트리거 저장을 클릭합니다.
인증 섹션에서 다음을 구성합니다.
- 인증 필요를 선택합니다.
- Identity and Access Management(IAM)를 확인합니다.
컨테이너, 네트워킹, 보안으로 이동하여 펼칩니다.
보안 탭으로 이동합니다.
- 서비스 계정: 서비스 계정(
symantec-wss-collector-sa)을 선택합니다.
- 서비스 계정: 서비스 계정(
컨테이너 탭으로 이동합니다.
- 변수 및 보안 비밀을 클릭합니다.
- 각 환경 변수에 대해 + 변수 추가를 클릭합니다.
변수 이름 예시 값 설명 GCS_BUCKETsymantec-wss-logsGCS 버킷 이름 GCS_PREFIXsymantec/wss/로그 파일의 프리픽스 STATE_KEYsymantec-wss-state.json로그 프리픽스 외부의 상태 경로 WSS_SYNC_URLhttps://portal.threatpulse.com/reportpod/logs/syncWSS Sync API 엔드포인트 WSS_API_USERNAMEyour-api-username(API 사용자 인증 정보에서)WSS API 사용자 이름 WSS_API_PASSWORDyour-api-password(API 사용자 인증 정보에서)WSS API 비밀번호 INITIAL_LOOKBACK_HOURS1첫 번째 실행에서 수집할 로그 시간(최대 167시간, 동기화 API는 최대 지난 7일 동안의 로그를 반환하기 때문) WSS_MAX_MB100동기화 API 응답 1개의 대략적인 최대 크기(MB)(1~2560) HTTP_TIMEOUT120HTTP 읽기 제한 시간(초) MAX_RETRIES3네트워크 오류 및 HTTP 5xx 응답에 대한 최대 재시도 횟수 RUN_BUDGET_SECONDS480함수가 새 페이지 요청을 중지하는 시간입니다. 요청 제한 시간보다 작게 유지하세요. USER_AGENTsymantec-wss-to-gcs/2.0사용자 에이전트 문자열 변수 및 보안 비밀 섹션에서 요청으로 이동합니다.
- 요청 제한 시간:
600초(10분)를 입력합니다.
- 요청 제한 시간:
설정 탭으로 이동합니다.
- 리소스 섹션에서 다음을 수행합니다.
- 메모리: 1GiB 이상을 선택합니다. 이 함수는 동기화 API 응답을 추출하는 동안 메모리에 하나(최대
WSS_MAX_MB)를 보관합니다. - CPU: 1을 선택합니다.
- 메모리: 1GiB 이상을 선택합니다. 이 함수는 동기화 API 응답을 추출하는 동안 메모리에 하나(최대
- 리소스 섹션에서 다음을 수행합니다.
버전 확장 섹션에서 다음을 수행합니다.
- 최소 인스턴스 수:
0를 입력합니다. - 최대 인스턴스 수:
1을 입력합니다. 동기화 API는 동기화 토큰당 하나의 클라이언트를 허용하므로 실행이 중복되어서는 안 됩니다.
- 최소 인스턴스 수:
만들기를 클릭합니다.
서비스가 생성될 때까지 기다립니다(1~2분).
서비스가 생성되면 인라인 코드 편집기가 자동으로 열립니다.
함수 코드 추가
- 함수 진입점에 main을 입력합니다.
인라인 코드 편집기에서 다음 두 파일을 만듭니다.
- 첫 번째 파일: main.py:
import functions_framework from google.api_core import exceptions as gcs_exceptions from google.cloud import storage import io import json import os import re import time import uuid import zipfile from datetime import datetime, timedelta, timezone from urllib.parse import urlencode import urllib3 http = urllib3.PoolManager(retries=False) storage_client = storage.Client() # The Sync API returns a ZIP archive of gzipped ELFF files followed by a # plain-text footer with the X-sync-token and X-sync-status lines. ZIP_SIGNATURES = (b'PK\x03\x04', b'PK\x05\x06') # archive with files, empty archive FOOTER_SCAN_BYTES = 4096 TOKEN_RE = re.compile(rb'X-sync-token:\s*(\S+)', re.IGNORECASE) STATUS_RE = re.compile(rb'X-sync-status:\s*(\S+)', re.IGNORECASE) MAX_LOOKBACK = timedelta(days=7) THROTTLE_WAIT_SECONDS = 60 MIN_SECONDS_PER_REQUEST = 120 class SyncApiError(Exception): """The Sync API returned a response that must not be processed.""" class TokenExpired(Exception): """The Sync API rejected the saved token (HTTP 410).""" @functions_framework.cloud_event def main(cloud_event): """Fetch Symantec WSS access logs from the Sync API and write them to GCS.""" bucket_name = os.environ['GCS_BUCKET'] prefix = os.environ.get('GCS_PREFIX', 'symantec/wss/') state_key = os.environ.get('STATE_KEY', 'symantec-wss-state.json') sync_url = os.environ.get('WSS_SYNC_URL', 'https://portal.threatpulse.com/reportpod/logs/sync') username = os.environ['WSS_API_USERNAME'] password = os.environ['WSS_API_PASSWORD'] lookback_hours = int(os.environ.get('INITIAL_LOOKBACK_HOURS', '1')) max_mb = int(os.environ.get('WSS_MAX_MB', '100')) http_timeout = int(os.environ.get('HTTP_TIMEOUT', '120')) max_retries = int(os.environ.get('MAX_RETRIES', '3')) run_budget = int(os.environ.get('RUN_BUDGET_SECONDS', '480')) user_agent = os.environ.get('USER_AGENT', 'symantec-wss-to-gcs/2.0') bucket = storage_client.bucket(bucket_name) state, generation = load_state(bucket, state_key) deadline = time.monotonic() + run_budget while time.monotonic() + MIN_SECONDS_PER_REQUEST <= deadline: token = state.get('token') or 'none' params = {'token': token, 'maxmb': max_mb} if token == 'none': params['startDate'] = initial_start_ms(state, lookback_hours) requested_at = datetime.now(timezone.utc) try: body = fetch_page(sync_url, params, username, password, user_agent, http_timeout, max_retries, deadline) except TokenExpired: # Restart the sync from the hour of the last successful page. # Events from that hour can be ingested again. print('Sync token expired (HTTP 410). Restarting with token=none.') state['token'] = None generation = save_state(bucket, state_key, state, generation) continue if body is None: print('Sync API is throttling requests. The next run continues from the saved token.') return archive, next_token, status = split_footer(body) if status not in ('more', 'done'): raise SyncApiError( f'X-sync-status is {status!r}. The data was discarded; the next run retries token {token!r}.') written = write_archive(bucket, prefix, archive) state.update({ 'token': next_token, 'last_status': status, 'last_success': requested_at.isoformat(), }) # resume_ms is where a restart after an expired token begins: the # startDate of a new sync, then the hour of the last fully synced point. if token == 'none': state['resume_ms'] = params['startDate'] if status == 'done': state['resume_ms'] = hour_floor_ms(requested_at) generation = save_state(bucket, state_key, state, generation) print(f'Wrote {len(written)} log files ({len(archive)} bytes), X-sync-status: {status}') if status == 'done': # The API expects at least 60 seconds before the next request. print('Sync is up to date.') return time.sleep(1) print('Run time budget reached. The next run continues from the saved token.') def initial_start_ms(state, lookback_hours): """startDate for a token=none request: within the last 7 days, at an hour boundary.""" now = datetime.now(timezone.utc) oldest_ms = hour_floor_ms(now - MAX_LOOKBACK) + 3600 * 1000 start_ms = state.get('resume_ms') or hour_floor_ms(now - timedelta(hours=lookback_hours)) return max(start_ms, oldest_ms) def hour_floor_ms(dt): return int(dt.replace(minute=0, second=0, microsecond=0).timestamp() * 1000) def fetch_page(sync_url, params, username, password, user_agent, timeout, max_retries, deadline): """Return the response body, None when throttled past the deadline, or raise.""" url = f'{sync_url}?{urlencode(params)}' headers = { 'User-Agent': user_agent, 'X-APIUsername': username, 'X-APIPassword': password, } failures = 0 while True: try: response = http.request('GET', url, headers=headers, timeout=urllib3.Timeout(connect=10.0, read=timeout)) except urllib3.exceptions.HTTPError as e: failures += 1 if failures > max_retries: raise print(f'Request failed ({e}), retry {failures}/{max_retries}') time.sleep(min(30, 2 ** failures)) continue if response.status == 200: return response.data if response.status == 410: raise TokenExpired() if response.status in (423, 429): # 423: another request with this token is in progress. 429: throttled. wait = retry_after_seconds(response) if time.monotonic() + wait + MIN_SECONDS_PER_REQUEST > deadline: return None print(f'HTTP {response.status}, waiting {wait}s') time.sleep(wait) continue if response.status >= 500: failures += 1 if failures <= max_retries: print(f'HTTP {response.status}, retry {failures}/{max_retries} with the same token') time.sleep(min(30, 2 ** failures)) continue detail = response.data[:500].decode('utf-8', errors='replace') raise SyncApiError(f'HTTP {response.status}: {detail}') def retry_after_seconds(response): value = response.headers.get('Retry-After', '') return int(value) if value.isdigit() else THROTTLE_WAIT_SECONDS def split_footer(body): """Split the response into the ZIP archive bytes, X-sync-token and X-sync-status.""" tail_start = max(0, len(body) - FOOTER_SCAN_BYTES) tail = body[tail_start:] token_match = TOKEN_RE.search(tail) status_match = STATUS_RE.search(tail) if not token_match or not status_match: raise SyncApiError( f'Response of {len(body)} bytes has no X-sync-token/X-sync-status footer (incomplete download).') footer_start = tail_start + min(token_match.start(), status_match.start()) token = token_match.group(1).decode('ascii') status = status_match.group(1).decode('ascii').lower() return body[:footer_start], token, status def write_archive(bucket, prefix, archive): """Upload every file in the ZIP archive to GCS as a separate object.""" if not archive: return [] if not archive.startswith(ZIP_SIGNATURES): raise SyncApiError(f'Expected a ZIP archive, got bytes starting with {archive[:8]!r}') date_path = datetime.now(timezone.utc).strftime('%Y/%m/%d') batch_id = f'{int(time.time())}_{uuid.uuid4().hex[:8]}' written = [] with zipfile.ZipFile(io.BytesIO(archive)) as zf: for member in zf.infolist(): if member.is_dir(): continue file_name = os.path.basename(member.filename) blob_name = f'{prefix}{date_path}/{batch_id}_{file_name}' content_type = 'application/gzip' if file_name.endswith('.gz') else 'text/plain' # if_generation_match=0 creates the object only if it does not exist, # which also makes the upload safe to retry. bucket.blob(blob_name).upload_from_string( zf.read(member), content_type=content_type, if_generation_match=0) written.append(blob_name) return written def load_state(bucket, key): """Return the saved state and its object generation (0 if there is no state yet).""" blob = bucket.get_blob(key) if blob is None: return {}, 0 return json.loads(blob.download_as_text()), blob.generation def save_state(bucket, key, state, generation): """Save the state only if no other run changed it since it was loaded.""" blob = bucket.blob(key) try: blob.upload_from_string(json.dumps(state), content_type='application/json', if_generation_match=generation) except gcs_exceptions.PreconditionFailed: raise RuntimeError(f'{key} was changed by another run; stopping to avoid a token conflict.') return blob.generation- 두 번째 파일: requirements.txt:
functions-framework==3.* google-cloud-storage==2.* urllib3>=2.0.0배포를 클릭하여 함수를 저장하고 배포합니다.
배포가 완료될 때까지 기다립니다(2~3분).
Cloud Scheduler 작업 만들기
Cloud Scheduler는 정기적으로 Pub/Sub 주제에 메시지를 게시하여 Cloud Run 함수를 트리거합니다.
- Google Cloud 콘솔에서 Cloud Scheduler로 이동합니다.
- 작업 만들기를 클릭합니다.
다음 구성 세부정보를 제공합니다.
설정 값 이름 symantec-wss-collector-hourly리전 Cloud Run 함수와 동일한 리전 선택 주파수 0 * * * *(매시간 정각)시간대 시간대 선택(UTC 권장) 타겟 유형 Pub/Sub 주제 Pub/Sub 주제( symantec-wss-trigger)를 선택합니다.메일 본문 {}(빈 JSON 객체)만들기를 클릭합니다.
일정 빈도 옵션
로그 볼륨 및 지연 시간 요구사항에 따라 빈도를 선택합니다.
| 빈도 | 크론 표현식 | 사용 사례 |
|---|---|---|
| 5분마다 | */5 * * * * |
대용량, 짧은 지연 시간 |
| 15분마다 | */15 * * * * |
검색량 보통 |
| 1시간마다 | 0 * * * * |
표준(권장) |
| 6시간마다 | 0 */6 * * * |
소량, 일괄 처리 |
| 매일 | 0 0 * * * |
이전 데이터 수집 |
통합 테스트
- Cloud Scheduler 콘솔에서 작업을 찾습니다.
- 강제 실행을 클릭하여 작업을 수동으로 트리거합니다.
- 몇 초 동안 기다립니다.
- Cloud Run > 서비스로 이동합니다.
- 함수 이름(
symantec-wss-collector)을 클릭합니다. - 로그 탭을 클릭합니다.
함수가 실행되었는지 확인합니다. 다음 항목을 찾습니다.
Wrote N log files (X bytes), X-sync-status: done Sync is up to date.동기화 API에 한 응답에 들어갈 수 있는 것보다 많은 데이터가 있는 경우 로그에는 최종
done앞에X-sync-status: more가 있는 여러Wrote N log files줄이 표시됩니다.Cloud Storage > 버킷으로 이동합니다.
버킷 이름을 클릭합니다.
접두사 폴더(
symantec/wss/)로 이동합니다.새
.log.gz파일(예:symantec/wss/YYYY/MM/DD/<run_ID>_cloud_<tenant_ID>_<timestamp>.log.gz)이 생성되었는지 확인합니다. 시만텍 WSS에 새 로그가 없으면 실행 시 파일이 생성되지 않습니다.
로그에 오류가 표시되는 경우:
- HTTP 401: 환경 변수에서 API 사용자 인증 정보를 확인합니다. 사용자 이름과 비밀번호가 올바른지 확인합니다.
- HTTP 403: API 사용자 인증 정보에 WSS 포털에서 'Reporting Access Logs'(액세스 로그 보고) 권한이 사용 설정되어 있는지 확인합니다.
- HTTP 400: 동기화의 첫 번째 요청에서 7일보다 오래된 시작 날짜를 사용했습니다.
INITIAL_LOOKBACK_HOURS낮음 - HTTP 409: 너무 많은 요청이
token=none와 새 동기화를 시작했습니다. 다음 실행까지 90분 동안 기다립니다. - HTTP 423 또는 429: 다른 요청이 진행 중이거나 Sync API가 요청을 제한하고 있습니다. 함수가 대기하고 다시 시도합니다. 대기가 실행 시간에 맞지 않으면 다음 실행은 저장된 토큰에서 계속됩니다.
- 동기화 토큰 만료(HTTP 410): 함수가 마지막으로 완료된 동기화 시간부터 동기화를 다시 시작합니다. 해당 시간의 일부 이벤트는 다시 수집될 수 있습니다.
- X-sync-status가 'abort' 또는 X-sync-token/X-sync-status 바닥글 없음: 응답이 불완전하여 삭제되었습니다. 다음 실행은 동일한 토큰으로 재시도합니다.
- ZIP 파일이 필요함: 동기화 API가 로그 파일이 아닌 다른 항목을 반환했습니다. API 액세스 테스트의 테스트를 통해 응답을 확인합니다.
- 다른 실행에 의해 변경됨: 두 실행이 중복되었습니다. 최대 인스턴스 수를
1로 설정합니다. - 변수 이름의 KeyError: Cloud Run 함수 구성에 필요한 모든 환경 변수가 설정되어 있는지 확인합니다.
Symantec WSS 로그를 수집하도록 Google SecOps에서 피드 구성
- SIEM 설정 > 피드로 이동합니다.
- 새 피드 추가를 클릭합니다.
- 단일 피드 구성을 클릭합니다.
- 피드 이름 필드에 피드 이름을 입력합니다(예:
Symantec WSS logs). - 소스 유형으로 Google Cloud Storage V2를 선택합니다.
- 로그 유형으로 Symantec WSS를 선택합니다.
서비스 계정 가져오기를 클릭합니다. 고유한 서비스 계정 이메일이 표시됩니다. 예를 들면 다음과 같습니다.
chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com이 이메일 주소를 복사합니다. 다음 단계에서 사용합니다.
다음을 클릭합니다.
다음 입력 파라미터의 값을 지정합니다.
- 스토리지 버킷 URL: 프리픽스 경로가 있는 Cloud Storage 버킷 URI를 입력합니다.
gs://symantec-wss-logs/symantec/wss/다음과 같이 바꿉니다.
symantec-wss-logs: Cloud Storage 버킷 이름입니다.symantec/wss/: 로그가 저장되는 선택적 프리픽스 또는 폴더 경로입니다(루트의 경우 비워 둠).
예시: - 루트 버킷:
gs://company-logs/- 프리픽스 포함:gs://company-logs/symantec-wss/- 하위 폴더 포함:gs://company-logs/symantec/wss/소스 삭제 옵션: 환경설정에 따라 삭제 옵션을 선택합니다.
- 파일 삭제 안함: 소스에서 파일을 삭제하지 않습니다(테스트에 권장).
- 전송된 파일 및 빈 디렉터리 삭제: 가져오기가 완료된 후 소스에서 파일과 빈 디렉터리를 삭제합니다.
최대 파일 기간: 최근 며칠 동안 수정된 파일을 포함합니다. 기본값은 180일입니다.
애셋 네임스페이스: 애셋 네임스페이스입니다.
수집 라벨: 이 피드의 이벤트에 적용할 라벨입니다.
다음을 클릭합니다.
확정 화면에서 새 피드 구성을 검토한 다음 제출을 클릭합니다.
Google SecOps 서비스 계정에 IAM 권한 부여
Google SecOps 서비스 계정에는 Cloud Storage 버킷에 대한 두 가지 역할이 필요합니다. 로그 객체를 읽기 위한 스토리지 객체 뷰어와 버킷 메타데이터를 읽기 위한 버킷 수준 역할입니다.
- Cloud Storage > 버킷으로 이동합니다.
- 버킷 이름을 클릭합니다.
- 권한 탭으로 이동합니다.
- 액세스 권한 부여를 클릭합니다.
- 다음 구성 세부정보를 제공합니다.
- 주 구성원 추가: Google SecOps 서비스 계정 이메일을 붙여넣습니다.
- 역할 할당: 다음 두 가지를 모두 선택합니다.
- 스토리지 객체 뷰어: 로그 객체를 읽습니다.
- 스토리지 기존 버킷 리더: 버킷 메타데이터를 읽습니다. 전송된 파일 및 빈 디렉터리 삭제 삭제 옵션을 선택한 경우 대신 스토리지 기존 버킷 작성자를 선택합니다. 이 역할은 삭제 권한도 부여합니다.
저장을 클릭합니다.
UDM 매핑 테이블
| 로그 필드 | UDM 매핑 | 로직 |
|---|---|---|
content_type_label |
additional.fields |
병합됨 |
cs_uri_extension_label |
additional.fields |
병합됨 |
cs_uri_path_label |
additional.fields |
병합됨 |
hostname_categories_label |
additional.fields |
병합됨 |
_intermediary |
intermediary |
병합됨 |
msg_desc |
metadata.description |
직접 매핑됨 |
s_action |
metadata.description |
직접 매핑됨 |
device_time |
metadata.event_timestamp |
ISO8601(으)로 파싱됨 |
log_time |
metadata.event_timestamp |
UNIX_MS(으)로 파싱됨 |
timestamp |
metadata.event_timestamp |
UNIX(으)로 파싱됨 |
when |
metadata.event_timestamp |
MMM dd HH:mm:ss(으)로 파싱됨 |
has_principal |
metadata.event_type |
매핑됨: true → NETWORK_CONNECTION, true → STATUS_UPDATE |
s-action |
metadata.product_event_type |
직접 매핑됨 |
product_data.x-bluecoat-transaction-uuid |
metadata.product_log_id |
직접 매핑됨 |
ref_uid |
metadata.product_log_id |
직접 매핑됨 |
uuid |
metadata.product_log_id |
직접 매핑됨 |
x-bluecoat-transaction-uuid |
metadata.product_log_id |
직접 매핑됨 |
product_name |
metadata.product_name |
직접 매핑됨 |
product_ver |
metadata.product_version |
직접 매핑됨 |
connection.url.scheme |
network.application_protocol |
직접 매핑됨 |
cs-uri-scheme |
network.application_protocol |
매핑됨: (?i)https → HTTPS |
uri_scheme |
network.application_protocol |
직접 매핑됨 |
cs-version |
network.application_protocol_version |
직접 매핑됨 |
connection.url.method |
network.http.method |
직접 매핑됨 |
cs-method |
network.http.method |
직접 매핑됨 |
method |
network.http.method |
직접 매핑됨 |
cs_referer |
network.http.referral_url |
직접 매핑됨 |
connection.http_status |
network.http.response_code |
이름 변경/매핑됨 |
status |
network.http.response_code |
직접 매핑됨 |
connection.http_user_agent |
network.http.user_agent |
직접 매핑됨 |
cs(user-agent) |
network.http.user_agent |
직접 매핑됨 |
http_user_agent |
network.http.user_agent |
직접 매핑됨 |
connection.url.scheme |
network.ip_protocol |
직접 매핑됨 |
uri_scheme |
network.ip_protocol |
직접 매핑됨 |
connection.bytes_download |
network.received_bytes |
이름 변경/매핑됨 |
received_bytes |
network.received_bytes |
이름 변경/매핑됨 |
connection.bytes_upload |
network.sent_bytes |
이름 변경/매핑됨 |
sent_bytes |
network.sent_bytes |
이름 변경/매핑됨 |
time_taken |
network.session_duration.seconds |
직접 매핑됨 |
session_id |
network.session_id |
직접 매핑됨 |
cs_connection_negotiated_cipher |
network.tls.cipher |
직접 매핑됨 |
product_data.x-cs-connection-negotiated-cipher |
network.tls.cipher |
직접 매핑됨 |
x-cs-connection-negotiated-cipher |
network.tls.cipher |
직접 매핑됨 |
certificate_hostname |
network.tls.client.server_name |
직접 매핑됨 |
product_data.x-rs-certificate-hostname |
network.tls.client.server_name |
직접 매핑됨 |
x-rs-certificate-hostname |
network.tls.client.server_name |
직접 매핑됨 |
product_data.x-rs-certificate-observed-errors |
network.tls.server.certificate.issuer |
직접 매핑됨 |
x-rs-certificate-observed-errors |
network.tls.server.certificate.issuer |
직접 매핑됨 |
certificate_validate |
network.tls.server.certificate.subject |
직접 매핑됨 |
product_data.x-rs-certificate-validate-status |
network.tls.server.certificate.subject |
직접 매핑됨 |
x-rs-certificate-validate-status |
network.tls.server.certificate.subject |
직접 매핑됨 |
connection.tls.version |
network.tls.version_protocol |
직접 매핑됨 |
cs_ssl_version |
network.tls.version_protocol |
직접 매핑됨 |
product_data.x-cs-connection-negotiated-ssl-version |
network.tls.version_protocol |
직접 매핑됨 |
x-cs-connection-negotiated-ssl-version |
network.tls.version_protocol |
직접 매핑됨 |
agent_type |
observer.application |
직접 매핑됨 |
product_data.x-client-agent-type |
observer.application |
직접 매핑됨 |
x-client-agent-type |
observer.application |
직접 매핑됨 |
os_version |
observer.platform_version |
직접 매핑됨 |
product_data.x-client-agent-sw |
observer.platform_version |
직접 매핑됨 |
x-client-agent-sw |
observer.platform_version |
직접 매핑됨 |
user_domain |
principal.administrative_domain |
직접 매핑됨 |
hostname |
principal.asset.hostname |
직접 매핑됨 |
c-ip |
principal.asset.ip |
병합됨 |
c_ip |
principal.asset.ip |
병합됨 |
collector_device_ip |
principal.asset.ip |
병합됨 |
connection.src_ip |
principal.asset.ip |
병합됨 |
src_ip |
principal.asset.ip |
병합됨 |
x-sr-vpop-ip |
principal.asset.ip |
병합됨 |
x-client-os |
principal.asset.platform_software.platform |
매핑됨: Windows → WINDOWS |
hostname |
principal.hostname |
직접 매핑됨 |
c-ip |
principal.ip |
병합됨 |
c_ip |
principal.ip |
병합됨 |
collector_device_ip |
principal.ip |
병합됨 |
connection.src_ip |
principal.ip |
병합됨 |
src_ip |
principal.ip |
병합됨 |
x-sr-vpop-ip |
principal.ip |
병합됨 |
product_data.r-supplier-country |
principal.location.country_or_region |
직접 매핑됨 |
r-supplier-country |
principal.location.country_or_region |
직접 매핑됨 |
supplier_country |
principal.location.country_or_region |
직접 매핑됨 |
src_port |
principal.port |
이름 변경/매핑됨 |
x-client-device-id |
principal.resource.product_object_id |
직접 매핑됨 |
user.name |
principal.user.user_display_name |
직접 매핑됨 |
user_name |
principal.user.user_display_name |
직접 매핑됨 |
cs-userdn |
principal.user.userid |
직접 매핑됨 |
security_result_action |
security_result.action |
병합됨 |
filter_result |
security_result.action_details |
직접 매핑됨 |
result |
security_result.action_details |
직접 매핑됨 |
rs_icap_status |
security_result.action_details |
직접 매핑됨 |
category_details |
security_result.category_details |
병합됨 |
cs-categories |
security_result.category_details |
병합됨 |
cs-icap-status |
security_result.description |
직접 매핑됨 |
cs_icap_status |
security_result.description |
직접 매핑됨 |
product_data.cs-icap-status |
security_result.description |
직접 매핑됨 |
additional_x_tenant_id |
security_result.detection_fields |
병합됨 |
architecture_label |
security_result.detection_fields |
병합됨 |
content_type_label |
security_result.detection_fields |
병합됨 |
risk_groups_label |
security_result.detection_fields |
병합됨 |
rs_negotiated_cipher_size_label |
security_result.detection_fields |
병합됨 |
verdict_label |
security_result.detection_fields |
병합됨 |
x_bluecoat_access_type_label |
security_result.detection_fields |
병합됨 |
x_bluecoat_application_operation_label |
security_result.detection_fields |
병합됨 |
x_cs_connection_negotiated_cipher_size_label |
security_result.detection_fields |
병합됨 |
x_data_leak_detected |
security_result.detection_fields |
병합됨 |
x_rs_certificate_hostname_threat_risk_label |
security_result.detection_fields |
병합됨 |
x_rs_connection_negotiated_cipher_label |
security_result.detection_fields |
병합됨 |
x_rs_connection_negotiated_cipher_size_label |
security_result.detection_fields |
병합됨 |
x_rs_connection_negotiated_ssl_version_label |
security_result.detection_fields |
병합됨 |
x_rs_ocsp_error_label |
security_result.detection_fields |
병합됨 |
x_x_virus_id_label |
security_result.detection_fields |
병합됨 |
rule_name1 |
security_result.rule_name |
직접 매핑됨 |
severity_id |
security_result.severity |
매핑됨: 1 , 2 → LOW, 3 , 4 → MEDIUM, 5 , 6 → HIGH |
product_data.x-exception-id |
security_result.summary |
직접 매핑됨 |
device_name |
src.asset.hostname |
직접 매핑됨 |
product_data.x-client-device-name |
src.asset.hostname |
직접 매핑됨 |
x-client-device-name |
src.asset.hostname |
직접 매핑됨 |
connection.src_ip |
src.asset.ip |
병합됨 |
device_name |
src.hostname |
직접 매핑됨 |
product_data.x-client-device-name |
src.hostname |
직접 매핑됨 |
x-client-device-name |
src.hostname |
직접 매핑됨 |
connection.src_ip |
src.ip |
병합됨 |
product_data.x_bluecoat_application_name |
target.application |
직접 매핑됨 |
target_application |
target.application |
직접 매핑됨 |
x_bluecoat_application_name |
target.application |
직접 매핑됨 |
connection.dst_name |
target.asset.hostname |
직접 매핑됨 |
connection.url.host |
target.asset.hostname |
직접 매핑됨 |
cs-host |
target.asset.hostname |
직접 매핑됨 |
device_name |
target.asset.hostname |
직접 매핑됨 |
connection.dst_ip |
target.asset.ip |
병합됨 |
s-ip |
target.asset.ip |
병합됨 |
target_ip |
target.asset.ip |
병합됨 |
os_name |
target.asset.platform_software.platform |
매핑됨: Windows → WINDOWS, macOS → MAC |
os_ver |
target.asset.platform_software.platform_version |
직접 매핑됨 |
connection.dst_name |
target.hostname |
직접 매핑됨 |
connection.url.host |
target.hostname |
직접 매핑됨 |
cs-host |
target.hostname |
직접 매핑됨 |
device_name |
target.hostname |
직접 매핑됨 |
connection.dst_ip |
target.ip |
병합됨 |
s-ip |
target.ip |
병합됨 |
target_ip |
target.ip |
병합됨 |
ip_geo_artifact_entry |
target.ip_geo_artifact |
병합됨 |
client_country |
target.location.country_or_region |
직접 매핑됨 |
connection.dst_location.country |
target.location.country_or_region |
직접 매핑됨 |
product_data.x-cs-client-ip-country |
target.location.country_or_region |
직접 매핑됨 |
x-cs-client-ip-country |
target.location.country_or_region |
직접 매핑됨 |
connection.dst_port |
target.port |
이름 변경/매핑됨 |
cs-uri-port |
target.port |
이름 변경/매핑됨 |
device_id |
target.resource.id |
직접 매핑됨 |
product_data.x-client-device-id |
target.resource.id |
직접 매핑됨 |
device_id |
target.resource.product_object_id |
직접 매핑됨 |
product_data.x-client-device-id |
target.resource.product_object_id |
직접 매핑됨 |
x_bluecoat_location_id |
target.resource.product_object_id |
직접 매핑됨 |
connection.url.path |
target.url |
직접 매핑됨 |
connection.url.text |
target.url |
직접 매핑됨 |
target_url |
target.url |
직접 매핑됨 |
uri_query |
target.url |
직접 매핑됨 |
| 해당 사항 없음 | metadata.event_type |
상수: NETWORK_UNCATEGORIZED |
| 해당 사항 없음 | metadata.product_event_type |
상수: Security |
| 해당 사항 없음 | metadata.vendor_name |
상수: SYMANTEC |
| 해당 사항 없음 | network.http.parsed_user_agent |
상수: cs(user-agent)} |
| 해당 사항 없음 | principal.asset.platform_software.platform |
상수: WINDOWS |
| 해당 사항 없음 | security_result.severity |
상수: LOW |
| 해당 사항 없음 | target.asset.platform_software.platform |
상수: WINDOWS |
| 해당 사항 없음 | target.resource.type |
상수: DEVICE |
변경 로그
도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가에게 문의하여 답변을 받으세요.