收集 F5 BIG-IP ASM 記錄
本文說明如何使用 Bindplane,將 F5 BIG-IP Application Security Manager (ASM) 記錄檔擷取至 Google Security Operations。剖析器會處理各種記錄格式 (syslog、CSV、CEF 等),並將其正規化為 UDM。這個剖析器會使用 grok 模式和鍵/值擷取功能剖析欄位、使用 XML 篩選功能擷取違規詳細資料、使用條件邏輯分類事件及對應嚴重程度,並將擷取的欄位合併至 UDM 結構定義。
事前準備
- 確認您有 Google Security Operations 執行個體。
- 請確認您使用的是 Windows 2016 以上版本,或搭載
systemd的 Linux 主機。 - 如果是在 Proxy 後方執行,請確認防火牆通訊埠已開啟。
- 確認您具備 F5 BIG-IP ASM 的特殊權限存取權。
取得 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 Settings」 > 「Collection Agents」。
- 下載擷取驗證檔案。
- 將檔案安全地儲存在要安裝 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 安裝
- 開啟具有 root 或 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 的/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: '/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 ingestion_labels: log_type: F5_ASM raw_log_field: body 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) 在「取得 Bindplane 代理程式的 Google SecOps 憑證」一節中儲存的路徑。
舊版 Ingestion API 匯出工具
如果您使用方式 2 的擷取驗證檔案,請將
exporters區塊替換成下列內容。將creds設為擷取驗證檔案的路徑。如果執行個體位於美國境外,請將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: '/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: F5_ASM raw_log_field: body
重新啟動 Bindplane 代理程式,套用變更
如要在 Linux 中重新啟動 Bindplane 代理程式,請執行下列指令:
sudo systemctl restart bindplane-agent如要在 Windows 重新啟動 Bindplane 代理程式,可以使用「服務」控制台,或輸入下列指令:
net stop BindPlaneAgent && net start BindPlaneAgent
在 F5 BIG-IP ASM 上設定遠端記錄功能
- 登入 ASM 控制台網頁版使用者介面。
- 依序前往「安全性」>「事件記錄」>「記錄設定檔」。
- 點選「建立」。
提供下列設定詳細資料:
- 設定檔名稱:輸入設定檔的專屬名稱。
- 選取「應用程式安全性」。
- 在「Application Security」(應用程式安全防護) 分頁,選取「Advanced」(進階) (如需其他設定)。
- 儲存目的地:選取「遠端儲存空間」。
- 記錄格式:選取「Common Event Format (CEF)」。
- 清除「本機存放區」。
- 「通訊協定」:選取「UDP」或「TCP」 (視 Bindplane 代理程式設定而定)。
- 伺服器位址:輸入 Bindplane 代理程式 IP 位址。
- 通訊埠:預設選取
514。根據 Bindplane 代理程式設定更新通訊埠設定。 - 按一下「新增」。
- 選取「保證記錄」。
- 選取「回報偵測到的異常狀況」。
- 設施:選取
LOG_LOCAL6(您可以視需要選取已記錄流量的設施類別,可能值為LOG_LOCAL0至LOG_LOCAL7)。
按一下「完成」。
將記錄設定檔與安全性政策建立關聯
- 依序點選「Local Traffic」 > 「Virtual Servers」。
- 按一下安全政策使用的虛擬伺服器名稱。
- 在「安全性」選單中,選取「政策」。
- 確認「應用程式安全政策」設定已「啟用」,且「政策」已設為您要的安全政策。
- 確認「記錄設定檔」設定已設為「啟用」。
- 從「Available」(可用) 清單中,選取要用於安全性政策的設定檔,然後移至「Selected」(已選取) 清單。
- 按一下「Update」。
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
act |
security_result.action |
如果 act 為 blocked,則對應至 BLOCK。如果 act 是 passed 或 legal,請將其對應至 ALLOW。如果 act 包含 alerted,則對應至 QUARANTINE。否則,Splunk 格式預設為 ALLOW。 |
app |
network.application_protocol |
如果原始記錄中含有 HTTPS,則會直接對應至 HTTPS。 |
attack_type |
security_result.category_details、metadata.description |
與其他欄位搭配使用,可判斷 security_result.category。如果沒有其他說明,則會成為事件說明。如果是 Splunk 格式的記錄,系統會使用此欄位判斷類別和摘要 (如果 violations 為空白)。 |
client_ip |
principal.ip、principal.asset.ip |
直接對應至主體 IP。 |
cn1 |
network.http.response_code |
直接對應至 HTTP 回應代碼。 |
cn2 |
security_result.severity_details |
直接對應至安全性結果嚴重程度詳細資料。與 response_code 搭配使用,判斷事件是否為警告。 |
column1 |
principal.ip、principal.asset.ip |
對應至特定 CSV 格式記錄的主體 IP。 |
column2 |
target.port |
對應至特定 CSV 格式記錄的目標通訊埠。 |
column3 |
target.ip、target.asset.ip |
對應特定 CSV 格式記錄的目標 IP。 |
column4 |
security_result.severity |
對應至特定 CSV 格式記錄的安全性結果嚴重性。值 Information、Informational、0、4 會對應至「參考資訊」。Warning、1、3 對應至「中」。Error、2 對應至 ERROR。Critical、CRITICAL、critical 對應至 CRITICAL。 |
column7 |
security_result.detection_fields、network.http.response_code |
包含 XML 資料。系統會擷取 request-violations 中的 viol_name,並以鍵 Request Violation Name_index 新增為偵測欄位。系統會擷取 response_violations 中的 viol_name,並新增為鍵為 Response Violation Name_index 的偵測欄位。response_violations 中的 response_code 對應至 network.http.response_code。 |
column8 |
security_result.rule_name |
對應特定 CSV 格式記錄的安全性結果規則名稱。 |
cs1 |
security_result.rule_name |
直接對應至安全性結果規則名稱。 |
cs2 |
security_result.summary |
直接對應至安全性結果摘要。 |
cs5 |
principal.ip、principal.asset.ip、additional.fields |
如果 cs5 包含 JNDI LDAP 網址,則會新增為具有鍵 JNDI_LDAP_URL 的額外欄位。如果包含以半形逗號分隔的 IP,則與 principal_ip 不同的任何 IP 都會新增為額外的主要 IP。 |
cs6 |
principal.location.country_or_region |
直接對應至主要地點的國家/地區。 |
data |
network.session_id、network.sent_bytes、network.tls.version |
如有,則剖析為 JSON,以擷取 sessionid、bits (對應至 sent_bytes) 和 version。 |
date_time |
metadata.event_timestamp |
剖析並轉換為正確格式後,直接對應至事件時間戳記。 |
dest_ip |
target.ip、target.asset.ip |
直接對應至目標 IP。 |
dest_port |
target.port |
直接對應至目標通訊埠。 |
dhost |
target.hostname |
直接對應至目標主機名稱。 |
dpt |
target.port |
直接對應至目標通訊埠。 |
dst |
target.ip |
直接對應至目標 IP。 |
dvc |
intermediary.ip |
直接對應至中介 IP。 |
dvchost |
target.hostname、intermediary.hostname |
直接對應至目標主機名稱和中介主機名稱。 |
errdefs_msgno |
additional.fields |
新增為額外欄位,鍵為 errdefs_msgno。 |
externalId |
additional.fields |
新增為額外欄位,鍵為 Support_Id。 |
f5_host |
target.hostname、intermediary.hostname |
直接對應至目標主機名稱和中介主機名稱。 |
geo_info |
principal.location.country_or_region、security_result.detection_fields |
對應至主要地點的國家/地區。也會新增為偵測欄位,並使用鍵 geo_info。 |
host |
target.hostname |
直接對應至目標主機名稱。 |
ids |
additional.fields |
剖析為以半形逗號分隔的支援 ID 清單。每個 ID 都會新增至鍵為 supportid 的清單值額外欄位。 |
ip_addr_intelli |
security_result.detection_fields |
以鍵 ip_addr_intelli 新增為偵測欄位。 |
ip_client |
principal.ip |
直接對應至主體 IP。 |
ip_route_domain |
principal.ip、principal.asset.ip |
系統會擷取 IP 部分,並對應至主體 IP。 |
irule |
security_result.rule_name |
直接對應至安全性結果規則名稱。 |
irule-version |
security_result.rule_version |
直接對應至安全性結果規則版本。 |
level |
security_result.severity、security_result.severity_details |
用於判斷安全結果的嚴重程度。error 或 warning 對應至 HIGH。notice 會對應至中等。information 或 info 對應至「低」。原始值也會對應至 severity_details。 |
logtime |
metadata.event_timestamp |
直接對應剖析後的事件時間戳記。 |
management_ip_address、management_ip_address_2 |
intermediary.ip |
直接對應至中介 IP。 |
method |
network.http.method |
直接對應至 HTTP 方法。 |
msg |
security_result.summary、metadata.description |
直接對應部分記錄格式的安全結果摘要。如果沒有其他說明,則會成為事件說明。 |
policy_name |
security_result.about.resource.name、security_result.rule_name |
直接對應至安全性結果資源名稱或規則名稱。 |
process |
target.application |
直接對應至目標應用程式。 |
process_id |
principal.process.pid |
直接對應至主體程序 ID。 |
protocol |
network.application_protocol、network.ip_protocol、app_protocol |
視記錄格式而定,直接對應至應用程式通訊協定或 IP 通訊協定。 |
proxy_id |
security_result.rule_id |
直接對應至安全性結果規則 ID。 |
query_string |
additional.fields |
以鍵 query_string 新增為額外欄位。 |
referrer |
network.http.referral_url |
直接對應至 HTTP 參照網址。 |
req_method |
network.http.method |
直接對應至 HTTP 方法。 |
req_status |
security_result.action、security_result.action_details、security_result.detection_fields |
如果為 blocked,則將 security_result.action 對應至 BLOCK。如果 passed 或 legal,則對應至 ALLOW。如果包含 alerted,則對應至「隔離」。原始值也會對應至 action_details,並以索引鍵 req_status 新增為偵測欄位。 |
request |
target.url |
直接對應至目標網址。 |
requestMethod |
network.http.method |
直接對應至 HTTP 方法。 |
resp |
security_result.detection_fields |
已新增為偵測欄位,鍵為 resp。 |
resp_code |
network.http.response_code |
直接對應至 HTTP 回應代碼。 |
response |
security_result.summary |
直接對應至安全性結果摘要。 |
response_code |
network.http.response_code |
直接對應至 HTTP 回應代碼。 |
route_domain |
additional.fields |
以鍵 route_domain 新增為額外欄位。 |
rt |
metadata.event_timestamp |
直接對應剖析後的事件時間戳記。 |
sev |
security_result.severity、security_result.severity_details |
用於判斷安全性結果的嚴重程度。ERROR 對應至 ERROR。原始值也會對應至 severity_details。 |
severity |
security_result.severity、security_result.severity_details |
用於判斷安全結果的嚴重程度。Informational 對應至 LOW,Error 或 warning 對應至 HIGH,critical 對應至 CRITICAL,notice 對應至 MEDIUM,information 或 info 對應至 LOW。原始值也會對應至 severity_details。 |
sig_ids |
security_result.rule_id |
直接對應至安全性結果規則 ID。 |
sig_names |
security_result.rule_name |
直接對應至安全性結果規則名稱。 |
snat_ip |
principal.nat_ip |
直接對應至主要 NAT IP。 |
snat_port |
principal.nat_port |
直接對應至主要 NAT 連接埠。 |
src |
principal.ip、principal.asset.ip |
直接對應至主體 IP。 |
spt |
principal.port |
直接對應至主體通訊埠。 |
sub_violates |
security_result.about.resource.attribute.labels |
已新增為安全性結果資源屬性的標籤,鍵為 Sub Violations。 |
sub_violations |
security_result.about.resource.attribute.labels |
已新增為安全性結果資源屬性的標籤,鍵為 Sub Violations。 |
summary |
security_result.summary |
直接對應至安全性結果摘要。 |
support_id |
metadata.product_log_id |
前置字元為 support_id -,並對應至產品記錄 ID。 |
suid |
network.session_id |
直接對應至網路工作階段 ID。 |
suser |
principal.user.userid |
直接對應至主體使用者 ID。 |
timestamp |
metadata.event_timestamp |
解析並轉換為正確格式後,直接對應至事件時間戳記。 |
unit_host |
principal.hostname、principal.asset.hostname |
直接對應至主體主機名稱。 |
uri |
principal.url |
直接對應至主要網址。 |
user_id |
principal.user.userid |
直接對應至主體使用者 ID。 |
user_name |
principal.user.user_display_name |
直接對應至主體使用者顯示名稱。 |
username |
principal.user.userid |
直接對應至主體使用者 ID。 |
useragent |
network.http.user_agent、network.http.parsed_user_agent |
直接對應至 HTTP 使用者代理程式。也會剖析並對應至剖析的使用者代理程式。 |
virtualserver |
network.tls.client.server_name |
直接對應至 TLS 用戶端伺服器名稱。 |
violate_details |
security_result.detection_fields、network.http.response_code |
包含 XML 資料。系統會擷取 request-violations 中的 viol_name,並以鍵 Request Violation Name_index 新增為偵測欄位。系統會擷取 response_violations 中的 viol_name,並新增為鍵為 Response Violation Name_index 的偵測欄位。response_violations 中的 response_code 對應至 network.http.response_code。 |
violate_rate |
security_result.detection_fields |
已新增為偵測欄位,鍵為 violate_rate。 |
violation_rating |
security_result.about.resource.attribute.labels |
以 Violations Rating 金鑰標籤的形式新增至安全性結果資源屬性。 |
violations |
security_result.description |
直接對應至安全性結果說明。如果是 Splunk 格式的記錄,則會用於判斷摘要 (如有)。 |
virus_name |
security_result.threat_name |
直接對應至安全結果威脅名稱。 |
vs_name |
network.tls.client.server_name |
直接對應至 TLS 用戶端伺服器名稱。 |
websocket_direction |
network.direction |
如果 clientToServer,則對應至「INBOUND」。如果是 ServerToclient,則對應至 OUTBOUND。 |
websocket_message_type |
security_result.detection_fields |
已新增為偵測欄位,鍵為 WebsocketMessageType。 |
x_fwd_hdr_val |
principal.ip、principal.asset.ip |
直接對應至主體 IP。 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求解答。