收集 Imperva CEF 日志
支持的平台:
Google SecOps
SIEM
本文档介绍了如何使用 Bindplane 代理将 Imperva CEF 日志注入到 Google Security Operations。
解析器从 CEF(通用事件格式)的 Imperva syslog 格式日志中提取字段。它使用 grok 和/或 kv 来解析 CEF 消息,然后将这些值映射到统一数据模型 (UDM)。它还会为事件来源和类型设置默认元数据值。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- 搭载
systemd的 Windows 2016 或更高版本或 Linux 主机 - 如果在代理后面运行,请确保防火墙端口已根据 Bindplane 代理要求打开
- 对 Imperva 管理控制台或设备的特权访问权限
获取 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 上的/opt/observiq-otel-collector/目录中或 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_CEF' 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 WAF 网关 (SecureSphere) 以通过 syslog 发送 CEF
在 MX 控制台中,创建操作集:
- 依次前往政策 > 操作集。
- 点击新建,然后为其命名(例如
Google SecOps CEF)。
添加 CEF syslog 操作接口:
- 在可用的操作界面中,打开系统日志,然后根据需要添加以下一项或多项:
- 使用 CEF 标准将安全事件记录到系统日志 (syslog)
- 使用 CEF 标准将网络安全事件记录到系统日志 (syslog)
- 使用 CEF 标准将系统事件记录到系统日志 (syslog)
- 使用 CEF 标准将自定义安全事件记录到系统日志 (syslog)
- 在可用的操作界面中,打开系统日志,然后根据需要添加以下一项或多项:
配置操作界面参数:
- Syslog Host:输入您的 Bindplane 代理 IP 地址。如需使用非默认端口,请附加
:PORT(如果您未指定端口,则默认值为 514)。示例:10.0.0.10:514。 - 设备 / 日志级别:根据政策要求进行设置。
- 消息:除非您有自定义映射,否则请保留 CEF 的供应商默认值。
- Syslog Host:输入您的 Bindplane 代理 IP 地址。如需使用非默认端口,请附加
将操作集附加到政策:
- 对于安全 / 网络安全事件:打开相关政策,并将后续操作设置为您的操作集。
- 对于系统事件:创建或验证系统事件政策,并将后续操作设置为您的操作集,以便通过 CEF 发送这些事件。
(可选)配置特定于网关的目标:
- 如果不同的网关组必须发送到不同的 syslog 服务器,请配置每个网关组 > 外部记录器,并在政策中启用“使用网关配置(如果存在)”。
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
act |
security_result.action |
派生。如果 act 为“allowed”“alert”,以“REQ_PASSED”开头,或以“REQ_CACHED”开头,则 action 为“ALLOW”。如果 act 为“deny”“blocked”,以“REQ_BLOCKED”开头,或以“REQ_CHALLENGE”开头,则 action 为“BLOCK”。如果 act 与正则表达式 (?i)REQ_BAD 匹配,则 action 为“FAIL”。否则,action 为“UNKNOWN_ACTION”。然后将 security_result.action 设置为 action 的值。 |
act |
security_result.action_details |
派生。系统会根据 act 的值生成详细说明。示例:“REQ_CACHED_FRESH:响应是从数据中心的缓存返回的”“REQ_BLOCKED:请求被阻止”。 |
app |
network.application_protocol |
在转换为大写后直接映射。 |
cs1 |
security_result.detection_fields.value |
如果 cs1 不为空或为“不适用”,则有条件地进行映射。security_result.detection_fields.key 设置为 cs1Label 的值。 |
cs1Label |
security_result.detection_fields.key |
如果 cs1 不为空或为“不适用”,则有条件地进行映射。security_result.detection_fields.value 设置为 cs1 的值。 |
cs2 |
security_result.detection_fields.value |
如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cs2Label 的值。 |
cs2Label |
security_result.detection_fields.key |
如果 cs2 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cs2 的值。 |
cs3 |
security_result.detection_fields.value |
如果不为空或“-”,则有条件地进行映射。security_result.detection_fields.key 设置为 cs3Label 的值。 |
cs3Label |
security_result.detection_fields.key |
如果 cs3 不为空或不为“-”,则有条件地进行映射。security_result.detection_fields.value 设置为 cs3 的值。 |
cs4 |
security_result.detection_fields.value |
如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cs4Label 的值。 |
cs4Label |
security_result.detection_fields.key |
如果 cs4 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cs4 的值。 |
cs5 |
security_result.detection_fields.value |
如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cs5Label 的值。 |
cs5Label |
security_result.detection_fields.key |
如果 cs5 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cs5 的值。 |
cs6 |
security_result.detection_fields.value |
如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cs6Label 的值。 |
cs6Label |
security_result.detection_fields.key |
如果 cs6 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cs6 的值。 |
cs7 |
principal.location.region_latitude |
如果 cs7Label 为“纬度”,则有条件地进行映射。 |
cs8 |
principal.location.region_longitude |
如果 cs8Label 为“longitude”,则有条件地进行映射。 |
cn1 |
security_result.detection_fields.value |
如果不为空且 cn1Label 不为空,则有条件地进行映射。security_result.detection_fields.key 设置为 cn1Label 的值。 |
cn1Label |
security_result.detection_fields.key |
如果 cn1 和 cn1Label 不为空,则有条件地进行映射。security_result.detection_fields.value 设置为 cn1 的值。 |
fileType |
security_result.detection_fields.value |
如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为“fileType”。 |
filePermission |
security_result.detection_fields.value |
如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为“filePermission”。 |
request |
target.url |
直接映射。 |
requestClientApplication |
network.http.user_agent |
如果不为空,则有条件地进行映射。覆盖从 CEF 载荷中的 requestContext 或 requestClientApplication 键值对提取的 user_agent 字段映射的值。 |
requestMethod |
network.http.method |
直接映射。 |
siteid |
security_result.detection_fields.value |
如果不为空,则有条件地进行映射。security_result.detection_fields.key 设置为“siteid”。 |
sourceServiceName |
target.hostname |
直接映射。如果存在,则覆盖 dhost 的值。 |
src |
principal.ip |
直接映射。 |
start |
metadata.event_timestamp.seconds |
使用 Grok 模式提取并转换为时间戳。如果 deviceReceiptTime 不存在,则用作其后备。如果 deviceReceiptTime 和 start 均为空,则使用日志时间戳。 |
suid |
principal.user.userid |
如果不为空,则有条件地进行映射。 |
| 不适用 | metadata.event_type |
硬编码为“NETWORK_HTTP”。 |
| 不适用 | metadata.log_type |
直接从顶层 log_type 字段映射。 |
| 不适用 | metadata.product_event_type |
如果 csv.event_id 不为空,则从 csv.event_id 映射。 |
| 不适用 | metadata.product_name |
硬编码为“Web 应用防火墙”。 |
| 不适用 | metadata.vendor_name |
硬编码为“Imperva”。 |
kv.act |
event.idm.read_only_udm.security_result.action_details |
从变更日志映射 |
kv.sourceServiceName |
event.idm.read_only_udm.target.resource.name |
从变更日志映射 |
cicode |
event.idm.read_only_udm.principal.location.city |
从变更日志映射 |
ccode |
event.idm.read_only_udm.principal.location.country_or_region |
从变更日志映射 |
Customer |
event.idm.read_only_udm.network.organization_name |
从变更日志映射 |
tls_cipher |
event.idm.read_only_udm.network.tls.cipher |
从变更日志映射 |
cpt |
event.idm.read_only_udm.target.port |
从变更日志映射 |
fileId |
event.idm.read_only_udm.target.resource.product_object_id |
从变更日志映射 |
dproc |
event.idm.read_only_udm.security_result.category_details |
从变更日志映射 |
deviceFacility |
event.idm.read_only_udm.security_result.detection_fields |
从变更日志映射 |
deviceExternalId |
event.idm.read_only_udm.security_result.detection_fields |
从变更日志映射 |
end |
event.idm.read_only_udm.metadata.collected_timestamp |
从变更日志映射 |
更新日志
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。