收集 Arista 交換器記錄
支援的國家/地區:
Google SecOps
SIEM
這個剖析器會從 Arista 交換器記錄中擷取欄位,並處理 JSON 和系統記錄格式。它會使用 grok 模式剖析各種記錄訊息類型,將擷取的欄位對應至 UDM,並根據擷取的詳細資料,使用事件類型、嚴重程度和主體/目標資訊等中繼資料來擴充事件。
事前準備
- 確認您擁有 Google SecOps 執行個體。
- 確認您使用的是 Windows 2016 以上版本,或是搭載
systemd
的 Linux 主機。 - 如果透過 Proxy 執行,請確認防火牆通訊埠已開啟。
- 已安裝並可存取 Arista EOS 4.23.x 以上版本。
- 確認您在 Arista EOS 交換器上擁有特殊權限。
取得 Google SecOps 擷取驗證檔案
- 登入 Google SecOps 控制台。
- 依序前往「SIEM 設定」>「收集代理程式」。
- 下載擷取驗證檔案。將檔案安全地儲存在要安裝 Bindplane 的系統上。
取得 Google SecOps 客戶 ID
- 登入 Google SecOps 控制台。
- 依序前往「SIEM 設定」>「設定檔」。
- 複製並儲存「機構詳細資料」專區中的客戶 ID。
安裝 Bindplane 代理程式
Windows 安裝
- 以系統管理員身分開啟「命令提示字元」或「PowerShell」。
執行下列指令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
Linux 安裝
- 開啟具有根層級或 sudo 權限的終端機。
執行下列指令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
其他安裝資源
- 如需其他安裝選項,請參閱這份安裝指南。
設定 Bindplane 代理程式,擷取系統記錄檔並傳送至 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: '/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: ARISTA_SWITCH raw_log_field: body 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
在 Arista 交換器中設定系統記錄
- 登入 Arista 交換器。
進入設定模式:
Arista# config terminal
為交換器提供下列設定,將記錄檔傳送至 Bindplane 代理程式。
Arista(config)# logging host <bindplane-server-ip> <port-number> protocol [tcp/udp] Arista(config)# logging trap information Arista(config)# copy running-config startup-config
* Replace `<bindplane-server-ip>` with Bindplane agent IP address and `<port-number>` with the port configured to listen.
輸入指令執行記錄的其他設定:
Arista (config)# aaa accounting commands all console start-stop logging Arista (config)# aaa accounting commands all default start-stop logging Arista (config)# aaa accounting exec console start-stop logging Arista (config)# aaa accounting exec default start-stop logging Arista (config)# copy running-config startup-config
輸入登入記錄的其他設定:
Arista (config)# aaa authentication policy on-success log Arista (config)# aaa authentication policy on-failure log Arista (config)# copy running-config startup-config
UDM 對應表
記錄欄位 | UDM 對應 | 邏輯 |
---|---|---|
appname |
target.application |
直接從「appname 」欄位對應。 |
description |
metadata.description |
直接從 description 欄位對應,該欄位是根據 product_event_type ,使用 grok 模式從 message 欄位擷取。 |
dst_ip |
target.ip 、target.asset.ip |
直接從 dst_ip 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
dst_mac |
target.mac |
直接從 dst_mac 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
dst_port |
target.port |
直接從 dst_port 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
facility |
additional.fields[facility].string_value |
直接從「facility 」欄位對應。 |
hostname |
principal.hostname 、principal.asset.hostname |
直接從「hostname 」欄位對應。 |
inner_msg |
metadata.description |
直接從 inner_msg 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
ip_protocol |
network.ip_protocol |
直接從 ip_protocol 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。如果值為「tcp」,系統會轉換為「TCP」。如果事件類型為「NO_IGMP_QUERIER」,則會設為「IGMP」。 |
pid |
principal.process.pid |
直接從 pid 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
prin_ip |
principal.ip 、principal.asset.ip |
直接從 prin_ip 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
product_event_type |
metadata.product_event_type |
直接從 product_event_type 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
proto |
network.application_protocol |
如果 proto 欄位為「sshd」,UDM 欄位會設為「SSH」。 |
severity |
security_result.severity 、security_result.severity_details |
security_result.severity 是根據以下對應關係,從 severity 欄位衍生而來:「DEFAULT」、「DEBUG」、「INFO」、「NOTICE」->「INFORMATIONAL」;「WARNING」、「ERROR」、「ERR」、「WARN」->「MEDIUM」;「CRITICAL」、「ALERT」、「EMERGENCY」->「HIGH」。severity 的原始值會對應至 security_result.severity_details 。 |
session_id |
network.session_id |
直接從 session_id 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
source_ip |
principal.ip 、principal.asset.ip |
直接從 source_ip 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
source_port |
principal.port |
直接從 source_port 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
src_ip |
principal.ip 、principal.asset.ip |
直接從 src_ip 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
table_name |
target.resource.name |
直接從 table_name 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。如果填入這個欄位,target.resource.resource_type 會設為「TABLE」。 |
target_host |
target.hostname 、target.asset.hostname |
直接從 target_host 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
target_ip |
target.ip 、target.asset.ip |
直接從 target_ip 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
target_package |
target.process.command_line |
直接從 target_package 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
target_port |
target.port |
直接從 target_port 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
timestamp |
metadata.event_timestamp |
剖析為時間戳記物件後,直接從 timestamp 欄位對應。 |
user |
principal.user.userid |
直接從 user 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
user_name |
target.user.userid |
直接從 user_name 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。 |
vrf |
additional.fields[vrf].string_value |
直接從 vrf 欄位對應,該欄位是使用 grok 模式從 message 欄位擷取。根據剖析器程式碼所述的複雜條件邏輯,從「has_principal 」、「has_target 」、「user 」、「message 」、「product_event_type 」和「description 」欄位組合衍生而來。預設值為「GENERIC_EVENT」。硬式編碼為「ARISTA_SWITCH」。硬式編碼為「Arista Switch」。硬式編碼為「Arista」。如果 description 欄位包含「connection rejected」,請設為「BLOCK」。 |
dpid |
additional.fields[DPID].string_value |
直接從「dpid 」欄位對應。 |
intf |
additional.fields[intf].string_value |
直接從「intf 」欄位對應。 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。