收集 F5 ASM 記錄
本文說明如何使用 Bindplane,將 F5 Application Security Manager (ASM) 記錄擷取至 Google Security Operations。剖析器會處理各種 F5 ASM 記錄格式 (例如 Syslog、CSV、CEF 和 Splunk),並將這些格式正規化為統一資料模型 (UDM)。這項服務會使用 grok 模式和鍵值擷取功能剖析欄位、使用 XML 篩選功能取得違規詳細資料、使用條件式邏輯進行事件分類和嚴重程度對應,並將擷取的欄位合併至 UDM 架構。
事前準備
請確認您已完成下列事前準備事項:
- Google SecOps 執行個體
- Windows 2016 以上版本,或搭載
systemd
的 Linux 主機 - 如果透過 Proxy 執行,防火牆通訊埠已開啟
- F5 ASM 的特殊存取權
取得 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_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 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 位址。
將
<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
在 F5 ASM 中設定系統記錄檔
輸入下列指令,登入 tmsh 執行個體:
tmsh
使用下列指令編輯系統記錄設定:
edit /sys syslog all-properties
系統會在
vi
文字編輯器中開啟 Syslog 設定,畫面與下列範例類似:modify syslog { auth-priv-from notice auth-priv-to emerg cron-from warning cron-to emerg daemon-from notice daemon-to emerg description none include none iso-date disabled kern-from notice kern-to emerg mail-from notice mail-to emerg messages-from notice messages-to warning remote-servers none user-log-from notice user-log-to emerg }
將
include none
行替換為下列系統記錄篩選器:include ` filter f_audit{ match(AUDIT); }; destination d_syslog_server { udp(\`<bindplane-ip>\` port (<bindplane-port>)); }; log { source(s_syslog_pipe); filter(f_audit); destination(d_syslog_server); }; `
請將
<bindplane-ip>
和<bindplane-port>
替換為為 Bindplane 代理程式設定的實際 IP 位址和通訊埠編號。輸入下列鍵序列,退出
vi
::wq!
在下列提示中輸入
y
,將變更儲存至檔案:Save changes? (y/n/e)
輸入下列指令,儲存設定:
save /sys config
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 會對應到「INFORMATIONAL」。Warning 、1 、3 會對應到 MEDIUM。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_code 內的 response_violations 會對應至 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 地圖設為「高」。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 ,則對應至 QUARANTINE。原始值也會對應至 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_code 內的 response_violations 會對應至 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 專業人員尋求答案。