擷取 Microsoft Azure 活動記錄

支援的國家/地區:

本文說明將 Microsoft Azure 活動記錄 (AZURE_ACTIVITY) 擷取至 Google Security Operations 的必要步驟。

設定儲存空間帳戶

請按照下列步驟設定儲存空間帳戶:

  1. 在 Azure 控制台中,搜尋「Storage accounts」(儲存體帳戶)
  2. 按一下 [Create]。
  3. 選取帳戶所需的訂閱項目、資源群組、區域、效能 (建議使用 Standard) 和備援 (建議使用 GRS 或 LRS),然後輸入新儲存體帳戶的名稱。
  4. 按一下「查看 + 建立」,查看帳戶總覽,然後按一下「建立」
  5. 在「儲存空間帳戶總覽」頁面中,從視窗左側的導覽列選取「存取金鑰」
  6. 按一下「顯示金鑰」,並記下儲存空間帳戶的共用金鑰。
  7. 在視窗左側導覽列中選取「端點」
  8. 記下 Blob 服務端點。(https://<storageaccountname>.blob.core.windows.net/)

設定 Azure 活動記錄

如要設定 Azure 活動記錄,請完成下列步驟:

  1. 在 Azure 控制台中,搜尋「Monitor」
  2. 按一下頁面左側導覽列中的「活動記錄」連結。
  3. 按一下視窗頂端的「匯出活動記錄」
  4. 按一下「新增診斷設定」。
  5. 選取要匯出至 Google SecOps 的所有類別。
  6. 在「目標詳細資料」下方,選取「封存至儲存空間帳戶」
  7. 選取您在上一個步驟中建立的訂閱項目和儲存空間帳戶。
  8. 按一下 [儲存]

在 Google SecOps 平台中,有兩種不同的進入點可設定動態饋給:

  • 「SIEM 設定」>「動態消息」
  • 內容中心 > 內容包

依序前往「SIEM 設定」>「動態饋給」,設定動態饋給

如要設定動態消息,請按照下列步驟操作:

  1. 依序前往「SIEM 設定」>「動態消息」
  2. 按一下「新增動態消息」
  3. 在下一個頁面中,按一下「設定單一動態饋給」
  4. 輸入不重複的「欄位名稱」
  5. 選取「Microsoft Azure Blob Storage」做為「來源類型」
  6. 選取「Microsoft Azure Activity」做為「記錄類型」
  7. 點選「下一步」
  8. 設定下列必要輸入參數:
    • Azure URI:輸入先前記錄的 Blob 服務端點值,並加上 insights-activity-logs 後綴 (例如:https://acme-azure-chronicle.blob.core.windows.net/insights-activity-logs)
    • URI 為:選取「包含子目錄的目錄」
    • 來源刪除選項:指定是否要在移轉後刪除檔案和目錄。
    • 共用金鑰:輸入您先前記下的共用金鑰值。
  9. 依序點按「繼續」和「提交」

從內容中心設定動態饋給

為下列欄位指定值:

  • Azure URI:輸入先前記錄的 Blob 服務端點值,並加上 insights-activity-logs 後綴 (例如:https://acme-azure-chronicle.blob.core.windows.net/insights-activity-logs)
  • URI 為:選取「包含子目錄的目錄」
  • 來源刪除選項:指定是否要在移轉後刪除檔案和目錄。
  • 共用金鑰:輸入您先前記下的共用金鑰值。

進階選項

  • 動態饋給名稱:系統預先填入的值,用於識別動態饋給。
  • 來源類型:將記錄收集到 Google SecOps 的方法。
  • 資產命名空間:與動態饋給相關聯的命名空間。
  • 擷取標籤:套用至這個動態饋給所有事件的標籤。

欄位對應參考資料

這個剖析器程式碼會先將大量欄位初始化為空字串,然後執行一系列字串操作和 JSON 剖析作業,從 Azure 活動記錄訊息中擷取相關資訊。最後,它會將擷取的資料對應至 Unified Data Model (UDM) 欄位,將事件類型分類,並加入嚴重程度、主體資訊和網路資料等詳細資料。

UDM 對應表

記錄欄位 UDM 對應 邏輯
category read_only_udm.security_result.category_details 直接對應原始記錄中的「category」欄位。
callerIpAddress read_only_udm.principal.asset.ipread_only_udm.principal.ip 直接從原始記錄中的「callerIpAddress」欄位對應。
correlationId read_only_udm.security_result.detection_fields.correlationId 直接對應原始記錄中的「correlationId」欄位。
data.callerIpAddress read_only_udm.principal.asset.ipread_only_udm.principal.ip 直接對應原始記錄中「data」物件內的「callerIpAddress」欄位。
data.correlationId read_only_udm.security_result.detection_fields.correlationId 直接從原始記錄中「data」物件內的「correlationId」欄位對應。
data.DeploymentUnit read_only_udm.target.resource.name 直接對應原始記錄中「data」物件內的「DeploymentUnit」欄位。
data.details read_only_udm.metadata.description 直接從原始記錄中「data」物件內的「details」欄位對應,但前提是「details」欄位不得為「Unknown」。
data.entity read_only_udm.additional.fields.entity 直接從原始記錄中「data」物件內的「entity」欄位對應。
data.EventName read_only_udm.metadata.product_event_type 直接從原始記錄的「data」物件中「EventName」欄位對應。
data.hierarchy read_only_udm.additional.fields.hierarchy 直接對應原始記錄中「data」物件內的「hierarchy」欄位。
data.identity.authorization.action read_only_udm.security_result.detection_fields.action 直接對應原始記錄中「身分」物件的「授權」物件內「動作」欄位。
data.identity.authorization.evidence.principalId read_only_udm.principal.user.product_object_idread_only_udm.principal.resource.product_object_idread_only_udm.principal.group.product_object_id 直接從原始記錄中「身分」物件的「授權」物件「證據」物件內的「principalId」欄位對應。對應的特定 UDM 欄位取決於「principalType」欄位的值。如果「principalType」是「User」或「ServicePrincipal」,則會對應至 principal.user.product_object_id。如果「principalType」是「Group」,則會對應至 principal.group.product_object_id。如果「principalType」是「ServicePrincipal」,則會對應至 principal.resource.product_object_id
data.identity.authorization.evidence.principalType read_only_udm.principal.resource.resource_subtype 直接對應原始記錄中「identity」物件的「authorization」物件「evidence」物件內的「principalType」欄位。
data.identity.authorization.evidence.role read_only_udm.principal.user.role_name 直接對應原始記錄中「身分」物件的「授權」物件「證據」物件內的「角色」欄位。
data.identity.authorization.evidence.roleAssignmentId read_only_udm.principal.resource.attribute.labels.roleAssignmentId 直接從原始記錄中「身分」物件的「授權」物件的「證據」物件內的「roleAssignmentId」欄位對應。
data.identity.authorization.evidence.roleAssignmentScope read_only_udm.principal.resource.attribute.labels.roleAssignmentScope 直接對應原始記錄中「身分」物件的「授權」物件「證據」物件內的「roleAssignmentScope」欄位。
data.identity.authorization.evidence.roleDefinitionId read_only_udm.principal.resource.attribute.labels.roleDefinitionId 直接從原始記錄中「身分」物件的「授權」物件「證據」物件內的「roleDefinitionId」欄位對應。
data.identity.authorization.scope read_only_udm.security_result.detection_fields.scope 直接對應原始記錄中「身分」物件的「授權」物件內「範圍」欄位。
data.identity.claims.aio read_only_udm.security_result.detection_fields.aio 直接對應原始記錄中「identity」物件的「claims」物件內「aio」欄位。
data.identity.claims.appid read_only_udm.security_result.detection_fields.appid 直接對應原始記錄中「identity」物件的「claims」物件內「appid」欄位。
data.identity.claims.appidacr read_only_udm.security_result.detection_fields.appidacr 直接對應原始記錄中「identity」物件的「claims」物件內「appidacr」欄位。
data.identity.claims.aud read_only_udm.security_result.detection_fields.aud 直接對應原始記錄中「identity」物件的「claims」物件內「aud」欄位。
data.identity.claims.exp read_only_udm.security_result.detection_fields.exp 直接對應原始記錄中「identity」物件的「claims」物件內「exp」欄位。
data.identity.claims.http://schemas.microsoft.com/identity/claims/identityprovider read_only_udm.security_result.detection_fields.identityprovider 直接從原始記錄中「identity」物件的「claims」物件內「http://schemas.microsoft.com/identity/claims/identityprovider」欄位對應。
data.identity.claims.http://schemas.microsoft.com/identity/claims/objectidentifier read_only_udm.security_result.detection_fields.objectidentifier 直接對應原始記錄中「identity」物件的「claims」物件內「http://schemas.microsoft.com/identity/claims/objectidentifier」欄位。
data.identity.claims.http://schemas.microsoft.com/identity/claims/tenantid read_only_udm.security_result.detection_fields.tenantid 直接從原始記錄中「identity」物件的「claims」物件內「http://schemas.microsoft.com/identity/claims/tenantid」欄位對應。
data.identity.claims.http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier read_only_udm.security_result.detection_fields.nameidentifier 直接對應原始記錄中「identity」物件的「claims」物件內「http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier」欄位。
data.identity.claims.iat read_only_udm.security_result.detection_fields.iat 直接對應原始記錄中「identity」物件的「claims」物件內「iat」欄位。
data.identity.claims.iss read_only_udm.security_result.detection_fields.iss 直接對應原始記錄中「identity」物件的「claims」物件內「iss」欄位。
data.identity.claims.nbf read_only_udm.security_result.detection_fields.nbf 直接對應原始記錄中「identity」物件的「claims」物件內「nbf」欄位。
data.identity.claims.rh read_only_udm.security_result.detection_fields.rh 直接對應原始記錄中「identity」物件的「claims」物件內「rh」欄位。
data.identity.claims.uti read_only_udm.security_result.detection_fields.uti 直接對應原始記錄中「identity」物件的「claims」物件內「uti」欄位。
data.identity.claims.ver read_only_udm.security_result.detection_fields.ver 直接對應原始記錄中「identity」物件的「claims」物件內「ver」欄位。
data.identity.claims.xms_tcdt read_only_udm.security_result.detection_fields.xms_tcdt 直接對應原始記錄中「identity」物件的「claims」物件內「xms_tcdt」欄位。
data.identity.UserName read_only_udm.principal.user.user_display_name 直接從原始記錄中「身分」物件的「使用者名稱」欄位對應。
data.level read_only_udm.security_result.severityread_only_udm.security_result.severity_details 直接從原始記錄中「data」物件內的「level」欄位對應。「level」欄位也用於判斷 severity 欄位的值。如果「level」是「Information」或「Informational」,severity 會設為「INFORMATIONAL」。如果「level」為「Warning」,severity 會設為「MEDIUM」。如果「level」為「Error」,severity 會設為「ERROR」。如果「層級」為「重大」,severity 會設為「重大」。
data.location read_only_udm.target.location.name 直接對應原始記錄中「data」物件內的「location」欄位。
data.operationName read_only_udm.metadata.product_event_type 直接從原始記錄中「data」物件內的「operationName」欄位對應。
data.properties.EventChannel read_only_udm.additional.fields.properties EventChannel 直接對應原始記錄中「data」物件的「properties」物件內「EventChannel」欄位。
data.properties.EventSource read_only_udm.additional.fields.properties EventSource 直接從原始記錄中「data」物件的「properties」物件內「EventSource」欄位對應。
data.properties.EventId read_only_udm.metadata.product_log_id 直接對應原始記錄中「data」物件的「properties」物件內「EventId」欄位。
data.properties.eventProperties.cause read_only_udm.security_result.detection_fields.cause 直接對應於原始記錄中「data」物件的「properties」物件內「eventProperties」物件的「cause」欄位。
data.properties.eventProperties.clientIPAddress read_only_udm.principal.asset.ipread_only_udm.principal.ip 直接對應原始記錄中「data」物件的「properties」物件內「eventProperties」物件的「clientIPAddress」欄位。
data.properties.eventProperties.compromisedHost read_only_udm.principal.asset.hostnameread_only_udm.principal.hostname 直接從原始記錄中「data」物件的「properties」物件內「eventProperties」物件的「compromisedHost」欄位對應。
data.properties.eventProperties.currentHealthStatus read_only_udm.security_result.detection_fields.currentHealthStatus 直接對應於原始記錄中「data」物件的「properties」物件內「eventProperties」物件的「currentHealthStatus」欄位。
data.properties.eventProperties.previousHealthStatus read_only_udm.security_result.detection_fields.previousHealthStatus 直接對應原始記錄中「data」物件的「properties」物件內「eventProperties」物件的「previousHealthStatus」欄位。
data.properties.eventProperties.type read_only_udm.security_result.detection_fields.type 直接對應原始記錄中「data」物件的「properties」物件內「eventProperties」物件的「type」欄位。
data.properties.eventProperties.User read_only_udm.principal.user.userid 直接對應於原始記錄中「data」物件的「properties」物件內「eventProperties」物件的「User」欄位。
data.properties.eventProperties.userName read_only_udm.principal.user.user_display_name 從原始記錄的「data」物件的「properties」物件的「eventProperties」物件中,直接對應「userName」欄位,並移除「SECURE\"」前置字串。
data.properties.ipAddress read_only_udm.principal.asset.ipread_only_udm.principal.ip 直接從原始記錄中「data」物件的「properties」物件內「ipAddress」欄位對應。
data.properties.legacyChannels read_only_udm.security_result.detection_fields.legacyChannels 直接對應原始記錄中「data」物件的「properties」物件內「legacyChannels」欄位。
data.properties.legacyEventDataId read_only_udm.security_result.detection_fields.legacyEventDataId 直接對應原始記錄中「data」物件的「properties」物件內「legacyEventDataId」欄位。
data.properties.legacyResourceId read_only_udm.security_result.detection_fields.legacyResourceId 直接對應原始記錄中「data」物件的「properties」物件內「legacyResourceId」欄位。
data.properties.legacyResourceGroup read_only_udm.security_result.detection_fields.legacyResourceGroup 直接對應原始記錄中「data」物件的「properties」物件內「legacyResourceGroup」欄位。
data.properties.legacyResourceProviderName read_only_udm.security_result.detection_fields.legacyResourceProviderName 直接對應原始記錄中「data」物件的「properties」物件內「legacyResourceProviderName」欄位。
data.properties.legacyResourceType read_only_udm.security_result.detection_fields.legacyResourceType 直接對應原始記錄中「data」物件的「properties」物件內「legacyResourceType」欄位。
data.properties.legacySubscriptionId read_only_udm.security_result.detection_fields.legacySubscriptionId 直接對應原始記錄中「data」物件的「properties」物件內「legacySubscriptionId」欄位。
data.properties.operationId read_only_udm.security_result.detection_fields.operationId 直接對應原始記錄中「data」物件的「properties」物件內「operationId」欄位。
data.properties.result read_only_udm.security_result.action_details 直接從原始記錄中「data」物件的「properties」物件內「result」欄位對應。
data.properties.statusCode read_only_udm.network.http.response_code 直接對應原始記錄中「data」物件的「properties」物件內「statusCode」欄位。
data.properties.suspiciousCommandLine read_only_udm.target.process.command_line 直接對應原始記錄中「data」物件的「properties」物件內「suspiciousCommandLine」欄位。
data.properties.suspiciousProcess read_only_udm.target.process.file.full_path 直接對應原始記錄中「data」物件的「properties」物件內「suspiciousProcess」欄位。
data.properties.suspiciousProcessId read_only_udm.target.process.pid 直接對應於原始記錄中「data」物件的「properties」物件內「suspiciousProcessId」欄位。
data.properties.tlsVersion read_only_udm.network.tls.version 直接對應原始記錄中「data」物件的「properties」物件內「tlsVersion」欄位。
data.properties.userAgent read_only_udm.network.http.user_agentread_only_udm.network.http.parsed_user_agent 直接從原始記錄中「data」物件的「properties」物件內「userAgent」欄位對應。
data.properties.userAgentHeader read_only_udm.network.http.user_agentread_only_udm.network.http.parsed_user_agent 直接對應原始記錄中「data」物件的「properties」物件內「userAgentHeader」欄位。
data.properties.userId read_only_udm.target.user.product_object_id 直接從原始記錄中「data」物件的「properties」物件內「userId」欄位對應。
data.ReleaseVersion read_only_udm.metadata.product_version 直接對應原始記錄中「data」物件內的「ReleaseVersion」欄位。
data.resourceId read_only_udm.target.resource.name 直接對應原始記錄中「data」物件內的「resourceId」欄位。
data.resourceType read_only_udm.additional.fields.resourceType 直接對應原始記錄中「data」物件內的「resourceType」欄位。
data.resultDescription read_only_udm.metadata.description 直接對應原始記錄中「data」物件內的「resultDescription」欄位。
data.resultSignature read_only_udm.additional.fields.resultSignature 直接從原始記錄中「data」物件內的「resultSignature」欄位對應。
data.resultType read_only_udm.security_result.action_detailsread_only_udm.additional.fields.resultType 直接對應原始記錄中「data」物件內的「resultType」欄位。
data.RoleLocation read_only_udm.target.location.name 直接對應原始記錄中「data」物件內的「RoleLocation」欄位。
data.time read_only_udm.metadata.event_timestamp 系統會剖析原始記錄中「data」物件內的「time」欄位,擷取時間戳記,然後對應至 event_timestamp
data.uri read_only_udm.network.http.referral_url 直接對應原始記錄中「data」物件內的「uri」欄位。
read_only_udm.extensions.auth.mechanism INTERACTIVE 如果原始記錄中「data」物件的「properties」物件內「isInteractive」欄位為「true」,則設為「INTERACTIVE」。否則會設為「MECHANISM_OTHER」。
read_only_udm.extensions.auth.type MACHINE 如果原始記錄中的「category」欄位為「NonInteractiveUserSignInLogs」、「ManagedIdentitySignInLogs」或「ServicePrincipalSignInLogs」,請設為「MACHINE」。
read_only_udm.metadata.log_type AZURE_ACTIVITY 硬式編碼為「AZURE_ACTIVITY」。
read_only_udm.metadata.vendor_name Microsoft 硬式編碼為「Microsoft」。
read_only_udm.principal.platform WINDOWSMACLINUXANDROID 系統會根據「properties.test.deviceDetail.operatingSystem」欄位的值判斷。如果包含「Win」,platform 會設為「WINDOWS」。如果包含「Mac」,platform 會設為「MAC」。如果包含「Lin」,platform 會設為「LINUX」。如果包含「Android」,platform 會設為「ANDROID」。
read_only_udm.principal.resource.type SERVICE_ACCOUNTUNSPECIFIED 根據「identity.authorization.evidence.principalType」欄位的值判斷。如果是「ServicePrincipal」,type 會設為「SERVICE_ACCOUNT」。否則會設為「UNSPECIFIED」。
read_only_udm.security_result.action ALLOWBLOCKUNKNOWN_ACTION 根據「resultType」、「status_errorcode」和「statusText」欄位的值判斷。如果「resultType」是「Success」、「success」、「Succeeded」、「Started」、「Resolved」、「Active」、「Updated」、「Start」、「Accept」、「Accepted」、「0」其中之一,或是「status_errorcode」為 0,或是「statusText」為「Success」,則 action 會設為「ALLOW」。如果「resultType」為「Failure」或「Failed」,或「status_errorcode」不為空白,或「resultType」不為空白,則 action 會設為「BLOCK」。否則會設為「UNKNOWN_ACTION」。
read_only_udm.target.cloud.environment MICROSOFT_AZURE 硬式編碼為「MICROSOFT_AZURE」。