收集 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. 点击保存更改

设置 Feed

  1. 依次前往 SIEM 设置> Feed
  2. 点击 + 添加新 Feed
  3. Feed 名称字段中,输入 Feed 的名称(例如 Duo Users Logs)。
  4. 选择第三方 API 作为来源类型
  5. 选择 Duo User Context 日志类型。
  6. 点击下一步
  7. 为以下输入参数指定值:
    • 用户名:输入之前复制的集成密钥
    • 密钥:输入之前复制的密钥
    • API 主机名:提供 Duo API 服务器网址(例如 api-abcd1234.duosecurity.com)。
    • 资产命名空间资产命名空间
    • 注入标签:应用于此 Feed 中事件的标签。
  8. 点击下一步
  9. 最终确定界面中检查 Feed 配置,然后点击提交

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”。如果匹配“windows”,则 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 该值直接取自相应字段。键设置为“已创建”。
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 该值直接取自相应字段。键设置为“状态”。
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 collection_time.secondscreate_time.seconds 中较大的值将用于 collected_timestamp.seconds 和顶级 timestamp.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 User Context”。
(解析器逻辑) 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 专业人士那里获得解答。