Sophos Endpoint のログを収集する

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

このドキュメントでは、Bindplane エージェントを使用して Sophos Endpoint(以前の Sophos AV/Intercept X)ログを収集する方法について説明します。パーサーは、JSON ログを統合データモデル(UDM)に変換します。ネストされた JSON 構造からフィールドを抽出し、UDM フィールドにマッピングして、タイプ フィールドに基づいてイベントの分類を行い、さまざまな Sophos AV イベントタイプに固有の詳細とアクションでデータを拡充します。

始める前に

次の前提条件を満たしていることを確認してください。

  • Google SecOps インスタンス
  • Windows 2016 以降、または systemd を使用する Linux ホスト
  • Python を継続的に実行できる Windows または Linux マシン
  • プロキシの背後で実行している場合は、Bindplane エージェントの要件に従ってファイアウォール ポートが開いていることを確認します
  • Sophos Central 管理コンソールへの特権アクセス

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

  1. Google SecOps コンソールにログインします。
  2. [SIEM 設定] > [収集エージェント] に移動します。
  3. Ingestion Authentication File をダウンロードします。
  4. Bindplane をインストールするシステムにファイルを安全に保存します。

Google SecOps のお客様 ID を取得する

  1. Google SecOps コンソールにログインします。
  2. [SIEM 設定] > [プロファイル] に移動します。
  3. [組織の詳細情報] セクションから [お客様 ID] をコピーして保存します。

Bindplane エージェントをインストールする

次の手順に沿って、Windows または Linux オペレーティング システムに 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 Agent を構成する

  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_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
        log_type: 'SOPHOS_AV'
        raw_log_field: body
        ingestion_labels:
    
    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 の値を、ステップ 1 で認証ファイルを保存したファイルパスに更新します。

Bindplane Agent を再起動して変更を適用する

  1. Linux で Bindplane エージェントを再起動するには、次のコマンドを実行します。

    sudo systemctl restart bindplane-agent
    
  2. Windows で Bindplane エージェントを再起動するには、サービス コンソールを使用するか、次のコマンドを入力します。

    net stop BindPlaneAgent && net start BindPlaneAgent
    

Sophos Central API アクセスを構成する

  1. Sophos Central Admin にログインします。
  2. [Global Settings] > [API Token Management] を選択します。
  3. [トークンを追加] をクリックして、新しいトークンを作成します。
  4. トークン名を入力して [保存] をクリックします。指定したトークンの API トークンの概要が表示されます。
  5. [API Token Summary] セクションで、[Copy] をクリックして API アクセス URL とヘッダーをコピーします。

追加のマシンに Python をインストールする

  1. ウェブブラウザを開き、Python のウェブサイトにアクセスします。
  2. お使いのオペレーティング システム(Windows または Mac)の [Download Python] をクリックします。
  3. Python をインストールします。

    • Windows の場合:
      1. インストーラを実行します。
      2. [PATH に Python を追加] のチェックボックスをオンにします。
      3. [今すぐインストール] をクリックします。
    • Mac の場合:

      1. Python がすでにインストールされている場合があります。インストールされていない場合は、ターミナルを使用して最新バージョンをインストールできます。
      2. ターミナルを開き、次のコマンドを入力します。
      python --version
      

Sophos 統合スクリプトをダウンロードする

  1. Sophos Central SIEM Integration GitHub リポジトリの GitHub ページに移動します。
  2. 緑色の [Code] ボタン > [Download ZIP] をクリックします。
  3. ZIP ファイルを解凍します。

スクリプト構成を設定する

  1. テキスト エディタで config.ini ファイルを見つけて開きます。
  2. 構成ファイルを編集します。
    • API トークン: Sophos Central からコピーした API キーを入力します。
    • Syslog サーバーの詳細: Syslog サーバーの詳細を入力します。
    • ホスト: Bindplane の IP アドレスを入力します。
    • ポート: Bindplane ポート番号を入力します。
    • プロトコル: UDP を入力します(設定に応じて TCP または TLS を使用することもできます)。
  3. ファイルを保存します。

スクリプトを実行する

  1. スクリプト フォルダに移動します。

    • Windows の場合:

      1. Windows キーを押して「cmd」と入力します。
      2. [コマンド プロンプト] をクリックします。
      3. スクリプト フォルダに移動します。
      cd C:UsersYourNameDownloadsSophos-Central-SIEM-Integration
      
    • macOS の場合:

      1. [Applications] > [Utilities] に移動します。
      2. ターミナルを開きます。
      3. スクリプト フォルダに移動します。
      cd /Users/YourName/Downloads/Sophos-Central-SIEM-Integration
      
  2. スクリプトを実行します。

    • 次のコマンドを入力して、スクリプトを開始します。

      python siem.py
      

Windows でスクリプトを継続的に実行するように自動化します(タスク スケジューラを使用)。

  1. [スタート] メニューに「タスク スケジューラ」と入力して、タスク スケジューラを開きます。
  2. [タスクを作成] をクリックします。
  3. [全般] タブで、次の操作を行います。
    • タスクに名前を付けます(例: Sophos AV Log Export)。
  4. [トリガー] タブで次の操作を行います。
    • [新規] をクリックし、タスクを [毎日] または [起動時] に実行するように設定します(必要に応じて)。
  5. [操作] タブで次の操作を行います。
    • [新規] をクリックし、[プログラムを開始] を選択します。
    • python.exe 実行可能ファイル(通常は C:PythonXXpython.exe にあります)を参照します。
    • [引数を追加] フィールドに、スクリプトのパス(例: C:UsersYourNameDownloadsSophos-Central-SIEM-Integrationsiem.py)を入力します。
  6. [OK] をクリックしてタスクを保存します。

Mac でスクリプトを継続的に実行するように自動化する(Cron ジョブを使用):

  1. ターミナルを開きます.
  2. crontab -e」と入力して Enter キーを押します。
  3. ファイルの末尾に新しい行を追加します。

    * * * * * /usr/bin/python /Users/YourName/Downloads/Sophos-Central-SIEM-Integration/siem.py
    
  4. 保存してエディタを終了します。

UDM マッピング テーブル

ログフィールド UDM マッピング ロジック
s_ip intermediary.ip 統合済み
description metadata.description 直接マッピングされます。
name metadata.description 直接マッピングされます。
security_result.description metadata.description 名前変更済み/マッピング済み
end metadata.event_timestamp RFC 3339 として解析
ts metadata.event_timestamp RFC 3339 として解析
action metadata.event_type マッピング: unknownNETWORK_CONNECTIONallowedSCAN_PROCESSblocked → `SCAN_PROC...
e_type metadata.event_type マッピングされた値(合計 11 個、例: NonCompliantSCAN_HOSTSavDisabled → `SETTING_MODIFIC...
type metadata.event_type マッピングされた値(合計 13 個、例: Event::Endpoint::NonCompliantSCAN_HOST、`Event::Endpoin...
e_type metadata.product_event_type 直接マッピングされます。
type metadata.product_event_type 直接マッピングされます。
action network.direction マッピング: warnedOUTBOUNDunknownOUTBOUND
e_type network.direction マッピング: WindowsFirewall::BlockedOUTBOUND
type network.direction マッピング: Event::Endpoint::WindowsFirewall::BlockedOUTBOUND
action network.ip_protocol マッピング: warnedTCPunknownTCP
appSha256 principal.file.sha256 直接マッピングされます。
dhost principal.hostname 直接マッピングされます。
host principal.hostname 直接マッピングされます。
source_info.ip principal.ip 統合済み
src_ip principal.ip 統合済み
id principal.resource.id 直接マッピングされます。
suser principal.user.user_display_name 直接マッピングされます。
suser principal.user.userid 直接マッピングされます。
user principal.user.userid 直接マッピングされます。
user_id principal.user.userid 直接マッピングされます。
endpoint_id_label security_result.about.labels 統合済み
endpoint_type_label security_result.about.labels 統合済み
action security_result.action マッピングされた値(合計 5 個、例: allowsec_actionunknownsec_actionallowed → `...
sec_action security_result.action 統合済み
group security_result.category_details 統合済み
sub_cat security_result.category_details 統合済み
desc security_result.description 直接マッピングされます。
e_type security_result.description マッピング: (UpdateRebootRequired/ServiceNotRunning/NonCompliant/OutOfDate) → `security_result...
type security_result.description マッピング: Event::Endpoint::(UpdateRebootRequired/ServiceNotRunning/NonCompliant/OutOfDate) →...
rule security_result.rule_name 直接マッピングされます。
rules security_result.rule_name 直接マッピングされます。
severity security_result.severity マッピングされた値(合計 6 個、例: lowLOWlowMEDIUMlowHIGH
security_result.description security_result.summary 名前変更済み/マッピング済み
application target.application 直接マッピングされます。
endpoint_id target.asset_id 直接マッピングされます。
f_path target.file.full_path 直接マッピングされます。
f_size target.file.size 名前変更済み/マッピング済み
dhost target.hostname 直接マッピングされます。
host target.hostname 直接マッピングされます。
application target.process.file.full_path 直接マッピングされます。
customer_id target.resource.id 直接マッピングされます。
e_type target.resource.name マッピング: SavDisabledReal time protectionOutOfDateDevice Registration、`Regist...
p_device target.resource.name 直接マッピングされます。
scan_name target.resource.name 直接マッピングされます。
type target.resource.name マッピング: Event::Endpoint::SavDisabledReal time protection、`Event::Endpoint::OutOfDate...
action target.resource.type マッピング: blockedDevicerestricted to read-onlyDevice
e_type target.resource.type マッピングされた値(合計 5 個、例: SavDisabledSETTINGOutOfDateSETTING、`Registered...
type target.resource.type マッピングされた値(合計 5 個、例: Event::Endpoint::SavDisabledSETTING、`Event::Endpoint::O...
url target.url 直接マッピングされます。
duid target.user.userid 直接マッピングされます。
suser target.user.userid 直接マッピングされます。
user target.user.userid 直接マッピングされます。
なし metadata.event_type 定数: GENERIC_EVENT
なし metadata.product_name 定数: Sophos Anti-Virus
なし metadata.vendor_name 定数: Sophos
なし network.direction 定数: OUTBOUND
なし network.ip_protocol 定数: TCP
なし security_result.description 定数: security_result.summary
なし security_result.severity 定数: LOW
なし target.resource.name 定数: Real time protection
なし target.resource.type 定数: SETTING

変更履歴

このパーサーの変更ログを表示する

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