收集 Sophos XG Firewall 記錄

支援的國家/地區:

本文說明如何使用 Bindplane 收集 Sophos Next Gen (XG) 防火牆記錄。剖析器會擷取記錄、正規化鍵/值組合,並將其對應至 UDM。這項服務可處理各種記錄格式、轉換時間戳記、擴充網路資料,以及根據記錄 ID 和網路活動將事件分類。

事前準備

  • 確認您有 Google Security Operations 執行個體。
  • 確認您使用的是 Windows 2016 以上版本,或是搭載 systemd 的 Linux 主機。
  • 如果透過 Proxy 執行,請確認防火牆通訊埠已開啟。
  • 確認您具備 Sophos XG Firewall 的特殊權限。

取得 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. 存取設定檔:

    1. 找出 config.yaml 檔案。通常位於 Linux 的 /etc/bindplane-agent/ 目錄,或 Windows 的安裝目錄。
    2. 使用文字編輯器 (例如 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: SYSLOG
                namespace: sophos_firewall
                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
    

設定 Sophos 防火牆的系統記錄伺服器

  1. 登入 Sophos XG Firewall。
  2. 依序前往「設定」>「系統服務」>「記錄設定」
  3. 在「Syslog servers」(系統記錄伺服器) 部分中,按一下「Add」(新增)
  4. 提供下列設定詳細資料:
    • 名稱:輸入 Google SecOps 收集器的專屬名稱。
    • IP 位址/網域:輸入 Bindplane IP 位址。
    • 「Port」(通訊埠):輸入 Bindplane 通訊埠編號。
    • 設施:選取「DAEMON」
    • 嚴重性等級:選取「資訊」
    • 格式:選取「裝置標準格式」
  5. 按一下 [儲存]
  6. 返回「記錄設定」頁面,然後選取要轉送至系統記錄伺服器的特定記錄類型。

設定 Sophos XG 防火牆記錄設定

  1. 選取下列「基本防火牆 (安全性政策記錄)」記錄:
    • 政策規定
    • 無效流量
    • 本機 ACL
    • 阻斷攻擊 (DoS)
    • 已捨棄 ICMP 重新導向封包
    • 已捨棄的來源路由封包
    • 捨棄的片段流量
    • MAC 篩選
    • IP-MAC 配對篩選
    • 防止 IP 詐欺
    • SSL VPN 通道
    • 受保護的應用程式伺服器
    • 心跳
  2. 選取下列「網路防護」記錄 (網頁篩選記錄和應用程式篩選記錄):
    • 網站篩選器
    • 應用程式篩選器
  3. 選取下列「網路保護」 (IPS 記錄) 記錄:
    • 異常狀況
    • 簽章
  4. 選取下列「系統記錄」記錄:
    • 系統事件

UDM 對應表

記錄欄位 UDM 對應 邏輯
activityname security_result.detection_fields.activityname activityname 欄位的值。
app_category security_result.detection_fields.Application Categoryapplication_category app_category 欄位的值。
app_filter_policy_id security_result.detection_fields.app_filter_policy_id app_filter_policy_id 欄位的值。
app_is_cloud security_result.detection_fields.app_is_cloud app_is_cloud 欄位的值。
app_name principal.application app_name 欄位的值。
app_resolved_by security_result.detection_fields.app_resolved_by app_resolved_by 欄位的值。
app_risk security_result.detection_fields.Application Riskapplication_risk app_risk 欄位的值。
app_technology application_technology app_technology 欄位的值。
application principal.application application 欄位的值。
application_category security_result.detection_fields.Application Category application_category 欄位的值。
application_risk security_result.detection_fields.Application Risk application_risk 欄位的值。
application_technology security_result.detection_fields.Application Technology application_technology 欄位的值。
bytes_received network.received_bytes bytes_received 欄位的值。
bytes_sent network.sent_bytes bytes_sent 欄位的值。
category application_category category 欄位的值。
category_type security_result.detection_fields.category_type category_type 欄位的值。
client_host_name network.dhcp.client_hostname client_host_name 欄位的值。
client_physical_address network.dhcp.chaddr client_physical_address 欄位的值。
con_event security_result.detection_fields.con_event con_event 欄位的值。
con_id security_result.detection_fields.con_id con_id 欄位的值。
connevent security_result.detection_fields.connevent connevent 欄位的值。
connid security_result.detection_fields.connid connid 欄位的值。
date event.timestamp datetime 欄位剖析,並根據時區調整。
device_id intermediary.asset.asset_id device_id 欄位的值,開頭為 ID:
device_model intermediary.hostname device_model 欄位的值。
device_name intermediary.hostname device_name 欄位的值。
device_serial_id intermediary.asset.asset_id device_serial_id 欄位的值,開頭為 ID:
domain principal.administrative_domaintarget.hostname domain 欄位的值。
dst_country target.location.country_or_region dst_country 欄位的值。
dst_country_code target.location.country_or_region dst_country_code 欄位的值。
dst_ip target.ip dst_ip 欄位的值。
dst_mac target.mac dst_mac 欄位的值。
dst_port target.port dst_port 欄位的值。
dst_trans_ip target.nat_ip dst_trans_ip 欄位的值。
dst_trans_port target.nat_port dst_trans_port 欄位的值。
dst_zone security_result.detection_fields.dst_zone dst_zone 欄位的值。
dstzone security_result.detection_fields.dstzone dstzone 欄位的值。
dstzonetype security_result.detection_fields.dstzonetype dstzonetype 欄位的值。
duration network.session_duration.seconds duration 欄位的值。
ether_type security_result.detection_fields.ether_type ether_type 欄位的值。
exceptions security_result.detection_fields.exceptions exceptions 欄位的值。
fw_rule_id security_result.rule_id fw_rule_id 欄位的值。
fw_rule_name security_result.rule_name fw_rule_name 欄位的值。
fw_rule_section security_result.rule_set fw_rule_section 欄位的值。
fw_rule_type security_result.rule_type fw_rule_type 欄位的值。
gw_id_request security_result.detection_fields.gw_id_request gw_id_request 欄位的值。
gw_name_request security_result.detection_fields.gw_name_request gw_name_request 欄位的值。
hb_health security_result.detection_fields.hb_health hb_health 欄位的值。
hb_status security_result.detection_fields.hb_status hb_status 欄位的值。
http_category security_result.detection_fields.http_category http_category 欄位的值。
http_category_type security_result.detection_fields.http_category_type http_category_type 欄位的值。
http_status network.http.response_code http_status 欄位的值。
in_display_interface security_result.detection_fields.in_display_interface in_display_interface 欄位的值。
in_interface security_result.detection_fields.in_interface in_interface 欄位的值。
ipaddress principal.ipnetwork.dhcp.ciaddr ipaddress 欄位的值。
log_component metadata.product_event_typesecurity_result.detection_fields.log_component log_component 欄位的值。
log_id metadata.product_log_id log_id 欄位的值。
log_msg metadata.description message 欄位移除 message= 後的值。
log_occurrence security_result.detection_fields.log_occurrence log_occurrence 欄位的值。
log_subtype security_result.detection_fields.log_subtypesecurity_result.action log_subtype 欄位的值。
log_type security_result.detection_fields.log_type log_type 欄位的值。
log_version security_result.detection_fields.log_version log_version 欄位的值。
message metadata.description message 欄位的值。
nat_rule_id security_result.detection_fields.nat_rule_id nat_rule_id 欄位的值。
nat_rule_name security_result.detection_fields.nat_rule_name nat_rule_name 欄位的值。
out_display_interface security_result.detection_fields.out_display_interface out_display_interface 欄位的值。
out_interface security_result.detection_fields.out_interface out_interface 欄位的值。
packets_received network.received_packets packets_received 欄位的值。
packets_sent network.sent_packets packets_sent 欄位的值。
priority security_result.severity 根據查閱表從 priorityseverity 欄位對應。
protocol network.ip_protocol 使用對照表從 protocol 欄位剖析。
reason security_result.detection_fields.reasonsecurity_result.summary reason 欄位的值。
recv_bytes network.received_bytes recv_bytes 欄位的值。
recv_pkts network.received_packets recv_pkts 欄位的值。
referer network.http.referral_url referer 欄位的值。
rule_id security_result.rule_id rule_id 欄位的值。
rule_name security_result.rule_name rule_name 欄位的值。
sent_bytes network.sent_bytes sent_bytes 欄位的值。
sent_pkts network.sent_packets sent_pkts 欄位的值。
severity priority severity 欄位的值。
src_country principal.location.country_or_region src_country 欄位的值。
src_country_code principal.location.country_or_region src_country_code 欄位的值。
src_ip principal.ip src_ip 欄位的值。
src_mac principal.mac src_mac 欄位的值。
src_port principal.port src_port 欄位的值。
src_trans_ip principal.nat_ip src_trans_ip 欄位的值。
src_trans_port principal.nat_port src_trans_port 欄位的值。
src_zone security_result.detection_fields.src_zone src_zone 欄位的值。
srczone security_result.detection_fields.srczone srczone 欄位的值。
srczonetype security_result.detection_fields.srczonetype srczonetype 欄位的值。
status security_result.action_detailssecurity_result.action status 欄位的值。
status_code network.http.response_code status_code 欄位的值。
target.url target.url url 欄位的值。
time event.timestamp datetime 欄位剖析,並根據時區調整。
timestamp event.timestamp timestamp 欄位剖析。
tran_dst_ip target.nat_ip tran_dst_ip 欄位的值。
tran_dst_port target.nat_port tran_dst_port 欄位的值。
tran_src_ip principal.nat_ip tran_src_ip 欄位的值。
tran_src_port principal.nat_port tran_src_port 欄位的值。
url target.url url 欄位的值。
used_quota security_result.detection_fields.used_quota used_quota 欄位的值。
user_agent network.http.user_agentnetwork.http.parsed_user_agent user_agent 欄位的值。系統也會產生剖析版本。
user_gp extensions.auth.type 如果 user_gpvpn,則將 extensions.auth.type 設為 VPN
user_name principal.user.useridprincipal.user.email_addresses user_name 欄位的值。如果包含 @,也會新增至 email_addresses
web_policy_id security_result.detection_fields.web_policy_id web_policy_id 欄位的值。
不適用 event.idm.read_only_udm.metadata.event_timestamp 從「event.timestamp」複製的項目。
不適用 event.idm.read_only_udm.metadata.log_type Chronicle 擷取結構定義會將記錄類型指定為 SOPHOS_FIREWALL
不適用 event.idm.read_only_udm.metadata.vendor_name 常數值 SOPHOS
不適用 event.idm.read_only_udm.metadata.product_name 常數值 SOPHOS Firewall
不適用 event.idm.read_only_udm.network.application_protocol 如果 ipaddress 欄位存在,請設為 DHCP。否則,系統會從 protocol 欄位衍生。
不適用 event.idm.read_only_udm.metadata.event_type 取決於其他欄位是否存在 (例如 NETWORK_HTTPNETWORK_CONNECTIONNETWORK_DHCPSTATUS_UPDATEGENERIC_EVENT)。
不適用 event.idm.read_only_udm.security_result.action 衍生自 statuslog_subtype 欄位。

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