收集 Elastic Defend 記錄
本文說明如何使用 Google Cloud Storage V2 和 Cloud Run 函式,將 Elastic Defend 記錄檔擷取至 Google Security Operations。
Elastic Defend 是 Elastic Security 中的端點偵測與應變 (EDR) 解決方案,可深入掌握 Windows、macOS 和 Linux 作業系統,提供防範、偵測和應變功能。這項功能會監控程序執行、檔案活動、網路連線、登錄修改和程式庫載入情形,以便在端點層級偵測及防範威脅。資料會儲存在 Elasticsearch 中,並可使用 Elasticsearch Search API 擷取。
事前準備
請確認您已完成下列事前準備事項:
- Google SecOps 執行個體
- 已啟用下列 API 的 Google Cloud 專案:
- Cloud Storage
- Cloud Run 函式
- Cloud Scheduler
- Pub/Sub
- IAM
- 存取已部署 Elastic Defend 的 Elasticsearch 叢集
- 在 Elasticsearch 中建立 API 金鑰的權限 (
manage_security、manage_api_key或manage_own_api_key叢集權限) - 從 Cloud Run 函式到 Elasticsearch 叢集的網路連線
建立 Google Cloud Storage 值區
- 前往 Google Cloud 控制台。
- 選取專案或建立新專案。
- 在導覽選單中,依序前往「Cloud Storage」>「Bucket」。
- 按一下「建立值區」。
請提供下列設定詳細資料:
設定 值 為 bucket 命名 輸入全域不重複的名稱 (例如 elastic-defend-logs)位置類型 根據需求選擇 (區域、雙區域、多區域) 位置 選取地點 (例如 us-central1)儲存空間級別 標準 (建議用於經常存取的記錄) 存取控管 統一 (建議) 保護工具 選用:啟用物件版本管理或保留政策 點選「建立」。
收集 Elastic Defend 憑證
如要讓 Cloud Run 函式擷取 Elastic Defend 事件,您必須建立 API 金鑰,並授予 logs-endpoint 資料串流的讀取權限。
使用 Kibana 建立 API 金鑰
- 登入 Kibana。
- 在導覽選單或全域搜尋欄位中,依序前往「堆疊管理」>「API 金鑰」。
- 按一下「建立 API 金鑰」。
- 在「Name」(名稱) 欄位中,輸入
Google SecOps Cloud Storage Integration。 - 在「有效期限」欄位中,視需要設定有效期限。根據預設,API 金鑰不會過期。
- 按一下「控管安全性權限」。
- 在「索引」部分中,按一下「新增索引權限」。
- 設定索引權限:
- 索引:輸入
logs-endpoint.* - 權限:選取「讀取」
- 索引:輸入
- 將「叢集權限」部分留空 (不需要叢集權限)。
- 按一下「建立 API 金鑰」。
記錄 API 憑證
建立 API 金鑰後,對話方塊會顯示您的憑證:
編碼:採用 Base64 編碼的 API 金鑰 (例如
VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw==)此外,您還需要記錄 Elasticsearch 端點網址:
Elastic Cloud:端點會顯示在 Cloud Console 中部署作業的「Elasticsearch」部分下方 (例如
https://my-deployment.es.us-central1.gcp.cloud.es.io:443)。自行管理的 Elasticsearch:使用 Elasticsearch 叢集的主機名稱或 IP 位址和通訊埠 (例如
https://elasticsearch.example.com:9200)
使用開發人員工具建立 API 金鑰 (替代方法)
或者,您也可以使用 Kibana 開發人員工具建立 API 金鑰:
- 登入 Kibana。
- 依序前往「管理」>「開發人員工具」。
在控制台中執行下列指令:
POST /_security/api_key { "name": "Google SecOps Cloud Storage Integration", "role_descriptors": { "chronicle_reader": { "indices": [ { "names": ["logs-endpoint.*"], "privileges": ["read"] } ] } }, "metadata": { "application": "google-chronicle-gcs", "environment": "production" } }回應會包含您的 API 金鑰憑證:
{ "id": "VuaCfGcBCdbkQm-e5aOx", "name": "Google SecOps Cloud Storage Integration", "api_key": "ui2lp2axTNmsyakw9tvNnw", "encoded": "VnVhQ2ZHY0JDZGJrUW0tZTVhT3g6dWkybHAyYXhUTm1zeWFrdzl0dk5udw==" }複製並儲存「encoded」值。這是您用於驗證的 Base64 編碼 API 金鑰。
建立服務帳戶
為 Cloud Run 函式建立專屬服務帳戶。
- 在 Google Cloud 控制台中,依序前往「IAM 與管理」>「服務帳戶」。
- 按一下「Create Service Account」(建立服務帳戶)。
- 請提供下列設定詳細資料:
- 服務帳戶名稱:輸入
elastic-defend-collector - 服務帳戶說明:輸入
Service account for Elastic Defend log collection to GCS
- 服務帳戶名稱:輸入
- 按一下「建立並繼續」。
- 在「將專案存取權授予這個服務帳戶」部分,新增下列角色:
- 按一下「選取角色」,然後選取「Storage 物件管理員」 (
roles/storage.objectAdmin)。 - 按一下「新增其他角色」,然後選取「Cloud Run Invoker」 (
roles/run.invoker)。
- 按一下「選取角色」,然後選取「Storage 物件管理員」 (
- 按一下「繼續」。
- 按一下 [完成]。
建立 Pub/Sub 主題
建立 Pub/Sub 主題,從 Cloud Scheduler 觸發 Cloud Run 函式。
- 在 Google Cloud 控制台中,依序前往「Pub/Sub」>「Topics」(主題)。
- 按一下 [Create Topic] (建立主題)。
- 請提供下列設定詳細資料:
- 主題 ID:輸入
elastic-defend-trigger - 新增預設訂閱項目:保持勾選
- 主題 ID:輸入
- 點選「建立」。
建立 Cloud Run 函式
建立 Cloud Run 函式,從 Elasticsearch 擷取事件並寫入 GCS。
建立函式
- 前往 Google Cloud 控制台中的「Cloud Run functions」(Cloud Run 函式)。
- 按一下「Create function」(建立函式)。
請提供下列設定詳細資料:
設定 值 環境 第 2 代 函式名稱 elastic-defend-to-gcs區域 選取與 GCS 值區相同的區域 觸發條件類型 Cloud Pub/Sub Cloud Pub/Sub 主題 選取「 elastic-defend-trigger」分配的記憶體 512 MiB (大量資料時可增加) 逾時 540 秒 執行階段服務帳戶 選取「 elastic-defend-collector」點選「下一步」。
新增環境變數
在「執行階段、建構作業、連線和安全性設定」部分中,新增下列環境變數:
變數 值 GCS_BUCKETGCS bucket 名稱 (例如 elastic-defend-logs)GCS_PREFIX記錄檔的前置字串 (例如 elastic-defend)STATE_KEY狀態檔案名稱 (例如 state.json)ES_HOSTElasticsearch 網址 (例如 https://my-deployment.es.us-central1.gcp.cloud.es.io:443)ES_API_KEY在建立憑證的步驟中編碼的 API 金鑰 MAX_RECORDS每次執行作業的記錄數量上限 (例如 100000)PAGE_SIZE每項搜尋要求的記錄數 (例如 1000)LOOKBACK_HOURS首次執行時要回溯的小時數 (例如 24)
新增函式程式碼
- 選取「Python 3.11」做為「執行階段」。
- 將「Entry point」(進入點) 設為
main。 - 在「Source code」(原始碼) 區段中,選取「Inline Editor」(內嵌編輯器)。
將
main.py的內容替換為下列程式碼:import os import json import datetime import base64 import requests from google.cloud import storage GCS_BUCKET = os.environ["GCS_BUCKET"] GCS_PREFIX = os.environ.get("GCS_PREFIX", "elastic-defend") STATE_KEY = os.environ.get("STATE_KEY", "state.json") ES_HOST = os.environ["ES_HOST"] ES_API_KEY = os.environ["ES_API_KEY"] MAX_RECORDS = int(os.environ.get("MAX_RECORDS", "100000")) PAGE_SIZE = int(os.environ.get("PAGE_SIZE", "1000")) LOOKBACK_HOURS = int(os.environ.get("LOOKBACK_HOURS", "24")) INDEX_PATTERN = "logs-endpoint.*" SEARCH_PATH = f"/{INDEX_PATTERN}/_search" def _gcs_client(): return storage.Client() def _load_state(bucket): blob = bucket.blob(f"{GCS_PREFIX}/{STATE_KEY}") if blob.exists(): return json.loads(blob.download_as_text()) return {} def _save_state(bucket, state): blob = bucket.blob(f"{GCS_PREFIX}/{STATE_KEY}") blob.upload_from_string( json.dumps(state), content_type="application/json", ) def _build_query(gte_ts, sort_after=None): body = { "size": PAGE_SIZE, "query": { "range": { "@timestamp": { "gte": gte_ts, "format": "strict_date_optional_time", } } }, "sort": [ {"@timestamp": {"order": "asc"}}, {"_shard_doc": "asc"}, ], } if sort_after: body["search_after"] = sort_after return body def _search(session, body): url = f"{ES_HOST.rstrip('/')}{SEARCH_PATH}" resp = session.post( url, json=body, headers={ "Authorization": f"ApiKey {ES_API_KEY}", "Content-Type": "application/json", }, timeout=120, ) resp.raise_for_status() return resp.json() def _write_ndjson(bucket, records, ts_label): if not records: return now = datetime.datetime.utcnow().strftime("%Y%m%dT%H%M%SZ") blob_name = f"{GCS_PREFIX}/{ts_label}/{now}.ndjson" blob = bucket.blob(blob_name) ndjson = "\n".join(json.dumps(r, separators=(",", ":")) for r in records) blob.upload_from_string(ndjson, content_type="application/x-ndjson") print(f"Wrote {len(records)} records to gs://{GCS_BUCKET}/{blob_name}") def main(event, context): """Cloud Run function entry point triggered by Pub/Sub.""" client = _gcs_client() bucket = client.bucket(GCS_BUCKET) state = _load_state(bucket) sort_after = state.get("sort_after") if state.get("last_timestamp"): gte_ts = state["last_timestamp"] else: gte_ts = ( datetime.datetime.utcnow() - datetime.timedelta(hours=LOOKBACK_HOURS) ).strftime("%Y-%m-%dT%H:%M:%S.%fZ") session = requests.Session() total = 0 batch = [] last_ts = gte_ts ts_label = datetime.datetime.utcnow().strftime("%Y/%m/%d/%H") while total < MAX_RECORDS: body = _build_query(gte_ts, sort_after) result = _search(session, body) hits = result.get("hits", {}).get("hits", []) if not hits: break for hit in hits: doc = hit.get("_source", {}) doc["_id"] = hit.get("_id") doc["_index"] = hit.get("_index") batch.append(doc) hit_ts = doc.get("@timestamp", last_ts) if hit_ts > last_ts: last_ts = hit_ts sort_after = hits[-1].get("sort") total += len(hits) if len(batch) >= PAGE_SIZE: _write_ndjson(bucket, batch, ts_label) batch = [] if len(hits) < PAGE_SIZE: break if batch: _write_ndjson(bucket, batch, ts_label) new_state = { "last_timestamp": last_ts, "sort_after": sort_after, } _save_state(bucket, new_state) print(f"Done. Fetched {total} records. State: {json.dumps(new_state)}") return f"OK: {total} records"將
requirements.txt改成以下內容:functions-framework==3.* google-cloud-storage==2.* requests==2.*點選「Deploy」(部署)。
等待部署作業順利完成。
建立 Cloud Scheduler 工作
建立 Cloud Scheduler 工作,定期觸發 Cloud Run 函式。
- 前往 Google Cloud 控制台的「Cloud Scheduler」。
- 點選「建立工作」。
請提供下列設定詳細資料:
設定 值 名稱 elastic-defend-scheduler區域 選取與 Cloud Run 函式相同的區域 頻率 */5 * * * *(每 5 分鐘)時區 選取時區 (例如 UTC)按一下「繼續」。
在「設定執行作業」部分:
- 目標類型:選取「Pub/Sub」
- Cloud Pub/Sub 主題:選取
elastic-defend-trigger - 訊息內文:輸入
{"run": true}
點選「建立」。
擷取 Google SecOps 服務帳戶並設定動態饋給
Google SecOps 會使用專屬服務帳戶,從 GCS bucket 讀取資料。您必須授予這個服務帳戶值區存取權。
取得服務帳戶電子郵件地址
- 依序前往「SIEM 設定」>「動態饋給」。
- 按一下「新增動態消息」。
- 按一下「設定單一動態饋給」。
- 在「動態饋給名稱」欄位中輸入動態饋給名稱 (例如
Elastic Defend Events)。 - 選取「Google Cloud Storage V2」做為「來源類型」。
- 選取「Elastic Defend」做為「記錄類型」。
按一下「取得服務帳戶」。系統會顯示不重複的服務帳戶電子郵件地址,例如:
chronicle-12345678@chronicle-gcp-prod.iam.gserviceaccount.com複製這個電子郵件地址,以便在下一步中使用。
設定動態饋給
- 點選「下一步」。
指定下列輸入參數的值:
儲存空間 bucket URL:輸入 GCS bucket URI,並加上前置路徑:
gs://elastic-defend-logs/elastic-defend/請將
elastic-defend-logs替換為您的 GCS bucket 名稱。來源刪除選項:根據偏好設定選取刪除選項:
- 永不:移轉後一律不刪除任何檔案 (建議用於測試)。
- 刪除已轉移的檔案:成功轉移檔案後刪除檔案。
刪除已轉移的檔案和空白目錄:成功轉移後刪除檔案和空白目錄。
檔案存在時間上限:包含在過去天數內修改的檔案 (預設為 180 天)
資產命名空間:資產命名空間
擷取標籤:要套用至這個動態饋給事件的標籤
點選「下一步」。
在「Finalize」(完成) 畫面中檢查新的動態饋給設定,然後按一下「Submit」(提交)。
將 IAM 權限授予 Google SecOps 服務帳戶
Google SecOps 服務帳戶需要 GCS bucket 的「Storage 物件檢視者」角色。
- 依序前往「Cloud Storage」>「Buckets」。
- 按一下 bucket 名稱 (例如
elastic-defend-logs)。 - 前往「權限」分頁標籤。
- 按一下「授予存取權」。
- 請提供下列設定詳細資料:
- 新增主體:貼上 Google SecOps 服務帳戶電子郵件地址
- 指派角色:選取「Storage 物件檢視者」
按一下 [儲存]。
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
| _source.agent.id、_source.agent.type、_source.agent.version、_source.host.architecture、_source.event.agent_id_status、_source.event.id、_source.user.id、_source.group.id、_source.data_stream.type、_source.agent.build.original | additional.fields | 與包含所列欄位值的標籤物件合併 |
| _source.process.Ext.session_info.logon_type | extensions.auth.auth_details | 直接複製值 |
| _source.host.os.full | hardware.cpu_platform | 直接複製值 |
| _source.host.id | hardware.serial_number | 直接複製值 |
| _source.rule.description | metadata.description | 直接複製值 |
| _source.@timestamp | metadata.event_timestamp | 使用日期篩選器轉換,格式為 ISO8601、yyyy-MM-ddTHH:mm:ss.SSSSSSSSSZ、yyyy-MM-ddTHH:mm:ss.SSSSSSZ、yyyy-MM-ddTHH:mm:ss.SSSZ、yyyy-MM-ddTHH:mm:ssZ |
| metadata.event_type | 根據索引、event.action 和 has* 條件設定 | |
| metadata.log_type | 設為「ELASTIC_DEFEND」 | |
| metadata.product_event_type | 如果 _index ~ events.file,請設為「File Events」;如果 events.library,請設為「Library Events」;如果 events.network,請設為「Network Events」;如果 events.process,請設為「Process Events」;如果 events.registry,請設為「Registry Events」;如果 events.security,請設為「Security Events」;如果 events.api,請設為「API Events」;如果 .alert,請設為「Alerts」 | |
| _id | metadata.product_log_id | 如果不在 ["", " ", "null", "N/A"] 中,則為 _id 的值 |
| _source.ecs.version | metadata.product_version | 直接複製值 |
| _source.network.type | network.application_protocol_version | 直接複製值 |
| _source.network.transport | network.ip_protocol | 如果符合 (?i)tcp,則設為「TCP」;如果符合 (?i)udp,則設為「UDP」;如果符合 (?i)icmp,則設為「ICMP」;否則設為「UNKNOWN_IP_PROTOCOL」 |
| _source.destination.as.organization.name | network.organization_name | 直接複製值 |
| _source.Endpoint.policy.applied.artifacts.global.identifiers | observer.file.names | 從 _source.Endpoint.policy.applied.artifacts.global.identifiers 合併 |
| _source.Endpoint.policy.applied.artifacts.global.version, _source.Endpoint.policy.applied.artifacts.global.snapshot | observer.resource.attribute.labels | 與包含所列欄位值的標籤物件合併 |
| _source.Endpoint.policy.applied.artifacts.user.version | observer.user.attribute.labels | 與包含 _source.Endpoint.policy.applied.artifacts.user.version 值的標籤物件合併 |
| _source.host.os.full | principal.asset.hardware.cpu_platform | 直接複製值 |
| _source.host.id | principal.asset.hardware.serial_number | 直接複製值 |
| _source.host.name | principal.asset.hostname | 直接複製值 |
| _source.host.ip | principal.asset.ip | 從 _source.host.ip 合併 |
| _source.host.os.type | principal.asset.platform_software.platform | 如果符合 (?i)windows,則設為「WINDOWS」;如果符合 (?i)linux,則設為「LINUX」;如果符合 (?i)mac,則設為「MAC」;如果符合 (?i)ios,則設為「IOS」;否則設為「UNKNOWN_PLATFORM」 |
| _source.host.os.kernel | principal.asset.platform_software.platform_patch_level | 直接複製值 |
| _source.event.created | principal.domain.creation_time | 使用日期篩選器轉換,格式為 ISO8601、yyyy-MM-ddTHH:mm:ss.SSSSSSSSSZ、yyyy-MM-ddTHH:mm:ss.SSSSSSZ、yyyy-MM-ddTHH:mm:ss.SSSZ、yyyy-MM-ddTHH:mm:ssZ |
| _source.user.domain | principal.domain.name | 直接複製值 |
| _source.process.thread.capabilities.effective | principal.file.capabilities_tags | Merged from _source.process.thread.capabilities.effective |
| _source.process.executable | principal.file.full_path | 直接複製值 |
| _source.process.hash.md5 | principal.file.md5 | 直接複製值 |
| _source.file.name | principal.file.names | 已從「_source.file.name」合併 |
| _source.process.hash.sha1 | principal.file.sha1 | 直接複製值 |
| _source.process.hash.sha256 | principal.file.sha256 | 直接複製值 |
| _source.host.hostname | principal.hostname | 直接複製值 |
| _source.host.ip | principal.ip | 從 _source.host.ip 合併 |
| _source.host.mac | principal.mac | 從 _source.host.mac 合併,並將 - 替換為 : |
| _source.host.os.Ext.variant | principal.platform_version | 直接複製值 |
| _source.source.port | principal.port | 轉換為字串,然後轉換為整數 |
| _source.process.command_line, _source.process.name | principal.process.command_line | 如果 _source.process.command_line 不是空白,則為該值,否則為 _source.process.name |
| _source.process.thread.capabilities.permitted | principal.process.file.capabilities_tags | Merged from _source.process.thread.capabilities.permitted |
| _source.process.executable | principal.process.file.full_path | 直接複製值 |
| _source.process.hash.md5 | principal.process.file.md5 | 直接複製值 |
| _source.process.hash.sha1 | principal.process.file.sha1 | 直接複製值 |
| _source.process.hash.sha256 | principal.process.file.sha256 | 直接複製值 |
| _source.process.parent.executable | principal.process.parent_process.file.full_path | 直接複製值 |
| _source.process.pid | principal.process.pid | 轉換為字串,然後複製 |
| _source.process.Ext.api.name | principal.resource.attribute.labels | 與包含 _source.process.Ext.api.name 值的標籤物件合併 |
| _source.event.code | principal.resource.product_object_id | 直接複製值 |
| _source.group.name | principal.user.group_identifiers | 從「_source.group.name」合併 |
| _source.user.name | principal.user.userid | 直接複製值 |
| _source.user.id | principal.user.windows_sid | 如果與規則運算式 ^S-\\d-(\\\\d+-){1,14}\\\\d+$ 相符,則為 _source.user.id 的值 |
| _source.file.Ext.malware_signature.primary.signature.hash.sha256 | security_result.about.file.sha256 | 直接複製值 |
| _source.event.outcome | security_result.action | 來自 _source.event.outcome 的值 (大寫),然後如果值位於 [SUCCESS, ALLOW] 中,則設為 ALLOW;如果值位於 [FAILURE, DENY, SKIPPED, RATE_LIMIT] 中,則設為 BLOCK;如果值為 UNKNOWN,則設為 UNKNOWN_ACTION |
| _source.event.action | security_result.action_details | 直接複製值 |
| _source.destination.geo.region_iso_code | security_result.associations | 與包含來自「_source.destination.geo.region_iso_code」名稱的物件合併 |
| _source.kibana.alert.rule.parameters.threat.tactic.id, _source.kibana.alert.rule.parameters.threat.tactic.name | security_result.attack_details.tactics | 與包含所列欄位 ID 和名稱的物件合併 |
| _source.kibana.alert.rule.parameters.threat.technique.id, _source.kibana.alert.rule.parameters.threat.technique.name, _source.kibana.alert.rule.parameters.threat.technique.subtechnique.id, _source.kibana.alert.rule.parameters.threat.technique.subtechnique.name | security_result.attack_details.techniques | 與包含 id、name、subtechnique_id、subtechnique_name 的物件合併 (來自列出的欄位) |
| _source.event.category | security_result.category_details | 從 _source.event.category 合併 |
| _source.kibana.alert.rule.description | security_result.description | 直接複製值 |
| _source.event.kind、_source.file.Ext.malware_signature.all_names、_source.file.Ext.malware_signature.identifier、_source.event.risk_score、_source.threat.tactic.reference、_source.threat.technique.reference、_source.threat.technique.subtechnique.reference | security_result.detection_fields | 與包含所列欄位值的標籤物件合併 |
| _source.rule.id、_source.kibana.alert.rule.rule_id | security_result.rule_id | 如果 _source.rule.id 不是空白,則為該值,否則為 _source.kibana.alert.rule.rule_id |
| __source.rule.name、__source.kibana.alert.rule.name | security_result.rule_name | 如果 _source.rule.name 不是空白,則為該值,否則為 _source.kibana.alert.rule.name |
| _source.rule.ruleset | security_result.rule_set | 直接複製值 |
| security_result.severity | 設為「LOW」;如果 _index 符合 .alert,則設為「HIGH」;如果 _source.kibana.alert.rule.parameters.severity 符合 (?i)LOW,則設為「LOW」 | |
| _source.message | security_result.summary | 直接複製值 |
| _source.file.Ext.malware_signature.primary.signature.id | security_result.threat_id | 直接複製值 |
| _source.file.Ext.malware_signature.primary.signature.name | security_result.threat_name | 直接複製值 |
| _source.source.address, _source.source.ip | src.asset.ip | 從 _source.source.address 和 _source.source.ip 合併 |
| _source.source.address, _source.source.ip | src.ip | 從 _source.source.address 和 _source.source.ip 合併 |
| _source.host.name | target.asset.hostname | 直接複製值 |
| _source.destination.address, _source.destination.ip | target.asset.ip | 從 _source.destination.address 和 _source.destination.ip 合併 |
| _source.file.path、_source.dll.path、_source.process.executable、_source.Target.process.executable | target.file.full_path | 如果為 events.file,則為 _source.file.path 的值;如果為 events.library,則為 _source.dll.path 的值;如果為 events.process 或 events.api,則為 _source.process.executable 的值;如果為 events.api,則為 _source.Target.process.executable 的值 |
| _source.dll.hash.md5、_source.process.hash.md5 | target.file.md5 | 如果為 events.library,則為 _source.dll.hash.md5 的值;如果為.alert,則為 _source.process.hash .md5 的值 |
| __source.dll.name、__source.process.name | target.file.names | 如果為 events.library,則從 _source.dll.name 合併;如果為.alert,則從 _source.process .name 合併 |
| _source.dll.hash.sha1、_source.process.hash.sha1 | target.file.sha1 | 如果為 events.library,則為 _source.dll.hash.sha1;如果為.alert,則為 _source.process.hash .sha1 |
| __source.dll.hash.sha256、__source.process.hash.sha256 | target.file.sha256 | 如果為 events.library,則為 _source.dll.hash.sha256;如果為.alert,則為 _source.process.hash .sha256 |
| _source.host.name | target.hostname | 直接複製值 |
| _source.destination.address, _source.destination.ip | target.ip | 從 _source.destination.address 和 _source.destination.ip 合併 |
| _source.destination.geo.city_name | target.location.city | 直接複製值 |
| _source.destination.geo.country_name | target.location.country_or_region | 直接複製值 |
| _source.destination.geo.continent_name | target.location.name | 直接複製值 |
| _source.destination.geo.location.lat | target.location.region_coordinates.latitude | 先轉換為字串,再轉換為浮點數 |
| _source.destination.geo.location.lon | target.location.region_coordinates.longitude | 先轉換為字串,再轉換為浮點數 |
| _source.destination.geo.region_name | target.location.state | 直接複製值 |
| _source.data_stream.namespace | target.namespace | 直接複製值 |
| _source.destination.port | target.port | 轉換為字串,然後轉換為整數 |
| _source.process.command_line | target.process.command_line | 直接複製值 |
| _source.process.executable | target.process.file.full_path | 直接複製值 |
| _source.process.hash.md5 | target.process.file.md5 | 直接複製值 |
| _source.process.hash.sha1 | target.process.file.sha1 | 直接複製值 |
| _source.process.hash.sha256 | target.process.file.sha256 | 直接複製值 |
| _source.process.name | target.process.file.names | 從「_source.process.name」合併 |
| _source.registry.key | target.registry.registry_key | 直接複製值 |
| _source.registry.path | target.registry.registry_value_data | 直接複製值 |
| _source.registry.value | target.registry.registry_value_name | 直接複製值 |
| _source.data_stream.dataset | target.resource.name | 直接複製值 |
| _source.process.entity_id | target.user.userid | 直接複製值 |
| metadata.product_name | 設為「Elastic Defend」 | |
| metadata.vendor_name | 設為「彈性」 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。