收集 Duo 使用者內容記錄

支援的國家/地區:

本文說明如何使用 API,將 Duo 使用者環境記錄擷取至 Google Security Operations。剖析器會處理 JSON 資料,將使用者資訊 (包括將別名使用者名稱對應至電子郵件地址、群組、電話號碼和裝置詳細資料) 對應至 UDM,並擷取使用者帳戶狀態。此外,也會處理巢狀資料結構,並執行多項資料轉換和合併作業,以建立最終的 UDM 事件。

事前準備

請確認您已完成下列事前準備事項:

設定 Admin API 應用程式並取得金鑰

  1. 以管理員身分登入 Duo 管理面板
  2. 在左側邊欄中,依序點按「應用程式」>「管理應用程式」
  3. 按下「Add Application」(新增應用程式) 按鈕。
  4. 在搜尋欄位中輸入「Admin API」,然後點選「Duo Admin API」旁邊的「新增」
  5. 下一個畫面會顯示下列資訊:
    • 整合金鑰: (字串,例如 DIYYYYYYYYYYYYYY)。
    • 密鑰:40 個字元的字串。
    • API 主機名稱:例如 api-abcd1234.duosecurity.com
  6. 複製並儲存「整合金鑰」、「密鑰」和「API 主機名稱」,並儲存在安全地點。
  7. 捲動至「設定」,然後將「權限」設為「授予讀取資源權限」
  8. 按一下 [儲存變更]。

設定動態饋給

  1. 依序前往「SIEM 設定」>「動態饋給」
  2. 按一下「+ 新增動態消息」
  3. 在「動態饋給名稱」欄位中輸入動態饋給名稱 (例如 Duo Users Logs)。
  4. 選取「第三方 API」做為「來源類型」
  5. 選取「Duo User Context」記錄類型。
  6. 點選「下一步」
  7. 指定下列輸入參數的值:
    • 使用者名稱:輸入先前複製的整合金鑰
    • 密鑰:輸入先前複製的密鑰
    • API 主機名稱:提供 Duo API 伺服器網址 (例如 api-abcd1234.duosecurity.com)。
    • 資產命名空間資產命名空間
    • 擷取標籤:套用至這個動態饋給事件的標籤。
  8. 點選「下一步」
  9. 在「Finalize」畫面中檢查動態饋給設定,然後按一下「Submit」

UDM 對應表

記錄欄位 UDM 對應 邏輯
access_device.browser event.idm.entity.entity.resource.attribute.labels.value 如果 access_device.browser 欄位為空白,系統會直接從 surfaced_auth.access_device.browser 擷取值。金鑰設為「access_device browser」。
access_device.browser_version event.idm.entity.entity.resource.attribute.labels.value 如果 access_device.browser_version 欄位為空白,系統會直接從 surfaced_auth.access_device.browser_version 擷取值。金鑰設為「access_device browser_version」。
access_device.ip.address event.idm.entity.entity.ip 如果 access_device.ip.address 欄位為空白,系統會直接從 surfaced_auth.access_device.ip 擷取值。
access_device.location.city event.idm.entity.entity.location.city 如果 access_device.location.city 欄位為空白,系統會直接從 surfaced_auth.access_device.location.city 擷取值。
access_device.location.country event.idm.entity.entity.location.country_or_region 如果 access_device.location.country 欄位為空白,系統會直接從 surfaced_auth.access_device.location.country 擷取值。
access_device.location.state event.idm.entity.entity.location.state 如果 access_device.location.state 欄位為空白,系統會直接從 surfaced_auth.access_device.location.state 欄位擷取值。
access_device.os event.idm.entity.entity.asset.platform_software.platform 如果 access_device.os 欄位為空白,則值會衍生自 surfaced_auth.access_device.os。如果值 (不區分大小寫) 與「ios」或「mac」相符,UDM 欄位會設為「MAC」。如果相符,UDM 欄位會設為「WINDOWS」。如果與「linux」相符,UDM 欄位會設為「LINUX」。
access_device.os_version event.idm.entity.entity.asset.platform_software.platform_version 如果 access_device.os_version 欄位為空白,系統會直接從 surfaced_auth.access_device.os_version 欄位擷取值。
action.details event.idm.entity.sec_result.action_details 如果 action 為空白,系統會從這個欄位取得值。
action.name event.idm.entity.sec_result.detection_fields.value 這個值直接取自欄位。索引鍵設為「action_name」。
activity_id event.idm.entity.sec_result.detection_fields.value 這個值直接取自欄位。索引鍵設為「activity_id」。
actor.details.created event.idm.entity.entity.user.attribute.labels.value 這個值直接取自欄位。索引鍵會設為「created」。
actor.details.email event.idm.entity.entity.user.email_addresses 值直接取自欄位。
actor.details.groups.key event.idm.entity.entity.user.group_identifiers 值直接取自欄位。
actor.details.groups.name event.idm.entity.entity.user.group_identifiers 值直接取自欄位。
actor.details.last_login event.idm.entity.entity.user.attribute.labels.value 這個值直接取自欄位。索引鍵設為「last_login」。
actor.details.status event.idm.entity.entity.user.attribute.labels.value 這個值直接取自欄位。索引鍵設為「status」。
actor.key event.idm.entity.entity.resource.product_object_id 值直接取自欄位。
actor.name event.idm.entity.entity.user.user_display_name 如果欄位為空白,則值會直接從 surfaced_auth.user.name 取得。
actor.type event.idm.entity.entity.user.attribute.labels.value 這個值直接取自欄位。索引鍵設為「actor type」。
akey event.idm.entity.metadata.product_entity_id 值會直接從欄位取得,如果 akey 為空,則會從 sekey 取得。
application event.idm.entity.entity.application 值直接取自欄位。
collection_time.secondscreate_time.seconds event.idm.entity.metadata.collected_timestamp.secondsevent.timestamp.seconds collected_timestamp.seconds 和頂層 timestamp.seconds 都會使用 collection_time.secondscreate_time.seconds 的較大值。
collection_time.nanoscreate_time.nanos event.idm.entity.metadata.collected_timestamp.nanosevent.timestamp.nanos 系統會使用對應於 collection_time.secondscreate_time.seconds 中較大值的奈秒值,做為 collected_timestamp.nanos 和頂層 timestamp.nanos 的值。
email event.idm.entity.entity.user.email_addresses 值直接取自欄位。
explanations event.idm.entity.entity.resource.attribute.labels explanations 陣列中每個物件內的鍵/值組合都會轉換為標籤。每個標籤的鍵都會加上「explanation 」前置字元。
firstname event.idm.entity.entity.user.first_name 值直接取自欄位。
from_common_netblock event.idm.entity.entity.resource.attribute.labels.value 這個值直接取自欄位。索引鍵設為「from_common_netblock」。
from_new_user event.idm.entity.entity.resource.attribute.labels.value 這個值直接取自欄位。索引鍵設為「from_new_user」。
groups.N.name (N=0..10) event.idm.entity.entity.user.group_identifiers 值直接取自欄位。
lastname event.idm.entity.entity.user.last_name 值直接取自欄位。
low_risk_ip event.idm.entity.entity.resource.attribute.labels.value 這個值直接取自欄位。索引鍵設為「low_risk_ip」。
phones.0.model event.idm.entity.relations.entity.asset.hardware.model 值直接取自欄位。
phones.0.number event.idm.entity.entity.user.phone_numbers 值直接取自欄位。
phones.0.phone_id event.idm.entity.relations.entity.asset.product_object_id 值直接取自欄位。
phones.0.platform event.idm.entity.relations.entity.asset.hardware.manufacturer 值直接取自欄位。
priority_event event.idm.entity.entity.resource.attribute.labels.value 這個值直接取自欄位。索引鍵設為「priority_event」。
realname event.idm.entity.entity.user.user_display_name 值直接取自欄位。
sekey event.idm.entity.metadata.product_entity_id 如果 akey 為空白,系統會直接從欄位取得值。
state event.idm.entity.entity.resource.attribute.labels.value 這個值直接取自欄位。索引鍵設為「state」。
status event.idm.entity.entity.user.attribute.labels.valueevent.idm.entity.entity.user.user_authentication_status 這個值直接取自欄位。標籤的鍵設為「status」。這個值也會用於判斷 user_authentication_status。「active」和「bypass」會對應至「ACTIVE」,「disabled」和「pending deletion」會對應至「SUSPENDED」,「locked out」則會對應至「NO_ACTIVE_CREDENTIALS」。
surfaced_auth.access_device.browser event.idm.entity.entity.resource.attribute.labels.value 如果 access_device.browser 為空白,系統會從這個欄位取得值。金鑰設為「surfaced_auth access_device browser」。
surfaced_auth.access_device.browser_version event.idm.entity.entity.resource.attribute.labels.value 如果 access_device.browser_version 為空白,系統會從這個欄位取得值。金鑰設為「surfaced_auth access_device browser_version」。
surfaced_auth.access_device.ip event.idm.entity.entity.ip 如果 access_device.ip.address 為空白,系統會從這個欄位取得值。
surfaced_auth.access_device.location.city event.idm.entity.entity.location.city 如果 access_device.location.city 為空白,系統會從這個欄位取得值。
surfaced_auth.access_device.location.country event.idm.entity.entity.location.country_or_region 如果 access_device.location.country 為空白,系統會從這個欄位取得值。
surfaced_auth.access_device.location.state event.idm.entity.entity.location.state 如果 access_device.location.state 為空白,系統會從這個欄位取得值。
surfaced_auth.access_device.os event.idm.entity.entity.asset.platform_software.platform 如果 access_device.os 為空白,系統會從這個欄位取得值。對應至 UDM 欄位的邏輯與 access_device.os 相同。
surfaced_auth.access_device.os_version event.idm.entity.entity.asset.platform_software.platform_version 如果 access_device.os_version 為空白,系統會從這個欄位取得值。
surfaced_auth.user.key event.idm.entity.entity.user.userid 如果 username 為空白,系統會從這個欄位取得值。
surfaced_auth.user.name event.idm.entity.entity.user.user_display_name 如果 actor.name 為空白,系統會從這個欄位取得值。
target.details.biometrics_status event.idm.entity.entity.asset.attribute.labels.value 這個值直接取自欄位。金鑰設為「biometrics_status」。
target.details.country_code event.idm.entity.entity.asset.attribute.labels.value 這個值直接取自欄位。索引鍵設為「country_code」。
target.details.extension event.idm.entity.entity.asset.attribute.labels.value 這個值直接取自欄位。索引鍵設為「extension」。
target.details.manufacturer event.idm.entity.entity.asset.hardware.manufacturer 值直接取自欄位。
target.details.model event.idm.entity.entity.asset.hardware.model 值直接取自欄位。
target.details.number event.idm.entity.entity.user.phone_numbers 值直接取自欄位。
target.details.os event.idm.entity.entity.asset.software.name 值直接取自欄位。
target.details.os_version event.idm.entity.entity.asset.software.version 值直接取自欄位。
target.details.passcode_status event.idm.entity.entity.asset.attribute.labels.value 這個值直接取自欄位。金鑰設為「passcode_status」。
target.details.tampered_status event.idm.entity.entity.asset.attribute.labels.value 這個值直接取自欄位。索引鍵設為「tampered_status」。
target.key event.idm.entity.entity.asset.asset_id 值直接取自欄位。
target.name event.idm.entity.entity.asset.attribute.labels.value 這個值直接取自欄位。索引鍵設為「name」。
target.type event.idm.entity.entity.asset.attribute.labels.value 這個值直接取自欄位。索引鍵設為「type」。
triage_event_uri event.idm.entity.entity.url 值直接取自欄位。
triaged_as_interesting event.idm.entity.entity.resource.attribute.labels.value 這個值直接取自欄位。索引鍵設為「triaged_as_interesting」。
ts event.timestamp.secondsevent.idm.entity.metadata.collected_timestamp.seconds 如果這個欄位存在,系統會使用 ISO8601 或 RFC 3339 格式剖析時間戳記。擷取的秒數和奈秒會用於頂層 timestampcollected_timestamp
type event.idm.entity.entity.resource.attribute.labels.value 這個值直接取自欄位。索引鍵設為「type」。
user_id event.idm.entity.metadata.product_entity_id 值直接取自欄位。
username event.idm.entity.entity.user.userid 值會直接從欄位取得,如果 username 為空,則會從 surfaced_auth.user.key 取得。
(剖析器邏輯) event.idm.entity.metadata.vendor_name 硬式編碼為「Duo」。
(剖析器邏輯) event.idm.entity.metadata.product_name 硬式編碼為「Duo 使用者環境」。
(剖析器邏輯) event.idm.entity.metadata.entity_type 根據其他欄位是否出現而決定。如果 user_present 為 true,則設為「USER」。如果 asset_mid_present 為 true,則設為「ASSET」。如果 ip_present 為 true,則設為「IP_ADDRESS」。如果 resource_present 為 true,則設為「RESOURCE」。否則會設為「UNKNOWN_ENTITYTYPE」。
(剖析器邏輯) event.idm.entity.relations.entity_type 如果 phones[0] 不為空白,請設為「ASSET」。
(剖析器邏輯) event.idm.entity.relations.relationship 如果 phones[0] 不為空白,請設為「OWNS」。
(剖析器邏輯) event.idm.entity.relations.entity.asset.type 如果 phones[0] 不為空白,請設為「MOBILE」。

還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。