收集 BMC AMI Defender 記錄
本文說明如何使用 Bindplane 代理程式,將 BMC AMI Defender 記錄擷取至 Google Security Operations。
BMC AMI Datastream for z/OS 是一種大型主機代理程式,可監控 z/OS 系統活動,並即時收集、處理及傳送系統管理設施 (SMF) 記錄至分散式 SIEM 系統。代理程式會重新格式化來自 RACF、ACF2、Top Secret、TCP/IP、CICS、IMS 和其他 z/OS 系統與應用程式事件的 SMF 記錄,使其符合 RFC 3164 規範的系統記錄訊息,並透過 UDP、TCP 或 TLS 通訊協定傳輸這些訊息。
事前準備
請確認您已完成下列事前準備事項:
- Google SecOps 執行個體
- Windows Server 2016 以上版本,或搭載
systemd的 Linux 主機 (適用於 Bindplane 代理程式) - Bindplane 代理程式主機與執行 BMC AMI Datastream 的 z/OS LPAR 之間的網路連線
- 如果透過 Proxy 執行,請確保防火牆通訊埠已根據 Bindplane 代理程式需求開啟
- 在 z/OS LPAR 上安裝並執行 BMC AMI Datastream for z/OS 6.1 以上版本
- 在 z/OS 上編輯 amihlq.PARM 資料集中的參數檔案 (通常需要 TSO/ISPF 存取權或批次工作提交授權)
- 修改 BMC AMI Datastream 設定的授權 (通常需要對參數資料集具備 RACF READ 存取權)
取得 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: tcplog: listen_address: "0.0.0.0:1514" exporters: chronicle/bmc_datastream: compression: gzip creds_file_path: '/etc/bindplane-agent/ingestion-auth.json' customer_id: 'your-customer-id-here' endpoint: malachiteingestion-pa.googleapis.com log_type: BMC_AMI_DEFENDER raw_log_field: body service: pipelines: logs/datastream_to_chronicle: receivers: - tcplog exporters: - chronicle/bmc_datastream替換下列預留位置:
接收器設定:
listen_address:要接聽的 IP 位址和通訊埠:0.0.0.0:1514,在通訊埠 1514 上監聽所有介面 (建議用於 Linux 非根目錄)0.0.0.0:514,在標準系統記錄通訊埠上監聽所有介面 (需要 Linux 上的根目錄)- 在一個介面上接聽的特定 IP 位址
匯出工具設定:
creds_file_path:擷取驗證檔案的完整路徑:- Linux:
/etc/bindplane-agent/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
customer_id:您的customer ID。詳情請參閱「取得 Google SecOps 客戶 ID」。endpoint:區域端點網址:- 美國:
malachiteingestion-pa.googleapis.com - 歐洲:
europe-malachiteingestion-pa.googleapis.com - 亞洲:
asia-southeast1-malachiteingestion-pa.googleapis.com - 如需完整清單,請參閱「區域端點」
- 美國:
log_type:BMC_AMI_DEFENDER
UDP Syslog 的設定範例
如果偏好使用 UDP 傳輸 (延遲時間較短,且可直接傳送):
receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/bmc_datastream: compression: gzip creds_file_path: '/etc/bindplane-agent/ingestion-auth.json' customer_id: 'a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6' endpoint: malachiteingestion-pa.googleapis.com log_type: BMC_AMI_DEFENDER raw_log_field: body service: pipelines: logs/datastream_to_chronicle: receivers: - udplog exporters: - chronicle/bmc_datastream
儲存設定檔
編輯完成後,請儲存檔案:
- Linux:依序按下
Ctrl+O、Enter和Ctrl+X - Windows:依序點選「檔案」>「儲存」
重新啟動 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"
設定 BMC AMI Defender Syslog 轉送
使用 TSO/ISPF 編輯參數檔案
- 在安裝 BMC AMI Datastream 的 z/OS LPAR 上登入 TSO/ISPF。
- 在「ISPF Primary Option Menu」中輸入 2,選取「EDIT」。
在「Edit - Entry Panel」(編輯 - 進入面板) 中,輸入下列內容:
- ISPF 程式庫:以
'amihlq.PARM'格式輸入參數資料集名稱,其中 amihlq 是安裝期間選擇的高階限定詞 (例如'PROD.CZAGENT.PARM')。 - 成員:輸入
$$$CONFG.
- ISPF 程式庫:以
Press Enter to open the member for editing.
Configure the SIEM type
- In the
$$$CONFGmember,找出標示為「Switches for setting the SIEM type」(用於設定 SIEM 類型的切換開關) 的部分。 從適當的行中移除開頭的分號,取消註解其中一個 SIEM 類型:
- 如要使用標準系統記錄格式,請取消註解:
SWITCH ON(RFC3164) - 如為通用事件格式,請取消註解:
SWITCH ON(CEF) - 如果是 JSON 格式,請取消註解:
SWITCH ON(JSON) - 如為 IBM QRadar LEEF 格式,請取消註解:
SWITCH ON(LEEF) - 如要使用 Splunk 格式,請取消註解:
SWITCH ON(Splunk)
- 如要使用標準系統記錄格式,請取消註解:
按下 F3 鍵,儲存並退出成員。
設定系統記錄伺服器
在「Edit - Entry Panel」(編輯 - 進入面板) 中,輸入下列內容:
- ISPF 程式庫:輸入
'amihlq.PARM'(與先前相同)。 - 成員:輸入
$$$SERVR.
- ISPF 程式庫:輸入
Press Enter to open the member for editing.
Locate the section corresponding to your selected SIEM type. For example:
- For RFC3164: Locate the section labeled
; RFC3164 - For CEF: Locate the section labeled
; CEF - TRANS(TCP) Recommended - For JSON: Locate the section labeled
; JSON - TRANS(TCP) Recommended
- For RFC3164: Locate the section labeled
Uncomment the SERVER statement by removing the leading semicolon.
Edit the SERVER statement with the following values:
- Replace
ip.addr.examplewith the IP address of the Bindplane agent host (for example,192.168.1.100). If using TCP (recommended), the statement should look like:
SERVER 192.168.1.100:1514 TRANS(TCP) MAXMSG(2000)If using UDP, the statement should look like:
SERVER 192.168.1.100:514 TRANS(UDP) MAXMSG(2000)
- Replace
If you selected CEF, JSON, or Splunk format and are using TCP transport, locate the OPTIONS statement section and uncomment the FRAMING parameter:
OPTIONS FRAMING(OCTETCOUNT)Press F3 to save and exit the member.
Refresh the BMC AMI Datastream configuration
- From the ISPF Primary Option Menu, enter 6 to select COMMAND.
On the TSO Command Processor screen, enter the following MVS console command:
F czagentname,PARMSReplace
czagentnamewith the name of the BMC AMI Datastream started task (typicallyCZAGENTor the instance name configured during installation).Press Enter to execute the command.
Verify the configuration was refreshed by checking the system log for message CZA0001I indicating the parameter file was successfully processed.
Verify syslog transmission
- From the ISPF Primary Option Menu, enter 6 to select COMMAND.
Enter the following command to display BMC AMI Datastream statistics:
F czagentname,STATSPress Enter to execute the command.
Check the system log for message CZA0350I showing the number of messages sent to the syslog server.
Verify the Bindplane agent is receiving messages by checking the Bindplane agent logs:
- Linux:
sudo journalctl -u observiq-otel-collector -f - Windows: Check
C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log
- Linux:
Alternative: Edit parameter file using batch job
If you do not have TSO/ISPF access, you can edit the parameter files using a batch job:
Create a batch job with the following JCL:
//EDITPARM JOB (ACCT),'EDIT DATASTREAM PARMS', // CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID //STEP1 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD * SWITCH ON(RFC3164) /* //SYSUT2 DD DSN=amihlq.PARM($$$CONFG),DISP=SHR //STEP2 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD * SERVER 192.168.1.100:1514 TRANS(TCP) MAXMSG(2000) /* //SYSUT2 DD DSN=amihlq.PARM($$$SERVR),DISP=SHR將
amihlq替換為 BMC AMI Datastream 安裝的高階限定符。將
192.168.1.100:1514替換為 Bindplane 代理程式主機的 IP 位址和通訊埠。提交工作並確認順利完成 (回傳代碼 0)。
發出 MODIFY 指令,按照上一節的說明重新整理設定。
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
| aceeadsp | security_result.detection_fields | 用於判斷安全結果的欄位 |
| aceeaudt | security_result.detection_fields | 用於判斷安全結果的欄位 |
| aceeflg1 | security_result.detection_fields | 用於判斷安全結果的欄位 |
| aceelogu | security_result.detection_fields | 用於判斷安全結果的欄位 |
| aceeoper | security_result.detection_fields | 用於判斷安全結果的欄位 |
| aceepriv | security_result.detection_fields | 用於判斷安全結果的欄位 |
| aceeracf | security_result.detection_fields | 用於判斷安全結果的欄位 |
| aceeroa | security_result.detection_fields | 用於判斷安全結果的欄位 |
| aceespec | security_result.detection_fields | 用於判斷安全結果的欄位 |
| additional.fields | additional.fields | 事件的其他資訊 |
| 授權 | security_result.detection_fields | 用於判斷安全結果的欄位 |
| auth_audit | security_result.detection_fields | 用於判斷安全結果的欄位 |
| auth_bypass | security_result.detection_fields | 用於判斷安全結果的欄位 |
| auth_exit | security_result.detection_fields | 用於判斷安全結果的欄位 |
| auth_normal | security_result.detection_fields | 用於判斷安全結果的欄位 |
| auth_oper | security_result.detection_fields | 用於判斷安全結果的欄位 |
| auth_soft | security_result.detection_fields | 用於判斷安全結果的欄位 |
| auth_special | security_result.detection_fields | 用於判斷安全結果的欄位 |
| auth_trusted | security_result.detection_fields | 用於判斷安全結果的欄位 |
| authinfo | security_result.description | 安全性結果說明 |
| 事件 | metadata.product_event_type | 產品專屬事件類型 |
| event_type | metadata.event_type | 事件類型 (例如USER_LOGIN、NETWORK_CONNECTION) |
| eventdesc | metadata.description | 事件說明 |
| 群組 | additional.fields | 事件的其他資訊 |
| 主機名稱 | principal.hostname、principal.asset.hostname | 主體主機名稱、資產主機名稱 |
| jobid | security_result.detection_fields | 用於判斷安全結果的欄位 |
| jobnm | additional.fields | 事件的其他資訊 |
| jsauth | security_result.detection_fields | 用於判斷安全結果的欄位 |
| 名稱 | principal.user.user_display_name | 使用者的顯示名稱 |
| pgm | security_result.detection_fields | 用於判斷安全結果的欄位 |
| privstatd | security_result.detection_fields | 用於判斷安全結果的欄位 |
| reas_always | security_result.detection_fields | 用於判斷安全結果的欄位 |
| reas_audit | security_result.detection_fields | 用於判斷安全結果的欄位 |
| reas_cmdviol | security_result.detection_fields | 用於判斷安全結果的欄位 |
| reas_globalaudit | security_result.detection_fields | 用於判斷安全結果的欄位 |
| reas_setropts | security_result.detection_fields | 用於判斷安全結果的欄位 |
| reas_special | security_result.detection_fields | 用於判斷安全結果的欄位 |
| reas_user | security_result.detection_fields | 用於判斷安全結果的欄位 |
| reas_verify | security_result.detection_fields | 用於判斷安全結果的欄位 |
| rtype | additional.fields | 事件的其他資訊 |
| saf | additional.fields | 事件的其他資訊 |
| safd | additional.fields | 事件的其他資訊 |
| security_result.detection_fields | security_result.detection_fields | 用於判斷安全結果的欄位 |
| 嚴重性 | security_result.severity、security_result.severity_details | 安全結果的嚴重程度、詳細嚴重程度資訊 |
| sid | additional.fields | 事件的其他資訊 |
| 時間戳記 | metadata.event_timestamp | 事件發生的時間戳記 |
| tokflg1 | security_result.detection_fields | 用於判斷安全結果的欄位 |
| tokflg3 | security_result.detection_fields | 用於判斷安全結果的欄位 |
| tokpriv | security_result.detection_fields | 用於判斷安全結果的欄位 |
| toksus | security_result.detection_fields | 用於判斷安全結果的欄位 |
| tokudus | security_result.detection_fields | 用於判斷安全結果的欄位 |
| userid | principal.user.userid | 使用者 ID |
| 違規 | security_result.detection_fields | 用於判斷安全結果的欄位 |
| user_warning | security_result.detection_fields | 用於判斷安全結果的欄位 |
| worktyped | additional.fields | 事件的其他資訊 |
| metadata.product_name | 產品名稱 | |
| metadata.vendor_name | 供應商/公司名稱 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。