收集 Sophos Firewall (SFOS) 記錄
本文說明如何使用 Bindplane,將 Sophos Firewall 記錄檔擷取至 Google Security Operations。Sophos Firewall (SFOS) 是新一代防火牆,提供網路安全、網頁篩選、應用程式控管、IPS、VPN 和進階威脅防護功能。SFOS 可在 Sophos XGS 系列硬體設備、虛擬和雲端部署環境中執行,並產生防火牆規則、網頁篩選、IPS 事件、驗證、VPN 連線和系統活動的詳細記錄。
詳情請參閱「收集 Sophos 防火牆記錄」。
事前準備
請確認您符合下列必要條件:
- Google SecOps 執行個體。
- Windows 2016 以上版本或 Linux 主機 (含 systemd)。
- 如果是在 Proxy 後方執行,請確認防火牆通訊埠已按照 Bindplane 代理程式需求開啟。
- 具備管理員角色的 Sophos Firewall 網頁管理控制台特殊權限存取權。
- Sophos Firewall 搭載 SFOS v18 以上版本。
取得 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」(服務帳戶)。
- 按一下「建立服務帳戶」。
- 提供下列設定詳細資料:
- 「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 與管理」>「設定」,然後複製「專案編號」。匯出工具設定時會用到。
方法 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](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](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/config.yaml目錄,或 Windows 的安裝目錄。 - 使用文字編輯器 (例如
nano、vi或記事本) 開啟檔案。
- 找出
按照下列方式編輯
config.yaml檔案:receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/sophos_firewall: 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 creds_file_path: '/path/to/ingestion-authentication-file.json' customer_id: '<CUSTOMER_ID>' endpoint: chronicle.googleapis.com log_type: SOPHOS_FIREWALL raw_log_field: body ingestion_labels: service: pipelines: logs/sophos_fw_to_chronicle: receivers: - udplog exporters: - chronicle/sophos_firewall
- 請根據基礎架構需求,替換通訊埠和 IP 位址。
- 將
<LOCATION>替換為 Google SecOps 執行個體的區域 (例如us、europe或asia-southeast1)。匯出工具會在這個值前面加上chronicle.googleapis.com。 - 將
<PROJECT_NUMBER>替換為「IAM 與管理」>「設定」中的專案編號。 - 將
<CUSTOMER_ID>替換為實際的客戶 ID。 - 將
/path/to/ingestion-authentication-file.json更新為服務帳戶金鑰檔案 (選項 1) 的儲存路徑。
舊版 Ingestion API 匯出工具
如果您使用選項 2 的擷取驗證檔案,請將
exporters區塊替換為下列內容。將creds_file_path設為擷取驗證檔案的路徑,如果您的執行個體位於美國境外,請將malachiteingestion-pa.googleapis.com替換為區域端點 (例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/sophos_firewall: compression: gzip creds_file_path: '/path/to/ingestion-authentication-file.json' customer_id: '<CUSTOMER_ID>' endpoint: malachiteingestion-pa.googleapis.com log_type: SOPHOS_FIREWALL 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
在 Sophos 防火牆上設定系統記錄轉送
新增系統記錄檔伺服器
- 登入 Sophos Firewall 網頁管理控制台。
- 依序前往「系統服務」>「記錄設定」。
- 向下捲動至「Syslog 伺服器」部分。
按一下「新增」,新增 Syslog 伺服器。
提供下列設定詳細資料:
- 名稱:輸入描述性名稱 (例如
Bindplane-SecOps)。 - IP address/Domain:輸入 Bindplane 代理程式主機的 IP 位址。
- 「Port」(通訊埠):輸入
514(或您設定的通訊埠)。 - Facility:選取「DAEMON」。
- 嚴重性等級:選取「資訊」 (建議用於全面記錄)。
- 格式:選取「裝置標準格式」。
- 名稱:輸入描述性名稱 (例如
按一下 [儲存]。
選取要轉送的記錄類型
- 在「Syslog servers」(Syslog 伺服器) 部分,按一下 Syslog 伺服器項目
Bindplane-SecOps。 在「記錄類型」部分,啟用要轉送的記錄類別:
- 防火牆:防火牆規則命中次數、捨棄的流量和允許的連線。
- IPS:入侵防禦系統快訊和事件。
- 防毒:惡意軟體偵測事件。
- 反垃圾訊息:垃圾訊息偵測和篩選事件。
- 內容篩選器:網路篩選和網址分類事件。
- 事件:系統事件、驗證和管理活動。
- 網路伺服器防護:WAF 事件。
- 進階威脅防護:Sandstorm 和 ATP 偵測事件。
- 無線:無線存取點事件 (如適用)。
- 活動訊號:Sophos Security Heartbeat 狀態變更 (如果已啟用同步安全防護)。
- 系統健康狀態:硬體和軟體健康狀態事件。
- 驗證:使用者和管理員驗證事件。
- 管理員:管理控制台活動。
按一下「套用」。
驗證系統記錄檔轉送
- 前往 Sophos Firewall 網頁管理控制台中的「記錄檢視器」。
- 確認系統是否產生記錄項目。
檢查 Bindplane 代理程式記錄,確認系統記錄訊息是否已收到:
sudo journalctl -u observiq-otel-collector -f
詳情請參閱 Sophos Firewall syslog 說明文件。
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
device_id |
intermediary.asset.asset_id |
直接對應 |
device_serial_id |
intermediary.asset.asset_id |
直接對應 |
device_model |
intermediary.hostname |
直接對應 |
device_name |
intermediary.hostname |
直接對應 |
log_msg |
metadata.description |
直接對應 |
date_time |
metadata.event_timestamp |
已剖析為 yyyy-MM-dd HH:mm:ss Z |
timestamp |
metadata.event_timestamp |
剖析為 yyyy-MM-ddTHH:mm:ssZ |
log_component |
metadata.product_event_type |
直接對應 |
log_id |
metadata.product_log_id |
直接對應 |
client_physical_address |
network.dhcp.chaddr |
直接對應 |
ipaddress |
network.dhcp.ciaddr |
直接對應 |
client_host_name |
network.dhcp.client_hostname |
直接對應 |
user_agent |
network.http.parsed_user_agent |
已重新命名/對應 |
referer |
network.http.referral_url |
直接對應 |
http_status |
network.http.response_code |
已重新命名/對應 |
status_code |
network.http.response_code |
已重新命名/對應 |
user_agent |
network.http.user_agent |
直接對應 |
ip_protocol_out |
network.ip_protocol |
直接對應 |
bytes_received |
network.received_bytes |
已重新命名/對應 |
recv_bytes |
network.received_bytes |
已重新命名/對應 |
packets_received |
network.received_packets |
已重新命名/對應 |
recv_pkts |
network.received_packets |
已重新命名/對應 |
bytes_sent |
network.sent_bytes |
已重新命名/對應 |
sent_bytes |
network.sent_bytes |
已重新命名/對應 |
packets_sent |
network.sent_packets |
已重新命名/對應 |
sent_pkts |
network.sent_packets |
已重新命名/對應 |
duration |
network.session_duration.seconds |
已重新命名/對應 |
domain |
principal.administrative_domain |
已重新命名/對應 |
app_name |
principal.application |
直接對應 |
application |
principal.application |
直接對應 |
ipaddress |
principal.ip |
已合併 |
src_ip |
principal.ip |
已合併 |
src_country |
principal.location.country_or_region |
直接對應 |
src_country_code |
principal.location.country_or_region |
直接對應 |
src_mac |
principal.mac |
已合併 |
src_trans_ip |
principal.nat_ip |
已合併 |
tran_src_ip |
principal.nat_ip |
已合併 |
src_trans_port |
principal.nat_port |
已重新命名/對應 |
tran_src_port |
principal.nat_port |
已重新命名/對應 |
src_port |
principal.port |
已重新命名/對應 |
user_name |
principal.user.email_addresses |
對應:.*?@.* → user_name |
user_name |
principal.user.userid |
直接對應 |
action |
security_result.action |
已合併 |
status |
security_result.action_details |
直接對應 |
_about0 |
security_result.detection_fields |
已合併 |
_about2 |
security_result.detection_fields |
已合併 |
activityname_label |
security_result.detection_fields |
已合併 |
appCategory_label |
security_result.detection_fields |
已合併 |
appTech_label |
security_result.detection_fields |
已合併 |
app_filter_policy_id_label |
security_result.detection_fields |
已合併 |
app_is_cloud_label |
security_result.detection_fields |
已合併 |
app_resolved_by_label |
security_result.detection_fields |
已合併 |
category_type_label |
security_result.detection_fields |
已合併 |
con_event_label |
security_result.detection_fields |
已合併 |
con_id_label |
security_result.detection_fields |
已合併 |
connevent_label |
security_result.detection_fields |
已合併 |
connid_label |
security_result.detection_fields |
已合併 |
dst_zone_type_label |
security_result.detection_fields |
已合併 |
dstzonetype_label |
security_result.detection_fields |
已合併 |
ether_type_label |
security_result.detection_fields |
已合併 |
exceptions_label |
security_result.detection_fields |
已合併 |
gw_id_request_label |
security_result.detection_fields |
已合併 |
gw_name_request_label |
security_result.detection_fields |
已合併 |
hb_health_label |
security_result.detection_fields |
已合併 |
hb_status_label |
security_result.detection_fields |
已合併 |
http_category_label |
security_result.detection_fields |
已合併 |
http_category_type_label |
security_result.detection_fields |
已合併 |
in_display_interface_label |
security_result.detection_fields |
已合併 |
in_interface_label |
security_result.detection_fields |
已合併 |
log_component_label |
security_result.detection_fields |
已合併 |
log_occurrence_label |
security_result.detection_fields |
已合併 |
log_subtype_label |
security_result.detection_fields |
已合併 |
log_type_label |
security_result.detection_fields |
已合併 |
log_version_label |
security_result.detection_fields |
已合併 |
nat_rule_id_label |
security_result.detection_fields |
已合併 |
nat_rule_name_label |
security_result.detection_fields |
已合併 |
out_display_interface_label |
security_result.detection_fields |
已合併 |
out_interface_label |
security_result.detection_fields |
已合併 |
qualifier_label |
security_result.detection_fields |
已合併 |
reason_label |
security_result.detection_fields |
已合併 |
risk_label |
security_result.detection_fields |
已合併 |
src_zone_type_label |
security_result.detection_fields |
已合併 |
srczonetype_label |
security_result.detection_fields |
已合併 |
used_quota_label |
security_result.detection_fields |
已合併 |
web_policy_id_label |
security_result.detection_fields |
已合併 |
fw_rule_id |
security_result.rule_id |
直接對應 |
fw_rule_name |
security_result.rule_name |
直接對應 |
fw_rule_section |
security_result.rule_set |
直接對應 |
fw_rule_type |
security_result.rule_type |
直接對應 |
priority |
security_result.severity |
對應:"INFORMATION", "NOTIFICATION", "NOTICE" → INFORMATIONAL,"ERROR","WARNING" → `... |
reason |
security_result.summary |
直接對應 |
domain |
target.hostname |
直接對應 |
dst_ip |
target.ip |
已合併 |
dst_country |
target.location.country_or_region |
直接對應 |
dst_country_code |
target.location.country_or_region |
直接對應 |
dst_mac |
target.mac |
已合併 |
dst_trans_ip |
target.nat_ip |
已合併 |
tran_dst_ip |
target.nat_ip |
已合併 |
dst_trans_port |
target.nat_port |
已重新命名/對應 |
tran_dst_port |
target.nat_port |
已重新命名/對應 |
dst_port |
target.port |
已重新命名/對應 |
url |
target.url |
直接對應 |
| 不適用 | extensions.auth.type |
常數:VPN |
| 不適用 | metadata.event_type |
常數:NETWORK_HTTP |
| 不適用 | metadata.product_name |
常數:SOPHOS Firewall |
| 不適用 | metadata.vendor_name |
常數:SOPHOS |
| 不適用 | network.application_protocol |
常數:DHCP |
| 不適用 | security_result.severity |
常數:INFORMATIONAL |
date_time |
event.idm.read_only_udm.metadata.event_timestamp |
從變更記錄對應 |
referer |
network.http.referer_url |
從變更記錄對應 |
device_serial_id |
principal.asset.asset_id |
從變更記錄對應 |
application_category, application_risk and application_technology |
security_result.detection_fields |
從變更記錄對應 |
user_name |
event.idm.read_only_udm.principal.user.userid |
從變更記錄對應 |
device_id |
event.idm.read_only_udm.principal.asset.asset_id |
從變更記錄對應 |
變更記錄
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求解答。