收集 Atlassian Bitbucket 記錄
總覽
這個剖析器會從 Atlassian Bitbucket JSON 記錄中擷取欄位,並將其對應至 UDM。這項服務可處理各種記錄格式,並根據 IP 位址、使用者 ID 和資產資訊等可用欄位,填入主體或目標實體。此外,這項工具還會根據網路和使用者活動將事件分類,並視情況提供安全調查結果,進一步豐富資料內容。剖析器在填入欄位時,會優先處理 agentRealtimeInfo
,而非 agentDetectionInfo
。
事前準備
請確認您已完成下列事前準備事項:
- Google SecOps 執行個體。
- 存放區內的特殊存取權。
設定動態饋給
在 Google SecOps 平台中,有兩種不同的進入點可設定動態饋給:
- 「SIEM 設定」>「動態消息」
- 內容中心 > 內容包
依序前往「SIEM 設定」>「動態饋給」,設定動態饋給
如要設定動態消息,請按照下列步驟操作:
- 依序前往「SIEM 設定」>「動態消息」。
- 按一下「新增動態消息」。
- 在下一個頁面中,按一下「設定單一動態饋給」。
- 在「Feed name」(動態消息名稱) 欄位中,輸入動態消息的名稱 (例如「Atlassian Bitbucket Logs」)。
- 選取「Webhook」做為「來源類型」。
- 選取「Atlassian Bitbucket」做為「記錄類型」。
- 點選「下一步」。
- 選用:指定下列輸入參數的值:
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
\n
。 - 資產命名空間:資產命名空間。
- 擷取標籤:套用至這個動態饋給事件的標籤。
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
- 點選「下一步」。
- 在「Finalize」畫面中檢查動態饋給設定,然後按一下「Submit」。
- 按一下「產生密鑰」,產生驗證這個動態消息的密鑰。
- 複製並儲存密鑰。您無法再次查看這個密鑰。如有需要,您可以重新產生新的密鑰,但這項操作會使先前的密鑰失效。
- 在「詳細資料」分頁中,從「端點資訊」欄位複製動態消息端點網址。您需要在用戶端應用程式中指定這個端點網址。
- 按一下 [完成]。
從內容中心設定動態饋給
為下列欄位指定值:
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
\n
。
進階選項
- 資產命名空間:資產命名空間。
- 擷取標籤:套用至這個動態饋給事件的標籤。
- 動態饋給名稱:系統預先填入的值,用於識別動態饋給。
來源類型:將記錄收集到 Google SecOps 的方法。
按一下「產生密鑰」,產生驗證這個動態消息的密鑰。
複製並儲存密鑰。您無法再次查看這個密鑰。如有需要,您可以重新產生新的密鑰,但這項操作會使先前的密鑰失效。
在「詳細資料」分頁中,從「端點資訊」欄位複製動態消息端點網址。您需要在用戶端應用程式中指定這個端點網址。
為 Webhook 資訊提供建立 API 金鑰
依序前往 Google Cloud 控制台 >「憑證」。
按一下 [Create credentials] (建立憑證),然後選取 [API key] (API 金鑰)。
將 API 金鑰存取權限制在 Google Security Operations API。
指定端點網址
- 在用戶端應用程式中,指定 webhook 動態饋給中提供的 HTTPS 端點網址。
如要啟用驗證,請在自訂標頭中指定 API 金鑰和私密金鑰,格式如下:
X-goog-api-key = API_KEY X-Webhook-Access-Key = SECRET
建議:請將 API 金鑰指定為標頭,而非在網址中指定。如果 Webhook 用戶端不支援自訂標頭,您可以使用查詢參數指定 API 金鑰和密鑰,格式如下:
ENDPOINT_URL?key=API_KEY&secret=SECRET
更改下列內容:
ENDPOINT_URL
:動態消息端點網址。API_KEY
:用於向 Google Security Operations 進行驗證的 API 金鑰。SECRET
:您產生的密鑰,用於驗證動態饋給。
在 Atlassian Bitbucket 中建立 Webhook
- 在 Bitbucket 中前往存放區設定。
- 按一下「工作流程」下方的「Webhook」。
- 按一下 [Add Webhook]。
- 設定下列欄位:
- 標題:提供說明名稱 (例如「Google SecOps」)。
- 網址:輸入 Google SecOps API 端點網址。
- 狀態:設為「有效」。
- 觸發條件:選取相關事件。
- 按一下 [儲存]。
UDM 對應表
記錄欄位 | UDM 對應 | 邏輯 |
---|---|---|
agentComputerName |
principal.hostname |
從「agentRealtimeInfo.agentComputerName 」填入。 |
agentDetectionInfo.accountId |
metadata.product_deployment_id |
已轉換為字串。如果沒有 agentRealtimeInfo.accountId ,則會使用這個屬性。 |
agentDetectionInfo.accountName |
metadata.product_name |
如果沒有 agentRealtimeInfo.accountName ,則會使用這個屬性。 |
agentDetectionInfo.agentDomain |
principal.administrative_domain |
直接對應。 |
agentDetectionInfo.agentIpV4 |
target.ip |
從 JSON 陣列擷取,並合併至 target.ip 欄位。 |
agentDetectionInfo.agentIpV6 |
principal.ip |
從 JSON 陣列擷取,並合併至 principal.ip 欄位。 |
agentDetectionInfo.agentLastLoggedInUserName |
principal.user.userid |
剖析以擷取使用者 ID 和網域 (如有)。如果沒有網域,則直接對應至 principal.user.userid 。 |
agentDetectionInfo.agentOsName |
principal.platform_version 、principal.asset.platform_software.platform_version |
如果沒有 agentRealtimeInfo.agentOsName ,則會使用這個屬性。 |
agentDetectionInfo.agentOsRevision |
principal.platform_patch_level 、principal.asset.platform_software.platform_patch_level |
如果沒有 agentRealtimeInfo.agentOsRevision ,則會使用這個屬性。 |
agentDetectionInfo.agentRegisteredAt |
principal.asset.first_discover_time |
剖析為 ISO8601 時間戳記。 |
agentDetectionInfo.agentUuid |
principal.asset_id 、principal.asset.asset_id |
如果沒有 agentRealtimeInfo.agentUuid ,則使用這個屬性。開頭為「agentUuid:」。 |
agentDetectionInfo.agentVersion |
metadata.product_version |
如果沒有 agentRealtimeInfo.agentVersion ,則會使用這個屬性。 |
agentDetectionInfo.externalIp |
target.ip |
直接對應。 |
agentDetectionInfo.groupId |
principal.user.group_identifiers |
如果不是空白或「-」,則會合併到欄位中。如果沒有 agentRealtimeInfo.groupId ,則會使用這個值。 |
agentDetectionInfo.groupName |
principal.group.group_display_name |
如果沒有 agentRealtimeInfo.groupName ,則會使用這個屬性。 |
agentDetectionInfo.siteId |
additional.fields |
以鍵/值組合形式新增,鍵為「agentDetectionInfo.siteId」。如果沒有 agentRealtimeInfo.siteId ,則會使用這個屬性。 |
agentDetectionInfo.siteName |
additional.fields |
以鍵/值組合形式新增,鍵為「agentDetectionInfo.siteName」。如果沒有 agentRealtimeInfo.siteName ,則會使用這個屬性。 |
agentRealtimeInfo.accountId |
metadata.product_deployment_id |
已轉換為字串。 |
agentRealtimeInfo.accountName |
metadata.product_name |
直接對應。 |
agentRealtimeInfo.agentComputerName |
principal.hostname 、principal.asset.hostname |
直接對應。 |
agentRealtimeInfo.agentId |
principal.asset_id 、principal.asset.asset_id |
開頭為「agentId:」。 |
agentRealtimeInfo.agentMachineType |
principal.asset.category |
直接對應。 |
agentRealtimeInfo.agentOsName |
principal.platform_version 、principal.asset.platform_software.platform_version |
直接對應。 |
agentRealtimeInfo.agentOsRevision |
principal.platform_patch_level 、principal.asset.platform_software.platform_patch_level |
直接對應。 |
agentRealtimeInfo.agentOsType |
principal.asset.platform_software.platform 、principal.platform |
根據值對應至 WINDOWS、MAC 或 LINUX。 |
agentRealtimeInfo.agentUuid |
principal.asset_id 、principal.asset.asset_id |
直接對應。開頭為「agentUuid:」。 |
agentRealtimeInfo.agentVersion |
metadata.product_version |
直接對應。 |
agentRealtimeInfo.groupId |
principal.user.group_identifiers |
如果不是空白或「-」,則會併入該欄位。 |
agentRealtimeInfo.groupName |
principal.group.group_display_name |
直接對應。 |
agentRealtimeInfo.siteId |
additional.fields |
以鍵/值組合形式新增,鍵為「agentDetectionInfo.siteId」。 |
agentRealtimeInfo.siteName |
additional.fields |
以鍵/值組合形式新增,鍵為「agentDetectionInfo.siteName」。 |
associatedItems.0.id |
principal.resource.id |
直接對應。 |
associatedItems.0.name |
principal.resource.name |
直接對應。 |
associatedItems.0.typeName |
principal.resource.resource_subtype |
直接對應。 |
authorAccountId |
principal.user.userid |
直接對應。 |
category |
metadata.product_event_type |
直接對應。如果不存在,且訊息含有「威脅」,請設為「威脅」。 |
id |
metadata.product_log_id |
已轉換為字串。 |
indicators.0.description |
security_result.description |
直接對應。 |
objectItem.id |
additional.fields |
以鍵/值組合形式新增,鍵為「objectItem.id」。 |
objectItem.name |
additional.fields |
以鍵/值組合形式新增,鍵為「objectItem.name」。 |
objectItem.typeName |
additional.fields |
以鍵/值組合形式新增,鍵為「objectItem.typeName」。 |
remoteAddress |
principal.ip |
直接對應。 |
summary |
security_result.summary |
直接對應。 |
threatInfo.classification |
security_result.category_details |
直接對應。也會用於判斷 security_result.category 。 |
threatInfo.collectionId |
metadata.ingestion_labels |
以鍵/值組合形式新增,鍵為「alert_aggregation_value」。 |
threatInfo.confidenceLevel |
security_result.confidence_details |
直接對應。也會用於判斷 security_result.confidence 。 |
threatInfo.createdAt |
metadata.collected_timestamp |
剖析為 ISO8601 時間戳記。 |
threatInfo.detectionEngines |
metadata.ingestion_labels |
每個元素的 key 和 title 都會新增為鍵/值組合。 |
threatInfo.fileExtensionType |
target.process.file.mime_type |
直接對應。 |
threatInfo.filePath |
target.file.full_path |
直接對應。 |
threatInfo.fileSize |
target.file.size |
轉換為字串,然後轉換為無正負號整數。 |
threatInfo.identifiedAt |
event_timestamp |
剖析為 ISO8601 時間戳記。 |
threatInfo.maliciousProcessArguments |
principal.process.command_line |
直接對應。如果沒有 summary ,也會用於 security_result.summary 欄位。 |
threatInfo.md5 |
target.file.md5 |
直接對應。 |
threatInfo.originatorProcess |
target.process.parent_process.file.full_path |
直接對應。如果沒有 summary ,也會用於 security_result.summary 欄位。 |
threatInfo.processUser |
target.user.userid |
直接對應。 |
threatInfo.sha1 |
target.file.sha1 |
直接對應。 |
threatInfo.sha256 |
target.file.sha256 |
直接對應。 |
threatInfo.storyline |
principal.process.product_specific_process_id |
開頭為「ID:」。 |
threatInfo.threatId |
security_result.threat_id |
直接對應。 |
threatInfo.threatName |
security_result.threat_name 、target.file.names |
直接對應並合併至 target.file.names 。如果沒有 summary ,也會用於 security_result.summary 欄位。一開始請設為「GENERIC_EVENT」。根據主體和目標 IP/主機名稱/使用者是否存在,變更為「NETWORK_UNCATEGORIZED」、「STATUS_UPDATE」或「USER_UNCATEGORIZED」。從「event.type 」欄位複製。設為「Atlassian Bitbucket」。一開始請設為「Atlassian Bitbucket」。可由 agentRealtimeInfo.accountName 或 agentDetectionInfo.accountName 覆寫。 |
timestamp |
metadata.event_timestamp 、timestamp |
直接對應。 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。