收集 IBM Security Verify 访问日志

支持的平台:

本文档介绍了如何收集 IBM Security Verify Access 日志。解析器使用 Grok 模式提取时间戳、主机名和说明等常见字段。然后,它利用 XML 解析来获取嵌入在说明字段中的详细事件信息,最终将提取的数据映射到统一数据模型 (UDM),以实现标准化的安全事件表示。

准备工作

  • 确保您有一个 Google Security Operations 实例。
  • 确保您使用的是 Windows 2016 或更高版本,或者使用了带有 systemd 的 Linux 主机。
  • 如果在代理后面运行,请确保防火墙端口处于打开状态。
  • 确保您拥有对 IBM Security Verify Access (ISVA) 的管理员权限。

获取 Google SecOps 提取身份验证文件

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载提取身份验证文件。将该文件安全地保存在将安装 BindPlane 的系统上。

获取 Google SecOps 客户 ID

  1. 登录 Google SecOps 控制台。
  2. 依次选择 SIEM 设置 > 配置文件
  3. 复制并保存组织详细信息部分中的客户 ID

安装 BindPlane Agent

Windows 安装

  1. 以管理员身份打开命令提示符PowerShell
  2. 运行以下命令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

Linux 安装

  1. 打开具有 root 或 sudo 权限的终端。
  2. 运行以下命令:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

其他安装资源

  • 如需了解其他安装选项,请参阅此安装指南

配置 BindPlane Agent 以提取 Syslog 并将其发送到 Google SecOps

  1. 访问配置文件:

    • 找到 config.yaml 文件。通常,在 Linux 上,该目录位于 /etc/bindplane-agent/ 目录中;在 Windows 上,该目录位于安装目录中。
    • 使用文本编辑器(例如 nanovi 或记事本)打开该文件。
  2. 按如下方式修改 config.yaml 文件:

    receivers:
        udplog:
            # Replace the below port <54525> and IP <0.0.0.0> with your specific values
            listen_address: "0.0.0.0:54525" 
    
    exporters:
        chronicle/chronicle_w_labels:
            compression: gzip
            # Adjust the creds location below according the placement of the credentials file you downloaded
            creds: '{ json file for creds }'
            # Replace <customer_id> below with your actual ID that you copied
            customer_id: <customer_id>
            endpoint: malachiteingestion-pa.googleapis.com
            # You can apply ingestion labels below as preferred
            ingestion_labels:
            log_type: SYSLOG
            namespace: ibm_security_verify
            raw_log_field: body
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 根据基础架构中的需要替换端口和 IP 地址。

  4. <customer_id> 替换为实际的客户 ID。

  5. 获取 Google SecOps 提取身份验证文件部分中,将 /path/to/ingestion-authentication-file.json 更新为身份验证文件的保存路径。

重启 BindPlane 代理以应用更改

  • 在 Linux 中,如需重启 BindPlane 代理,请运行以下命令:

    sudo systemctl restart bindplane-agent
    
  • 在 Windows 中,如需重启 BindPlane Agent,您可以使用 Services 控制台,也可以输入以下命令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

自定义日志格式

  1. 如需修改 WebSEAL 配置文件,请使用设备本地管理界面 (LMI)。
  2. 在 LMI 中,前往反向代理管理
  3. 依次点击 Manage > Configuration > Edit configuration file(您可以使用编辑器直接修改 WebSEAL 配置文件)。
  4. 前往 logging[stanza],找到 syntax requests = {yes|no},然后点击 Yes
  5. 找到 gmt-time 参数,并按如下所示对其进行修改:gmt-time = yes
  6. 将 request-log-format 替换为以下内容:

    request-log-format = ibmsva: %h %l "%u" %t "%r" %s %b %T %j %{X-Forwarded-For}i %a %A %H %p %m %U %v %d %q
    
  7. 请参阅以下对每个指令的说明:

    • ibmsva: 用于标识 SVA 设备的日志
    • %h:远程主机
    • %l:远程日志名称
    • %u:远程用户
    • %t:时间和日期(采用 CLF 格式)
    • %r:请求的第一行
    • %s:响应状态
    • %b:响应中的字节数(不包括 HTTP 标头)
    • %T:处理请求所用时间(秒)
    • %j:交叉路口名称
    • %X-Forwarded-For:转发的 IP 地址
    • %a:远程 IP 地址
    • %A:本地 IP 地址
    • %H:请求协议
    • %p:端口
    • %m:请求方法(GET、POST、HEAD)
    • %U:请求的网址
    • %v:服务器名称
    • %d:交易标识符
    • %q:查询字符串

在 ISVA 中配置 Syslog 转发

  1. 登录 ISVA 本地管理界面。
  2. 依次选择 Monitor > Logs > Remote Syslog Forwarding
  3. 点击 Add(添加)。
  4. 指定远程 syslog 服务器的详细信息。
    • 服务器:Syslog 服务器 (Bindplane) 的 IP 地址或主机名。
    • 端口:Syslog 服务器监听请求的端口(绑定平面)。
    • 协议:选择 UDPTCP(具体取决于您的 syslog/Bindplane 配置)。
    • 格式:选择 Syslog
  5. 点击保存

为远程日志服务器配置日志源

  1. 选择要将日志发送到的远程 syslog 服务器
  2. 点击来源
  3. 点击 Add(添加)。
  4. 指定日志源的详细信息,然后点击 OK

    • 名称:选择 WebSEAL
    • 实例名称:选择 WebSEAL 实例。
    • 日志文件:源日志文件的名称。
    • 可选:标记:要添加到发送的日志条目的标记。
    • 设施:所有消息都将使用指定的设施代码发送(可用代码列表)。
    • Severity:发送的日志条目的严重性。
      • 所有消息都将以指定的严重程度级别发送。
  5. 点击保存

UDM 映射表

日志字段 UDM 映射 逻辑
操作 read_only_udm.security_result.action_details 当“description”字段包含“event”时,从 XML 字段“/event/originator/action”中提取。
应用 read_only_udm.target.application 使用 grok 模式从“message”字段中提取。
auth_details read_only_udm.security_result.detection_fields.value 当“description”字段包含“event”时,从 XML 字段“/event/accessor/principal/@auth”中提取。该键设置为“Auth”。
authntype read_only_udm.security_result.detection_fields.value 当“description”字段包含“event”时,从 XML 字段“/event/authntype”中提取。该键设置为“Authntype”。
数据 read_only_udm.metadata.description 如果“data”字段不为空,则其值会替换“read_only_udm.metadata.description”的现有值。
说明 read_only_udm.metadata.description 使用 Grok 模式从“message”字段中提取。如果“description”字段包含“event”,则系统会将其解析为 XML 以提取其他字段。
event_id read_only_udm.metadata.product_log_id 当“description”字段包含“event”时,从 XML 字段“/event/originator/event_id”中提取。
主机名 read_only_udm.principal.hostname、read_only_udm.principal.asset.hostname 使用 grok 模式从“message”字段中提取。
id read_only_udm.metadata.product_log_id 使用 grok 模式从“message”字段中提取。
位置 read_only_udm.principal.location.name 当“description”字段包含“event”时,从 XML 字段“/event/originator/location”中提取。
结果 read_only_udm.security_result.detection_fields.value 当“description”字段包含“event”时,从 XML 字段“/event/outcome”中提取。键设置为“结果”。
outcome_reason read_only_udm.security_result.summary 当“description”字段包含“event”时,从 XML 字段“/event/outcome/@reason”中提取。还用于确定“read_only_udm.security_result.action”的值:如果“outcome_reason”包含“fail”(不区分大小写),则设置为“BLOCK”;否则设置为“ALLOW”。
outcome_status read_only_udm.security_result.detection_fields.value 当“description”字段包含“event”时,从 XML 字段“/event/outcome/@status”中提取。该键设置为“结果状态”。
originator_blade read_only_udm.security_result.detection_fields.value 当“description”字段包含“event”时,从 XML 字段“/event/originator/@blade”中提取。该键设置为“Originator Blade”。
originator_component read_only_udm.security_result.detection_fields.value 当“description”字段包含“event”时,从 XML 字段“/event/originator/component”中提取。该键设置为“Originator Component”。
originator_instance read_only_udm.security_result.detection_fields.value 当“description”字段包含“event”时,从 XML 字段“/event/originator/@instance”中提取。将键设置为“Originator Instance”。
session_id read_only_udm.network.session_id 当“description”字段包含“event”时,从 XML 字段“/event/accessor/session_id”中提取。
target_url read_only_udm.target.url 当“description”字段包含“event”时,从 XML 字段“/event/target/url”中提取。
thread_id read_only_udm.security_result.detection_fields.value 使用 grok 模式从“message”字段中提取。将键设置为“线程 ID”。
时间戳 read_only_udm.metadata.event_timestamp 使用 grok 模式从“message”字段中提取。根据“timezone”字段的存在性和格式,使用“date”过滤器设置格式。
time_stamp read_only_udm.metadata.event_timestamp 当“description”字段包含“event”时,从 XML 字段“/event/date”中提取。使用“日期”过滤条件设置的格式。
timezone 与“时间戳”字段结合使用,可使用“日期”过滤条件设置“read_only_udm.metadata.event_timestamp”字段的格式。
网址 read_only_udm.target.url 使用 grok 模式从“message”字段中提取。
用户 read_only_udm.principal.user.userid 当“description”字段包含“event”时,从 XML 字段“/event/accessor/principal”中提取。
user_location read_only_udm.principal.ip、read_only_udm.principal.asset.ip 当“description”字段包含“event”时,从 XML 字段“/event/accessor/user_location”中提取。如果“user_location_type”包含“ip”(不区分大小写),则会解析为 IP 地址,并同时映射到“read_only_udm.principal.ip”和“read_only_udm.principal.asset.ip”。
user_location_type 用于确定是否应将“user_location”解析为 IP 地址。
不适用 read_only_udm.metadata.vendor_name 设置为“IBM_SECURITY_VERIFY”。
不适用 read_only_udm.metadata.product_name 设置为“IBM_SECURITY_VERIFY”。
不适用 read_only_udm.metadata.event_type 最初设置为“STATUS_UPDATE”。如果同时提取“user”和“hostname”字段,则更改为“USER_LOGIN”。
不适用 read_only_udm.extensions.auth.type 如果同时提取“user”和“hostname”字段,则将其设置为“SSO”。
不适用 read_only_udm.network.application_protocol 如果“message”字段包含“HttpServletRequest”,则设置为“HTTP”。
不适用 read_only_udm.metadata.log_type 设置为“IBM_SECURITY_VERIFY”- 从日志元数据中获取。

更改

2024-05-13

  • 更新了解析器,以支持 XML 格式日志。

2023-01-25

  • 新创建的解析器。