收集 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 之間的網路連線
- 如果是在 Proxy 後方執行,請確認防火牆通訊埠已按照 Bindplane 代理程式規定開啟
- Cisco ASA 的特殊存取權
取得 Bindplane 代理程式的 Google SecOps 憑證
如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:
- 新部署作業:使用 Chronicle API (選項 1)。
- 舊版部署作業:繼續使用擷取驗證檔案 (選項 2),直到 Ingestion API 於 2027 年 7 月 20 日停用。
方法 1:為 Chronicle API 建立服務帳戶 (建議)
- 登入 Google Cloud 控制台,選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
- 依序前往「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
- 按一下「建立服務帳戶」。
- 提供下列設定詳細資料:
- 服務帳戶名稱:輸入帳戶名稱 (例如
bindplane-ingest)。 - 服務帳戶說明:輸入說明 (例如
Bindplane agent log ingestion)。
- 服務帳戶名稱:輸入帳戶名稱 (例如
- 點按「Create and continue」(建立並繼續)。
- 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
- 依序點選「繼續」和「完成」。
- 按一下您建立的服務帳戶,然後前往「金鑰」分頁標籤。
- 依序點選「新增金鑰」>「建立新的金鑰」。
- 選取「JSON」,然後點選「建立」。金鑰檔案會下載到電腦。
- 將金鑰檔案儲存為 Bindplane 收集器目錄中的
ingestion-auth.json(Linux 上的/opt/observiq-otel-collector/ingestion-auth.json或 Windows 上的C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json),或更新config.yaml中的creds_file_path,使其與儲存路徑相符。 - 依序前往「IAM & Admin」(IAM 與管理) >「Settings」(設定),然後複製「Project number」(專案編號)。設定匯出工具時會用到。
方法 2:下載擷取驗證檔案 (舊版)
- 登入 Google SecOps 控制台。
- 依序前往「SIEM Settings」 > 「Collection Agents」。
- 下載擷取驗證檔案。
- 將檔案安全地儲存在要安裝 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 安裝
- 開啟具有根層級或 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服務應顯示為「active (running)」。
其他安裝資源
如需其他安裝選項和疑難排解資訊,請參閱 Bindplane 代理程式安裝指南。
設定 Bindplane 代理,擷取系統記錄檔並傳送至 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 上需要根目錄;非根目錄請使用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:依序前往「IAM 與管理」>「設定」,然後將<PROJECT_NUMBER>替換為專案編號。endpoint:維持設為chronicle.googleapis.com。
舊版 Ingestion 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 Collector」。
- 按一下滑鼠右鍵,然後選取「重新啟動」。
確認服務正在執行:
sc query observiq-otel-collector查看記錄檔是否有錯誤:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
- 按下
設定 Cisco ASA VPN 的系統記錄
- 開啟 Cisco ASDM。
- 依序前往「Configuration」>「Features」>「Properties」>「Logging」>「Logging Setup」。
- 勾選「啟用記錄功能」核取方塊,啟用系統記錄。
- 在「Logging」中選取「Syslog Servers」,然後點選「Add」。
- 在「新增 Syslog 伺服器」視窗中輸入下列設定詳細資料:
- 介面:選取傳出通訊的介面。
- IP 位址:輸入 Bindplane 代理程式 IP 位址。
- 「通訊協定」:選取「UDP」。
- Port:輸入 Bindplane 代理程式通訊埠編號。
- 按一下 [確定]。
- 在「Logging」部分,選取「Logging Filters」。
- 選取「Syslog Servers」,然後按一下「Edit」。
- 在「Filter on severity」清單中選取「Informational」。
- 按一下 [確定]。
- 按一下「套用」。
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
accesslist |
target.resource.name |
當 eventtype 為「ASA-4-106103」時,從 message_info 擷取。代表存取清單的名稱。 |
action |
security_result.action |
剖析器會根據記錄訊息中的關鍵字 (例如「拒絕」、「允許」) 衍生出這項資訊。「地圖」設為「允許」或「封鎖」。 |
action |
security_result.action_details |
所採取動作的原始字串值 (例如「permitted」、「denied」、「disconnected」)。 |
app_name |
principal.application |
主體使用的應用程式名稱 (例如「CLI」)。從 message_details 擷取,適用於事件 ID 111008、111009 和 111010。 |
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 工作階段使用的加密。Extracted from message_info for eventtype 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 |
從 message_info 擷取的中介 IP 位址,用於事件 ID 111010。 |
invalid_ip |
不適用 | 用於邏輯的內部變數,未對應至 UDM。 |
ip_1 |
principal.ip、principal.asset.ip |
如果來源和目的地 IP 相同,系統會擷取來源 IP 位址做為備援。 |
ip_2 |
target.ip、target.asset.ip |
來源和目的地 IP 相同時,系統會擷取目的地 IP 位址做為備用。 |
ipprotocol |
network.ip_protocol |
IP 通訊協定,從各種記錄訊息格式擷取並轉換為大寫。 |
issuer |
network.tls.client.certificate.issuer |
對等憑證的核發者,從 message_details 擷取,事件 ID 為 717037。 |
local_proxy_ip |
intermediary.ip |
從事件 ID 713041 的 message_details 擷取的本機 Proxy 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 |
觀察者的 IP 位址,從 observer 欄位擷取。 |
peer_type |
不適用 | 雖然經過剖析,但這個欄位不會對應至 UDM 中的 IDM 物件。 |
policy |
target.resource.name |
政策名稱,從 message_details 擷取,用於事件 ID 113003。 |
policy_name |
target.resource.name |
政策名稱,從事件 ID 113009 和 113011 的 message_details 中擷取。 |
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 |
遠端 Proxy 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 |
來源 IP 位址,從主要 grok 模式或其他特定模式擷取。 |
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 |
事件摘要,擷取自 message_details,事件 ID 為 113016。 |
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,從事件 ID 113003 的 message_details 中擷取。 |
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 |
TLS 版本,從事件 ID 725002 的 message_details 擷取。 |
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 |
使用者代理程式字串,擷取自 message_details,事件 ID 為 722055。 |
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 專業人員尋求解答。