收集 Azure Firewall 日志
支持的平台:
Google SecOps
SIEM
本文档介绍了如何使用 Azure 存储账号将 Azure Firewall 日志导出到 Google 安全运营中心。解析器首先会尝试将输入内容作为 JSON 进行处理,从 Records 字段中提取数据。如果 Record 字段为空,则解析器会使用一系列 Grok 模式和条件语句从消息中提取相关字段,以处理 Azure Firewall 日志中的不同格式和变体。
准备工作
- 确保您拥有 Google SecOps 实例。
- 确保您拥有有效的 Azure 租户。
- 确保您拥有对 Azure 的特权访问权限。
配置 Azure 存储账号
- 在 Azure 控制台中,搜索存储账号。
- 点击 + 创建。
- 为以下输入参数指定值:
- 订阅:选择相应订阅。
- 资源组:选择资源组。
- 地区:选择地区。
- 效果:选择效果(推荐“标准”)。
- 冗余:选择冗余级别(建议使用 GRS 或 LRS)。
- 存储账号名称:为新存储账号输入名称。
- 点击 Review + create(检查 + 创建)。
- 查看账号概览,然后点击创建。
- 在存储账号概览页面上,选择安全 + 网络中的访问密钥子菜单。
- 点击 key1 或 key2 旁边的显示
- 点击复制到剪贴板以复制密钥。
- 将密钥保存在安全的位置,以备日后使用。
- 在存储账号概览页面中,选择设置中的端点子菜单。
- 点击复制到剪贴板,复制 Blob 服务端点网址(例如
https://<storageaccountname>.blob.core.windows.net
) - 将端点网址保存在安全的位置,以备日后使用。
为 Azure 防火墙日志配置日志导出
- 使用您的特权账号登录 Azure 门户。
- 前往防火墙,然后选择所需的防火墙。
- 依次选择 Monitoring > Diagnostic Services。
- 点击 + 添加诊断设置。
- 为诊断设置输入描述性名称。
- 选择 allLogs。
- 选择归档到存储账号复选框作为目标位置。
- 指定订阅和存储空间账号。
- 点击保存。
在 Google SecOps 中配置 Feed 以提取 Azure 防火墙日志
- 依次前往 SIEM 设置 > Feed。
- 点击新增。
- 在Feed 名称字段中,输入 Feed 的名称(例如 Azure Firewall 日志)。
- 选择 Microsoft Azure Blob Storage 作为来源类型。
- 选择 Azure Firewall 作为日志类型。
- 点击下一步。
为以下输入参数指定值:
- Azure URI:Blob 端点网址。
ENDPOINT_URL/BLOB_NAME
- 替换以下内容:
ENDPOINT_URL
:blob 端点网址 (https://<storageaccountname>.blob.core.windows.net
)BLOB_NAME
:blob 的名称(例如<logname>-logs
)
- URI 是:根据日志流配置选择 URI 类型(单个文件 | 目录 | 包含子目录的目录)。
来源删除选项:根据您的偏好选择删除选项。
共享密钥:Azure Blob Storage 的访问密钥。
资源命名空间:资源命名空间。
提取标签:要应用于此 Feed 中的事件的标签。
- Azure URI:Blob 端点网址。
点击下一步。
在最终确定界面中查看新的 Feed 配置,然后点击提交。
UDM 映射
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
@timestamp | metadata.event_timestamp | 将原始日志字段 @timestamp 转换为 UDM 格式。 |
类别 | security_result.rule_type | 将原始日志字段 category 映射到 UDM。 |
operationName | metadata.product_event_type | 将原始日志字段 operationName 映射到 UDM。 |
properties.Action | security_result.action | 将原始日志字段 properties.Action 映射到 UDM,将 ALLOW 转换为 ALLOW 、DENY 转换为 BLOCK ,并将任何其他值转换为 UNKNOWN_ACTION 。 |
properties.DestinationIp | target.ip | 将原始日志字段 properties.DestinationIp 映射到 UDM。 |
properties.DestinationPort | target.port | 将原始日志字段 properties.DestinationPort 映射到 UDM。 |
properties.DnssecOkBit | additional.fields.value.bool_value | 将原始日志字段 properties.DnssecOkBit 映射到 UDM。 |
properties.EDNS0BufferSize | additional.fields.value.number_value | 将原始日志字段 properties.EDNS0BufferSize 映射到 UDM。 |
properties.ErrorMessage | additional.fields.value.string_value | 将原始日志字段 properties.ErrorMessage 映射到 UDM。 |
properties.ErrorNumber | additional.fields.value.number_value | 将原始日志字段 properties.ErrorNumber 映射到 UDM。 |
properties.Policy | security_result.detection_fields.value | 将原始日志字段 properties.Policy 映射到 UDM。 |
properties.Protocol | network.ip_protocol | 如果原始日志字段 properties.Protocol 不是 HTTPS 或 HTTP ,则将其映射到 UDM。 |
properties.Protocol | network.application_protocol | 如果原始日志字段 properties.Protocol 为 HTTPS 或 HTTP ,则将其映射到 UDM。 |
properties.QueryClass | network.dns.questions.class | 使用用于映射 DNS 查询类的查询表将原始日志字段 properties.QueryClass 映射到 UDM。 |
properties.QueryId | network.dns.id | 将原始日志字段 properties.QueryId 映射到 UDM。 |
properties.QueryName | network.dns.questions.name | 将原始日志字段 properties.QueryName 映射到 UDM。 |
properties.QueryType | network.dns.questions.type | 使用用于映射 DNS 记录类型的查询表将原始日志字段 properties.QueryType 映射到 UDM。 |
properties.RequestSize | network.sent_bytes | 将原始日志字段 properties.RequestSize 映射到 UDM。 |
properties.ResponseCode | network.dns.response_code | 使用用于映射 DNS 响应代码的查找表将原始日志字段 properties.ResponseCode 映射到 UDM。 |
properties.ResponseFlags | additional.fields.value.string_value | 将原始日志字段 properties.ResponseFlags 映射到 UDM。 |
properties.ResponseSize | network.received_bytes | 将原始日志字段 properties.ResponseSize 映射到 UDM。 |
properties.Rule | security_result.rule_name | 将原始日志字段 properties.Rule 映射到 UDM。 |
properties.RuleCollection | security_result.detection_fields.value | 将原始日志字段 properties.RuleCollection 映射到 UDM。 |
properties.RuleCollectionGroup | security_result.detection_fields.value | 将原始日志字段 properties.RuleCollectionGroup 映射到 UDM。 |
properties.SourceIp | principal.ip | 将原始日志字段 properties.SourceIp 映射到 UDM。 |
properties.SourcePort | principal.port | 将原始日志字段 properties.SourcePort 映射到 UDM。 |
properties.msg | security_result.description | 从原始日志字段 properties.msg 中提取其他字段后,将其映射到 UDM。 |
records.category | security_result.rule_type | 将原始日志字段 records.category 映射到 UDM。 |
records.operationName | metadata.product_event_type | 将原始日志字段 records.operationName 映射到 UDM。 |
records.properties.msg | 此字段用于使用 Grok 模式提取多个字段,并且没有直接映射到 UDM。 | |
records.resourceId | metadata.product_log_id | 将原始日志字段 records.resourceId 映射到 UDM。 |
resourceId | metadata.product_log_id | 将原始日志字段 resourceId 映射到 UDM。 |
时间 | metadata.event_timestamp | 将原始日志字段 time 转换为 UDM 格式。 |
metadata.vendor_name | 此字段由解析器填充值 Microsoft Inc. 。 |
|
metadata.product_name | 此字段由解析器填充值 Azure Firewall Application Rule 。 |
|
metadata.log_type | 此字段由解析器填充值 AZURE_FIREWALL 。 |
|
additional.fields.key | 解析器会使用附加字段的键填充此字段。 | |
security_result.detection_fields.key | 此字段由解析器使用检测字段的键进行填充。 | |
network.application_protocol | 解析器会为 DNS 日志填充此字段,并将其值设为 DNS 。 |
|
metadata.event_type | 此字段由解析器根据日志消息填充。可以是 NETWORK_CONNECTION 、GENERIC_EVENT 、STATUS_UPDATE 或 NETWORK_DNS 。 |
变化
2024-12-26
bug 修复:
- 当日志包含关键字
Alert
时,将security_result.action
映射到ALLOW
。
2024-11-13
增强功能:
- 将
Action
映射到security_result.detection_fields
。 - 将
Signature
映射到security_result.detection_fields
。 - 将
IDS
映射到security_result.detection_fields
。 - 将
Priority
映射到security_result.priority_details
。 - 将
Classification
映射到security_result.detection_fields
。
2024-09-04
增强功能:
- 将 DNS 事件的
from_ip
映射到dns.questions.name
。
2024-07-02
增强功能:
- 添加了对处理新格式时间戳的支持。
2024-04-29
增强功能:
- 添加了对处理新格式提取日志的支持。
2024-02-07
增强功能:
- 将
ICMP type
映射到additional.fields
。 - 将
Action
和properties.Action
映射到security_result.action_details
。
2023-06-01
增强功能:
- 系统会解析新提取的类别为
AZFWDnsQuery
的 JSON 日志。 - 在类别为
AzureFirewallNetworkRule
的新提取 JSON 日志中映射了properties.msg
。
2022-04-29
bug 修复:
- 系统会解析新提取的 JSON 日志,以提高总体解析百分比。
- operationName 已映射到 metadata.product_event_type。
- 映射到 metadata.product_log_id 的 resourceId。
需要更多帮助?向社区成员和 Google SecOps 专业人士寻求解答。