收集 WatchGuard EDR 記錄
本文說明如何使用 Google Cloud Storage V2,將 WatchGuard EDR 記錄檔擷取至 Google Security Operations。
WatchGuard EDR (舊稱 Panda Adaptive Defense) 是雲端管理的端點偵測與回應平台,可提供進階威脅防護、行為分析和威脅搜尋功能。WatchGuard Cloud API 可透過程式輔助存取安全事件資料,包括偵測結果、攻擊指標和威脅情報記錄。
事前準備
請確認您已完成下列事前準備事項:
- Google SecOps 執行個體
- 已啟用 Cloud Storage API 的 GCP 專案
- 建立及管理 GCS bucket 的權限
- 管理 Google Cloud Storage 值區 IAM 政策的權限
- 建立 Cloud Run 服務、Pub/Sub 主題和 Cloud Scheduler 工作的權限
- 具備管理員權限的 WatchGuard Cloud 控制台特殊存取權
- WatchGuard Cloud API 金鑰或 OAuth2 憑證
建立 Google Cloud Storage bucket
- 前往 Google Cloud 控制台。
- 選取專案或建立新專案。
- 在導覽選單中,依序前往「Cloud Storage」>「Bucket」。
- 按一下「建立值區」。
請提供下列設定詳細資料:
設定 值 為 bucket 命名 輸入全域不重複的名稱 (例如 watchguard-edr-logs)位置類型 根據需求選擇 (區域、雙區域、多區域) 位置 選取位置 (例如 us-central1)儲存空間級別 標準 (建議用於經常存取的記錄) 存取控管 統一 (建議) 保護工具 選用:啟用物件版本管理或資料保留政策 點選「建立」。
收集 WatchGuard EDR API 憑證
取得 API 憑證
- 以管理員身分登入 WatchGuard Cloud 控制台。
- 依序前往「Administration」(管理) >「Managed Access」(受管理存取權)。
- 按一下「API 存取權」,或前往 API 金鑰管理部分。
- 點選「Generate API Key」。
- 輸入 API 金鑰名稱 (例如
Google SecOps Integration)。 複製下列詳細資料並存放在安全的位置:
- API 金鑰 ID:API 存取金鑰
- API 密鑰:API 密鑰
- 帳戶 ID:您的 WatchGuard Cloud 帳戶 ID
判斷 API 基準網址
WatchGuard Cloud API 基本網址取決於資料中心區域:
| 區域 | API 基礎網址 |
|---|---|
| 美國 | https://api.usa.cloud.watchguard.com |
| 歐盟 | https://api.eu.cloud.watchguard.com |
測試 API 存取權
請先測試憑證,再繼續進行整合:
# Replace with your actual credentials WG_API_KEY="your-api-key-id" WG_API_SECRET="your-api-secret" WG_ACCOUNT_ID="your-account-id" WG_BASE_URL="https://api.usa.cloud.watchguard.com" # Get access token TOKEN=$(curl -s -X POST "${WG_BASE_URL}/oauth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials&client_id=${WG_API_KEY}&client_secret=${WG_API_SECRET}&scope=api-access" \ | jq -r '.access_token') # Test API access - list indicators curl -s -X GET "${WG_BASE_URL}/rest/aether/v1/accounts/${WG_ACCOUNT_ID}/indicators?$top=1" \ -H "Authorization: Bearer ${TOKEN}"
為 Cloud Run 函式建立服務帳戶
Cloud Run 函式需要具備 GCS bucket 寫入權限,且可由 Pub/Sub 叫用的服務帳戶。
建立服務帳戶
- 在 GCP 控制台中,依序前往「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
- 按一下「Create Service Account」(建立服務帳戶)。
- 請提供下列設定詳細資料:
- 服務帳戶名稱:輸入
watchguard-edr-logs-collector-sa - 服務帳戶說明:輸入
Service account for Cloud Run function to collect WatchGuard EDR logs
- 服務帳戶名稱:輸入
- 按一下「建立並繼續」。
- 在「將專案存取權授予這個服務帳戶」部分,新增下列角色:
- 按一下「選擇角色」。
- 搜尋並選取「Storage 物件管理員」。
- 點選「+ 新增其他角色」。
- 搜尋並選取「Cloud Run Invoker」。
- 點選「+ 新增其他角色」。
- 搜尋並選取「Cloud Functions Invoker」(Cloud Functions 叫用者)。
- 按一下「繼續」。
- 按一下 [完成]。
這些角色適用於:
- Storage 物件管理員:將記錄檔寫入 GCS bucket,並管理狀態檔案
- Cloud Run 叫用者:允許 Pub/Sub 叫用函式
- Cloud Functions 叫用者:允許函式叫用
授予 GCS 值區的 IAM 權限
將 GCS bucket 的寫入權限授予服務帳戶:
- 依序前往「Cloud Storage」>「Buckets」。
- 點按 bucket 名稱 (例如
watchguard-edr-logs)。 - 前往「權限」分頁標籤。
- 按一下「授予存取權」。
- 請提供下列設定詳細資料:
- 新增主體:輸入服務帳戶電子郵件地址 (例如
watchguard-edr-logs-collector-sa@PROJECT_ID.iam.gserviceaccount.com) - 指派角色:選取「Storage 物件管理員」
- 新增主體:輸入服務帳戶電子郵件地址 (例如
- 按一下 [儲存]。
建立 Pub/Sub 主題
建立 Pub/Sub 主題,Cloud Scheduler 會將訊息發布至該主題,而 Cloud Run 函式會訂閱該主題。
- 在 GCP Console 中,前往「Pub/Sub」>「Topics」(主題)。
- 按一下「建立主題」。
- 請提供下列設定詳細資料:
- 主題 ID:輸入
watchguard-edr-logs-trigger - 其他設定保留預設值
- 主題 ID:輸入
- 點選「建立」。
建立 Cloud Run 函式來收集記錄
Cloud Run 函式會由 Cloud Scheduler 的 Pub/Sub 訊息觸發,從 WatchGuard Cloud API 擷取記錄,並寫入 GCS。
- 前往 GCP Console 的「Cloud Run」。
- 按一下「Create service」(建立服務)。
- 選取「函式」 (使用內嵌編輯器建立函式)。
在「設定」部分,提供下列設定詳細資料:
設定 值 服務名稱 watchguard-edr-logs-collector區域 選取與 GCS bucket 相符的區域 (例如 us-central1)執行階段 選取 Python 3.12 以上版本 在「Trigger (optional)」(觸發條件 (選用)) 專區:
- 按一下「+ 新增觸發條件」。
- 選取「Cloud Pub/Sub」。
- 在「選取 Cloud Pub/Sub 主題」中,選擇主題
watchguard-edr-logs-trigger。 - 按一下 [儲存]。
在「Authentication」(驗證) 部分:
- 選取「需要驗證」。
- 檢查 Identity and Access Management (IAM)。
向下捲動並展開「容器」、「網路」和「安全性」。
前往「安全性」分頁:
- 服務帳戶:選取服務帳戶
watchguard-edr-logs-collector-sa。
- 服務帳戶:選取服務帳戶
前往「容器」分頁:
- 按一下「變數與密鑰」。
- 針對每個環境變數,按一下「+ 新增變數」:
變數名稱 範例值 說明 GCS_BUCKETwatchguard-edr-logsGCS bucket 名稱 GCS_PREFIXwatchguard記錄檔的前置字串 STATE_KEYwatchguard/state.json狀態檔案路徑 WG_API_KEYyour-api-key-idWatchGuard Cloud API 金鑰 ID WG_API_SECRETyour-api-secretWatchGuard Cloud API 密碼 WG_ACCOUNT_IDyour-account-idWatchGuard Cloud 帳戶 ID WG_API_BASEhttps://api.usa.cloud.watchguard.comWatchGuard Cloud API 基礎網址 MAX_RECORDS5000每次執行的記錄數上限 PAGE_SIZE1000每頁記錄數 LOOKBACK_HOURS24初始回溯期 在「變數與密鑰」部分,向下捲動至「要求」:
- 要求逾時:輸入
600秒 (10 分鐘)
- 要求逾時:輸入
前往「設定」分頁:
- 在「資源」部分:
- 記憶體:選取 512 MiB 以上
- CPU:選取 1
- 在「資源」部分:
在「修訂版本資源調度」部分:
- 執行個體數量下限:輸入
0 - 執行個體數量上限:輸入
100(或根據預期負載調整)
- 執行個體數量下限:輸入
點選「建立」。
等待服務建立完成 (1 到 2 分鐘)。
服務建立完成後,系統會自動開啟內嵌程式碼編輯器。
新增函式程式碼
- 在「進入點」欄位中輸入「main」。
在內嵌程式碼編輯器中建立兩個檔案:
main.py:
import functions_framework from google.cloud import storage import json import os import urllib3 from datetime import datetime, timezone, timedelta import time # Initialize HTTP client with timeouts http = urllib3.PoolManager( timeout=urllib3.Timeout(connect=5.0, read=30.0), retries=False, ) # Initialize Storage client storage_client = storage.Client() # Environment variables GCS_BUCKET = os.environ.get('GCS_BUCKET') GCS_PREFIX = os.environ.get('GCS_PREFIX', 'watchguard') STATE_KEY = os.environ.get('STATE_KEY', 'watchguard/state.json') WG_API_KEY = os.environ.get('WG_API_KEY') WG_API_SECRET = os.environ.get('WG_API_SECRET') WG_ACCOUNT_ID = os.environ.get('WG_ACCOUNT_ID') WG_API_BASE = os.environ.get('WG_API_BASE', 'https://api.usa.cloud.watchguard.com') MAX_RECORDS = int(os.environ.get('MAX_RECORDS', '5000')) PAGE_SIZE = int(os.environ.get('PAGE_SIZE', '1000')) LOOKBACK_HOURS = int(os.environ.get('LOOKBACK_HOURS', '24')) def parse_datetime(value: str) -> datetime: """Parse ISO datetime string to datetime object.""" if value.endswith("Z"): value = value[:-1] + "+00:00" return datetime.fromisoformat(value) def get_access_token(): """ Obtain OAuth2 access token using client credentials grant. """ api_base = WG_API_BASE.rstrip('/') token_url = f"{api_base}/oauth/token" headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json' } body = ( f"grant_type=client_credentials" f"&client_id={WG_API_KEY}" f"&client_secret={WG_API_SECRET}" f"&scope=api-access" ) backoff = 1.0 for attempt in range(3): response = http.request('POST', token_url, body=body, headers=headers) if response.status == 429: retry_after = int(response.headers.get('Retry-After', str(int(backoff)))) print(f"Rate limited (429) on token request. Retrying after {retry_after}s...") time.sleep(retry_after) backoff = min(backoff * 2, 30.0) continue if response.status != 200: raise RuntimeError(f"Failed to get access token: {response.status} - {response.data.decode('utf-8')}") data = json.loads(response.data.decode('utf-8')) return data['access_token'] raise RuntimeError("Failed to get access token after 3 retries") @functions_framework.cloud_event def main(cloud_event): """ Cloud Run function triggered by Pub/Sub to fetch WatchGuard EDR security event logs and write to GCS. Args: cloud_event: CloudEvent object containing Pub/Sub message """ if not all([GCS_BUCKET, WG_API_KEY, WG_API_SECRET, WG_ACCOUNT_ID]): print('Error: Missing required environment variables') return try: bucket = storage_client.bucket(GCS_BUCKET) # Load state state = load_state(bucket, STATE_KEY) # Determine time window now = datetime.now(timezone.utc) last_time = None if isinstance(state, dict) and state.get("last_event_time"): try: last_time = parse_datetime(state["last_event_time"]) # Overlap by 2 minutes to catch any delayed events last_time = last_time - timedelta(minutes=2) except Exception as e: print(f"Warning: Could not parse last_event_time: {e}") if last_time is None: last_time = now - timedelta(hours=LOOKBACK_HOURS) print(f"Fetching logs from {last_time.isoformat()} to {now.isoformat()}") # Get access token token = get_access_token() # Fetch logs from multiple endpoints all_records = [] newest_event_time = None for endpoint_type in ['indicators', 'threats']: records, newest_time = fetch_logs( token=token, endpoint_type=endpoint_type, start_time=last_time, end_time=now, page_size=PAGE_SIZE, max_records=MAX_RECORDS, ) all_records.extend(records) if newest_time: if newest_event_time is None or parse_datetime(newest_time) > parse_datetime(newest_event_time): newest_event_time = newest_time if not all_records: print("No new log records found.") save_state(bucket, STATE_KEY, now.isoformat()) return # Write to GCS as NDJSON timestamp = now.strftime('%Y%m%d_%H%M%S') object_key = f"{GCS_PREFIX}/logs_{timestamp}.ndjson" blob = bucket.blob(object_key) ndjson = '\n'.join([json.dumps(record, ensure_ascii=False) for record in all_records]) + '\n' blob.upload_from_string(ndjson, content_type='application/x-ndjson') print(f"Wrote {len(all_records)} records to gs://{GCS_BUCKET}/{object_key}") # Update state with newest event time if newest_event_time: save_state(bucket, STATE_KEY, newest_event_time) else: save_state(bucket, STATE_KEY, now.isoformat()) print(f"Successfully processed {len(all_records)} records") except Exception as e: print(f'Error processing logs: {str(e)}') raise def load_state(bucket, key): """Load state from GCS.""" try: blob = bucket.blob(key) if blob.exists(): state_data = blob.download_as_text() return json.loads(state_data) except Exception as e: print(f"Warning: Could not load state: {e}") return {} def save_state(bucket, key, last_event_time_iso: str): """Save the last event timestamp to GCS state file.""" try: state = {'last_event_time': last_event_time_iso} blob = bucket.blob(key) blob.upload_from_string( json.dumps(state, indent=2), content_type='application/json' ) print(f"Saved state: last_event_time={last_event_time_iso}") except Exception as e: print(f"Warning: Could not save state: {e}") def fetch_logs(token: str, endpoint_type: str, start_time: datetime, end_time: datetime, page_size: int, max_records: int): """ Fetch security event logs from WatchGuard Cloud API with OData-style pagination and rate limiting. Args: token: OAuth2 access token endpoint_type: API endpoint type (indicators, threats) start_time: Start time for log query end_time: End time for log query page_size: Number of records per page max_records: Maximum total records to fetch Returns: Tuple of (records list, newest_event_time ISO string) """ api_base = WG_API_BASE.rstrip('/') endpoint = f"{api_base}/rest/aether/v1/accounts/{WG_ACCOUNT_ID}/{endpoint_type}" headers = { 'Authorization': f'Bearer {token}', 'Accept': 'application/json', 'User-Agent': 'GoogleSecOps-WatchGuardEDRCollector/1.0' } records = [] newest_time = None page_num = 0 skip = 0 backoff = 1.0 start_iso = start_time.strftime('%Y-%m-%dT%H:%M:%SZ') end_iso = end_time.strftime('%Y-%m-%dT%H:%M:%SZ') while True: page_num += 1 if len(records) >= max_records: print(f"Reached max_records limit ({max_records}) for {endpoint_type}") break url = f"{endpoint}?$top={min(page_size, max_records - len(records))}&$skip={skip}&$filter=date ge {start_iso} and date le {end_iso}&$orderby=date asc" try: response = http.request('GET', url, headers=headers) # Handle rate limiting with exponential backoff if response.status == 429: retry_after = int(response.headers.get('Retry-After', str(int(backoff)))) print(f"Rate limited (429). Retrying after {retry_after}s...") time.sleep(retry_after) backoff = min(backoff * 2, 30.0) continue backoff = 1.0 if response.status != 200: print(f"HTTP Error: {response.status}") response_text = response.data.decode('utf-8') print(f"Response body: {response_text}") return records, newest_time data = json.loads(response.data.decode('utf-8')) page_results = data.get('value', data.get('data', [])) if not page_results: print(f"No more results (empty page) for {endpoint_type}") break print(f"{endpoint_type} page {page_num}: Retrieved {len(page_results)} events") # Add endpoint type for identification for event in page_results: event['_wg_log_type'] = endpoint_type records.extend(page_results) # Track newest event time for event in page_results: try: event_ts = event.get('date') or event.get('timestamp') or event.get('createdAt') if event_ts: event_time = str(event_ts) if newest_time is None or parse_datetime(event_time) > parse_datetime(newest_time): newest_time = event_time except Exception as e: print(f"Warning: Could not parse event time: {e}") # Check for more results if len(page_results) < page_size: print(f"No more pages for {endpoint_type} (last page not full)") break skip += len(page_results) except Exception as e: print(f"Error fetching {endpoint_type} logs: {e}") return records, newest_time print(f"Retrieved {len(records)} total {endpoint_type} records from {page_num} pages") return records, newest_timerequirements.txt:
functions-framework==3.* google-cloud-storage==2.* urllib3>=2.0.0
點選「部署」即可儲存並部署函式。
等待部署作業完成 (2 到 3 分鐘)。
建立 Cloud Scheduler 工作
Cloud Scheduler 會定期將訊息發布至 Pub/Sub 主題,觸發 Cloud Run 函式。
- 前往 GCP 主控台的「Cloud Scheduler」。
- 點選「建立工作」。
請提供下列設定詳細資料:
設定 值 名稱 watchguard-edr-logs-collector-hourly區域 選取與 Cloud Run 函式相同的區域 頻率 0 * * * *(每小時整點)時區 選取時區 (建議使用世界標準時間) 目標類型 Pub/Sub 主題 選取主題 watchguard-edr-logs-trigger郵件內文 {}(空白 JSON 物件)點選「建立」。
排程頻率選項
根據記錄檔量和延遲時間要求選擇頻率:
| 頻率 | Cron 運算式 | 用途 |
|---|---|---|
| 每 5 分鐘 | */5 * * * * |
大量、低延遲 |
| 每 15 分鐘 | */15 * * * * |
中等 |
| 每小時 | 0 * * * * |
標準 (建議) |
| 每 6 小時 | 0 */6 * * * |
少量、批次處理 |
| 每日 | 0 0 * * * |
歷來資料集合 |
測試整合項目
- 在 Cloud Scheduler 控制台中找出您的工作。
- 按一下「強制執行」即可手動觸發工作。
- 稍等幾秒鐘。
- 前往「Cloud Run」>「Services」。
- 按一下
watchguard-edr-logs-collector。 - 按一下 [Logs] (記錄) 分頁標籤。
確認函式是否已順利執行。請注意以下事項:
Fetching logs from YYYY-MM-DDTHH:MM:SS+00:00 to YYYY-MM-DDTHH:MM:SS+00:00 indicators page 1: Retrieved X events threats page 1: Retrieved X events Wrote X records to gs://watchguard-edr-logs/watchguard/logs_YYYYMMDD_HHMMSS.ndjson Successfully processed X records依序前往「Cloud Storage」>「Buckets」。
按一下 bucket 名稱 (
watchguard-edr-logs)。前往
watchguard/資料夾。確認是否已建立新的
.ndjson檔案,且檔案名稱包含目前的時間戳記。
如果記錄中顯示錯誤:
- HTTP 401:檢查環境變數中的 API 憑證
- HTTP 403:在 WatchGuard Cloud 控制台中確認 API 金鑰是否具備必要權限
- HTTP 429:頻率限制 - 函式會自動重試,並延遲一段時間
- 缺少環境變數:檢查是否已設定所有必要變數
在 Google SecOps 中設定動態饋給,擷取 WatchGuard EDR 記錄
- 依序前往「SIEM 設定」>「動態饋給」。
- 按一下「新增動態消息」。
- 按一下「設定單一動態饋給」。
- 在「動態饋給名稱」欄位中輸入動態饋給名稱 (例如
WatchGuard EDR Logs)。 - 選取「Google Cloud Storage V2」做為「來源類型」。
- 選取「WatchGuard EDR」做為「記錄類型」。
按一下「取得服務帳戶」,系統會顯示專屬服務帳戶電子郵件地址,例如:
chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com複製這個電子郵件地址。
點選「下一步」。
指定下列輸入參數的值:
儲存空間 bucket URL:輸入 GCS bucket URI,並加上前置路徑:
gs://watchguard-edr-logs/watchguard/- 取代:
watchguard-edr-logs:您的 GCS bucket 名稱。watchguard:儲存記錄的選用前置字元/資料夾路徑 (如為根目錄,請留空)。
- 取代:
來源刪除選項:根據偏好設定選取刪除選項:
- 永不:移轉後一律不刪除任何檔案 (建議用於測試)。
- 刪除已轉移的檔案:成功轉移檔案後刪除檔案。
刪除已轉移的檔案和空白目錄:成功轉移後刪除檔案和空白目錄。
檔案存在時間上限:包含在過去天數內修改的檔案 (預設為 180 天)
資產命名空間:資產命名空間
擷取標籤:要套用至這個動態饋給事件的標籤
點選「下一步」。
在「Finalize」(完成) 畫面中檢查新的動態饋給設定,然後按一下「Submit」(提交)。
將 IAM 權限授予 Google SecOps 服務帳戶
Google SecOps 服務帳戶需要 GCS bucket 的「Storage 物件檢視者」角色。
- 依序前往「Cloud Storage」>「Buckets」。
- 點按 bucket 名稱。
- 前往「權限」分頁標籤。
- 按一下「授予存取權」。
- 請提供下列設定詳細資料:
- 新增主體:貼上 Google SecOps 服務帳戶電子郵件地址
- 指派角色:選取「Storage 物件檢視者」
- 按一下 [儲存]。
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
| about.asset.asset_id | 設為 device_vendor.device_product:deviceExternalId | |
| about.file.full_path | 如果 filePath 不為空白,則為 filePath 的值;如果 file_is_not_hash 為 true,則為 _hash 的值;如果 file_is_not_hash 為 true,則為 fileHash 的值 | |
| about.file.size | 如果 fsize > 0,則為 fsize 的值 | |
| about.hostname | dvchost 的值 | |
| about.ip | IP 驗證後從 dvc 陣列合併 | |
| about.mac | 如果 MAC 有效,則為 dvcmac 的值;如果沒有位置,則為 dvc_mac 的值 | |
| about.nat_ip | deviceTranslatedAddress 的值 | |
| about.process.command_line | 如果沒有,則為「主旨」中的值,否則為「Emne」,否則為「路徑」 | |
| about.process.pid | dvcpid 的值 | |
| about.resource.attribute.permissions | filePermission 的值 | |
| about.resource.attribute.labels | resource_Type_label 的值 | |
| additional.fields | 從各種 additional_* 標籤合併,例如 additional_eventId、additional_devicePayloadId 等。 | |
| metadata.collected_timestamp | 如果「alertDateTime」值採用 ISO 格式,則為該值;否則如果「AlertDate」值採用 ISO 格式,則為該值;否則如果「Received」值採用 ISO 格式,則為該值;否則如果「Generated」值採用 ISO 格式,則為該值 | |
| metadata.description | 訊息中的值 | |
| metadata.event_timestamp | 如果採用 ISO 格式,則為「Date」的值 | |
| metadata.event_type | 如果 file_full_path 不為空白,則設為「PROCESS_UNCATEGORIZED」;如果 event_name 位於 LogSpyware 或 LogPredictiveMachineLearning 中,則設為「SCAN_UNCATEGORIZED」;如果 has_principal 為 true,則設為「STATUS_UPDATE」;否則設為「GENERIC_EVENT」 | |
| metadata.product_event_type | 如果 huntingRule 不為空白,則取自 huntingRule;否則取自 ThreatType;否則取自 device_event_class_id - event_name;否則取自 device_event_class_id;否則取自 event_name | |
| metadata.product_log_id | 如果 pandaAlertId 不是空白,則為該值,否則為 externalId | |
| metadata.product_name | 如果是 JSON,請設為「ALERTS」,否則請從 device_product 取得 | |
| metadata.product_version | device_version 的值 | |
| metadata.url_back_to_product | directLink 的值 | |
| metadata.vendor_name | 如果是 JSON,請設為「WATCHGUARD」,否則請設為 device_vendor | |
| network.application_protocol | 如果 app_protocol_output 不是空白,則使用該值 | |
| network.direction | 如果 deviceDirection == 0,則設為「INBOUND」,否則如果 == 1,則設為「OUTBOUND」 | |
| network.http.method | requestMethod 的值 | |
| network.http.user_agent | requestClientApplication 中的值 | |
| network.ip_protocol | 如果 ip_protocol_out 不是空白,則使用該值 | |
| network.received_bytes | 值來自 in,且 > 0 和整數 | |
| network.sent_bytes | 值來自 out,且大於 0 的整數 | |
| principal.administrative_domain | 如果 sntdom 不為空白,則為 sntdom 的值;否則為「網域」的值;否則為「Domene」的值 | |
| principal.application | 來自 sourceServiceName 的值 | |
| principal.asset.asset_id | 如果 MUID 值不為空白,則使用該值 | |
| principal.asset.hostname | 如果 machineName 不是空白,則取自該值;否則取自 HostName;否則取自 SourceMachineName;否則取自 MachineName | |
| principal.asset.ip | 如果不是空白,則從 HostIp 合併,否則為 SourceIP,否則為 MachineIP | |
| principal.asset.product_object_id | ClientId 的值 | |
| principal.group.group_display_name | 如果 Group_name 不為空白,則為 Group_name 的值,否則為 Gruppenavn | |
| principal.hostname | 如果 machineName 不為空值,則取自該值;否則如果 temp_dhost 不為空值,則取自該值;否則如果 IP 驗證失敗,則取自 shost;否則取自 Device_name;否則取自 Enhetsnavn | |
| principal.ip | 如果 principal_ip 是有效 IP,則取自該 IP;否則取自 src (如果 src 是有效 IP) | |
| principal.mac | 如果 MAC 有效,則為 smac 的值 | |
| principal.nat_ip | 如果 IP 位址有效,則為 sourceTranslatedAddress 的值 | |
| principal.nat_port | 如果 > 0,則為 sourceTranslatedPort 的值 | |
| principal.port | 如果為整數且不為 0,則為 spt 的值 | |
| principal.process.command_line | 來自預存程序的 Value | |
| principal.process.pid | spid 的值 | |
| principal.user.attribute.roles | spriv 的值 | |
| principal.user.user_display_name | 如果不是以 { 開頭,則取自 suser 的值;否則取自 SourceUserName,否則取自 CustomerName (如果不是空白) | |
| principal.user.userid | 如果內容.0.LoggedUser 不為空白,則取自該值,並將 event_type 設為 USER_UNCATEGORIZED;否則取自 temp_duid,否則取自 User,否則取自 Bruker | |
| security_result.action | 如果 act 為 accept/notified 或 outcome 為 REDIRECTED_USER_MAY_PROCEED 或 categoryOutcome 為 Success 或 cs2 為 Allow,則設為「ALLOW」;如果 act 為 deny/blocked 或 outcome 為 BLOCKED 或 categoryOutcome 為 Failure 或 cs2 為 Denied,則設為「BLOCK」;如果 outcome 為 Failure,則設為「FAIL」 | |
| security_result.action_details | 來自 act 的值,否則來自 Action_Taken | |
| security_result.attack_details.tactics | 如果 tactics_data 不為空白,則從該資料合併 | |
| security_result.attack_details.techniques | 如果不是空白,則從 technique_data 合併 | |
| security_result.category_details | 貓咪帶來的價值 | |
| security_result.description | 如果 msg_data_2 不為空白,則為 msg_data_2 的值;否則為 THRuleName 的值;否則為 Type 的值;否則為 Scan_Type 的值 | |
| security_result.detection_fields | 合併自 operation_label、operasjon_label、permission_label、tillatelse_label、infection_channel_label、spyware_Grayware_Type_label、threat_probability_label | |
| security_result.rule_name | mwProfile 的值 | |
| security_result.severity | 如果嚴重程度 == 1,則設為「INFORMATIONAL」;如果為 2,則設為「LOW」;如果為 3,則設為「MEDIUM」;如果為 4,則設為「HIGH」;如果為 5,則設為「CRITICAL」;否則,如果嚴重程度為 0/1/2,則設為「LOW」;如果為 3/4/5/INFO,則設為「MEDIUM」;如果為 6/7/SEVERE,則設為「HIGH」;如果為 8/9/10/VERY-HIGH,則設為「CRITICAL」 | |
| security_result.summary | 應用程式類別的值,否則為結果 | |
| security_result.threat_name | 如果間諜軟體的值不為空,則為該值;否則為 Virus_Malware_Name,否則為 Unknown_Threat | |
| src.file.full_path | 來自舊檔案路徑的值 | |
| src.file.size | 如果 oldFileSize > 0,則為 oldFileSize 的值 | |
| target.administrative_domain | 來自 dntdom 的值 | |
| target.application | destinationServiceName 的值 | |
| target.file.full_path | ItemPath 的值 | |
| target.file.md5 | 如果小寫轉換成功,則為 ItemHash 的值 | |
| target.hostname | 如果 temp_dhost 不是空白,則使用該值 | |
| target.ip | 如果 IP 有效,則為 dst_ip 的值 | |
| target.mac | 如果 MAC 有效,則為 dmac 的值 | |
| target.nat_ip | 如果 IP 有效,則為 destination_translated_address 的值 | |
| target.nat_port | 如果為整數,則為 destinationTranslatedPort 的值 | |
| target.port | 如果值為整數且在範圍內,則為 dpt 的值 | |
| target.process.command_line | dproc 的值 | |
| target.process.file.full_path | 如果內容.0.ChildPath 不為空白,則取自該值,否則取自 file_full_path | |
| target.process.file.md5 | 如果小寫成功,則為 contents.0.ChildMd5 的值 | |
| target.process.file.names | 如果不是空白,則從 file_name 合併 | |
| target.process.parent_process.file.full_path | contents.0.ParentPath 的值 | |
| target.process.parent_process.file.md5 | 如果小寫成功,則為 contents.0.ParentMd5 的值 | |
| target.process.parent_process.file.names | 如果不是空白,則從 parent_file_name 合併 | |
| target.process.parent_process.pid | contents.0.ParentPID 的值 | |
| target.process.pid | 來自 dpid 的值 | |
| target.resource.attribute.labels | DriveType_label、ServiceLevel_label 的值 | |
| target.url | 要求中的值 | |
| target.user.user_display_name | temp_duser 的值 | |
| target.user.userid | 如果 temp_duid 不是空白,則使用該值 |
變更記錄
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。