收集 Cisco VPN 日志
支持的语言:
Google SecOps
SIEM
本文档介绍了如何使用 Bindplane 将 Cisco ASA VPN 日志注入到 Google Security Operations。解析器使用 Grok 模式从 syslog 消息中提取字段,同时处理标准 syslog 格式和替代消息结构。然后,它会将提取的字段映射到统一数据模型 (UDM),根据 ID 和提取的信息对事件进行分类,并使用供应商、产品和事件类型等元数据来丰富数据。解析器还会处理特定的事件 ID,应用额外的 grok 模式和逻辑来提取相关详细信息,并将其映射到相应的 UDM 字段。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- Windows 2016 或更高版本,或者具有
systemd
的 Linux 主机 - 如果在代理后运行,防火墙端口处于开放状态
- 对 Cisco ASA 的特权访问权限
获取 Google SecOps 注入身份验证文件
- 登录 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
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
其他安装资源
如需了解其他安装选项,请参阅安装指南。
配置 Bindplane 代理以注入 Syslog 并将其发送到 Google SecOps
- 访问配置文件:
- 找到
config.yaml
文件。通常,它位于 Linux 上的/etc/bindplane-agent/
目录中或 Windows 上的安装目录中。 - 使用文本编辑器(例如
nano
、vi
或记事本)打开该文件。
- 找到
按如下方式修改
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_file_path: '/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 log_type: 'CISCO_VPN' raw_log_field: body ingestion_labels: service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels
- 根据基础架构的需要替换端口和 IP 地址。
- 将
<customer_id>
替换为实际的客户 ID。 - 将
/path/to/ingestion-authentication-file.json
更新为获取 Google SecOps 提取身份验证文件部分中保存身份验证文件的路径。
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请运行以下命令:
sudo systemctl restart bindplane-agent
如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:
net stop BindPlaneAgent && net start BindPlaneAgent
为 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 会话所用的加密。已从 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.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 |
从主要 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_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,从事件 ID 209005 的 message_details 中提取。 |
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 |
对等证书的签发者,从事件 ID 717037 的 message_details 中提取。 |
local_proxy_ip |
intermediary.ip |
从事件 ID 713041 的 message_details 中提取的本地代理 IP 地址。 |
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 |
从 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.ip ,principal.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_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 |
远程代理 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.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 |
对等证书的主题,从事件 ID 717037 的 message_details 中提取。 |
summary |
security_result.summary |
从事件 ID 为 113016 的 message_details 中提取的事件摘要。 |
target_host |
target.hostname |
从事件 ID 113004 的 message_details 中提取的目标主机名。 |
target_ip |
target.ip ,target.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.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 |
从事件 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.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 |
从 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。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。