收集 Cisco IOS 記錄
本文說明如何使用 Bindplane 代理程式,將 Cisco Internetwork Operating System (IOS) 記錄擷取至 Google Security Operations。剖析器會將原始系統記錄訊息轉換為符合統一資料模型 (UDM) 的結構化格式。系統會先根據常見的 Cisco IOS Syslog 格式,使用 grok 模式初始化及擷取欄位。接著,它會將擷取的欄位對應至相應的 UDM 欄位、分類事件,並以額外背景資訊擴充資料,最後以 UDM 格式輸出結構化記錄。
事前準備
- 確認您擁有 Google SecOps 執行個體。
- 確認您使用的是 Windows 2016 以上版本,或是搭載
systemd
的 Linux 主機。 - 如果透過 Proxy 執行,請確認防火牆通訊埠已開啟。
- 確認你擁有 Cisco IOS 的特殊權限。
取得 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_IOS 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 IOS 上設定系統記錄
- 登入 Cisco IOS。
輸入下列指令,提升權限:
enable
輸入下列指令,切換至設定模式:
conf t
輸入下列指令:
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 syslog
儲存並結束。
輸入下列指令,設定在重新啟動後仍可使用的設定:
copy running-config startup-config
UDM 對應表
記錄欄位 | UDM 對應 | 邏輯 |
---|---|---|
AcsSessionID | network.session_id | 取自 AcsSessionID 欄位的值。 |
AcctRequest-Flags | security_result.summary | 取自 AcctRequest-Flags 欄位的值。 |
AcctRequest-Flags | security_result.action | 如果 AcctRequest-Flags 包含 Start ,請設為 ALLOW 。如果 AcctRequest-Flags 包含 Stop ,請設為 BLOCK 。 |
AuthenticationIdentityStore | additional.fields.key = AuthenticationIdentityStore , value = AuthenticationIdentityStore |
從 AuthenticationIdentityStore 欄位取得的值。 |
AuthenticationMethod | additional.fields.key = AuthenticationMethod , value = AuthenticationMethod |
從 AuthenticationMethod 欄位取得的值。 |
AuthenticationStatus | security_result.summary | 取自 AuthenticationStatus 欄位的值。 |
Authen-Method | security_result.detection_fields.key = Authen-Method , value = Authen-Method |
取自 Authen-Method 欄位的值。 |
Authen-Method | extensions.auth.type | 如果 Authen-Method 包含 TacacsPlus ,請設為 TACACS 。 |
AVPair_priv-lvl | security_result.detection_fields.key = AVPair_priv-lvl , value = AVPair_priv-lvl |
取自 AVPair_priv-lvl 欄位的值。 |
AVPair_start_time | additional.fields.key = AVPair_start_time , value = AVPair_start_time |
取自 AVPair_start_time 欄位的值。 |
AVPair_task_id | additional.fields.key = AVPair_task_id , value = AVPair_task_id |
取自 AVPair_task_id 欄位的值。 |
AVPair_timezone | additional.fields.key = AVPair_timezone , value = AVPair_timezone |
取自 AVPair_timezone 欄位的值。 |
auditid | metadata.product_log_id | 取自 auditid 欄位的值。 |
cisco_facility | 未對應至 IDM 物件。 | |
cisco_message | metadata.description | 取自 cisco_message 欄位的值。 |
cisco_mnemonic | security_result.rule_name | 取自 cisco_mnemonic 欄位的值。 |
cisco_severity | security_result.severity | 根據值對應至不同嚴重程度:0:ALERT、1:CRITICAL、2:HIGH、3:ERROR、4:MEDIUM、5:LOW、6:INFORMATIONAL、7:INFORMATIONAL。 |
cisco_severity | security_result.severity_details | 根據值對應至不同嚴重程度的詳細資料:0:System unusable 、1:Immediate action needed 、2:Critical condition 、3:Error condition 、4:Warning condition 、5:Normal but significant condition 、6:Informational message only 、7:Appears during debugging only 。 |
cisco_tag | metadata.product_event_type | 取自 cisco_tag 欄位的值。 |
cisco_tag | metadata.event_type | 根據值對應至不同事件類型:SYS-6-LOGGINGHOST_STARTSTOP、TRACK-6-STATE、SYS-3-LOGGINGHOST_FAIL、CRYPTO-4-IKMP_NO_SA、HA_EM-3-FMPD_ACTION_NOTRACK、HA_EM-3-FMPD_ERROR:GENERIC_EVENT;IPSEC-3-REPLAY_ERROR、CRYPTO-4-RECVD_PKT_INV_SPI、IPSEC-3-HMAC_ERROR、FW-6-DROP_PKT、SEC-6-IPACCESSLOGP:NETWORK_UNCATEGORIZED;CRYPTO-4-IKMP_BAD_MESSAGE、CRYPTO-6-IKMP_NOT_ENCRYPTED、CRYPTO-6-IKMP_MODE_FAILURE:STATUS_UNCATEGORIZED;SYS-5-CONFIG_I:USER_UNCATEGORIZED。 |
ClientLatency | additional.fields.key = ClientLatency , value = ClientLatency |
取自 ClientLatency 欄位的值。 |
CmdSet | additional.fields.key = CmdSet , value = CmdSet |
取自 CmdSet 欄位的值。 |
指令 | principal.process.command_line | 從指令欄位取得的值。 |
CPMSessionID | additional.fields.key = CPMSessionID , value = CPMSessionID |
取自 CPMSessionID 欄位的值。 |
說明 | metadata.description | 取自說明欄位的值。 |
DestinationIPAddress | target.asset.ip | 取自 DestinationIPAddress 欄位的值。 |
DestinationIPAddress | target.ip | 取自 DestinationIPAddress 欄位的值。 |
DestinationPort | target.port | 取自 DestinationPort 欄位的值。 |
Device_IP_Address | principal.asset.ip | 取自 Device_IP_Address 欄位的值。 |
Device_IP_Address | principal.ip | 取自 Device_IP_Address 欄位的值。 |
Device_Type | additional.fields.key = Device_Type , value = Device_Type |
取自 Device_Type 欄位的值。 |
dst_ip | target.asset.ip | 取自 dst_ip 欄位的值。 |
dst_ip | target.ip | 取自 dst_ip 欄位的值。 |
dst_port | target.port | 取自 dst_port 欄位的值。 |
dst_user | target.user.userid | 取自 dst_user 欄位的值。 |
EnableFlag | security_result.detection_fields.key = EnableFlag , value = EnableFlag |
從 EnableFlag 欄位取得的值。 |
IdentityGroup | additional.fields.key = IdentityGroup , value = IdentityGroup |
從 IdentityGroup 欄位取得的值。 |
IdentitySelectionMatchedRule | security_result.detection_fields.key = IdentitySelectionMatchedRule , value = IdentitySelectionMatchedRule |
取自 IdentitySelectionMatchedRule 欄位的值。 |
intermediary_host | intermediary.hostname | 取自 intermediary_host 欄位的值。 |
intermediary_ip | intermediary.ip | 取自 intermediary_ip 欄位的值。 |
IPSEC | additional.fields.key = IPSEC , value = IPSEC |
取自 IPSEC 欄位的值。 |
ISEPolicySetName | extensions.auth.type | 如果 ISEPolicySetName 包含 Tacacs ,請設為 TACACS 。 |
IsMachineAuthentication | additional.fields.key = IsMachineAuthentication , value = IsMachineAuthentication |
取自 IsMachineAuthentication 欄位的值。 |
IsMachineIdentity | security_result.detection_fields.key = IsMachineIdentity , value = IsMachineIdentity |
取自 IsMachineIdentity 欄位的值。 |
位置 | additional.fields.key = Location , value = Location |
取自「位置」欄位的值。 |
MatchedCommandSet | additional.fields.key = MatchedCommandSet , value = MatchedCommandSet |
從 MatchedCommandSet 欄位取得的值。 |
訊息 | 未對應至 IDM 物件。 | |
metadata_event_type | metadata.event_type | 取自 metadata_event_type 欄位的值。如果為空白或 GENERIC_EVENT ,且 principal_mid_present 和 target_mid_present 為 true,則設為 NETWORK_UNCATEGORIZED;如果 principal_userid_present 為 true,則設為 USER_UNCATEGORIZED;如果 principal_mid_present 為 true,則設為 STATUS_UPDATE;否則設為 GENERIC_EVENT。如果 Service 包含 Login ,且 principal_userid_present、principal_mid_present 和 target_mid_present 皆為 true,則設為 USER_LOGIN;如果 principal_userid_present 為 true,則設為 USER_UNCATEGORIZED。 |
Model_Name | additional.fields.key = Model_Name , value = Model_Name |
取自 Model_Name 欄位的值。 |
名稱 | additional.fields.key = Name , value = Name |
取自「名稱」欄位的值。 |
Network_Device_Profile | additional.fields.key = Network_Device_Profile , value = Network_Device_Profile |
取自 Network_Device_Profile 欄位的值。 |
NetworkDeviceGroups | additional.fields.key = NetworkDeviceGroups , value = NetworkDeviceGroups |
取自 NetworkDeviceGroups 欄位的值。 |
NetworkDeviceName | principal.asset.hostname | 取自 NetworkDeviceName 欄位的值。 |
NetworkDeviceName | principal.hostname | 取自 NetworkDeviceName 欄位的值。 |
NetworkDeviceProfileId | principal.resource.product_object_id | 取自 NetworkDeviceProfileId 欄位的值。 |
pid | principal.process.pid | 取自 pid 欄位的值。 |
通訊埠 | principal.resource.attribute.labels.key = Port , value = Port |
從「Port」欄位取得的值。 |
權限等級 | security_result.detection_fields.key = Privilege-Level , value = Privilege-Level |
取自「Privilege-Level」欄位的值。 |
product_event_type | metadata.product_event_type | 取自 product_event_type 欄位的值。 |
通訊協定 | additional.fields.key = Protocol , value = Protocol |
取自「通訊協定」欄位的值。 |
通訊協定 | network.application_protocol | 如果通訊協定為 HTTPS ,請設為 HTTPS 。 |
通訊協定 | network.ip_protocol | 如果通訊協定為 TCP 或 UDP ,請設為通訊協定的大寫值。 |
原因 | security_result.summary | 從原因欄位取得的值。 |
區域 | principal.location.country_or_region | 取自區域欄位的值。 |
Remote-Address | target.asset.ip | 從「Remote-Address」欄位取得值,並驗證該值是否為 IP 位址。 |
Remote-Address | target.ip | 從「Remote-Address」欄位取得值,並驗證該值是否為 IP 位址。 |
RequestLatency | security_result.detection_fields.key = RequestLatency , value = RequestLatency |
取自 RequestLatency 欄位的值。 |
回應 | additional.fields.key = Response , value = Response |
從「回應」欄位取得的值。 |
SelectedAccessService | security_result.action_details | 從 SelectedAccessService 欄位取得的值。 |
SelectedAuthenticationIdentityStores | security_result.detection_fields.key = SelectedAuthenticationIdentityStores , value = SelectedAuthenticationIdentityStores |
取自 SelectedAuthenticationIdentityStores 欄位的值。 |
SelectedCommandSet | additional.fields.key = SelectedCommandSet , value = SelectedCommandSet |
取自 SelectedCommandSet 欄位的值。 |
服務 | additional.fields.key = Service , value = Service |
取自「服務」欄位的值。 |
Service-Argument | additional.fields.key = Service-Argument , value = Service-Argument |
取自 Service-Argument 欄位的值。 |
嚴重性 | security_result.severity | 如果嚴重程度包含 Notice ,請設為「資訊」。 |
Software_Version | additional.fields.key = Software_Version , value = Software_Version |
取自 Software_Version 欄位的值。 |
source_facility | principal.asset.hostname | 取自 source_facility 欄位的值。 |
source_facility | principal.hostname | 取自 source_facility 欄位的值。 |
src_ip | principal.asset.ip | 取自 src_ip 欄位的值。 |
src_ip | principal.ip | 取自 src_ip 欄位的值。 |
src_mac | principal.mac | 從 src_mac 欄位取得的值,並將 . 替換為 : 。 |
src_port | principal.port | 取自 src_port 欄位的值。 |
src_user_id | principal.user.userid | 取自 src_user_id 欄位的值。如果留空,請從「使用者」欄位取值。如果仍為空白,請從 StepData_9 欄位取值。 |
src_user_name | principal.user.user_display_name | 取自 src_user_name 欄位的值。 |
步驟 | additional.fields.key = Step , value = Step |
取自「步驟」欄位的值。 |
StepData_10 | principal.asset.hostname | 取自 StepData_10 欄位的值。 |
StepData_10 | principal.hostname | 取自 StepData_10 欄位的值。 |
StepData_13 | security_result.summary | 取自 StepData_13 欄位的值。 |
StepData_14 | security_result.detection_fields.key = StepData_14 , value = StepData_14 |
取自 StepData_14 欄位的值。 |
StepData_15 | security_result.detection_fields.key = StepData_15 , value = StepData_15 |
取自 StepData_15 欄位的值。 |
StepData_20 | security_result.detection_fields.key = StepData_20 , value = StepData_20 |
取自 StepData_20 欄位的值。 |
StepData_21 | security_result.detection_fields.key = StepData_21 , value = StepData_21 |
取自 StepData_21 欄位的值。 |
StepData_3 | additional.fields.key = StepData_3 , value = StepData_3 |
取自 StepData_3 欄位的值。 |
StepData_4 | security_result.detection_fields.key = StepData_4 , value = StepData_4 |
取自 StepData_4 欄位的值。 |
StepData_6 | security_result.detection_fields.key = StepData_6 , value = StepData_6 |
取自 StepData_6 欄位的值。 |
StepData_7 | security_result.detection_fields.key = StepData_7 , value = StepData_7 |
取自 StepData_7 欄位的值。 |
StepData_8 | security_result.detection_fields.key = StepData_8 , value = StepData_8 |
取自 StepData_8 欄位的值。 |
StepData_9 | principal.user.userid | 如果 src_user_id 和 User 欄位為空白,則取自 StepData_9 欄位的值。 |
target_host | target.asset.hostname | 取自 target_host 欄位的值。 |
target_host | target.hostname | 取自 target_host 欄位的值。 |
時間戳記 | metadata.event_timestamp | 從時間戳記欄位中移除多餘空格並剖析日期後,取得的值。 |
TotalAuthenLatency | additional.fields.key = TotalAuthenLatency , value = TotalAuthenLatency |
取自 TotalAuthenLatency 欄位的值。 |
ts | metadata.event_timestamp | 剖析日期後,從 ts 欄位取得的值。 |
類型 | security_result.category_details | 取自「類型」欄位的值。 |
使用者 | principal.user.userid | 如果 src_user_id 為空白,則取自「使用者」欄位的值。 |
UserType | additional.fields.key = UserType , value = UserType |
取自 UserType 欄位的值。 |
metadata.vendor_name | 設為 CISCO 。 |
|
metadata.product_name | 設為 CISCO_IOS 。 |
|
metadata.log_type | 設為 CISCO_IOS 。 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。