收集 Kaspersky AV 日志

支持的平台:

本文档介绍了如何使用 Bindplane 将 Kaspersky Antivirus 日志注入到 Google 安全运营中心。解析器代码会先尝试将原始日志消息解析为 JSON。如果失败,则会使用正则表达式 (grok 模式) 根据常见的 Kaspersky AV 日志格式从消息中提取字段。

准备工作

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

  • Google SecOps 实例
  • Windows 2016 或更高版本,或者搭载 systemd 的 Linux 主机
  • 如果在代理后运行,防火墙端口处于打开状态
  • 对 Kaspersky Antivirus 的特权访问权限

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

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

获取 Google SecOps 客户 ID

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

安装 Bindplane 代理

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 代理以注入 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: KASPERSKY_AV
                    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 代理,您可以使用服务控制台,也可以输入以下命令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

在 Kaspersky AV 中配置事件导出

  1. 登录 Kaspersky Security Center 控制台。
  2. 选择要导出事件的管理服务器
  3. 管理服务器工作区中,点击事件标签页。
  4. 点击“配置通知和事件导出”链接。
  5. 在列表中选择配置导出到 SIEM 系统
  6. 提供以下配置详细信息:
    • SIEM 系统:选择 Arcsight(CEF 格式)
    • SIEM 系统服务器地址:输入 Bindplane 代理 IP 地址。
    • SIEM 系统服务器端口:输入 Bindplane 代理端口号(例如,对于 UDP,输入 514)。
    • 协议:选择 UDP
  7. 点击确定

UDM 映射表

日志字段 UDM 映射 逻辑
应用 network.http.user_agent 直接从原始日志中的 Application 字段映射。
应用路径 target.process.file.full_path Name 字段搭配使用,用于在原始日志中存在 Application path 时构建完整路径。
组件 target.resource.name 直接从原始日志中的 Component 字段映射。
内容类别 security_result.category_details 如果原始日志中存在 Content category,则添加到 security_result.category_details 字段。
内容类别来源 target.resource.type 如果该值包含 databases,则 UDM 字段会设置为 DATABASE
Erreur security_result.summary 如果 summary 字段为空,则直接从原始日志中的 Erreur 字段映射。
et metadata.product_event_type 如果 product_event_type 字段为空,则直接从原始日志中的 et 字段映射。
et security_result.category_details 已添加到 security_result.category_details 字段。
etdn extensions.vulns.vulnerabilities.description 直接从原始日志中的 etdn 字段映射。
文件 SHA256 哈希 target.process.file.sha256 直接从原始日志中的 File SHA256 hash 字段映射。
gn security_result.about.labels key 设置为 GNvalue 设置为 gn 字段的值。
hdn principal.hostname 直接从原始日志中的 hdn 字段映射。
髋部 principal.ip 直接从原始日志中的 hip 字段映射。
host_name principal.hostname 直接从原始日志中的 host_name 字段映射。
intermediary_host intermediary.hostname 直接从原始日志中的 intermediary_host 字段映射。
intermediary_hostname intermediary.hostname 直接从原始日志中的 intermediary_hostname 字段映射。
kv_data1 系统会解析此字段,并将其值映射到其他 UDM 字段。
kv_data2 系统会解析此字段,并将其值映射到其他 UDM 字段。
标签 network.http.user_agent 如果值为 User-Agent,则 UDM 字段会填充 description 字段的值。
标签 principal.hostname 如果值为 Host,则 UDM 字段会填充从 description 字段中提取的主机名。
标签 security_result.description 对于其他值,UDM 字段会填充包含 labeldescription 字段的字符串。
MD5 target.process.file.md5 直接从原始日志中的 MD5 字段映射(转换为小写后)。
MD5 文件哈希 target.process.file.md5 直接从原始日志中的 MD5 file hash 字段映射。
消息 系统会解析此字段,并将其值映射到其他 UDM 字段。
方法 network.http.method 如果原始日志中的 method 字段与 HTTP 方法列表匹配,则直接从该字段映射。
name target.file.full_path 直接从原始日志中的 name 字段映射。
Nom target.process.file.full_path application_path 字段搭配使用,用于构建完整路径。
p1 target.process.file.sha256 如果 SHA256 字段为空且值为十六进制字符串,则直接从原始日志中的 p1 字段转换为小写后进行映射。
p2 target.process.file.full_path 直接从原始日志中的 p2 字段映射。
p5 security_result.rule_name 直接从原始日志中的 p5 字段映射。
p7 principal.user.user_display_name 如果 Useruser_name 字段为空,则直接从原始日志中的 p7 字段映射。
进程 ID principal.process.pid 直接从原始日志中的 Process ID 字段映射。
process_id target.process.pid 直接从原始日志中的 process_id 字段映射。
协议 network.application_protocol 如果值包含 http(不区分大小写),则 UDM 字段会设置为 HTTP
原因 security_result.summary 直接从原始日志中的 Reason 字段映射。
请求访问的网页 target.url 直接从原始日志中的 Requested web page 字段映射。
结果 如果值为 Allowed,则 sr_action 字段设置为 ALLOW
rtid security_result.about.labels key 设置为 rtidvalue 设置为 rtid 字段的值。
规则 security_result.description 直接从原始日志中的 Rule 字段映射。
SHA256 target.process.file.sha256 直接从原始日志中的 SHA256 字段映射(转换为小写后)。
sr_action security_result.action 已合并到 security_result.action 字段中。
摘要 security_result.summary 直接从原始日志中的 summary 字段映射。
task_name security_result.about.labels key 设置为 TaskNamevalue 设置为 task_name 字段的值。
threat_action_taken 如果值为 blocked,则 security_action 字段设置为 BLOCK。如果值为 allowed,则 security_action 字段设置为 ALLOW
时间戳 metadata.event_timestamp 用于填充事件时间戳。
类型 security_result.threat_name 直接从原始日志中的 Type 字段映射。
网址 network.http.referral_url 直接从原始日志中的 url 字段映射。
用户 principal.user.user_display_name 系统会从此字段中提取用户名,并将其映射到 UDM 字段。
用户 principal.administrative_domain 系统会从此字段中提取网域,并将其映射到 UDM 字段。
user_name principal.user.user_display_name 如果 User 字段为空,则直接从原始日志中的 user_name 字段映射。
metadata.event_type 如果存在 Application pathName,则设置为 SCAN_VULN_NETWORK;如果存在 hdnhost_name,则设置为 STATUS_UNCATEGORIZED;否则设置为 GENERIC_EVENT
metadata.vendor_name 一律设置为 KASPERSKY
metadata.product_name 一律设置为 KASPERSKY_AV
metadata.log_type 一律设置为 KASPERSKY_AV

变化

2025-02-13

增强功能

  • 添加了对解析未解析的 CEF 日志的支持。

2025-02-05

增强功能

  • 添加了对解析未解析的 CEF 日志的支持。

2023-10-13

增强功能

  • Hachage SHA256p1 映射到 target.process.file.sha256
  • Hachage MD5md5 映射到 target.process.file.md5
  • intermediary 映射到 event.idm.read_only_udm.intermediary

2022-10-14

增强功能

  • 添加了 gsub 以绕过不需要的特殊字符。

2022-05-17

增强功能

  • 添加了以下字段的映射
  • Nom(进程/应用的名称)(名称)已映射到 target.file.full_path(扩展名)。
  • Chemin de l'application(应用路径)已映射到 target.file.full_path。
  • Type d'événement(事件类型)已映射到 metadata.product_event_type。
  • 映射到 target.process.pid 的 ID du processus(进程 ID)。
  • Description du résultat(结果说明)已映射到 metadata.description。
  • Erreur(错误)已映射到 security_result.summary。

2022-03-29

增强功能

  • 为以下缺失字段添加了映射:
  • Result description 映射到 security_result.description
  • Type 映射到 security_result.threat_name
  • MD5 映射到 process.file.md5
  • SHA256 映射到 process.file.sha256
  • p2 映射到 target.process.file.full_path
  • p5 映射到 security_result.rule_name
  • p7 映射到 principal.user.user_display_name
  • Reason 映射到 security_result.summary

需要更多帮助?向社区成员和 Google SecOps 专业人士寻求解答。