Sophos XG Firewall のログを収集する

以下でサポートされています。

このドキュメントでは、Bindplane を使用して Sophos Next Gen(XG)ファイアウォールのログを収集する方法について説明します。パーサーはログを抽出し、Key-Value ペアを正規化して UDM にマッピングします。さまざまなログ形式の処理、タイムスタンプの変換、ネットワーク データの拡充、ログ ID とネットワーク アクティビティに基づくイベントの分類を行います。

始める前に

  • Google Security Operations インスタンスがあることを確認します。
  • Windows 2016 以降、または systemd を使用する Linux ホストを使用していることを確認します。
  • プロキシの背後で実行している場合は、ファイアウォールのポートが開いていることを確認します。
  • Sophos XG Firewall への特権アクセス権があることを確認します。

Google SecOps の取り込み認証ファイルを取得する

  1. Google SecOps コンソールにログインします。
  2. [SIEM 設定] > [コレクション エージェント] に移動します。
  3. Ingestion Authentication File をダウンロードします。ファイルを、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. root 権限または sudo 権限でターミナルを開きます。
  2. 次のコマンドを実行します。

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

その他のインストール リソース

Syslog を取り込んで Google SecOps に送信するように Bindplane エージェントを構成する

  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 エージェントを再起動するには、Services コンソールを使用するか、次のコマンドを入力します。

    net stop BindPlaneAgent && net start BindPlaneAgent
    

Sophos Firewall syslog サーバーを構成する

  1. Sophos XG Firewall にログインします。
  2. [設定] > [システム サービス] > [ログ設定] に移動します。
  3. [Syslog サーバ] セクションで、[追加] をクリックします。
  4. 次の構成情報を提供してください。
    • 名前: Google SecOps コレクタの一意の名前を入力します。
    • IP アドレス/ドメイン: Bindplane の IP アドレスを入力します。
    • ポート: Bindplane ポート番号を入力します。
    • Facility: [DAEMON] を選択します。
    • 重大度: [情報] を選択します。
    • フォーマット: [デバイスの標準フォーマット] を選択します。
  5. [保存] をクリックします。
  6. [ログ設定] ページに戻り、syslog サーバーに転送する特定のログタイプを選択します。

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 date フィールドと time フィールドから解析され、タイムゾーンに合わせて調整されます。
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 ルックアップ テーブルに基づいて priority フィールドまたは severity フィールドからマッピングされます。
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 date フィールドと time フィールドから解析され、タイムゾーンに合わせて調整されます。
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.typeVPN に設定します。
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 status フィールドまたは log_subtype フィールドから取得されます。

変更点

2024-08-26

機能強化:

  • timezone=WAT のログを解析しました。

2023-11-20

機能強化:

  • packets_sentnetwork.sent_packets にマッピングしました。
  • packets_receivednetwork.received_packets にマッピングしました。
  • src_trans_ipprincipal.nat_ip にマッピングしました。
  • src_trans_portprincipal.nat_port にマッピングしました。
  • dst_trans_iptarget.nat_ip にマッピングしました。
  • dst_trans_porttarget.nat_port にマッピングしました。
  • bytes_sentnetwork.sent_bytes にマッピングしました。
  • bytes_receivednetwork.received_bytes にマッピングしました。
  • durationnetwork.session_duration にマッピングしました。
  • referernetwork.http.referer_url にマッピングしました。
  • ipaddressprincipal.ipnetwork.dhcp.ciaddr にマッピングしました。
  • client_physical_addressnetwork.dhcp.chaddr にマッピングしました。
  • client_host_namenetwork.dhcp.client_hostname にマッピングしました。
  • reasonsecurity_result.summary にマッピングしました。
  • http_statusnetwork.http.response_code にマッピングしました。
  • app_nameprincipal.application にマッピングしました。
  • out_display_interfaceweb_policy_idhttp_categoryhttp_category_typeexceptionscon_idused_quotasrc_zone_typesrc_zonedst_zone_typedst_zoneapp_riskapp_categorynat_rule_namegw_id_requestgw_name_requestapp_filter_policy_idapp_technologyin_interfaceout_interfacecon_eventsrczonetypedstzonetypeconneventconnidhb_healthcategory_typeactivitynamesecurity_result.detection_fields にマッピングしました。

2023-11-10

機能強化:

  • fw_rule_typesecurity_result.rule_type にマッピングしました。
  • severitysecurity_result.severity にマッピングしました。
  • device_serial_idprincipal.asset.asset_id にマッピングしました。
  • log_typelog_componentlog_subtypelog_versionnat_rule_idether_typehb_statusapp_resolved_byapp_is_cloudqualifierlog_occurrencein_display_interfacesecurity_result.detection_fields にマッピングしました。

2023-04-03

機能強化:

  • device_name のマッピングを principal.hostname から intermediary.hostname に変更しました。
  • device_id のマッピングを principal.asset.asset_id から intermediary.asset.asset_id に変更しました。
  • metadata.vendor_name のマッピングを SOPHOS Ltd. から SOPHOS に変更しました。
  • sent_pktsnetwork.sent_packets にマッピングしました。
  • recv_pktsnetwork.received_packets にマッピングしました。
  • tran_src_ipprincipal.nat_ip にマッピングしました。
  • tran_src_portprincipal.nat_port にマッピングしました。
  • tran_dst_iptarget.nat_ip にマッピングしました。
  • tran_dst_porttarget.nat_port にマッピングしました。

2022-12-01

機能強化:

  • timezone=IST のログを解析しました。
  • application_category, application_risk and application_technologysecurity_result.detection_fields にマッピングしました。
  • fw_rule_namesecurity_result.rule_name にマッピングしました。
  • fw_rule_sectionsecurity_result.rule_set にマッピングしました。

2022-08-18

機能強化:

  • timezone=CEST のログを解析しました。
  • 一般的なイベントの割合を減らしました
  • user_nameevent.idm.read_only_udm.principal.user.userid にマッピングしました
  • device_idevent.idm.read_only_udm.principal.asset.asset_id にマッピングしました

さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。