收集 Cisco VPN 日志

解析器版本:22.0

支持的平台:

本文档介绍了如何使用 Bindplane 代理将 Cisco ASA VPN 日志注入到 Google Security Operations。

解析器使用 grok 模式从 Cisco ASA VPN syslog 消息中提取字段,同时处理标准 syslog 格式和替代消息结构。它将提取的字段映射到统一数据模型 (UDM),并根据 ASA 事件 ID 对事件进行分类。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • Bindplane 代理与 Cisco ASA 之间的网络连接
  • 如果在代理后面运行,请确保防火墙端口已根据 Bindplane 代理要求打开
  • 对 Cisco ASA 的特权访问权限

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

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

获取 Google SecOps 客户 ID

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

安装 Bindplane 代理

按照以下说明在 Windows 或 Linux 操作系统上安装 Bindplane 代理。

Windows 安装

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

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    
  3. 等待安装完成。

  4. 运行以下命令,验证安装是否成功:

    sc query observiq-otel-collector
    

    该服务应显示为 正在运行

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
    
  3. 等待安装完成。

  4. 运行以下命令,验证安装是否成功:

    sudo systemctl status observiq-otel-collector
    

    该服务应显示为有效(正在运行)

其他安装资源

如需了解其他安装选项和问题排查信息,请参阅 Bindplane 代理安装指南

配置 Bindplane 代理以注入 syslog 并将其发送到 Google SecOps

找到配置文件

  • Linux

    sudo nano /etc/bindplane-agent/config.yaml
    
  • Windows

    notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
    

修改配置文件

  • config.yaml 的全部内容替换为以下配置:

    receivers:
        udplog:
            listen_address: "0.0.0.0:514"
    
    exporters:
        chronicle/cisco_vpn:
            compression: gzip
            creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
            customer_id: '<customer_id>'
            endpoint: malachiteingestion-pa.googleapis.com
            log_type: CISCO_VPN
            raw_log_field: body
    
    service:
        pipelines:
            logs/cisco_vpn_to_chronicle:
                receivers:
                    - udplog
                exporters:
                    - chronicle/cisco_vpn
    

配置参数

替换以下占位符:

  • 接收器配置

    • listen_address:要监听的 IP 地址和端口:
      • 0.0.0.0 侦听所有接口(推荐)
      • 端口 514 是标准 syslog 端口(在 Linux 上需要 root 权限;对于非 root 用户,请使用 1514
  • 导出器配置

    • creds_file_path:提取身份验证文件的完整路径:
      • Linux/etc/bindplane-agent/ingestion-auth.json
      • WindowsC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:从 Google SecOps 控制台复制的客户 ID
    • endpoint:区域端点网址:
      • 美国malachiteingestion-pa.googleapis.com
      • 欧洲europe-malachiteingestion-pa.googleapis.com
      • 亚洲asia-southeast1-malachiteingestion-pa.googleapis.com
      • 如需查看完整列表,请参阅区域级端点

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+OEnterCtrl+X
    • Windows:依次点击文件 > 保存

重启 Bindplane 代理以应用更改

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

    sudo systemctl restart observiq-otel-collector
    
    1. 验证服务是否正在运行:

      sudo systemctl status observiq-otel-collector
      
    2. 检查日志是否存在错误:

      sudo journalctl -u observiq-otel-collector -f
      
  • 如需在 Windows 中重启 Bindplane 代理,请选择以下选项之一:

    • 以管理员身份运行命令提示符或 PowerShell:

      net stop observiq-otel-collector && net start observiq-otel-collector
      
    • 服务控制台:

      1. Win+R,输入 services.msc,然后按 Enter 键。
      2. 找到 observIQ OpenTelemetry 收集器
      3. 右键点击并选择重新启动
      4. 验证服务是否正在运行:

        sc query observiq-otel-collector
        
      5. 检查日志是否存在错误:

        type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
        

为 Cisco ASA VPN 配置 syslog

  1. 打开 Cisco ASDM
  2. 依次前往配置 > 功能 > 属性 > 日志记录 > 日志记录设置
  3. 选中启用日志记录复选框以启用 syslog。
  4. 日志记录中选择 Syslog 服务器,然后点击添加
  5. 添加 Syslog 服务器窗口中输入以下配置详细信息:
    • 接口:选择用于出站通信的接口。
    • IP 地址:输入 Bindplane 代理 IP 地址。
    • 协议:选择 UDP
    • 端口:输入 Bindplane 代理端口号。
    • 点击确定
  6. 日志记录部分中,选择日志记录过滤条件
  7. 选择 Syslog 服务器,然后点击修改
  8. 从列表中选择信息作为按严重程度过滤的条件。
  9. 点击确定
  10. 点击应用

UDM 映射表

日志字段 UDM 映射 逻辑
accesslist target.resource.name eventtype 为“ASA-4-106103”时,从 message_info 中提取。表示访问列表的名称。
action security_result.action 由解析器根据日志消息中的关键字(例如“拒绝”“允许”“接受”)派生得出。映射到 ALLOW 或 BLOCK。
action security_result.action_details 所采取操作的原始字符串值(例如“permitted”“denied”“disconnected”)。
app_name principal.application 正文使用的应用的名称(例如“CLI”)。从事件 ID 为 111008、111009 和 111010 的 message_details 中提取。
assigned_ipv4 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
assigned_ipv6 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
bytes_rcv network.received_bytes 会话中收到的字节数。从 log_mssg 中提取,适用于事件 ID 113019。
bytes_sent network.sent_bytes 会话中发送的字节数。从 log_mssg 中提取,适用于事件 ID 113019。
cipher network.tls.cipher SSL 会话使用的加密。从 message_info 中提取,适用于事件类型 725012。
cisco_message_number security_result.rule_name eventtype 字段中提取的 Cisco 消息编号。
cisco_severity security_result.severity_details eventtype 字段中提取的原始 Cisco 严重程度级别。
command 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
cumulative_total_count.key security_result.outcomes.key 将键“cumulative_total_count”添加到 security_result.outcomes 数组。
cumulative_total_count.value security_result.outcomes.value message_info 中提取的累计总数的值。
current_average_rate.key security_result.outcomes.key 将键“current_average_rate”添加到 security_result.outcomes 数组。
current_average_rate.value security_result.outcomes.value message_info 中提取的当前平均费率值。
current_burst_rate.key security_result.outcomes.key 将键“current_burst_rate”添加到 security_result.outcomes 数组。
current_burst_rate.value security_result.outcomes.value message_info 中提取的当前突发速率值。
desc metadata.description 从日志消息中提取的事件说明。在没有更具体的说明时使用。
description metadata.description 事件的更详细说明,如果可用,则从日志消息中提取。
destination_ip target.iptarget.asset.ip 从各种日志消息格式中提取的目标 IP 地址。
destination_ip_port target.portnetwork.application_protocol 从各种日志消息格式中提取的目标端口。如果提取的值不是数字,则将其视为应用协议。
dst_email target.user.email_addressestarget.user.userid message_info 中提取的目标电子邮件地址或用户 ID。如果该值与电子邮件格式匹配,则会添加到 email_addresses;否则,该值会用作 userid
dst_host target.hostname message_info 中提取的目标主机名。
dst_ip target.iptarget.asset.ip 从主要 grok 模式或其他特定模式中提取的目标 IP 地址。
dst_port target.port 从主要 grok 模式或其他特定模式中提取的目标端口。
duration network.session_duration message_details 中提取并转换为秒的会话时长。
event_date @timestamp 事件的日期和时间,根据原始日志中的各种时间戳字段构建,并使用 date 过滤条件进行解析。
event_id metadata.product_event_type(部分) event_severity 结合使用以构成 metadata.product_event_type 字段。
event_name metadata.product_event_type(部分) event_severityevent_type 结合使用,以在可用时形成 metadata.product_event_type 字段。
event_severity metadata.product_event_type(部分)、security_result.severityis_alertis_significant event_idevent_nameevent_type 结合使用,以构成 metadata.product_event_type 字段。还用于派生 security_result.severityis_alertis_significant 字段。
event_type metadata.product_event_type(部分) event_nameevent_severity 结合使用,以在可用时形成 metadata.product_event_type 字段。
eventtype metadata.product_event_typesecurity_result.rule_namesecurity_result.severity_detailssecurity_result.severity 用于派生 metadata.product_event_typesecurity_result.rule_namesecurity_result.severity_detailssecurity_result.severity 字段的事件类型字符串。
fragment_id security_result.about.resource.id IP 片段的 ID,从事件 ID 209005 的 message_details 中提取。
group principal.group.group_display_nameprincipal.user.group_identifierstarget.user.group_identifiers 从各种日志消息格式中提取的群组名称。
group_name principal.group.group_display_name group 字段是主机名时,从中提取的群组名称。
has_principal_ip 不适用 用于逻辑的内部变量,未映射到 UDM。
has_target_ip 不适用 用于逻辑的内部变量,未映射到 UDM。
hostname principal.hostnameprincipal.asset.hostname 从各种日志消息格式中提取的正文的主机名。
hostname2 principal.hostnameprincipal.asset.hostname 主账号的主机名,在 hostname 不可用时作为后备提取。
icmp_code 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
icmp_dst_ip target.iptarget.asset.ip ICMP 错误消息中的目标 IP 地址。
icmp_id 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
icmp_src_ip principal.ipprincipal.asset.ip ICMP 错误消息中的来源 IP 地址。
icmp_type 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
intermediary_ip principal.ipprincipal.asset.ip 从事件 ID 111010 的 message_info 中提取的中介 IP 地址。
invalid_ip 不适用 用于逻辑的内部变量,未映射到 UDM。
ip_1 principal.ipprincipal.asset.ip 当来源 IP 和目标 IP 相同时的回退来源 IP 地址。
ip_2 target.iptarget.asset.ip 当来源 IP 和目标 IP 相同时,提取的目标 IP 地址作为后备。
ipprotocol network.ip_protocol 从各种日志消息格式中提取的 IP 协议,并转换为大写。
issuer network.tls.client.certificate.issuer 对等证书的签发者,从事件 ID 717037 的 message_details 中提取。
local_proxy_ip intermediary.ip 从事件 ID 713041 的 message_details 中提取的本地代理 IP 地址。
log_mssg security_result.descriptionsr.action 用于填充 security_result.description 字段和提取身份验证操作。
login security_result.summary message_info 中提取的登录状态。
max_configured_rate.key security_result.outcomes.key 将键“max_configured_rate”添加到 security_result.outcomes 数组。
max_configured_rate.value security_result.outcomes.value message_info 中提取的最大配置速率的值。
message_details 各种字段 日志消息的主要部分,包含有关事件的详细信息。根据事件 ID 使用不同的 Grok 模式进行解析。
message_info metadata.description 用于在可用时填充 metadata.description 字段。
observer observer.hostnameobserver.ip 从日志消息中提取的观测者主机名或 IP 地址。
observer_ip observer.ip observer 字段中提取的观测者 IP 地址。
peer_type 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
policy target.resource.name 从事件 ID 113003 的 message_details 中提取的政策名称。
policy_name target.resource.name message_details 中提取的政策名称,适用于事件 ID 113009 和 113011。
principal_ip principal.ipprincipal.asset.ip 从事件 ID 113009 的 message_details 中提取的主 IP 地址。
privilege_level_from 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
privilege_level_to 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
process principal.process.command_line 从事件 ID 711004 的 message_details 中提取的进程名称。
protocol network.ip_protocolnetwork.application_protocol 事件中使用的协议,从各种日志消息格式中提取。如果协议是标准 IP 协议(ICMP、TCP、UDP、ESP),则映射到 network.ip_protocol;否则,映射到 network.application_protocol
reason security_result.description 事件原因,从事件 ID 113016 的 message_details 中提取。
remote_proxy_ip intermediary.ip 远程代理 IP 地址,从事件 ID 713041 的 message_details 中提取。
retrieved_file target.file.full_path message_info 中提取的已检索文件的路径。
security_action security_result.action 由解析器根据事件上下文派生的安全操作。
security_category security_result.category 由解析器根据事件上下文派生的安全类别。
security_result.description security_result.description 从日志消息中提取或派生的安全结果说明。
security_result.severity security_result.severity 安全结果的严重程度,从 event_severity 字段派生而来。
security_result.summary security_result.summary 从日志消息中提取或派生的安全结果摘要。
sent_bytes network.sent_bytes message_info 中提取的已发送字节数。
ses_id network.session_id message_info 中提取的会话 ID。
session_id network.session_id message_info 中提取的会话 ID。
sess_type principal.hostnameprincipal.asset.hostname log_mssg 中提取的会话类型,在 hostname 不可用时用作主机名。
source_ip principal.ipprincipal.asset.ip 从各种日志消息格式中提取的来源 IP 地址。
source_ip_port principal.port 从各种日志消息格式中提取的源端口。
src_email principal.user.email_addressesprincipal.user.userid message_info 中提取的来源电子邮件地址或用户 ID。如果该值与电子邮件格式匹配,则会添加到 email_addresses;否则,该值会用作 userid
src_ip principal.ipprincipal.asset.ip 从主要 Grok 模式或其他特定模式中提取的源 IP 地址。
src_port principal.port 从主要 Grok 模式或其他特定模式中提取的源端口。
src_user principal.user.user_display_name 源用户的显示名称,从事件 ID 为 713049 和 713120 的 message_details 中提取。
subject network.tls.client.certificate.subject 对等证书的主题,从 message_details 中提取,适用于事件 ID 717037。
summary security_result.summary message_details 中提取的活动摘要,适用于活动 ID 113016。
target_host target.hostname 从事件 ID 113004 的 message_details 中提取的目标主机名。
target_ip target.iptarget.asset.ip 从事件 ID 113004 的 message_details 中提取的目标 IP 地址。
target_user target.user.userid 从事件 ID 113003 的 message_details 中提取的目标用户 ID。
task_duration 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
tcp_dst_ip target.iptarget.asset.ip ICMP 错误消息的原始 TCP 载荷中的目标 IP 地址。
tcp_dst_port 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
tcp_src_ip principal.ipprincipal.asset.ip ICMP 错误消息的原始 TCP 载荷中的来源 IP 地址。
tcp_src_port 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
threshold 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
tls_version network.tls.version 从事件 ID 725002 的 message_details 中提取的 TLS 版本。
ts @timestamp 使用 date 过滤条件解析的事件时间戳。
ts_day @timestamp(部分) 时间戳中的当月日期,用于构建 @timestamp 字段。
ts_month @timestamp(部分) 时间戳中的月份,用于构建 @timestamp 字段。
ts_time @timestamp(部分) 时间戳中的时间,用于构建 @timestamp 字段。
ts_year @timestamp(部分) 时间戳中的年份,用于构造 @timestamp 字段。
tunnel_type 不适用 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。
user principal.user.useridtarget.user.userid 从各种日志消息格式中提取的用户 ID。
user_agent network.http.user_agent 从事件 ID 722055 的 message_details 中提取的用户代理字符串。
user_attr.key principal.user.attribute.labels.key 用户属性的键,从 message_details 中提取,适用于事件 ID 734003 和 734001。
user_attr.value principal.user.attribute.labels.value 用户属性的值,从 message_details 中提取,适用于事件 ID 734003 和 734001。
userid principal.user.userid message_details 中提取的用户 ID(针对事件 ID 106103)。
username principal.user.userid message_details 中提取的用户名,适用于事件 ID 111008、111009、111010 和 113008。
不适用 metadata.vendor_name 硬编码为“CISCO”。
不适用 metadata.product_name 硬编码为“ASA VPN”或“VPN”。
不适用 metadata.event_type 由解析器逻辑根据特定字段和事件 ID 的存在情况来确定。可以是 GENERIC_EVENT、NETWORK_CONNECTION、STATUS_UPDATE、NETWORK_FTP、USER_LOGIN、USER_LOGOUT、NETWORK_UNCATEGORIZED、USER_UNCATEGORIZED、NETWORK_FLOW。
不适用 metadata.log_type 硬编码为“CISCO_VPN”。
不适用 metadata.event_timestamp 从已解析的 @timestamp 字段复制。
不适用 extensions.auth.type 根据事件上下文,设置为“VPN”“AUTHTYPE_UNSPECIFIED”或“MACHINE”。
不适用 security_result.about.resource.type 对于事件 ID 209005,设置为“PACKET FRAGMENT”。
不适用 is_alert 对于高严重程度的事件(event_severity 为 0 或 1),设置为 true。
不适用 is_significant 对于高严重程度的事件(event_severity 为 0 或 1),设置为 true。
puser_id principal.user.userid 从变更日志映射

更新日志

查看相应解析器的更改日志

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