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 の取り込み認証ファイルを取得する
- Google SecOps コンソールにログインします。
- [SIEM 設定] > [収集エージェント] に移動します。
- Ingestion Authentication File をダウンロードします。
- Bindplane をインストールするシステムにファイルを安全に保存します。
Google SecOps のお客様 ID を取得する
- Google SecOps コンソールにログインします。
- [SIEM 設定] > [プロファイル] に移動します。
- [組織の詳細情報] セクションから [お客様 ID] をコピーして保存します。
Bindplane エージェントをインストールする
次の手順に沿って、Windows または Linux オペレーティング システムに Bindplane エージェントをインストールします。
Windows へのインストール
- 管理者として コマンド プロンプトまたは PowerShell を開きます。
次のコマンドを実行します。
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
Linux へのインストール
- root 権限または sudo 権限でターミナルを開きます。
次のコマンドを実行します。
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 を構成する
- 構成ファイルにアクセスします。
config.yamlファイルを見つけます。通常、Linux では/etc/bindplane-agent/ディレクトリに、Windows ではインストール ディレクトリにあります。- テキスト エディタ(
nano、vi、メモ帳など)を使用してファイルを開きます。
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自社のインフラストラクチャでの必要性に応じて、ポートと IP アドレスを置き換えます。
<customer_id>は、実際の顧客 ID に置き換えます。/path/to/ingestion-authentication-file.jsonの値を、ステップ 1 で認証ファイルを保存したファイルパスに更新します。
Bindplane Agent を再起動して変更を適用する
Linux で Bindplane エージェントを再起動するには、次のコマンドを実行します。
sudo systemctl restart bindplane-agentWindows で Bindplane エージェントを再起動するには、サービス コンソールを使用するか、次のコマンドを入力します。
net stop BindPlaneAgent && net start BindPlaneAgent
Sophos Central API アクセスを構成する
- Sophos Central Admin にログインします。
- [Global Settings] > [API Token Management] を選択します。
- [トークンを追加] をクリックして、新しいトークンを作成します。
- トークン名を入力して [保存] をクリックします。指定したトークンの API トークンの概要が表示されます。
- [API Token Summary] セクションで、[Copy] をクリックして API アクセス URL とヘッダーをコピーします。
追加のマシンに Python をインストールする
- ウェブブラウザを開き、Python のウェブサイトにアクセスします。
- お使いのオペレーティング システム(Windows または Mac)の [Download Python] をクリックします。
Python をインストールします。
- Windows の場合:
- インストーラを実行します。
- [PATH に Python を追加] のチェックボックスをオンにします。
- [今すぐインストール] をクリックします。
Mac の場合:
- Python がすでにインストールされている場合があります。インストールされていない場合は、ターミナルを使用して最新バージョンをインストールできます。
- ターミナルを開き、次のコマンドを入力します。
python --version
- Windows の場合:
Sophos 統合スクリプトをダウンロードする
- Sophos Central SIEM Integration GitHub リポジトリの GitHub ページに移動します。
- 緑色の [Code] ボタン > [Download ZIP] をクリックします。
- ZIP ファイルを解凍します。
スクリプト構成を設定する
- テキスト エディタで
config.iniファイルを見つけて開きます。 - 構成ファイルを編集します。
- API トークン: Sophos Central からコピーした API キーを入力します。
- Syslog サーバーの詳細: Syslog サーバーの詳細を入力します。
- ホスト: Bindplane の IP アドレスを入力します。
- ポート: Bindplane ポート番号を入力します。
- プロトコル: UDP を入力します(設定に応じて TCP または TLS を使用することもできます)。
- ファイルを保存します。
スクリプトを実行する
スクリプト フォルダに移動します。
Windows の場合:
- Windows キーを押して「
cmd」と入力します。 - [コマンド プロンプト] をクリックします。
- スクリプト フォルダに移動します。
cd C:UsersYourNameDownloadsSophos-Central-SIEM-Integration- Windows キーを押して「
macOS の場合:
- [Applications] > [Utilities] に移動します。
- ターミナルを開きます。
- スクリプト フォルダに移動します。
cd /Users/YourName/Downloads/Sophos-Central-SIEM-Integration
スクリプトを実行します。
次のコマンドを入力して、スクリプトを開始します。
python siem.py
Windows でスクリプトを継続的に実行するように自動化します(タスク スケジューラを使用)。
- [スタート] メニューに「タスク スケジューラ」と入力して、タスク スケジューラを開きます。
- [タスクを作成] をクリックします。
- [全般] タブで、次の操作を行います。
- タスクに名前を付けます(例:
Sophos AV Log Export)。
- タスクに名前を付けます(例:
- [トリガー] タブで次の操作を行います。
- [新規] をクリックし、タスクを [毎日] または [起動時] に実行するように設定します(必要に応じて)。
- [操作] タブで次の操作を行います。
- [新規] をクリックし、[プログラムを開始] を選択します。
python.exe実行可能ファイル(通常はC:PythonXXpython.exeにあります)を参照します。- [引数を追加] フィールドに、スクリプトのパス(例:
C:UsersYourNameDownloadsSophos-Central-SIEM-Integrationsiem.py)を入力します。
- [OK] をクリックしてタスクを保存します。
Mac でスクリプトを継続的に実行するように自動化する(Cron ジョブを使用):
- ターミナルを開きます.
- 「
crontab -e」と入力してEnterキーを押します。 ファイルの末尾に新しい行を追加します。
* * * * * /usr/bin/python /Users/YourName/Downloads/Sophos-Central-SIEM-Integration/siem.py保存してエディタを終了します。
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 |
マッピング: unknown → NETWORK_CONNECTION、allowed → SCAN_PROCESS、blocked → `SCAN_PROC... |
e_type |
metadata.event_type |
マッピングされた値(合計 11 個、例: NonCompliant → SCAN_HOST、SavDisabled → `SETTING_MODIFIC... |
type |
metadata.event_type |
マッピングされた値(合計 13 個、例: Event::Endpoint::NonCompliant → SCAN_HOST、`Event::Endpoin... |
e_type |
metadata.product_event_type |
直接マッピングされます。 |
type |
metadata.product_event_type |
直接マッピングされます。 |
action |
network.direction |
マッピング: warned → OUTBOUND、unknown → OUTBOUND |
e_type |
network.direction |
マッピング: WindowsFirewall::Blocked → OUTBOUND |
type |
network.direction |
マッピング: Event::Endpoint::WindowsFirewall::Blocked → OUTBOUND |
action |
network.ip_protocol |
マッピング: warned → TCP、unknown → TCP |
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 個、例: allow → sec_action、unknown → sec_action、allowed → `... |
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 個、例: low → LOW、low → MEDIUM、low → HIGH) |
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 |
マッピング: SavDisabled → Real time protection、OutOfDate → Device Registration、`Regist... |
p_device |
target.resource.name |
直接マッピングされます。 |
scan_name |
target.resource.name |
直接マッピングされます。 |
type |
target.resource.name |
マッピング: Event::Endpoint::SavDisabled → Real time protection、`Event::Endpoint::OutOfDate... |
action |
target.resource.type |
マッピング: blocked → Device、restricted to read-only → Device |
e_type |
target.resource.type |
マッピングされた値(合計 5 個、例: SavDisabled → SETTING、OutOfDate → SETTING、`Registered... |
type |
target.resource.type |
マッピングされた値(合計 5 個、例: Event::Endpoint::SavDisabled → SETTING、`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 のプロフェッショナルから回答を得ることができます。