收集 Cisco 交換器記錄
本文說明如何使用 Bindplane 代理程式,將 Cisco 交換器記錄擷取至 Google Security Operations。剖析器會從 SYSLOG 訊息中擷取欄位,並根據識別出的模式和關鍵字,將這些欄位對應至統一資料模型 (UDM)。這項服務可處理各種事件,包括 DHCP、SSH、登入嘗試、網路流量和系統狀態更新,並將這些事件分類,以及提供相關安全性詳細資料來豐富資料。
事前準備
- 確認您擁有 Google SecOps 執行個體。
- 確認您使用的是 Windows 2016 以上版本,或是搭載
systemd
的 Linux 主機。 - 如果透過 Proxy 執行,請確認防火牆通訊埠已開啟。
- 確認您擁有 Cisco 交換器的特殊權限。
取得 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: CISCO_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
在 Cisco 交換器上設定系統記錄
- 登入 Cisco 交換器。
輸入
enable
指令來提升權限:Switch> enable Switch#
輸入
conf t
指令,切換至設定模式:Switch# conf t Switch(config)#
輸入下列指令:
logging host <bindplane-server-ip> transport <tcp/udp> port <port-number> logging source-interface <interface>
- 將
<bindplane-server-ip>
替換為 Bindplane 代理程式 IP 位址,並將<port-number>
替換為設定的通訊埠。 - 將
<tcp/udp>
替換為 Bindplane 代理程式上設定的監聽通訊協定。例如udp
。 - 將
<interface>
替換為 Cisco 介面 ID。
- 將
輸入下列指令,設定優先順序:
logging trap Informational logging console Informational logging severity Informational
設定系統記錄設施:
logging facility local6
輸入下列指令來啟用時間戳記:
service timestamps log datetime
儲存並結束。
輸入下列指令,設定在重新啟動後仍可使用的設定:
copy running-config startup-config
UDM 對應表
記錄欄位 | UDM 對應 | 邏輯 |
---|---|---|
動作 | security_result.action_details | 這個欄位的值是從原始記錄的 action 欄位衍生而來。 |
天 | ||
說明 | metadata.description | 這個欄位的值是從原始記錄的 description 欄位衍生而來。 |
說明 | security_result.description | 這個欄位的值是從原始記錄的 description 欄位衍生而來。 |
destination_ip | target.asset.ip | 這個欄位的值是從原始記錄的 destination_ip 欄位衍生而來。 |
destination_ip | target.ip | 這個欄位的值是從原始記錄的 destination_ip 欄位衍生而來。 |
destination_port | target.port | 這個欄位的值是從原始記錄的 destination_port 欄位衍生而來。 |
裝置 | principal.asset.hostname | 這個欄位的值是從原始記錄的 device 欄位衍生而來。 |
裝置 | principal.hostname | 這個欄位的值是從原始記錄的 device 欄位衍生而來。 |
裝置 | target.asset.hostname | 這個欄位的值是從原始記錄的 device 欄位衍生而來。 |
裝置 | target.hostname | 這個欄位的值是從原始記錄的 device 欄位衍生而來。 |
device_ip | principal.asset.ip | 這個欄位的值是從原始記錄的 device_ip 欄位衍生而來。 |
device_ip | principal.ip | 這個欄位的值是從原始記錄的 device_ip 欄位衍生而來。 |
device_ip | target.asset.ip | 這個欄位的值是從原始記錄的 device_ip 欄位衍生而來。 |
device_ip | target.ip | 這個欄位的值是從原始記錄的 device_ip 欄位衍生而來。 |
機構 | principal.resource.type | 這個欄位的值是從原始記錄的 facility 欄位衍生而來。 |
header_data | metadata.product_log_id | 這個欄位的值是從原始記錄的 header_data 欄位衍生而來。 |
header_data | target.asset.ip | 這個欄位的值是從原始記錄的 header_data 欄位衍生而來。 |
header_data | target.ip | 這個欄位的值是從原始記錄的 header_data 欄位衍生而來。 |
主機名稱 | principal.asset.hostname | 這個欄位的值是從原始記錄的 hostname 欄位衍生而來。 |
主機名稱 | principal.hostname | 這個欄位的值是從原始記錄的 hostname 欄位衍生而來。 |
ip | principal.asset.ip | 這個欄位的值是從原始記錄的 ip 欄位衍生而來。 |
ip | principal.ip | 這個欄位的值是從原始記錄的 ip 欄位衍生而來。 |
ip_address | principal.asset.ip | 這個欄位的值是從原始記錄的 ip_address 欄位衍生而來。 |
ip_address | principal.ip | 這個欄位的值是從原始記錄的 ip_address 欄位衍生而來。 |
ip_protocol | network.ip_protocol | 這個欄位的值是從原始記錄的 ip_protocol 欄位衍生而來。 |
mac | principal.mac | 這個欄位的值是從原始記錄的 mac 欄位衍生而來。 |
助憶鍵 | network.dhcp.opcode | 這個欄位的值是從原始記錄的 mnemonic 欄位衍生而來。 |
助憶鍵 | metadata.product_event_type | 這個欄位的值是從原始記錄的 mnemonic 欄位衍生而來。 |
個月 | ||
p_ip | principal.asset.ip | 這個欄位的值是從原始記錄的 p_ip 欄位衍生而來。 |
p_ip | principal.ip | 這個欄位的值是從原始記錄的 p_ip 欄位衍生而來。 |
通訊埠 | target.port | 這個欄位的值是從原始記錄的 port 欄位衍生而來。 |
優先順序 | ||
通訊協定 | network.ip_protocol | 這個欄位的值是從原始記錄的 protocol 欄位衍生而來。 |
原因 | ||
規則 | security_result.rule_id | 這個欄位的值是從原始記錄的 rule 欄位衍生而來。 |
sec_result_action | security_result.action | 這個欄位的值是從原始記錄的 sec_result_action 欄位衍生而來。 |
嚴重性 | ||
來源 | principal.asset.ip | 這個欄位的值是從原始記錄的 source 欄位衍生而來。 |
來源 | principal.ip | 這個欄位的值是從原始記錄的 source 欄位衍生而來。 |
source_ip | network.dhcp.ciaddr | 這個欄位的值是從原始記錄的 source_ip 欄位衍生而來。 |
source_ip | principal.asset.ip | 這個欄位的值是從原始記錄的 source_ip 欄位衍生而來。 |
source_ip | principal.ip | 這個欄位的值是從原始記錄的 source_ip 欄位衍生而來。 |
source_mac | network.dhcp.chaddr | 這個欄位的值是從原始記錄的 source_mac 欄位衍生而來。 |
source_port | principal.port | 這個欄位的值是從原始記錄的 source_port 欄位衍生而來。 |
摘要 | security_result.summary | 這個欄位的值是從原始記錄的 summary 欄位衍生而來。 |
時間 | ||
時區 | ||
使用者 | principal.user.userid | 這個欄位的值是從原始記錄的 user 欄位衍生而來。 |
使用者 | target.user.userid | 這個欄位的值是從原始記錄的 user 欄位衍生而來。 |
時間 | ||
年 | ||
extensions.auth.type | MACHINE | |
metadata.log_type | CISCO_SWITCH | |
metadata.vendor_name | Cisco | |
metadata.product_name | Cisco 交換器 | |
network.application_protocol | DHCP | |
network.dhcp.type | 提出要求 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。