收集 Imperva FlexProtect 日志
支持的环境:
Google SecOps
SIEM
本文档介绍了如何使用 Bindplane 代理将 Imperva FlexProtect 日志注入 Google Security Operations。
解析器会从采用 CEF(通用事件格式)且具有键值对扩展的 Imperva FlexProtect Syslog 格式日志中提取字段。它使用 grok 和/或 kv 解析 CEF 消息,然后将这些值映射到统一数据模型 (UDM)。它还会为事件来源和类型设置默认元数据值。Imperva FlexProtect 可在混合云环境中灵活部署 Imperva 安全解决方案(SecureSphere、Cloud WAF、Bot Protection)。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- 搭载
systemd的 Windows 2016 或更高版本或 Linux 主机 - 如果通过代理运行,请确保防火墙端口根据 Bindplane 代理要求处于开放状态
- 对 Imperva FlexProtect 管理控制台或各个产品控制台的特权访问权限
获取 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 代理安装指南。
配置 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: 'IMPERVA_FLEXPROTECT' 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更新为在第 1 步中保存身份验证文件的文件路径。
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请运行以下命令:
sudo systemctl restart observiq-otel-collector如需在 Windows 中重启 Bindplane 代理,您可以使用服务 控制台,也可以输入以下命令:
net stop observiq-otel-collector && net start observiq-otel-collector
在 Imperva FlexProtect 上配置 Syslog 转发
对于 SecureSphere 组件(本地/云端)
- 登录 Imperva SecureSphere 管理控制台 。
- 依次前往配置 > 操作集。
- 点击添加 以创建新的操作集。
点击添加操作 并提供以下配置详细信息:
- 名称:输入描述性名称(例如
Google SecOps Syslog)。 - 操作类型:选择 Syslog。
- 主机:输入 Bindplane 代理 IP 地址。
- 端口:输入 Bindplane 代理端口号(默认值为 514)。
- 协议:选择 UDP 或 TCP。
- Syslog 日志级别:选择 DEBUG。
- Syslog 功能:选择 LOCAL0。
- 格式:选择 CEF(通用事件格式)。
- 名称:输入描述性名称(例如
保存操作配置并将其应用于相关安全政策。
对于 Cloud WAF/Incapsula 组件
- 登录 Imperva Cloud 控制台 。
- 依次前往日志 > 日志设置。
- 配置 Syslog 目标:
- 主机:输入 Bindplane 代理 IP 地址。
- 端口:输入 Bindplane 代理端口号(默认值为 514)。
- 协议:选择 UDP 或 TCP。
- 格式:选择 CEF。
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
| act | read_only_udm.security_result.action_details | 直接从 act 字段映射。 |
| app | read_only_udm.network.application_protocol | 直接从 app 字段映射。 |
| ccode | read_only_udm.principal.location.country_or_region | 直接从 ccode 字段映射。 |
| cicode | read_only_udm.principal.location.city | 直接从 cicode 字段映射。 |
| cn1 | read_only_udm.network.http.response_code | 转换为整数后直接从 cn1 字段映射。 |
| cs1 | read_only_udm.additional.fields.value.string_value | 直接从 cs1 字段映射。 |
| cs2 | read_only_udm.additional.fields.value.string_value | 直接从 cs2 字段映射。 |
| cs3 | read_only_udm.additional.fields.value.string_value | 直接从 cs3 字段映射。 |
| cs4 | read_only_udm.additional.fields.value.string_value | 直接从 cs4 字段映射。 |
| cs5 | read_only_udm.additional.fields.value.string_value | 直接从 cs5 字段映射。 |
| cs6 | read_only_udm.additional.fields.value.string_value | 直接从 cs6 字段映射。 |
| cs7 | read_only_udm.additional.fields.value.string_value | 直接从 cs7 字段映射。 |
| cs8 | read_only_udm.additional.fields.value.string_value | 直接从 cs8 字段映射。 |
| cs9 | read_only_udm.additional.fields.value.string_value | 直接从 cs9 字段映射。 |
| cpt | read_only_udm.principal.port | 转换为整数后直接从 cpt 字段映射。 |
| Customer | read_only_udm.principal.user.user_display_name | 直接从 Customer 字段映射。 |
| deviceExternalId | read_only_udm.about.asset.asset_id | 该值通过将“Incapsula.SIEMintegration:”与 deviceExternalId 字段连接而得出。 |
| deviceFacility | read_only_udm.principal.location.city | 直接从 deviceFacility 字段映射。 |
| dproc | read_only_udm.target.process.command_line | 直接从 dproc 字段映射。 |
| end | read_only_udm.security_result.detection_fields.value | 直接从 end 字段映射。 |
| fileId | read_only_udm.network.session_id | 直接从 fileId 字段映射。 |
| filePermission | read_only_udm.about.resource.attribute.permissions.name | 直接从 filePermission 字段映射。 |
| in | read_only_udm.network.received_bytes | 直接从 in 字段映射。 |
| qstr | read_only_udm.security_result.detection_fields.value | 直接从 qstr 字段映射。 |
| request | read_only_udm.target.url | 直接从 request 字段映射。 |
| requestClientApplication | read_only_udm.network.http.user_agent | 直接从 requestClientApplication 字段映射。 |
| requestMethod | read_only_udm.network.http.method | 直接从 requestMethod 字段映射。 |
| siteid | read_only_udm.security_result.detection_fields.value | 直接从 siteid 字段映射。 |
| sip | read_only_udm.target.ip | 直接从 sip 字段映射。 |
| sourceServiceName | read_only_udm.principal.application | 直接从 sourceServiceName 字段映射。 |
| spt | read_only_udm.target.port | 转换为整数后直接从 spt 字段映射。 |
| src | read_only_udm.principal.ip | 直接从 src 字段映射。 |
| start | read_only_udm.security_result.detection_fields.value | 直接从 start 字段映射。 |
| suid | read_only_udm.principal.user.userid | 直接从 suid 字段映射。 |
| ver | read_only_udm.network.tls.version | 直接从 ver 字段映射。 |
| read_only_udm.about.asset.asset_id | 该值通过将“Incapsula.SIEMintegration:”与 deviceExternalId 字段连接而得出。 |
|
| read_only_udm.additional.fields.key | 值由解析器逻辑根据字段的标签确定,例如: - cs1Label 映射到“Cap Support” - cs2Label 映射到“Javascript Support” - cs3Label 映射到“CO Support” - cs4Label 映射到“VID” - cs5Label 映射到“clappsig” - cs6Label 映射到“clapp” - cs7Label 映射到“latitude” - cs8Label 映射到“longitude” - cs9Label 映射到“Rule name” |
|
| read_only_udm.metadata.event_timestamp.nanos | 直接从 collection_time.nanos 字段映射。 |
|
| read_only_udm.metadata.event_timestamp.seconds | 直接从 collection_time.seconds 字段映射。 |
|
| read_only_udm.metadata.event_type | 该值根据是否存在 src 和 sip 字段来确定: - 如果这两个字段都存在,则该值设置为 "NETWORK_HTTP"。 - 如果仅存在 src 字段,则该值设置为“USER_UNCATEGORIZED”。- 否则,该值设置为“GENERIC_EVENT”。 |
|
| read_only_udm.metadata.product_event_type | 该值通过将“[”、索引 4 处的 CEF 标头字段中的数值、“] - ”以及索引 4 处的 CEF 标头字段中的文本说明连接而得出。 | |
| read_only_udm.metadata.product_name | 值静态设置为“SIEMintegration”。 | |
| read_only_udm.metadata.product_version | 值静态设置为“1”。 | |
| read_only_udm.metadata.vendor_name | 值静态设置为“Incapsula”。 | |
| read_only_udm.security_result.detection_fields.key | 值静态设置为“siteid”“event_start_time”“event_end_time”或“qstr”,具体取决于正在处理的相应字段。 | |
| read_only_udm.security_result.severity | 值静态设置为“LOW”。 | |
| read_only_udm.target.port | 转换为整数后直接从 spt 字段映射。 |
|
qstr |
security_results.detection_fields |
从变更日志映射 |
siteid |
security_results.detection_fields |
从变更日志映射 |
device_facility |
principal.location.city |
从变更日志映射 |
start |
security_result.detection_fields.event_start_time |
从变更日志映射 |
cs8Label |
additional_cs8.key |
从变更日志映射 |
cs8 |
additional_cs8.value.string_value |
从变更日志映射 |
cs9Label |
additional_cs9.key |
从变更日志映射 |
cs9 |
additional_cs9.value.string_value |
从变更日志映射 |
end |
security_result.detection_fields.event_end_time |
从变更日志映射 |