收集 McAfee Web Gateway 記錄

支援的國家/地區:

本文說明如何使用 Bindplane 代理程式,將 McAfee Web Gateway 記錄擷取至 Google Security Operations。剖析器會從 SYSLOG + KV (CEF)、JSON 和原始格式的記錄中擷取欄位。這項服務會使用 grok 和 CSV 篩選器剖析不同的記錄結構,並將欄位名稱標準化。接著,系統會將擷取的欄位對應至統合式資料模型 (UDM) 結構定義,處理各種極端情況和資料不一致問題,以建立統一的輸出內容。

事前準備

請確認您已完成下列事前準備事項:

  • Google SecOps 執行個體
  • Windows 2016 以上版本或 Linux 主機 (含 systemd)
  • 如果透過 Proxy 執行,防火牆通訊埠已開啟
  • McAfee Web Gateway 的特殊存取權

取得 Google SecOps 擷取驗證檔案

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM 設定」>「收集代理程式」
  3. 下載擷取驗證檔案。將檔案安全地儲存在要安裝 Bindplane 的系統上。

取得 Google SecOps 客戶 ID

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM 設定」>「設定檔」
  3. 複製並儲存「機構詳細資料」專區中的客戶 ID

安裝 Bindplane 代理程式

Windows 安裝

  1. 以系統管理員身分開啟「命令提示字元」或「PowerShell」
  2. 執行下列指令:

    msiexec /i `https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi` /quiet
    

Linux 安裝

  1. 開啟具有根層級或 sudo 權限的終端機。
  2. 執行下列指令:

    sudo sh -c `$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)` install_unix.sh
    

其他安裝資源

如需其他安裝選項,請參閱安裝指南

設定 Bindplane 代理程式,擷取系統記錄檔並傳送至 Google SecOps

  1. 存取設定檔:
    • 找出 config.yaml 檔案。通常位於 Linux 的 /etc/bindplane-agent/ 目錄,或 Windows 的安裝目錄。
    • 使用文字編輯器 (例如 nanovi 或記事本) 開啟檔案。
  2. 按照下列方式編輯 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: '/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: MCAFEE_WEBPROXY
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 視基礎架構需求,替換通訊埠和 IP 位址。

  4. <customer_id> 替換為實際的客戶 ID。

  5. /path/to/ingestion-authentication-file.json 更新為「取得 Google SecOps 擷取驗證檔案」一節中儲存驗證檔案的路徑。

重新啟動 Bindplane 代理程式,以套用變更

  • 如要在 Linux 中重新啟動 Bindplane 代理程式,請執行下列指令:

    sudo systemctl restart bindplane-agent
    
  • 如要在 Windows 中重新啟動 Bindplane 代理程式,可以使用「服務」控制台,也可以輸入下列指令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

在 McAfee Web Gateway 中設定 Syslog

  1. 登入 McAfee Web Gateway 網頁版 UI。
  2. 前往「政策」>「規則集」
  3. 按一下「記錄處理常式」,然後展開「預設」規則集,並選取巢狀的「CEF Syslog」規則集。
  4. 啟用「傳送至系統記錄」規則。
  5. 按一下 [儲存變更]。
  6. 依序前往「Configuration」>「Appliances」>「Log File Manager」>「Settings」。
  7. 選取「將稽核記錄寫入系統記錄」
  8. 依序前往「Configuration」>「File Editor」
  9. 在檔案樹狀結構中選取「rsyslog.conf」rsyslog.conf
  10. 按照下列方式編輯檔案:
    • 找出以下程式碼行 (或類似程式碼):*.info;mail.none;authpriv.none;cron.none /var/log/messages
    • 在這行中新增精靈,並在路徑資訊前插入 - (破折號):*.info;daemon.!=info;mail.none;authpriv.none;cron.none -/var/log/messages
  11. 在檔案底部新增一行,將資訊訊息傳送至 Bindplane 代理程式 IP 位址。

    • 透過 UDP 傳送系統記錄:

      daemon.info;auth.=info @<bindplane-server-ip>:<bindplane-port>
      
    • 透過 TCP 傳送系統記錄:

      daemon.info;auth.=info @@<bindplane-server-ip>:<bindplane-port>
      

UDM 對應表

記錄欄位 UDM 對應 邏輯
application_name principal.application 直接從 KV 格式的 application_name 欄位或 JSON 格式的 user_agent_product 欄位對應。
auth_user principal.user.userid 直接從 KV 格式的 auth_user 欄位對應。
block_reason security_result.summary 直接從 JSON 和 CSV JSON 格式的 block_reason 欄位、原始格式的 _block_reason 或 KV 格式的 block_reason 對應。
block_res security_result.action 以 KV 格式對應自 block_res 欄位。如果 block_resDENIED 或包含 Block,則動作為 BLOCK。如果 block_res0 或包含 Allow,則動作為 ALLOW。系統會使用 5051525358598180828384110111 等特殊值來判斷 security_result.category
bytes_from_client network.sent_bytes 直接從 KV 格式的 bytes_from_client 欄位、原始格式的 sr_bytes 欄位,或 JSON 和 CSV JSON 格式的 client_to_server_bytes 欄位對應。
bytes_to_client network.received_bytes 直接從 KV 格式的 bytes_to_client 欄位、原始格式的 rs_bytes 欄位,或 JSON 和 CSV JSON 格式的 server_to_client_bytes 欄位對應。
categories security_result.category_details 直接從 KV 格式的 categories 欄位、原始格式的 _category 欄位,或 JSON 和 CSV JSON 格式的 category 欄位對應。
client_ip principal.ipintermediary.ip 直接從 JSON 格式的 client_ip 欄位對應。
clientIP principal.ip 直接從 CEF 格式的 clientIP 欄位對應。
csmethod network.http.method 直接從原始格式的 csmethod 欄位對應。
day metadata.event_timestamp 時間戳記的一部分,以 KV 格式從 time_stamp 欄位擷取。
destination_ip target.ip 直接從 JSON 格式的 destination_ip 欄位對應。
destination_port target.port 直接從 JSON 格式的 destination_port 欄位對應。
domain target.hostnametarget.url 直接從原始格式的 domain 欄位對應。如果存在 uri,則用於建構 target.url
header intermediary.hostname 從記錄訊息開頭擷取。用於擷取 intermediary.hostname
host target.hostname 直接從 KV 格式的 host 欄位對應。
hostname principal.hostname 直接從 JSON 格式的 hostname 欄位對應。
hour metadata.event_timestamp 時間戳記的一部分,以 KV 格式從 time_stamp 欄位擷取。
http_action network.http.method 直接從 JSON 格式的 http_action 欄位對應。
http_status_code network.http.response_code 直接從 JSON 和 CSV JSON 格式的 http_status_code 欄位,或原始和 KV 格式的 status_code 欄位對應。
kv_entry.application_name principal.application 直接從 KV 項目中的 application_name 欄位對應。
kv_entry.auth_user principal.user.userid 直接從 KV 項目中的 auth_user 欄位對應。
kv_entry.block_reason security_result.summary 直接從 KV 項目中的 block_reason 欄位對應。
kv_entry.block_res security_result.actionsecurity_result.category 對應自 KV 項目中的 block_res 欄位。判斷動作和類別的邏輯與頂層 block_res 欄位相同。
kv_entry.bytes_from_client network.sent_bytes 直接從 KV 項目中的 bytes_from_client 欄位對應。
kv_entry.bytes_to_client network.received_bytes 直接從 KV 項目中的 bytes_to_client 欄位對應。
kv_entry.categories security_result.category_details 直接從 KV 項目中的 categories 欄位對應。
kv_entry.host target.hostname 直接從 KV 項目中的 host 欄位對應。
kv_entry.method network.http.method 直接從 KV 項目中的 method 欄位對應。
kv_entry.rep_level security_result.severity_details 直接從 KV 項目中的 rep_level 欄位對應。
kv_entry.server_ip target.ip 直接從 KV 項目中的 server_ip 欄位對應。
kv_entry.status_code network.http.response_code 直接從 KV 項目中的 status_code 欄位對應。
kv_entry.time_stamp metadata.event_timestamp 直接從 KV 項目中的 time_stamp 欄位對應。
kv_entry.url target.url 直接從 KV 項目中的 url 欄位對應。
kv_entry.url_port target.port 直接從 KV 項目中的 url_port 欄位對應。
kv_entry.user_agent network.http.parsed_user_agent 直接從 KV 項目中的 user_agent 欄位對應,然後剖析為結構化物件。
last_rule security_result.rule_name 直接從 JSON 格式的 last_rule 欄位對應。
loc principal.location.country_or_region 直接從 tgt_ip_or_location 擷取的 loc 欄位對應。
location principal.location.country_or_region 直接從 JSON 格式的 location 欄位對應。
log.file.path principal.process.file.full_path 直接從 JSON 格式的 log.file.path 欄位對應。
message 多項政策 原始記錄訊息。系統會根據格式 (原始、JSON、KV、CEF) 以不同方式剖析。
method network.http.method 直接從 KV 和原始格式的 method 欄位、JSON 格式的 http_action 欄位對應,或從 CEF 資料衍生而來。如果值為 GETPOSTHEADOPTIONSPUTCONNECT,則 metadata.event_type 會設為 NETWORK_HTTP。如果值為 -CERTVERIFY,則 metadata.event_type 會設為 NETWORK_CONNECTION
mins metadata.event_timestamp 時間戳記的一部分,以 KV 格式從 time_stamp 欄位擷取。
month metadata.event_timestamp 時間戳記的一部分,以 KV 格式從 time_stamp 欄位擷取,或以 CEF 格式從 rt 欄位擷取。
monthday metadata.event_timestamp 時間戳記的一部分,從記錄訊息開頭擷取。
protocol network.application_protocol 直接從原始格式的 protocol 欄位對應,或從 JSON 格式的 uri_scheme 欄位對應,或從 KV 格式的 url 欄位衍生。
query target.url 直接從原始格式的 query 欄位對應。附加至 url 欄位。
rep_level security_result.severity_details 直接從 KV 格式的 rep_level 欄位、JSON 格式的 reputation 欄位,或原始格式的 _risk 欄位對應。用於判斷 security_result.severity
request target.url 直接從 CEF 格式的 request 欄位對應。
requestClientApplication network.http.user_agent 直接從 CEF 格式的 requestClientApplication 欄位對應。
requestContext network.http.referral_url 直接從 CEF 格式的 requestContext 欄位對應。
requestMethod network.http.method 直接從 CEF 格式的 requestMethod 欄位對應。
requested_host target.url 直接從 JSON 格式的 requested_host 欄位對應。如果 requested_path 也存在,則用於建構 target.url
requested_path target.url 直接從 JSON 格式的 requested_path 欄位對應。附加至 requested_host,形成 target.url
request_timestamp metadata.event_timestamp 直接從 JSON 格式的 request_timestamp 欄位對應。
result security_result.actionsecurity_result.category 直接從 JSON 和 CSV JSON 格式的 result 欄位,或 KV 格式的 block_res 對應。用於判斷 security_result.actionsecurity_result.category
rt metadata.event_timestamp 直接從 CEF 格式的 rt 欄位對應。
secs metadata.event_timestamp 時間戳記的一部分,以 KV 格式從 time_stamp 欄位擷取。
server_ip target.ip 直接從 KV 格式的 server_ip 欄位對應。
source_ip principal.ip 直接從 JSON、CSV JSON、原始和 KV 格式的 source_ip 欄位,或 CEF 格式的 src,或原始格式的 src_ip 對應。
src principal.ip 直接從 CEF 格式的 src 欄位對應。
status_code network.http.response_code 直接從原始格式的 status_code 欄位對應。
summary security_result.summary 直接從 CSV 格式的 summary 欄位或 JSON 格式的 block_reason 欄位對應。
system principal.platform 直接從 JSON 格式的 system 欄位對應。轉換為大寫。
target_ip target.ip 直接從原始格式的 target_ip 欄位對應,或採用 dst 的 CEF 格式。
tgtport target.port 直接從原始格式的 tgtport 欄位對應。
time metadata.event_timestamp 時間戳記的一部分,從記錄訊息開頭擷取,或是 CEF 格式的 rt 欄位,或是 KV 格式的 time_stamp 欄位。
timestamp metadata.event_timestamp 直接從 JSON 格式的 @timestamp 欄位對應。
timezone metadata.event_timestamp 時間戳記的一部分,以 KV 格式從 time_stamp 欄位擷取。
uri target.url 直接從原始格式的 uri 欄位對應。用於建構 target.url
uri_scheme network.application_protocol 直接從 JSON 格式的 uri_scheme 欄位對應。轉換為大寫。
url target.url 直接從原始、KV 和 JSON 格式的 url 欄位對應,或從原始格式的 domainuriquery、JSON 格式的 requested_hostrequested_path,或 CEF 格式的 request 建構。
url_port target.port 直接從 KV 格式的 url_port 欄位對應。
user principal.user.userid 直接從 JSON 格式的 user 欄位、JSON 格式的 username、KV 格式的 auth_user 或原始格式的 suser 對應。
user_agent network.http.parsed_user_agent 直接從原始和 KV 格式的 user_agent 欄位、JSON 格式的 user_agent_comment 欄位、CEF 格式的 requestClientApplication 欄位對應,或是從 JSON 格式的 agent.typeagent.version 欄位建構。剖析為結構化物件。
user_agent_comment network.http.parsed_user_agent 直接從 JSON 格式的 user_agent_comment 欄位對應。
user_agent_product principal.application 直接從 JSON 格式的 user_agent_product 欄位對應。
username principal.user.userid 直接從 JSON 格式的 username 欄位對應。
year metadata.event_timestamp 時間戳記的一部分,以 KV 格式從 time_stamp 欄位擷取,或以 CEF 格式從 rt 欄位擷取。
不適用 metadata.event_type 由剖析器根據 method 欄位判斷。可以是 NETWORK_HTTPNETWORK_CONNECTIONGENERIC_EVENTSTATUS_UPDATE
不適用 metadata.log_type 硬式編碼為 MCAFEE_WEBPROXY
不適用 metadata.product_name 硬式編碼為 MCAFEE_WEBPROXY
不適用 metadata.vendor_name 硬式編碼為 MCAFEE
不適用 network.direction 硬式編碼為 OUTBOUND
不適用 security_result.action 由剖析器根據 block_reasonresult 欄位判斷。可以是 ALLOWBLOCK
不適用 security_result.category 由剖析器根據 result 欄位判斷。可以是 NETWORK_CATEGORIZED_CONTENTNETWORK_DENIAL_OF_SERVICEMAIL_SPAMAUTH_VIOLATIONSOFTWARE_MALICIOUSNETWORK_SUSPICIOUSNETWORK_MALICIOUS
不適用 security_result.severity 由剖析器根據 risk 欄位判斷。可以是 LOWMEDIUMHIGH

還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。