收集 Akeyless Vault 日志

支持的语言:

本文档介绍了如何使用直接注入或 Bindplane 将 Akeyless Vault 日志注入到 Google Security Operations。解析器首先将键值或 JSON 格式的日志消息标准化为一致的结构。然后,它会提取相关字段并将其映射到统一数据模型 (UDM) 架构,根据 IP 地址的存在情况和执行的操作对事件类型进行分类。

准备工作

请确保满足以下前提条件:

  • Google SecOps 实例
  • 对 Akeyless Vault 的特权访问权限

获取 Google SecOps 注入身份验证文件

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载注入身份验证文件

获取 Google SecOps 客户 ID

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

在 Akeyless Vault 中配置日志转发,以便直接将日志注入到 Google SecOps

  1. 登录 Akeyless Gateway 网页界面。
  2. 前往日志转发
  3. 选择启用
  4. 提供以下配置详细信息:
    • 日志格式:选择 JSON
    • 审核日志服务器:输入 https://audit.akeyless.io/
    • 服务:选择 Google Chronicle
    • 服务账号密钥:提供包含服务账号凭据的 JSON 文件。
    • 客户 ID:输入您的 Google SecOps 唯一标识符。
    • 区域:输入 Google SecOps 的预配区域。
    • 日志类型:输入 AKEYLESS_VAULT
  5. 点击保存更改

可选:通过 Bindplane 注入 Syslog

Windows Bindplane 安装

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

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

Linux Bindplane 安装

  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 代理以注入 Syslog 并将其发送到 Google SecOps

  1. 访问配置文件:
    • 找到 config.yaml 文件。通常,它位于 Linux 上的 /etc/bindplane-agent/ 目录中或 Windows 上的安装目录中。
    • 使用文本编辑器(例如 nanovi 或记事本)打开该文件。
  2. 按如下方式修改 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: '/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
            ingestion_labels:
                log_type: 'AKEYLESS_VAULT'
                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. /path/to/ingestion-authentication-file.json 更新为获取 Google SecOps 提取身份验证文件部分中保存身份验证文件的路径。

重启 Bindlane 代理以应用更改

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

    sudo systemctl restart bindplane-agent
    
  • 如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

在 Akeyless Vault 中配置 Syslog 转发到 Bindplane

  1. 登录 Akeyless Gateway 网页界面。
  2. 前往日志转发
  3. 选择启用
  4. 提供以下配置详细信息:
    • 日志格式:选择 JSON
    • 审核日志服务器:输入 https://audit.akeyless.io/
    • 服务:选择 Syslog
    • Syslog 网络:选择 UDP。(您可以根据 Bindplane 代理配置选择其他选项)。
    • Syslog Host:输入 Bindplane 代理 IP 地址。
    • Syslog Formatter:选择 Text
    • 可选)TLS:选中 TLS 复选框,然后上传 TLS 证书
  5. 点击保存更改

UDM 映射表

日志字段 UDM 映射 逻辑
access_id read_only_udm.metadata.product_log_id 直接从 access_id 字段映射。如果不存在,则使用正则表达式 access_id:\s+(?<accessid>[\w-]+)message 字段中提取。
account_id read_only_udm.target.user.userid 直接从 account_id 字段映射。
操作 read_only_udm.security_result.action_details 直接从 action 字段映射。
组件 read_only_udm.target.resource.name 直接从 component 字段映射。
时长 read_only_udm.network.session_duration.seconds 直接从 duration 字段映射并转换为整数。
remote_addr read_only_udm.principal.ip remote_addr 字段中提取,按英文逗号拆分,然后添加到 principal.ip 数组中。
request_parameters.access_type read_only_udm.target.resource.attribute.labels.value(其中键为“access_type”) 直接从 request_parameters.access_type 字段映射。如果不存在,则使用正则表达式 access_type:\s+(?<accesstype>[\S]+)message 字段中提取。
request_parameters.comment read_only_udm.target.resource.attribute.labels.value(其中键为“comment”) 直接从 request_parameters.comment 字段映射。
request_parameters.operation read_only_udm.target.resource.attribute.labels.value(其中键为“operation”) 直接从 request_parameters.operation 字段映射。
request_parameters.product read_only_udm.target.resource.attribute.labels.value(其中键为“product”) 直接从 request_parameters.product 字段映射。如果不存在,则使用正则表达式 product:\s+(?<product>[\w\s]+)message 字段中提取。
request_parameters.token_id read_only_udm.target.resource.attribute.labels.value(其中键为“token_id”) 直接从 request_parameters.token_id 字段映射。
request_parameters.transaction_type read_only_udm.target.resource.attribute.labels.value(其中键为“transaction_type”) 直接从 request_parameters.transaction_type 字段映射并转换为字符串。如果不存在,则使用正则表达式 transaction_type:\s+(?<transactiontype>[\S]+)message 字段中提取。
request_parameters.unique_id read_only_udm.target.resource.attribute.labels.value(其中键为“unique_id”) 直接从 request_parameters.unique_id 字段映射。如果不存在,则使用正则表达式 unique_id:\s+(?<uniqueid>[\w-]+)message 字段中提取。
request_parameters.universal_identity_rotate_type read_only_udm.target.resource.attribute.labels.value(其中键为“universal_identity_rotate_type”) 直接从 request_parameters.universal_identity_rotate_type 字段映射。
request_parameters.user_agent read_only_udm.target.resource.attribute.labels.value(其中键为“user_agent”) 直接从 request_parameters.user_agent 字段映射。
和程度上减少 直接从 severity 字段映射。
状态 read_only_udm.network.http.response_code 直接从 status 字段映射并转换为整数。
时间戳 read_only_udm.metadata.event_timestamp 直接从日志条目的 timestamp 字段映射。
read_only_udm.metadata.log_type 硬编码为 AKEYLESS_VAULT
read_only_udm.metadata.event_type 如果 ip_present 为 true,则设置为 STATUS_UPDATE,否则默认为 GENERIC_EVENT
read_only_udm.metadata.vendor_name 使用正则表达式 CEF:0|%{DATA:device_vendor}|%{DATA:device_product}|%{DATA:device_version}|%{DATA:device_event_class_id}\s+%{WORD}\[%{INT}\]:\s+%{GREEDYDATA:kv_data}message 字段中提取。
read_only_udm.metadata.product_name 使用正则表达式 CEF:0|%{DATA:device_vendor}|%{DATA:device_product}|%{DATA:device_version}|%{DATA:device_event_class_id}\s+%{WORD}\[%{INT}\]:\s+%{GREEDYDATA:kv_data}message 字段中提取。
read_only_udm.metadata.product_version 使用正则表达式 CEF:0|%{DATA:device_vendor}|%{DATA:device_product}|%{DATA:device_version}|%{DATA:device_event_class_id}\s+%{WORD}\[%{INT}\]:\s+%{GREEDYDATA:kv_data}message 字段中提取。
read_only_udm.metadata.product_event_type 使用正则表达式 <%{INT}>%{TIMESTAMP_ISO8601:time}\s+%{DATA}\s+(?P<product_event_type>[\w-]+)\[%{INT}\]:\s+(?P<time2>\d{1,2}-%{MONTH}-\d{1,4}\s+\d{1,2}:\d{1,2}:\d{1,2}.\d+)\s+%{WORD}\s+%{WORD:severity}\s+CEF:0|%{DATA:device_vendor}|%{DATA:device_product}|%{DATA:device_version}|%{DATA:device_event_class_id}\s+%{WORD}\[%{INT}\]:\s+%{GREEDYDATA:kv_data}message 字段中提取。
read_only_udm.target.namespace 使用正则表达式 namespace:\s+(?<namespace>[\S]+)message 字段中提取。
read_only_udm.security_result.severity severity 字段映射:Info 映射到 INFORMATIONALError 映射到 ERRORWarning 映射到 MEDIUM,否则映射到 UNKNOWN_SEVERITY
read_only_udm.network.http.method action 字段映射:getGETputAuthenticationPUTpostPOSTdeleteDELETE

需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。