收集 Dell 交換器記錄
本文說明如何使用 Bindplane 代理程式,將 Dell 交換器記錄擷取至 Google Security Operations。
這個剖析器會擷取 Dell 交換器記錄、正規化時間戳記,並使用 grok 模式將記錄訊息結構化為鍵值組。接著,剖析器會將這些擷取的欄位對應至統合式資料模型 (UDM),處理各種記錄格式,並使用資產詳細資料和安全性嚴重程度等情境資訊來擴充資料。
事前準備
請確認您已完成下列事前準備事項:
- Google SecOps 執行個體
- Windows Server 2016 以上版本,或搭載
systemd的 Linux 主機 - Bindplane 代理程式與 Dell 交換器之間的網路連線
- 如果透過 Proxy 執行,請確保防火牆通訊埠已根據 Bindplane 代理程式需求開啟
- Dell 交換器的有效連線和管理員憑證
取得 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等待安裝完成。
執行下列指令,確認安裝成功:
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服務應顯示為有效 (執行中)。
其他安裝資源
如需其他安裝選項和疑難排解資訊,請參閱 Bindplane 代理程式安裝指南。
設定 Bindplane 代理程式,擷取系統記錄檔並傳送至 Google SecOps
找出設定檔
Linux:
sudo nano /etc/bindplane-agent/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: compression: gzip creds_file_path: '/etc/bindplane-agent/ingestion-auth.json' customer_id: '<customer_id>' endpoint: malachiteingestion-pa.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是標準的系統記錄通訊埠 (在 Linux 上需要根層級權限;非根層級權限請使用1514)
匯出工具設定:
creds_file_path:擷取驗證檔案的完整路徑:- Linux:
/etc/bindplane-agent/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
customer_id:從 Google SecOps 控制台複製的客戶 IDendpoint:區域端點網址:- 美國:
malachiteingestion-pa.googleapis.com - 歐洲:
europe-malachiteingestion-pa.googleapis.com - 亞洲:
asia-southeast1-malachiteingestion-pa.googleapis.com - 如需完整清單,請參閱「區域端點」
- 美國:
儲存設定檔
- 編輯完成後,請儲存檔案:
- 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>選用:定義要傳送至系統記錄檔伺服器的訊息最低嚴重性等級。舉例來說,如要記錄資訊訊息和更重要的訊息,請執行下列操作:
logging level informational將執行設定儲存至啟動設定,確保變更在重新啟動後仍會保留:
copy running-config startup-config儲存設定:
write memory
支援的 Dell 交換器範例記錄
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 trap / 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 |
直接對應至資產標籤值,且鍵會硬式編碼為「資產名稱」。如果資產欄位空白,且訊息包含「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 |
對應至 principal.resource.attribute.labels 內索引鍵為 grantors 的標籤。 |
host |
principal.hostname、principal.asset.hostname、metadata.event_type |
做為主要主機名稱和資產主機名稱。如果存在 host,則 metadata.event_type 會設為 STATUS_UPDATE。如果存在主機名稱但不存在主機,則主機名稱會做為主機。 |
hostname |
principal.asset.ip、principal.ip、host |
如果是有效 IP,則用於主體 IP 和資產 IP。如果 host 為空,則會用做 host。 |
ID |
principal.resource.attribute.labels.value |
對應至 principal.resource.attribute.labels 內索引鍵為 ID 的標籤。 |
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。 |
變更記錄
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。