收集 Imperva FlexProtect 記錄
本文說明如何使用 Bindplane 代理程式,將 Imperva FlexProtect 記錄檔擷取至 Google Security Operations。
剖析器會從 CEF (通用事件格式) 的 Imperva FlexProtect Syslog 格式記錄中,擷取含有鍵/值擴充功能的欄位。它會使用 grok 和/或 kv 剖析 CEF 訊息,然後將這些值對應至統一資料模型 (UDM)。並設定事件來源和類型的預設中繼資料值。Imperva FlexProtect 可在混合雲環境中彈性部署 Imperva 安全性解決方案 (SecureSphere、Cloud WAF、Bot Protection)。
事前準備
請確認您已完成下列事前準備事項:
- Google SecOps 執行個體
- 搭載
systemd的 Windows 2016 以上版本或 Linux 主機 - 如果透過 Proxy 執行,請確保防火牆通訊埠已根據 Bindplane 代理程式需求開啟
- 有權存取 Imperva FlexProtect 管理控制台或個別產品控制台
取得 Bindplane 代理程式的 Google SecOps 憑證
如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:
- 新部署作業:使用 Chronicle API (選項 1)。
- 舊版部署作業:繼續使用擷取驗證檔案 (選項 2),直到 Ingestion API 於 2027 年 7 月 20 日停用。
方法 1:為 Chronicle API 建立服務帳戶 (建議)
- 登入 Google Cloud 控制台,然後選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
- 依序前往 「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
- 按一下「建立服務帳戶」。
- 請提供下列設定詳細資料:
- 服務帳戶名稱:輸入帳戶名稱 (例如
bindplane-ingest)。 - 「服務帳戶說明」:輸入說明 (例如
Bindplane agent log ingestion)。
- 服務帳戶名稱:輸入帳戶名稱 (例如
- 點按「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 Settings」 > 「Collection Agents」。
- 下載擷取驗證檔案。
- 將檔案安全地儲存在要安裝 Bindplane 代理程式的系統上。
取得 Google SecOps 客戶 ID
- 登入 Google SecOps 控制台。
- 依序前往「SIEM Settings」(SIEM 設定) >「Profile」(設定檔)。
- 複製並儲存「機構詳細資料」專區中的「客戶 ID」。
安裝 Bindplane 代理程式
請按照下列操作說明,在 Windows 或 Linux 作業系統上安裝 Bindplane 代理程式。
Windows 安裝
- 以管理員身分開啟命令提示字元或 PowerShell。
執行下列指令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
安裝 Linux
- 開啟具有 root 或 sudo 權限的終端機。
執行下列指令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
其他安裝資源
如需其他安裝選項,請參閱 Bindplane 代理程式安裝指南。
設定 Bindplane 代理,擷取系統記錄檔並傳送至 Google SecOps
存取設定檔:
- 找出
config.yaml檔案。通常位於 Linux 的/opt/observiq-otel-collector/目錄,或 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: 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 # Adjust the path to the credentials file you downloaded in Step 1 creds_file_path: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: <CUSTOMER_ID> endpoint: chronicle.googleapis.com # Add optional ingestion labels for better organization log_type: 'IMPERVA_FLEXPROTECT' raw_log_field: body ingestion_labels: service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels- 視基礎架構需求更換連接埠和 IP 位址。
- 將
<LOCATION>替換為 Google SecOps 執行個體的區域 (例如us、europe或asia-southeast1)。匯出工具會在這個值前面加上chronicle.googleapis.com。 - 將
<PROJECT_NUMBER>替換為「IAM 與管理」>「設定」中的專案編號。 - 將
<CUSTOMER_ID>替換為實際的客戶 ID。 - 將
/path/to/ingestion-authentication-file.json更新為步驟 1 中儲存服務帳戶金鑰檔案 (選項 1) 的檔案路徑。
舊版擷取 API 匯出工具
如果您使用選項 2 的擷取驗證檔案,請將
exporters區塊替換為下列內容。將creds_file_path設為擷取驗證檔案的路徑。如果執行個體位於美國境外,請將malachiteingestion-pa.googleapis.com替換為區域端點 (例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/chronicle_w_labels: compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds_file_path: '/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 log_type: 'IMPERVA_FLEXPROTECT' raw_log_field: body ingestion_labels:
重新啟動 Bindplane 代理程式,套用變更
如要在 Linux 中重新啟動 Bindplane 代理程式,請執行下列指令:
sudo systemctl restart observiq-otel-collector如要在 Windows 中重新啟動 Bindplane 代理程式,可以使用「服務」控制台,也可以輸入下列指令:
net stop observiq-otel-collector && net start observiq-otel-collector
在 Imperva FlexProtect 設定 Syslog 轉送
SecureSphere 元件 (地端部署/雲端)
- 登入 Imperva SecureSphere 管理主控台。
- 依序前往「設定」「動作組合」。
- 按一下「新增」,建立新的動作組合。
按一下「Add Action」,然後提供下列設定詳細資料:
- 名稱:輸入描述性名稱 (例如
Google SecOps Syslog)。 - 動作類型:選取「Syslog」。
- 主機:輸入 Bindplane 代理程式 IP 位址。
- 通訊埠:輸入 Bindplane 代理程式通訊埠編號 (預設為 514)。
- 「通訊協定」:選取「UDP」或「TCP」。
- Syslog Log Level:選取「DEBUG」。
- Syslog Facility:選取「LOCAL0」。
- 格式:選取「CEF」 (通用事件格式)。
- 名稱:輸入描述性名稱 (例如
儲存動作設定,並套用至相關安全性政策。
Cloud WAF/Incapsula 元件
- 登入 Imperva Cloud 控制台。
- 依序前往「記錄」>「記錄設定」。
- 設定 syslog 目的地:
- 主機:輸入 Bindplane 代理程式 IP 位址。
- 通訊埠:輸入 Bindplane 代理程式通訊埠編號 (預設為 514)。
- 「通訊協定」:選取「UDP」或「TCP」。
- 格式:選取「CEF」。
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
| act | read_only_udm.security_result.action_details | 直接從 act 欄位對應。 |
| 應用程式 | read_only_udm.network.application_protocol | 直接從 app 欄位對應。 |
| ccode | read_only_udm.principal.location.country_or_region | 直接從 ccode 欄位對應。 |
| cicode | read_only_udm.principal.location.city | 直接從「cicode」欄位對應。 |
| cn1 | read_only_udm.network.http.response_code | 轉換為整數後,直接從 cn1 欄位對應。 |
| cs1 | read_only_udm.additional.fields.value.string_value | 直接從 cs1 欄位對應。 |
| cs2 | read_only_udm.additional.fields.value.string_value | 直接從「cs2」欄位對應。 |
| cs3 | read_only_udm.additional.fields.value.string_value | 直接從 cs3 欄位對應。 |
| cs4 | read_only_udm.additional.fields.value.string_value | 直接從 cs4 欄位對應。 |
| cs5 | read_only_udm.additional.fields.value.string_value | 直接從「cs5」欄位對應。 |
| cs6 | read_only_udm.additional.fields.value.string_value | 直接從「cs6」欄位對應。 |
| cs7 | read_only_udm.additional.fields.value.string_value | 直接從「cs7」欄位對應。 |
| cs8 | read_only_udm.additional.fields.value.string_value | 直接從「cs8」欄位對應。 |
| cs9 | read_only_udm.additional.fields.value.string_value | 直接從「cs9」欄位對應。 |
| cpt | read_only_udm.principal.port | 轉換為整數後,直接從 cpt 欄位對應。 |
| 客戶 | read_only_udm.principal.user.user_display_name | 直接從 Customer 欄位對應。 |
| deviceExternalId | read_only_udm.about.asset.asset_id | 這個值是將「Incapsula.SIEMintegration:」與 deviceExternalId 欄位串連而成。 |
| deviceFacility | read_only_udm.principal.location.city | 直接從「deviceFacility」欄位對應。 |
| dproc | read_only_udm.target.process.command_line | 直接從 dproc 欄位對應。 |
| 結束 | read_only_udm.security_result.detection_fields.value | 直接從 end 欄位對應。 |
| fileId | read_only_udm.network.session_id | 直接從 fileId 欄位對應。 |
| filePermission | read_only_udm.about.resource.attribute.permissions.name | 直接從「filePermission」欄位對應。 |
| 在 | read_only_udm.network.received_bytes | 直接從 in 欄位對應。 |
| qstr | read_only_udm.security_result.detection_fields.value | 直接從 qstr 欄位對應。 |
| 要求 | read_only_udm.target.url | 直接從 request 欄位對應。 |
| requestClientApplication | read_only_udm.network.http.user_agent | 直接從 requestClientApplication 欄位對應。 |
| requestMethod | read_only_udm.network.http.method | 直接從 requestMethod 欄位對應。 |
| siteid | read_only_udm.security_result.detection_fields.value | 直接從 siteid 欄位對應。 |
| sip | read_only_udm.target.ip | 直接從 sip 欄位對應。 |
| sourceServiceName | read_only_udm.principal.application | 直接從 sourceServiceName 欄位對應。 |
| spt | read_only_udm.target.port | 轉換為整數後,直接從 spt 欄位對應。 |
| src | read_only_udm.principal.ip | 直接從 src 欄位對應。 |
| 開始 | read_only_udm.security_result.detection_fields.value | 直接從 start 欄位對應。 |
| suid | read_only_udm.principal.user.userid | 直接從 suid 欄位對應。 |
| ver | read_only_udm.network.tls.version | 直接從 ver 欄位對應。 |
| read_only_udm.about.asset.asset_id | 這個值是將「Incapsula.SIEMintegration:」與 deviceExternalId 欄位串連而成。 |
|
| read_only_udm.additional.fields.key | 值是由剖析器邏輯根據欄位標籤決定,例如: - cs1Label 對應至「Cap Support」- cs2Label 對應至「Javascript Support」- cs3Label 對應至「CO Support」- cs4Label 對應至「VID」- cs5Label 對應至「clappsig」- cs6Label 對應至「clapp」- cs7Label 對應至「latitude」- cs8Label 對應至「longitude」- cs9Label 對應至「Rule name」 |
|
| read_only_udm.metadata.event_timestamp.nanos | 直接從「collection_time.nanos」欄位對應。 |
|
| read_only_udm.metadata.event_timestamp.seconds | 直接從「collection_time.seconds」欄位對應。 |
|
| read_only_udm.metadata.event_type | 這個值取決於 src 和 sip 欄位是否存在:- 如果兩者都存在,值會設為「NETWORK_HTTP」。 :如果只有 src,值會設為「USER_UNCATEGORIZED」。- 否則,值會設為「GENERIC_EVENT」。 |
|
| read_only_udm.metadata.product_event_type | 這個值是串連「[」、索引 4 的 CEF 標頭欄位數值、「] - 」和索引 4 的 CEF 標頭欄位文字說明而得。 | |
| read_only_udm.metadata.product_name | 值會靜態設為「SIEMintegration」。 | |
| read_only_udm.metadata.product_version | 值會靜態設為「1」。 | |
| read_only_udm.metadata.vendor_name | 值會靜態設為「Incapsula」。 | |
| read_only_udm.security_result.detection_fields.key | 根據處理的對應欄位,值會靜態設為「siteid」、「event_start_time」、「event_end_time」或「qstr」。 | |
| read_only_udm.security_result.severity | 值會靜態設為「LOW」。 | |
| read_only_udm.target.port | 轉換為整數後,直接從 spt 欄位對應。 |
|
qstr |
security_results.detection_fields |
從變更記錄對應 |
siteid |
security_results.detection_fields |
從變更記錄對應 |
device_facility |
principal.location.city |
從變更記錄對應 |
start |
security_result.detection_fields.event_start_time |
從變更記錄對應 |
cs8Label |
additional_cs8.key |
從變更記錄對應 |
cs8 |
additional_cs8.value.string_value |
從變更記錄對應 |
cs9Label |
additional_cs9.key |
從變更記錄對應 |
cs9 |
additional_cs9.value.string_value |
從變更記錄對應 |
end |
security_result.detection_fields.event_end_time |
從變更記錄對應 |
變更記錄
還有其他問題嗎?向社群成員和 Google SecOps 專家尋求解答。