收集 Cisco VPN 日志
解析器版本:22.0
本文档介绍了如何使用 Bindplane 代理将 Cisco ASA VPN 日志注入 Google Security Operations。
解析器使用 grok 模式从 Cisco ASA VPN 系统日志消息中提取字段,同时处理标准系统日志格式和替代消息结构。它将提取的字段映射到统一数据模型 (UDM),并根据 ASA 事件 ID 对事件进行分类。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- Windows Server 2016 或更高版本,或者具有
systemd的 Linux 主机 - Bindplane 代理与 Cisco ASA 之间的网络连接
- 如果在代理后面运行,请确保按照 Bindplane 代理要求打开防火墙端口
- 对 Cisco ASA 的特权访问权限
获取 Bindplane 代理的 Google SecOps 凭证
如需向 Google SecOps 验证 Bindplane 代理,请选择以下方法之一:
- 新部署:使用 Chronicle API(选项 1)。
- 旧版部署:继续使用提取身份验证文件(方法 2),直到提取 API 于 2027 年 7 月 20 日停用。
方法 1:为 Chronicle API 创建服务账号(推荐)
- 登录 Google Cloud 控制台,然后选择与您的 Google SecOps 实例关联的 Google Cloud 项目。
- 前往 IAM 和管理 > 服务账号。
- 点击创建服务账号。
- 提供以下配置详细信息:
- 服务账号名称:输入账号的名称(例如
bindplane-ingest)。 - 服务账号说明:输入说明(例如
Bindplane agent log ingestion)。
- 服务账号名称:输入账号的名称(例如
- 点击创建并继续。
- 在向此服务账号授予对项目的访问权限部分,点击选择角色,然后选择 Chronicle Editor。
- 点击继续,然后点击完成。
- 点击您创建的服务账号,然后前往密钥标签页。
- 依次点击添加密钥 > 创建新密钥。
- 选择 JSON,然后点击创建。密钥文件会下载到您的计算机上。
- 将密钥文件另存为 Bindplane 收集器目录(Linux 上的
/opt/observiq-otel-collector/ingestion-auth.json或 Windows 上的C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json)中的ingestion-auth.json,或更新config.yaml中的creds_file_path以匹配您保存该文件的路径。 - 前往 IAM 和管理 > 设置,然后复制项目编号。您在配置导出器时需要用到该名称。
方法 2:下载数据注入身份验证文件(旧版)
- 登录 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等待安装完成。
运行以下命令,验证安装是否成功:
sc query observiq-otel-collector该服务应显示为 RUNNING。
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh等待安装完成。
运行以下命令,验证安装是否成功:
sudo systemctl status observiq-otel-collector该服务应显示为有效(正在运行)。
其他安装资源
如需了解其他安装选项和问题排查,请参阅 Bindplane 代理安装指南。
配置 Bindplane 代理以注入 syslog 并将其发送到 Google SecOps
找到配置文件
Linux:
sudo nano /opt/observiq-otel-collector/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
修改配置文件
将
config.yaml的全部内容替换为以下配置:receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/cisco_vpn: protocol: https # Region of your instance, for example us, europe, asia-southeast1 location: <LOCATION> # Project number of the Google Cloud project linked to the instance project: '<PROJECT_NUMBER>' compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<customer_id>' endpoint: chronicle.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:服务账号 JSON 密钥文件的完整路径(选项 1):- Linux:
/opt/observiq-otel-collector/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
customer_id:从 Google SecOps 控制台复制的客户 IDlocation:将<LOCATION>替换为 Google SecOps 实例的区域(例如us、europe或asia-southeast1)。导出器会使用此值作为chronicle.googleapis.com的前缀。如需查看完整列表,请参阅区域级端点。project:将<PROJECT_NUMBER>替换为“IAM 和管理”>“设置”中的项目编号。endpoint:保持设置为chronicle.googleapis.com。
旧版提取 API 导出工具
如果您使用选项 2 中的提取身份验证文件,请将
exporters代码块替换为以下内容。将creds_file_path设置为数据注入身份验证文件的路径,如果您的实例位于美国境外,请将malachiteingestion-pa.googleapis.com替换为您的区域端点(例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/cisco_vpn: compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<customer_id>' endpoint: malachiteingestion-pa.googleapis.com log_type: CISCO_VPN raw_log_field: body
保存配置文件
- 修改后,保存文件:
- Linux:依次按
Ctrl+O、Enter和Ctrl+X - Windows:依次点击文件 > 保存
- Linux:依次按
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请运行以下命令:
sudo systemctl restart observiq-otel-collector验证服务是否正在运行:
sudo systemctl status observiq-otel-collector检查日志中的错误:
sudo journalctl -u observiq-otel-collector -f
如需在 Windows 中重启 Bindplane 代理,请选择以下选项之一:
以管理员身份运行命令提示符或 PowerShell:
net stop observiq-otel-collector && net start observiq-otel-collector“服务”控制台:
- 按
Win+R,输入services.msc,然后按 Enter 键。 - 找到 observIQ OpenTelemetry 收集器。
- 右键点击并选择重启。
验证服务是否正在运行:
sc query observiq-otel-collector检查日志中的错误:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
- 按
为 Cisco ASA VPN 配置 syslog
- 打开 Cisco ASDM。
- 依次前往配置 > 功能 > 属性 > 日志记录 > 日志记录设置。
- 选中启用日志记录复选框以启用 syslog。
- 在日志记录中选择 Syslog 服务器,然后点击添加。
- 在添加 Syslog 服务器窗口中输入以下配置详细信息:
- 接口:选择用于出站通信的接口。
- IP 地址:输入 Bindplane 代理 IP 地址。
- 协议:选择 UDP。
- 端口:输入 Bindplane 代理端口号。
- 点击确定。
- 在日志记录部分中选择日志记录过滤条件。
- 选择 Syslog 服务器,然后点击修改。
- 从列表中选择信息作为按严重程度过滤的条件。
- 点击确定。
- 点击应用。
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 会话使用的加密。针对事件类型 725012 从 message_info 中提取。 |
cisco_message_number |
security_result.rule_name |
Cisco 消息编号,从 eventtype 字段中提取。 |
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.ip,target.asset.ip |
目标 IP 地址,从各种日志消息格式中提取。 |
destination_ip_port |
target.port 或 network.application_protocol |
目标端口,从各种日志消息格式中提取。如果提取的值不是数字,则将其视为应用协议。 |
dst_email |
target.user.email_addresses 或 target.user.userid |
从 message_info 中提取的目标电子邮件地址或用户 ID。如果该值与电子邮件格式匹配,则会将其添加到 email_addresses;否则,会将其用作 userid。 |
dst_host |
target.hostname |
目标主机名,从 message_info 中提取。 |
dst_ip |
target.ip,target.asset.ip |
目标 IP 地址,从主 grok 模式或其他特定模式中提取。 |
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_severity 和 event_type 结合使用,在可用时构成 metadata.product_event_type 字段。 |
event_severity |
metadata.product_event_type(一部分)、security_result.severity、is_alert、is_significant |
与 event_id 或 event_name 和 event_type 结合使用,以形成 metadata.product_event_type 字段。还用于派生 security_result.severity、is_alert 和 is_significant 字段。 |
event_type |
metadata.product_event_type(属于) |
与 event_name 和 event_severity 结合使用,以在可用时形成 metadata.product_event_type 字段。 |
eventtype |
metadata.product_event_type、security_result.rule_name、security_result.severity_details、security_result.severity |
事件类型字符串,用于派生 metadata.product_event_type、security_result.rule_name、security_result.severity_details 和 security_result.severity 字段。 |
fragment_id |
security_result.about.resource.id |
IP 分段的 ID,从 message_details 中提取,事件 ID 为 209005。 |
group |
principal.group.group_display_name、principal.user.group_identifiers、target.user.group_identifiers |
群组名称,从各种日志消息格式中提取。 |
group_name |
principal.group.group_display_name |
当 group 字段是主机名时,从中提取的群组名称。 |
has_principal_ip |
不适用 | 用于逻辑的内部变量,未映射到 UDM。 |
has_target_ip |
不适用 | 用于逻辑的内部变量,未映射到 UDM。 |
hostname |
principal.hostname,principal.asset.hostname |
主账号的主机名,从各种日志消息格式中提取。 |
hostname2 |
principal.hostname,principal.asset.hostname |
主账号的主机名,在 hostname 不可用时作为后备提取。 |
icmp_code |
不适用 | 虽然此字段已解析,但未映射到 UDM 中的 IDM 对象。 |
icmp_dst_ip |
target.ip,target.asset.ip |
ICMP 错误消息中的目标 IP 地址。 |
icmp_id |
不适用 | 虽然此字段已解析,但未映射到 UDM 中的 IDM 对象。 |
icmp_src_ip |
principal.ip,principal.asset.ip |
ICMP 出错提示中的来源 IP 地址。 |
icmp_type |
不适用 | 虽然此字段已解析,但未映射到 UDM 中的 IDM 对象。 |
intermediary_ip |
principal.ip,principal.asset.ip |
从事件 ID 111010 的 message_info 中提取的中间 IP 地址。 |
invalid_ip |
不适用 | 用于逻辑的内部变量,未映射到 UDM。 |
ip_1 |
principal.ip,principal.asset.ip |
当来源 IP 和目标 IP 相同时,提取的来源 IP 地址作为后备。 |
ip_2 |
target.ip,target.asset.ip |
当来源 IP 和目标 IP 相同时,提取的目标 IP 地址作为后备。 |
ipprotocol |
network.ip_protocol |
IP 协议,从各种日志消息格式中提取并转换为大写。 |
issuer |
network.tls.client.certificate.issuer |
对等证书的颁发者,从 message_details 中提取,事件 ID 为 717037。 |
local_proxy_ip |
intermediary.ip |
本地代理 IP 地址,从事件 ID 713041 的 message_details 中提取。 |
log_mssg |
security_result.description,sr.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.hostname 或 observer.ip |
从日志消息中提取的观察器主机名或 IP 地址。 |
observer_ip |
observer.ip |
观察者 IP 地址,从 observer 字段中提取。 |
peer_type |
不适用 | 虽然此字段已解析,但未映射到 UDM 中的 IDM 对象。 |
policy |
target.resource.name |
政策名称,从 message_details 中提取,适用于事件 ID 113003。 |
policy_name |
target.resource.name |
从 message_details 中提取的政策名称,适用于事件 ID 113009 和 113011。 |
principal_ip |
principal.ip,principal.asset.ip |
主账号 IP 地址,从事件 ID 113009 的 message_details 中提取。 |
privilege_level_from |
不适用 | 虽然此字段已解析,但未映射到 UDM 中的 IDM 对象。 |
privilege_level_to |
不适用 | 虽然此字段已解析,但未映射到 UDM 中的 IDM 对象。 |
process |
principal.process.command_line |
从事件 ID 711004 的 message_details 中提取的进程名称。 |
protocol |
network.ip_protocol 或 network.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 |
从事件 ID 713041 的 message_details 中提取的远程代理 IP 地址。 |
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 |
会话 ID,从 message_info 中提取。 |
session_id |
network.session_id |
会话 ID,从 message_info 中提取。 |
sess_type |
principal.hostname,principal.asset.hostname |
从 log_mssg 中提取的会话类型,在 hostname 不可用时用作主机名。 |
source_ip |
principal.ip,principal.asset.ip |
从各种日志消息格式中提取的来源 IP 地址。 |
source_ip_port |
principal.port |
源端口,从各种日志消息格式中提取。 |
src_email |
principal.user.email_addresses 或 principal.user.userid |
从 message_info 中提取的来源电子邮件地址或用户 ID。如果该值与电子邮件格式匹配,则会将其添加到 email_addresses;否则,会将其用作 userid。 |
src_ip |
principal.ip,principal.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 |
事件摘要,从事件 ID 113016 的 message_details 中提取。 |
target_host |
target.hostname |
从事件 ID 113004 的 message_details 中提取的目标主机名。 |
target_ip |
target.ip,target.asset.ip |
目标 IP 地址,从 message_details 中提取,适用于事件 ID 113004。 |
target_user |
target.user.userid |
目标用户 ID,从 message_details 中提取,用于事件 ID 113003。 |
task_duration |
不适用 | 虽然此字段已解析,但未映射到 UDM 中的 IDM 对象。 |
tcp_dst_ip |
target.ip,target.asset.ip |
ICMP 错误消息的原始 TCP 载荷中的目标 IP 地址。 |
tcp_dst_port |
不适用 | 虽然此字段已解析,但未映射到 UDM 中的 IDM 对象。 |
tcp_src_ip |
principal.ip,principal.asset.ip |
ICMP 错误消息的原始 TCP 载荷中的来源 IP 地址。 |
tcp_src_port |
不适用 | 虽然此字段已解析,但未映射到 UDM 中的 IDM 对象。 |
threshold |
不适用 | 虽然已解析,但此字段未映射到 UDM 中的 IDM 对象。 |
tls_version |
network.tls.version |
从 message_details 中提取的 TLS 版本,适用于事件 ID 725002。 |
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.userid,target.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 |
用户属性的值,从事件 ID 734003 和 734001 的 message_details 中提取。 |
userid |
principal.user.userid |
用户 ID,从 message_details 中提取,对应事件 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 专业人士的解答。