收集 Active Countermeasures AC-Hunter 日志
解析器版本: 3.0
本文档介绍了如何使用 Bindplane 将 Active Countermeasures AC-Hunter 日志注入 Google Security Operations。
AC-Hunter 是 Active Countermeasures 推出的一种网络威胁检测平台,它通过分析网络流量来执行自动威胁搜寻,以识别与命令和控制服务器通信的受入侵系统。AC-Hunter 在 Linux 服务器上的 Docker 容器中运行,并且可以通过 syslog 协议将威胁提醒转发到 SIEM 或中心化日志服务器。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例。
- Windows Server 2016 或更高版本,或者具有
systemd的 Linux 主机。 - 如果通过代理运行,请确保防火墙端口按照 Bindplane 代理要求处于打开状态。
- 对 Active Countermeasures AC-Hunter 服务器的特权访问权限(使用 sudo 的 SSH),以便修改配置文件。
- AC-Hunter 版本 5.3.0 或更高版本(早期版本包含阻止发送 syslog 消息的 bug)。
- 从 AC-Hunter 服务器到您选择的 syslog 端口(UDP 或 TCP)上的 Bindplane 代理主机的网络路径。
- 在 AC-Hunter 主机上启用 IP 转发,以允许 Docker 容器将 syslog 发送到外部服务器。
获取 Bindplane 代理的 Google SecOps 凭据
如需对 Bindplane 代理进行 Google SecOps 身份验证,请选择以下方法之一:
- 新部署:使用 Chronicle API(方法 1)。
- 旧版部署:继续使用注入身份验证文件(方法 2),直到注入 API 于 2027 年 7 月 20 日停用为止。
方法 1:为 Chronicle API 创建服务帐号(推荐)
- 登录 Google Cloud 控制台,然后选择与您的 Google SecOps 实例关联的 Google Cloud 项目。
- 依次前往 IAM 和管理 > 服务账号。
- 点击创建服务账号 。
- 提供以下配置详细信息:
- 服务账号名称:输入账号的名称(例如
bindplane-ingest)。 - 服务账号说明:输入说明(例如
Bindplane agent log ingestion)。
- 服务账号名称:输入账号的名称(例如
- 点击创建并继续 。
- 在向此服务帐号授予对项目的访问权限 部分,点击选择角色 ,然后选择 Chronicle Editor 。
- 点击继续 ,然后点击完成 。
- 点击您创建的服务帐号,然后前往密钥 标签页。
- 依次点击添加密钥 > 创建新密钥。
- 选择 JSON ,然后点击创建 。密钥文件会下载到您的计算机上。
- 将密钥文件另存为 Bindplane 收集器目录中的
ingestion-auth.json(在 Linux 上为/opt/observiq-otel-collector/ingestion-auth.json,在 Windows 上为C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json),或者更新creds_file_path在config.yaml中以与您保存该文件的路径匹配。 - 依次前往 IAM 和管理 > 设置 ,然后复制项目编号 。您需要此编号进行导出器配置。
方法 2:下载注入身份验证文件(旧版)
- 登录 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 代理安装指南。
配置 Bindplane 代理以注入 syslog 并发送到 Google SecOps
找到配置文件
Linux:
sudo nano /opt/observiq-otel-collector/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
修改配置文件
将
config.yaml的全部内容替换为以下配置:receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/ac_hunter: protocol: https # Region of your instance, for example us, europe, asia-southeast1 location: <LOCATION> # Project number of the Google Cloud project linked to the instance project: '<PROJECT_NUMBER>' compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<CUSTOMER_ID>' endpoint: chronicle.googleapis.com log_type: AI_HUNTER raw_log_field: body service: pipelines: logs/ac_hunter_to_chronicle: receivers: - udplog exporters: - chronicle/ac_hunter
配置参数
替换以下占位符:
接收器配置:
udplog:对于 UDP syslog,请使用udplog;对于 TCP syslog,请使用tcplog。与 AC-Hunter 中配置的协议匹配。0.0.0.0:514:要监听的 IP 地址和端口。使用0.0.0.0监听所有接口。
导出器配置:
<CUSTOMER_ID>:在上一步中复制的 Google SecOps 客户 ID。/opt/observiq-otel-collector/ingestion-auth.json:服务帐号 JSON 密钥文件的完整路径(方法 1)。- Linux:
/opt/observiq-otel-collector/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
location:将<LOCATION>替换为 Google SecOps 实例的区域(例如us、europe或asia-southeast1)。导出器会使用此值为chronicle.googleapis.com添加前缀。如需查看完整列表,请参阅区域级端点。project:将<PROJECT_NUMBER>替换为 IAM 和管理 > 设置 中的项目编号。endpoint:保持设置为chronicle.googleapis.com。
旧版注入 API 导出器
如果您使用方法 2 中的注入身份验证文件,请将
exporters块替换为以下内容。将creds_file_path设置为注入身份验证文件的路径,并且如果您的实例位于美国境外,请将malachiteingestion-pa.googleapis.com替换为您的 区域级端点(例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/ac_hunter: compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<CUSTOMER_ID>' endpoint: malachiteingestion-pa.googleapis.com log_type: AI_HUNTER raw_log_field: body
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请执行以下操作:
运行以下命令:
sudo systemctl restart observiq-otel-collector验证服务是否正在运行:
sudo systemctl status observiq-otel-collector检查日志中的错误:
sudo journalctl -u observiq-otel-collector -f
如需在 Windows 中重启 Bindplane 代理,请执行以下操作:
请从下列选项中选择一项:
- 以管理员身份运行命令提示符或 PowerShell:
net stop observiq-otel-collector && net start observiq-otel-collector- “服务”控制台:
- 按
Win+R,输入services.msc,然后按 Enter 键。 - 找到 observIQ OpenTelemetry Collector 。
- 右键点击并选择重启 。
- 按
验证服务是否正在运行:
sc query observiq-otel-collector检查日志中的错误:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
在 Active Countermeasures AC-Hunter 上配置 syslog 转发
- 通过 SSH 使用特权访问权限登录 AC-Hunter 服务器 。
备份现有配置文件:
sudo cp /etc/AI-Hunter/config.yaml /etc/AI-Hunter/config.yaml.backup在文本编辑器中打开配置文件:
sudo nano /etc/AI-Hunter/config.yaml找到 Alert: 部分和嵌套的 Syslog: 部分。提供以下配置详细信息:
Alert: Syslog: Threshold: 20 Protocol: "udp" Address: "BINDPLANE_IP:514" Tag: " AC-Hunter "- 阈值:输入触发提醒的最低威胁得分(例如
20)。得分等于或高于此值的系统会生成 syslog 提醒。 - 协议:选择
"udp"或"tcp"以与 Bindplane 代理接收器配置匹配。使用""(空字符串)写入主机/dev/log以进行 rsyslog 转发。 - 地址:输入 Bindplane 代理 IP 地址和端口(例如
"10.1.2.3:514")。 - Tag:输入用于日志标识的可选标记(例如
" AC-Hunter ")。在结束引号之前添加尾随空格,以使标记不会与消息文本冲突。
- 阈值:输入触发提醒的最低威胁得分(例如
保存配置文件并退出编辑器。
重启 AC-Hunter 以应用更改:
hunt up -d --force-recreate等待到下一个小时大约 20 分钟后。AC-Hunter 会从传感器导入新的每小时日志,并在此导入周期内为超出配置阈值的系统发送 syslog 提醒。
通过检查本地 syslog 日志文件,验证 syslog 消息是否到达 Bindplane 代理主机:
sudo tail -f /var/log/syslog
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
api_msg_label |
additional.fields |
已合并 |
prev_score |
metadata.description |
已直接映射 |
score |
metadata.description |
已直接映射 |
ts_date |
metadata.event_timestamp |
解析为 MMM dd HH:mm:ss |
ts_iso8601 |
metadata.event_timestamp |
解析为 ISO8601 |
has_principal |
metadata.event_type |
已映射:true → STATUS_UNCATEGORIZED |
src_ip |
principal.asset.ip |
已合并 |
src_ip |
principal.ip |
已合并 |
blacklist_avg_bytes_label |
principal.labels |
已合并 |
blacklist_in_label |
principal.labels |
已合并 |
blacklist_out_label |
principal.labels |
已合并 |
database_label |
principal.labels |
已合并 |
dns_txt_query_label |
principal.labels |
已合并 |
invalid_cert_label |
principal.labels |
已合并 |
max_beacon_label |
principal.labels |
已合并 |
max_duration_label |
principal.labels |
已合并 |
prev_score_label |
principal.labels |
已合并 |
rare_client_label |
principal.labels |
已合并 |
score_label |
principal.labels |
已合并 |
unexpected_proto_label |
principal.labels |
已合并 |
source_module_label |
principal.resource.attribute.labels |
已合并 |
domain |
target.asset.hostname |
已直接映射 |
domain |
target.hostname |
已直接映射 |
| 不适用 | metadata.event_type |
常量:STATUS_UNCATEGORIZED |
| 不适用 | metadata.product_name |
常量:AI hunter |
| 不适用 | metadata.vendor_name |
常量:Active Countermeasures |
更新日志
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。