收集 F5 DNS 日志
支持的语言:
Google SecOps
SIEM
本文档介绍了如何使用 Bindplane 将 F5 DNS 日志注入到 Google Security Operations。解析器使用基于应用字段的 grok 模式从 F5 DNS syslog 消息中提取字段,然后将这些字段映射到统一数据模型 (UDM)。它处理各种 F5 应用(如 gtmd
、mcpd
、big3d
等),解析特定字段,并根据日志级别和应用设置相应的 UDM 事件类型、严重程度和说明。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- Windows 2016 或更高版本,或者具有
systemd
的 Linux 主机 - 如果在代理后运行,防火墙端口处于开放状态
- 对 F5 BIG-IP 的特权访问权限
获取 Google SecOps 注入身份验证文件
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 收集代理。
- 下载注入身份验证文件。将该文件安全地保存在将要安装 Bindplane 的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 配置文件。
- 复制并保存组织详细信息部分中的客户 ID。
安装 Bindplane 代理
按照以下说明在 Windows 或 Linux 操作系统上安装 Bindplane 代理。
Windows 安装
- 以管理员身份打开命令提示符或 PowerShell。
运行以下命令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
其他安装资源
如需了解其他安装选项,请参阅安装指南。
配置 Bindplane 代理以注入 Syslog 并将其发送到 Google SecOps
- 访问配置文件:
- 找到
config.yaml
文件。通常,它位于 Linux 上的/etc/bindplane-agent/
目录中,或位于 Windows 上的安装目录中。 - 使用文本编辑器(例如
nano
、vi
或记事本)打开该文件。
- 找到
按如下方式修改
config.yaml
文件:receivers: udplog: # Replace the port and IP address as required listen_address: "0.0.0.0:514" exporters: chronicle/chronicle_w_labels: compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds_file_path: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: <customer_id> endpoint: malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization log_type: 'F5_DNS' raw_log_field: body ingestion_labels: service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels
- 根据基础架构的需要替换端口和 IP 地址。
- 将
<customer_id>
替换为实际的客户 ID。 - 将
/path/to/ingestion-authentication-file.json
更新为获取 Google SecOps 提取身份验证文件部分中保存身份验证文件的路径。
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请运行以下命令:
sudo systemctl restart bindplane-agent
如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:
net stop BindPlaneAgent && net start BindPlaneAgent
配置远程日志记录服务器池
- 登录 F5 BIG-IP 网页界面。
- 在主标签页上,依次前往 DNS > Delivery > Load Balancing > Pools 或 Local Traffic > Pools。
- 点击创建。
- 提供以下配置详细信息:
- 名称:为池输入一个唯一名称。
- 使用新成员设置:
- 在 Address 字段中输入 Bindplane 代理的 IP 地址。
- 在服务端口字段中,输入 Bindplane 代理端口号。
- 依次点击添加 > 完成。
配置远程日志目的地
- 在主标签页上,依次前往系统 > 日志 > 配置 > 日志目的地。
- 点击创建。
- 提供以下配置详细信息:
- 名称:为此目的地输入一个唯一名称。
- 类型:选择远程高速日志。
- 池名称:选择您希望 BIG-IP 系统将日志消息发送到的远程日志服务器池。
- 协议:选择所使用的协议。
- 点击 Finished。
创建格式化的远程日志目标位置
- 在主标签页上,依次前往系统 > 日志 > 配置 > 日志目的地。
- 点击创建。
- 提供以下配置详细信息:
- 名称:为此目的地输入一个唯一名称。
- 类型:选择远程 Syslog。
- 格式:选择日志格式。
- 转发到:选择高速日志目标 > 指向远程 Syslog 服务器池的目标。
- 点击 Finished。
配置日志发布者
- 在主标签页上,依次前往系统 > 日志 > 配置 > 日志发布者。
- 点击创建。
- 提供以下配置详细信息:
- 名称:为此发布商输入一个唯一名称。
- 目的地:从可用列表中选择新创建的 Remote Syslog 目的地,然后点击 keyboard_double_arrow_left 移动,将该目的地移至已选择列表。
- 点击 Finished。
配置自定义 DNS 日志记录配置文件
- 在主标签页上,依次前往 DNS > 交付 > 配置文件 > 其他 > DNS 日志记录或本地流量 > 配置文件 > 其他 > DNS 日志记录。
- 点击创建。
- 提供以下配置详细信息:
- 名称:输入此配置文件的唯一名称。
- 日志发布者:选择系统将 DNS 日志条目发送到的新创建的目标。
- 记录查询:选中已启用复选框。
- 记录响应:选中已启用复选框。
- Include Query ID:选中已启用复选框。
- 点击 Finished。
将 DNS 配置文件添加到 DNS 监听器
- 在主标签页中,依次前往 DNS > Delivery > Listeners > 选择 DNS 监听器。
- 在服务部分的 DNS 配置文件中,选择您之前配置的 DNS 配置文件。
- 点击更新。
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
application |
principal.application |
直接从 application 字段映射。 |
cipher_name |
network.tls.cipher |
直接从 cipher_name 字段映射。 |
command_line |
principal.process.command_line |
直接从 command_line 字段映射。 |
desc |
security_result.description |
直接从 desc 字段映射。 |
desc_icrd |
security_result.description |
直接从 desc_icrd 字段映射。 |
dest_ip |
target.ip |
直接从 dest_ip 字段映射。 |
dest_port |
target.port |
直接从 dest_port 字段映射。 |
file_path |
principal.process.file.full_path |
直接从 file_path 字段映射。如果 level 为“alert”,则设置为 true ,否则不设置。如果 level 为“alert”,则设置为 true ,否则不设置。 |
msg3 |
security_result.description |
当 application 为“run-parts”时,直接从 msg3 字段映射。 |
metadata.event_type |
如果 event_type 为空,则设置为 GENERIC_EVENT ,否则从 event_type 映射。硬编码为“DNS”。硬编码为“F5”。 |
|
principal_hostname |
principal.hostname |
直接从 principal_hostname 字段映射。 |
proc_id |
principal.process.pid |
直接从 proc_id 字段映射。 |
received_bytes |
network.received_bytes |
直接从 received_bytes 字段映射。 |
resource_id |
target.resource.id |
直接从 resource_id 字段映射。 |
resource_parent |
principal.resource.parent |
直接从 resource_parent 字段映射。 |
response_code |
network.http.response_code |
直接从 response_code 字段映射。根据 level 字段确定。 |
src_ip |
principal.ip |
直接从 src_ip 字段映射。 |
src_port |
principal.port |
直接从 src_port 字段映射。 |
tls_version |
network.tls.version |
直接从 tls_version 字段映射。 |
userName |
principal.user.userid |
直接从 userName 字段映射。 |
when |
event.timestamp |
根据 datetime1 和 timezone 或 datetime 和 timezone 计算得出。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。