收集 BMC AMI Defender 記錄
剖析器版本:1.0
本文說明如何使用 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 規範的 syslog 訊息,並透過 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 存取權)
取得 Bindplane 代理程式的 Google SecOps 憑證
如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:
- 新部署作業:使用 Chronicle API (選項 1)。
- 舊版部署作業:在 2027 年 7 月 20 日停用 Ingestion API 前,請繼續使用擷取驗證檔案 (選項 2)。
方法 1:為 Chronicle API 建立服務帳戶 (建議)
- 登入 Google Cloud 控制台,選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
- 依序前往 「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
- 按一下「建立服務帳戶」。
- 請提供下列設定詳細資料:
- 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如
bindplane-ingest)。 - 「服務帳戶說明」:輸入說明 (例如
Bindplane agent log ingestion)。
- 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如
- 點按「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 & Admin」(IAM 與管理) >「Settings」(設定),然後複製「Project number」(專案編號)。匯出工具設定時會用到。
方法 2:下載擷取驗證檔案 (舊版)
- 登入 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
- 開啟具有 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: tcplog: listen_address: "0.0.0.0:1514" exporters: chronicle/bmc_datastream: 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: 'your-customer-id-here' endpoint: chronicle.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:在標準 syslog 通訊埠上監聽所有介面 (Linux 需有 root 權限)- 在一個介面上接聽的特定 IP 位址
匯出工具設定:
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:您的customer ID。詳情請參閱「取得 Google SecOps 客戶 ID」。location:將<LOCATION>替換為 Google SecOps 執行個體的區域 (例如us、europe或asia-southeast1)。匯出工具會在這個值前面加上chronicle.googleapis.com。如需完整清單,請參閱「區域性端點」。project:依序前往「IAM 與管理」>「設定」,然後將<PROJECT_NUMBER>替換為專案編號。endpoint:維持設為chronicle.googleapis.com。log_type:BMC_AMI_DEFENDER
UDP Syslog 設定範例
如果偏好 UDP 傳輸 (延遲時間較短,傳送後不需確認):
receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/bmc_datastream: 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: 'a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6' endpoint: chronicle.googleapis.com log_type: BMC_AMI_DEFENDER raw_log_field: body service: pipelines: logs/datastream_to_chronicle: receivers: - udplog exporters: - chronicle/bmc_datastream
舊版 Ingestion API 匯出工具
如果您使用方式 2 的擷取驗證檔案,請將
exporters區塊替換成下列內容。將creds_file_path設為擷取驗證檔案的路徑。如果執行個體位於美國境外,請將malachiteingestion-pa.googleapis.com替換為區域端點 (例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/bmc_datastream: compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: 'your-customer-id-here' endpoint: malachiteingestion-pa.googleapis.com log_type: BMC_AMI_DEFENDER raw_log_field: body
儲存設定檔
編輯完畢後,請儲存檔案:
- 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 類型:
- 如要使用標準 syslog 格式,請取消註解:
SWITCH ON(RFC 3164) - 如要使用通用事件格式,請取消註解:
SWITCH ON(CEF) - 如果是 JSON 格式,請取消註解:
SWITCH ON(JSON) - 如要使用 IBM QRadar LEEF 格式,請取消註解:
SWITCH ON(LEEF) - 如要使用 Splunk 格式,請取消註解:
SWITCH ON(Splunk)
- 如要使用標準 syslog 格式,請取消註解:
按下 F3 鍵,儲存並退出成員。
設定 Syslog 伺服器
在「Edit - Entry Panel」(編輯 - 輸入面板) 中,輸入下列內容:
- ISPF Library:輸入
'amihlq.PARM'(與先前相同)。 - Member:輸入
$$$SERVR.
- ISPF Library:輸入
Press Enter to open the member for editing.
Locate the section corresponding to your selected SIEM type. For example:
- For RFC 3164: Locate the section labeled
; RFC 3164 - For CEF: Locate the section labeled
; CEF - TRANS(TCP) Recommended - For JSON: Locate the section labeled
; JSON - TRANS(TCP) Recommended
- For RFC 3164: 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(RFC 3164) /* //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 專家尋求解答。