收集 Dell 交換器記錄
剖析器版本:11.0
本文說明如何使用 Bindplane 代理程式,將 Dell 交換器記錄檔擷取至 Google Security Operations。
這個剖析器會擷取 Dell 交換器記錄、正規化時間戳記,並使用 grok 模式將記錄訊息結構化為鍵/值組合。接著,剖析器會將這些擷取的欄位對應至 Unified Data Model (UDM),處理各種記錄格式,並以資產詳細資料和安全性嚴重性等情境資訊,充實資料內容。
事前準備
請確認您符合下列必要條件:
- Google SecOps 執行個體
- Windows Server 2016 以上版本,或搭載
systemd的 Linux 主機 - Bindplane 代理程式與 Dell 交換器之間的網路連線
- 如果是在 Proxy 後方執行,請確認防火牆通訊埠已按照 Bindplane 代理程式規定開啟
- Dell 交換器的有效連線和管理憑證
取得 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」>「Service Accounts」。
- 按一下「建立服務帳戶」。
- 提供下列設定詳細資料:
- 「服務帳戶名稱」:輸入帳戶名稱 (例如
bindplane-ingest)。 - 「Service account description」(服務帳戶說明):輸入說明 (例如
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 與管理」>「設定」,然後複製「專案編號」。設定匯出工具時會用到。
方法 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 安裝
- 開啟具有 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服務應顯示為「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/dell_switch: 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: DELL_SWITCH raw_log_field: body service: pipelines: logs/dell_switch_to_chronicle: receivers: - udplog exporters: - chronicle/dell_switch
設定參數
替換下列預留位置:
接收器設定:
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:依序前往「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/dell_switch: compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<customer_id>' endpoint: malachiteingestion-pa.googleapis.com log_type: DELL_SWITCH 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"
- 按下
設定從 Dell 交換器匯出系統記錄
- 使用 SSH 或主控台通訊埠連線至 Dell 交換器。
- 使用管理員憑證登入。
使用下列指令指定 Syslog 伺服器的 IP 位址或主機名稱 (請將
<syslog-server-ip>、<udp|tcp>和<syslog-port-number>替換為實際詳細資料):logging host <syslog-server-ip> transport <udp|tcp> port <syslog-port-number>選用:定義要傳送至 Syslog 伺服器的訊息最低嚴重性等級。舉例來說,如要記錄資訊訊息和更高等級的訊息,請使用下列指令:
logging level informational將執行設定儲存至啟動設定,確保變更在重新啟動後仍會保留:
copy running-config startup-config儲存設定:
write memory
支援的 Dell Switch 記錄範例
SYSLOG
{ "priority": 165, "version": 1, "timestamp": "2023-10-12T12:37:17.249566+00:00", "hostname": "switch-lon-01", "app_name": "dn_alm", "proc_id": "940", "message": "Node.1-Unit.1:PRI [event], Dell EMC (OS10) %ALM_AUTH_EVENT: Authentication event was raised MESSAGE=pam_unix(sshd:session): session opened for user service_account by (uid=0)" }JSON
{ "appname": "SNOOP", "facility": 23, "hostname": "access-switch-a1", "message": "snooping.c(2177) 70820228 %% DBG Report from intf Gi6/0/11 ignored -- no router ports on vlan 193", "priority": 191, "proc_id": "snoopTask" }KV/事件格式
Events: Eventid = {38812} Occurrencetime = {3 Sept 2024 00:06:06} Eventseverity = {Minor} Jobid = {30506} Computer = {backup-server-01} Program = {DatabaseAgent} Description = {Block Change Tracking is found DISABLED on Oracle DB [PROD_DB]. Incremental backups may run slow.}稽核 SYSLOG
{ "priority": 110, "version": 1, "timestamp": "2023-12-12T00:58:26.893679+00:00", "hostname": "core-switch-palf", "app_name": ".clish", "proc_id": "29156", "message": "Node.1-Unit.1:PRI [audit], User sec_admin on /dev/pts/0 from 10.0.0.50 used cmd: 'terminal length 0' - completed" }SNMP 陷阱/TRAPMGR 格式
{ "priority": 189, "version": 1, "timestamp": "2023-12-28T23:37:27.394Z", "hostname": "dist-switch-01", "app_name": "TRAPMGR", "proc_id": "trapTask", "extensions": { "origin_ip": "192.168.1.1", "software": "N3000_Series", "swVersion": "6.3.2.3" }, "message": "traputil.c(721) 1056839 %% Gi1/0/5 is transitioned from the Learning state to the Forwarding state" }
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
acct |
principal.user.userid |
如果沒有 user 欄位,則會做為 userid。 |
addr |
principal.asset.ip、principal.ip |
如果 IP 位址有效且與主機名稱不同,則會剖析為 IP 位址,並用於主體 IP 和資產 IP。 |
application |
principal.application |
直接對應。 |
asset |
principal.asset.attribute.labels.value |
直接對應至資產標籤值,鍵則硬式編碼為「Asset Name」。如果資產欄位空白,且訊息包含「Dell」,資產就會設為「Dell」。 |
auid |
principal.resource.attribute.labels.value |
直接對應至 principal.resource.attribute.labels 中鍵為 auid 的標籤。 |
datetime |
metadata.event_timestamp |
從訊息欄位中的各種格式剖析,並轉換為時間戳記。 |
dest_ip |
target.asset.ip、target.ip |
對應至目標 IP 和目標資產 IP。 |
enterpriseId |
principal.resource.attribute.labels.value |
對應至 principal.resource.attribute.labels 中鍵為 enterpriseId 的標籤。 |
exe |
sec_result.detection_fields.value |
已對應至鍵為 exe 的偵測欄位。 |
File |
target.file.full_path |
直接對應。 |
grantors |
principal.resource.attribute.labels.value |
對應至 grantors 中鍵為 principal.resource.attribute.labels 的標籤。 |
host |
principal.hostname、principal.asset.hostname、metadata.event_type |
做為主體主機名稱和資產主機名稱。如果 host 存在,metadata.event_type 會設為 STATUS_UPDATE。如果存在 hostname 但不存在 host,則 hostname 會用作 host。 |
hostname |
principal.asset.ip、principal.ip、host |
如果是有效的 IP,則用於主體 IP 和資產 IP。如果 host 為空白,則會做為 host 使用。 |
ID |
principal.resource.attribute.labels.value |
對應至 ID 中鍵為 principal.resource.attribute.labels 的標籤。 |
ip |
principal.asset.ip、principal.ip |
對應至主體 IP 和資產 IP。 |
is_synced |
sec_result.detection_fields.value |
已對應至鍵為 is_synced 的偵測欄位。 |
local |
target.asset.ip、target.ip、target.port |
剖析後擷取本機 IP 和通訊埠,並對應至目標 IP、目標資產 IP 和目標通訊埠。 |
local_ip |
target.asset.ip、target.ip |
從 local 欄位擷取,並對應至目標 IP 和目標資產 IP。 |
local_port |
target.port |
從 local 欄位擷取,並對應至目標通訊埠。 |
mac |
principal.mac |
如果 MAC 位址有效,則會對應至主要 MAC 位址。 |
msg |
metadata.description |
如果存在,則會用作事件說明。也會剖析其他欄位。 |
msg1 |
metadata.description |
如果沒有 msg2,則會用作事件說明。 |
msg2 |
sec_result.description、metadata.event_type、extensions.auth.type |
做為安全性結果說明。如果包含「opened for user」,事件類型會設為 USER_LOGIN,驗證類型則設為 MACHINE。如果包含「closed for user」,事件類型會設為 USER_LOGOUT,授權類型則設為 MACHINE。 |
op |
metadata.product_event_type |
如果存在,則做為產品事件類型。 |
pid |
principal.process.pid |
直接對應。 |
port |
principal.port |
直接對應。 |
prod_event_type |
metadata.product_event_type |
如果存在,則做為產品事件類型。 |
res |
sec_result.summary |
直接對應。 |
sec_description |
sec_result.description、target.url、target.ip、target.asset.ip、sec_result.action_details |
剖析目標網址、IP、動作詳細資料,並做為安全性結果說明。 |
Server_ID |
target.resource.product_object_id |
直接對應。 |
server |
principal.asset.ip、principal.ip、principal.port |
剖析後擷取伺服器 IP 和通訊埠,對應至主體 IP、主體資產 IP 和主體通訊埠。 |
server_ip |
principal.asset.ip、principal.ip |
從 server 欄位擷取,並對應至主體 IP 和主體資產 IP。 |
server_port |
principal.port |
從 server 欄位擷取,並對應至主體通訊埠。 |
ses |
network.session_id |
直接對應。 |
severity |
sec_result.severity、metadata.product_event_type |
根據特定值,判斷安全性結果嚴重性和產品事件類型。 |
software |
principal.asset.software |
直接對應。 |
softwareName |
software.name |
直接對應。 |
Status |
sec_result.summary |
如果沒有 res,則做為安全性結果摘要。 |
subj |
principal.resource.attribute.labels.value |
對應至 principal.resource.attribute.labels 中鍵為 subj 的標籤。 |
swVersion |
software.version |
直接對應。 |
target_host |
target.hostname、target.asset.hostname |
直接對應至目標主機名稱和目標資產主機名稱。 |
target_ip |
target.asset.ip、target.ip |
直接對應至目標 IP 和目標資產 IP。 |
target_url |
target.url |
直接對應。 |
target_user_id |
target.user.userid |
直接對應。 |
terminal |
principal.resource.attribute.labels.value |
對應至 principal.resource.attribute.labels 中鍵為 terminal 的標籤。 |
tzknown |
sec_result.detection_fields.value |
已對應至鍵為 tzknown 的偵測欄位。 |
uid |
principal.resource.attribute.labels.value |
對應至 principal.resource.attribute.labels 中鍵為 uid 的標籤。 |
user |
principal.user.userid、metadata.event_type |
做為主要使用者 ID。如果 user 存在,metadata.event_type 會設為 USER_UNCATEGORIZED。 |
username |
target.user.userid |
直接對應至目標使用者 ID。 |
| 不適用 | metadata.vendor_name |
硬式編碼為「Dell」。 |
| 不適用 | metadata.product_name |
硬式編碼為「Dell Switch」。 |
| 不適用 | extensions.auth.type |
針對特定登入/登出事件設為 MACHINE。 |
| 不適用 | metadata.event_type |
由複雜邏輯根據各種欄位和條件決定,如未另行設定,則預設為 GENERIC_EVENT。可以是 USER_LOGIN、USER_LOGOUT、USER_UNCATEGORIZED、NETWORK_CONNECTION、NETWORK_UNCATEGORIZED、STATUS_UPDATE 或 GENERIC_EVENT。 |
reason_code |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
Eventid |
metadata.product_log_id |
從變更記錄對應 |
Eventseverity |
security_result.severity |
從變更記錄對應 |
Computer |
principal.hostname |
從變更記錄對應 |
Program |
principal.application |
從變更記錄對應 |
Description |
security_result.description |
從變更記錄對應 |
tzknown", "is_synced" and "exe |
security_result.detection_fields |
從變更記錄對應 |
res |
security_result.summary |
從變更記錄對應 |
status |
security_result.summary |
從變更記錄對應 |
uid", "enterpriseId", "auid", "terminal", "subj", "grantors", and "ID |
principal.resource.attribute.labels |
從變更記錄對應 |
sec_description |
security_result.description |
從變更記錄對應 |
action_details |
security_result.action_details |
從變更記錄對應 |
softwareName |
principal.asset.software.name |
從變更記錄對應 |
swVersion |
principal.asset.software.version |
從變更記錄對應 |
port |
principal_port |
從變更記錄對應 |
變更記錄
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求解答。