收集 Cisco Umbrella DNS 日志
支持的语言:
Google SecOps
SIEM
本文档介绍了如何使用 AWS S3 存储桶将 Cisco Umbrella DNS 日志收集到 Google Security Operations Feed 中。解析器可处理 JSON 和 CSV 格式的日志。它会提取字段,将其重命名为与 UDM 匹配,处理不同的日志版本和格式(包括代理和 IP 日志),并针对身份、安全类别和网络事件执行特定逻辑,最终将提取的数据合并到 UDM 架构中。
准备工作
- 确保您拥有 Google SecOps 实例。
- 确保您拥有对 AWS IAM 和 S3 的特权访问权限。
- 确保您拥有对 Cisco Umbrella 的特权访问权限。
配置由 Cisco 管理的 Amazon S3 存储桶
- 登录 Cisco Umbrella 信息中心。
- 前往管理 > 日志管理。
- 选择 Use a Cisco-managed Amazon S3 bucket 选项。
- 提供以下配置详细信息:
- 选择区域:选择离您较近的区域,以缩短延迟时间。
- 选择保留时长:选择时间段。保留时长为 7 天、14 天或 30 天。在所选时间段过后,数据会被删除,且无法恢复。如果您的提取周期规律,请使用较短的时间段。您可以稍后更改保留时长。
- 点击保存。
- 点击继续以确认您的选择,并接收启用通知。
在随即显示的激活完成窗口中,系统会显示访问密钥和密钥值。 - 复制访问密钥和密钥值。如果您丢失了这些密钥,则必须重新生成它们。
- 依次点击知道了 > 继续。
- 系统会显示一个摘要页面,其中包含配置和存储桶名称。您可以根据组织的要求关闭或开启日志记录。不过,系统会根据保留时长清除日志,而不会考虑是否添加了新数据。
可选:为自行管理的 AWS S3 存储桶配置用户访问密钥
- 登录 AWS Management Console。
- 按照以下用户指南创建用户:创建 IAM 用户。
- 选择创建的用户。
- 选择安全凭据标签页。
- 在访问密钥部分中,点击创建访问密钥。
- 选择第三方服务作为使用情形。
- 点击下一步。
- 可选:添加说明标记。
- 点击创建访问密钥。
- 点击 Download CSV file(下载 CSV 文件),保存访问密钥和不公开的访问密钥以供日后使用。
- 点击完成。
- 选择权限标签页。
- 在权限政策部分中,点击添加权限。
- 选择添加权限。
- 选择直接附加政策。
- 搜索并选择 AmazonS3FullAccess 政策。
- 点击下一步。
- 点击添加权限。
可选:配置自行管理的 Amazon S3 存储桶
前往 S3。
点击创建存储分区。
提供以下配置详细信息:
- 存储桶名称:为 Amazon S3 存储桶提供名称。
- 区域:选择一个区域。
点击创建。
可选:为自行管理的 AWS S3 存储桶配置存储桶政策
- 点击新创建的存储桶以将其打开。
- 依次选择属性 > 权限。
- 在权限列表中,点击添加存储桶政策。
按如下方式输入预配置的存储桶政策:
{ "Version": "2008-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::568526795995:user/logs" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::BUCKET_NAME/*" }, { "Sid": "", "Effect": "Deny", "Principal": { "AWS": "arn:aws:iam::568526795995:user/logs" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::BUCKET_NAME/*"}, { "Sid": "", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::568526795995:user/logs" }, "Action": "s3:GetBucketLocation", "Resource": "arn:aws:s3:::BUCKET_NAME" }, { "Sid": "", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::568526795995:user/logs" }, "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::BUCKET_NAME" } ] }
- 将
BUCKET_NAME
替换为您提供的 Amazon S3 存储桶名称。
- 将
点击保存。
可选:自行管理的 Amazon S3 存储桶需要进行验证
- 在 Cisco Umbrella 信息中心内,依次选择 Admin > Log management > Amazon S3。
- 在 Bucket name 字段中,指定确切的 Amazon S3 存储桶名称,然后点击 Verify。
- 在验证过程中,系统会将名为
README_FROM_UMBRELLA.txt
的文件从 Cisco Umbrella 上传到您的 Amazon S3 存储桶。您可能需要刷新浏览器才能在上传后看到 README 文件。 - 下载
README_FROM_UMBRELLA.txt
文件,然后使用文本编辑器打开该文件。 - 复制并保存文件中的唯一 Cisco Umbrella 令牌。
- 前往 Cisco Umbrella 信息中心。
- 在令牌编号字段中,指定令牌,然后点击保存。
- 如果验证成功,您的信息中心会显示一条确认消息,表明存储桶已成功通过验证。如果您收到一条错误消息,指出您的存储桶无法验证,请重新检查存储桶名称的语法并检查配置。
在 Google SecOps 中配置 Feed 以注入 Cisco Umbrella DNS 日志
- 依次前往 SIEM 设置> Feed。
- 点击新增。
- 在 Feed 名称字段中,输入 Feed 的名称,例如 Cisco Umbrella DNS 日志。
- 选择 Amazon S3 V2 作为来源类型。
- 选择 Cisco Umbrella DNS 作为日志类型。
- 点击下一步。
为以下输入参数指定值:
- S3 URI:存储桶 URI。
s3:/BUCKET_NAME/
- 将
BUCKET_NAME
替换为存储桶的实际名称。
- 将
- 来源删除选项:根据您的偏好设置选择删除选项。
- S3 URI:存储桶 URI。
点击下一步。
在最终确定界面中查看新的 Feed 配置,然后点击提交。
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
action |
security_result.action_details |
该值取自 JSON 日志中的 action 字段(如果存在),或取自 CSV 日志中的 column6 或 column7 ,并转换为大写形式(ALLOW 或 BLOCK)。 |
amp.disposition |
security_result.detection_fields[].key |
值为 ampDisposition 。 |
amp.disposition |
security_result.detection_fields[].value |
该值取自 amp.disposition 字段。 |
amp.malware |
security_result.detection_fields[].key |
值为 ampMalware 。 |
amp.malware |
security_result.detection_fields[].value |
该值取自 amp.malware 字段。 |
amp.score |
security_result.detection_fields[].key |
值为 ampScore 。 |
amp.score |
security_result.detection_fields[].value |
该值取自 amp.score 字段。 |
blocked_categories |
security_result.category_details |
该值取自 blocked_categories 字段。 |
blockedfiletype |
security_result.detection_fields[].key |
值为 egress type 。 |
blockedfiletype |
security_result.detection_fields[].value |
该值取自 blockedfiletype 字段。 |
bundleid |
additional.fields[].key |
值为 bundleid 。 |
bundleid |
additional.fields[].value.string_value |
该值取自 bundleid 字段。 |
categories[] |
security_result.category_details |
该值取自 categories[].label 字段。 |
column1 |
metadata.event_timestamp.seconds |
该值会从 column1 字段解析为时间戳。对于代理日志,如果存在 date 和 time 字段,则将它们合并并解析为时间戳。 |
column10 |
network.http.user_agent |
该值取自 column10 字段。 |
column10 |
additional.fields[].value.string_value |
该值取自 column10 字段。 |
column11 |
target.port |
该值取自 column11 字段。 |
column12 |
principal.resource.name |
该值取自 column12 字段。 |
column13 |
security_result.rule_id |
该值取自 column13 字段。 |
column14 |
security_result.action_details |
该值取自 column14 字段。 |
column2 |
principal.user.user_display_name |
该值取自 column2 字段。 |
column2 |
principal.user.userid |
该值取自 column2 字段。 |
column2 |
principal.location.name |
该值取自 column2 字段。 |
column3 |
principal.hostname |
该值取自 column3 字段。 |
column3 |
principal.user.product_object_id |
该值取自 column3 字段。 |
column3 |
principal.location.city |
该值取自 column3 字段。 |
column3 |
additional.fields[].value.string_value |
该值取自 column3 字段。 |
column4 |
principal.asset.ip |
该值取自 column4 字段。 |
column4 |
principal.ip |
该值取自 column4 字段。 |
column4 |
principal.port |
该值取自 column4 字段。 |
column5 |
principal.asset.ip |
该值取自 column5 字段。 |
column5 |
principal.ip |
该值取自 column5 字段。 |
column5 |
target.asset.ip |
该值取自 column5 字段。 |
column5 |
target.ip |
该值取自 column5 字段。 |
column6 |
security_result.action_details |
该值取自 column6 字段。 |
column6 |
target.port |
该值取自 column6 字段。 |
column7 |
network.received_bytes |
该值取自 column7 字段。 |
column7 |
additional.fields[].value.string_value |
该值取自 column7 字段。 |
column8 |
principal.asset.ip |
该值取自 column8 字段。 |
column8 |
principal.ip |
该值取自 column8 字段。 |
column8 |
target.url |
该值取自 column8 字段。 |
column9 |
principal.port |
该值取自 column9 字段。 |
column9 |
network.http.referral_url |
该值取自 column9 字段。 |
data_center_name |
principal.resource.name |
该值取自 data_center_name 字段。 |
datacenter.label |
security_result.detection_fields[].key |
值为 datacenter label 。 |
datacenter.label |
security_result.detection_fields[].value |
该值取自 datacenter.label 字段。 |
destinationip |
target.asset.ip |
该值取自 destinationip 字段。 |
destinationip |
target.ip |
该值取自 destinationip 字段。 |
direction |
network.direction |
该值取自 direction 字段,并转换为大写。 |
domain |
network.dns.questions[].name |
该值取自 domain 字段,如果存在尾随句点,则将其移除。 |
dstPort |
target.port |
该值取自 dstPort 字段。 |
dstip |
target.asset.ip |
该值取自 dstip 字段。 |
dstip |
target.ip |
该值取自 dstip 字段。 |
egress.ip |
security_result.detection_fields[].key |
值为 egress ip 。 |
egress.ip |
security_result.detection_fields[].value |
该值取自 egress.ip 字段。 |
egress.type |
security_result.detection_fields[].key |
值为 egress type 。 |
egress.type |
security_result.detection_fields[].value |
该值取自 egress.type 字段。 |
externalip |
principal.asset.ip |
该值取自 externalip 字段。 |
externalip |
principal.ip |
该值取自 externalip 字段。 |
forwardingmethod |
additional.fields[].key |
值为 forwardingmethod 。 |
forwardingmethod |
additional.fields[].value.string_value |
该值取自 forwardingmethod 字段。 |
granular_identity |
principal.user.user_display_name |
如果同时存在 granular_identity 和 most_granular_identity ,则值取自 granular_identity 字段。否则,它会从 _policy_identity 字段派生出来,并根据 identityType 进行进一步解析。 |
granular_identity |
principal.user.email_addresses |
该值使用正则表达式从 granular_identity 字段中提取。 |
granular_identity |
principal.user.first_name |
该值使用正则表达式从 granular_identity 字段中提取。 |
granular_identity |
principal.user.last_name |
该值使用正则表达式从 granular_identity 字段中提取。 |
granular_identity |
principal.user.userid |
该值使用正则表达式从 granular_identity 字段中提取。 |
granular_identity |
principal.hostname |
该值取自 granular_identity 字段。 |
granular_identity |
principal.location.name |
该值取自 granular_identity 字段。 |
identity_types |
additional.fields[].value.string_value |
该值取自 identity_types 字段。 |
identities[] |
principal.user.product_object_id |
该值取自 identities[] 字段。 |
identities |
principal.user.product_object_id |
该值取自 identities 字段。 |
internalip |
principal.asset.ip |
该值取自 internalip 字段。 |
internalip |
principal.ip |
该值取自 internalip 字段。 |
isolated.fileaction |
security_result.detection_fields[].key |
值为 isolated fileaction 。 |
isolated.fileaction |
security_result.detection_fields[].value |
该值取自 isolated.fileaction 字段。 |
isolated.state |
security_result.detection_fields[].key |
值为 isolated state 。 |
isolated.state |
security_result.detection_fields[].value |
该值取自 isolated.state 字段。 |
most_granular_identity |
principal.user.identityType |
如果同时存在 granular_identity 和 most_granular_identity ,则值取自 most_granular_identity 字段。否则,系统会从 _policy_identity_type 字段中获取该值。 |
nat_destination_ip |
principal.asset.ip |
该值取自 nat_destination_ip 字段。 |
nat_destination_ip |
principal.ip |
该值取自 nat_destination_ip 字段。 |
odns_categories |
security_result.category_details |
该值取自 odns_categories 字段。 |
policy.ruleid |
security_result.rule_id |
该值取自 policy.ruleid 字段。 |
policy.rulesetid |
security_result.detection_fields[].key |
值为 rulesetid 。 |
policy.rulesetid |
security_result.detection_fields[].value |
该值取自 policy.rulesetid 字段。 |
policy.timebasedrule |
security_result.detection_fields[].key |
值为 timebasedrule 。 |
policy.timebasedrule |
security_result.detection_fields[].value |
该值取自 policy.timebasedrule 字段。 |
port |
target.port |
该值取自 port 字段。 |
query_type_name |
network.dns.questions[].type |
使用正则表达式从 query_type_name 字段中提取数字部分,并将其转换为整数。 |
query_type_name |
additional.fields[].value.string_value |
使用正则表达式从 query_type_name 字段中提取括号内的字符串部分。 |
querytype |
network.dns.questions[].type |
该值取自 querytype 字段,并根据 DNS 记录类型映射为数值。 |
referer |
network.http.referral_url |
该值取自 referer 字段。 |
requestmethod |
network.http.method |
该值取自 requestmethod 字段。 |
requestsize |
network.sent_bytes |
该值取自 requestsize 字段,并转换为无符号整数。 |
response |
additional.fields[].value.string_value |
该值取自 response 字段。 |
responsecode |
network.http.response_code |
该值取自 responsecode 字段。 |
responsefilename |
target.file.names |
该值取自 responsefilename 字段。 |
responsesize |
network.received_bytes |
该值取自 responsesize 字段,并转换为无符号整数。 |
returncode |
network.dns.response_code |
该值取自 returncode 字段,并转换为无符号整数。 |
securityoverridden |
additional.fields[].key |
值为 securityoverridden 。 |
securityoverridden |
additional.fields[].value.string_value |
该值取自 securityoverridden 字段。 |
sha256 |
target.file.sha256 |
该值取自 sha256 字段。 |
source_ip |
principal.asset.ip |
如果 JSON 日志中存在 source_ip 字段,则该值取自该字段;否则,如果 CSV 日志中存在 column3 字段,则该值取自该字段。 |
source_ip |
principal.ip |
如果 JSON 日志中存在 source_ip 字段,则该值取自该字段;否则,如果 CSV 日志中存在 column3 字段,则该值取自该字段。 |
srcPort |
principal.port |
该值取自 srcPort 字段。 |
statuscode |
network.http.response_code |
该值取自 statuscode 字段。 |
tenantcontrols |
additional.fields[].key |
值为 tenantcontrols 。 |
tenantcontrols |
additional.fields[].value.string_value |
该值取自 tenantcontrols 字段。 |
timestamp |
metadata.event_timestamp.seconds |
该值会从 timestamp 字段解析为时间戳。 |
tunnel_name |
additional.fields[].key |
值为 tunnel_name 。 |
tunnel_name |
additional.fields[].value.string_value |
该值取自 tunnel_name 字段。 |
tunnel_type |
metadata.product_event_type |
该值取自 tunnel_type 字段。 |
type |
additional.fields[].key |
值为 type 。 |
type |
additional.fields[].value.string_value |
该值取自 type 字段。 |
url |
target.url |
该值取自 url 字段。 |
useragent |
network.http.user_agent |
该值取自 useragent 字段。 |
verdict |
security_result.action_details |
该值取自 verdict 字段。 |
warnstatus |
security_result.detection_fields[].key |
值为 warnstatus 。 |
warnstatus |
security_result.detection_fields[].value |
该值取自 warnstatus 字段。值为 DNS Lookup Type 。括号内的字符串部分使用正则表达式从 query_type_name 字段中提取,如果该字段不存在,则为空字符串。值为 DNS request and response were made. 。根据是否存在某些字段来确定:如果存在 question.name ,则为 NETWORK_DNS;如果同时存在 principal.ip 和 target.ip ,则为 NETWORK_CONNECTION;如果仅存在 principal.ip ,则为 STATUS_UPDATE;否则为 GENERIC_EVENT。值为 UMBRELLA_DNS 。值为 Umbrella DNS 。值为 Cisco 。值最初设置为 DNS 。如果 requestmethod 是有效的 HTTP 方法,则会将其更改为 HTTP 。系统会使用正则表达式从 query_type_name 字段中提取数字部分并将其转换为整数,或者从 querytype 字段中派生出数字部分,并根据 DNS 记录类型将其映射到数值。该值是使用 parseduseragent 过滤条件从 useragent 或 column10 字段派生出来的。该值取自 column3 字段(按逗号分隔)的最后一部分,如果该字段不存在,则为空字符串。该值取自 column3 字段(按逗号拆分)的第一部分,如果不存在 column3 ,则取自 column2 字段。该值使用正则表达式从 column2 或 column3 字段中提取。该值使用正则表达式从 column2 或 column3 字段中提取。该值使用正则表达式从 column2 或 column3 字段中提取。该值使用正则表达式从 column2 或 column3 字段中提取。该值派生自 action 、column6 、column7 或 verdict 字段,并转换为大写形式(ALLOW 或 BLOCK)。如果 _categories 包含 Malware ,则将值设置为 NETWORK_MALICIOUS ;如果 _categories 包含 Potentially Harmful ,则将值设置为 NETWORK_SUSPICIOUS 。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。