Windows Defender ウイルス対策ログを収集する
このドキュメントでは、Bindplane を使用して Windows Defender Antivirus ログを Google Security Operations に取り込む方法について説明します。
Windows Defender ウイルス対策は、Microsoft Windows に組み込まれているマルウェア対策エンジンです。リアルタイムの脅威検出、スキャン結果、保護イベントログを提供します。Bindplane エージェントは、エクスポートされた Windows Defender イベントログ ファイルをローカル ファイル システムから直接収集します。
始める前に
次の前提条件を満たしていることを確認してください。
- Google SecOps インスタンス
observiq-otel-collectorサービスをサポートする Windows Server 2016 以降- プロキシの背後で実行している場合は、Bindplane エージェントの要件に従ってファイアウォール ポートが開いていることを確認します。
- Windows Defender ウイルス対策を実行している Windows エンドポイントへの管理者アクセス
Bindplane エージェントの Google SecOps 認証情報を取得する
Bindplane エージェントを Google SecOps に対して認証するには、次のいずれかの方法を選択します。
- 新規デプロイ: Chronicle API を使用します(オプション 1)。
- 以前のデプロイ: 2027 年 7 月 20 日に Ingestion API が廃止されるまで、取り込み認証ファイル(オプション 2)を引き続き使用します。
オプション 1: Chronicle API のサービス アカウントを作成する(推奨)
- Google Cloud コンソールにログインし、Google SecOps インスタンスにリンクされている Google Cloud プロジェクトを選択します。
- [IAM と管理] > [サービス アカウント] に移動します。
- [サービス アカウントを作成] をクリックします。
- 次の構成情報を指定します。
- サービス アカウント名: アカウントの名前を入力します(例:
bindplane-ingest)。 - サービス アカウントの説明: 説明を入力します(例:
Bindplane agent log ingestion)。
- サービス アカウント名: アカウントの名前を入力します(例:
- [作成して続行] をクリックします。
- [このサービス アカウントにプロジェクトへのアクセスを許可する] セクションで、[ロールを選択] をクリックし、[Chronicle 編集者] を選択します。
- [続行] をクリックして [完了] をクリックします。
- 作成したサービス アカウントをクリックし、[キー] タブに移動します。
- [鍵を追加] > [新しい鍵を作成] の順にクリックします。
- [JSON] を選択し、[作成] をクリックします。鍵ファイルがパソコンにダウンロードされます。
- 鍵ファイルを
ingestion-auth.jsonとして Bindplane コレクタ ディレクトリ(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 のみのプラットフォームを使用している場合は、[設定] > [収集エージェント] に移動します。
- 取り込み認証ファイルをダウンロードします。
- Bindplane エージェントがインストールされるシステムにファイルを安全に保存します。
Google SecOps のお客様 ID を取得する
- Google SecOps コンソールにログインします。
- [Settings] > [Administration] > [Profile] に移動します。SIEM のみのプラットフォームを使用している場合は、[設定] > [プロファイル] に移動します。
[組織の詳細情報] セクションから [お客様 ID] をコピーして保存します。
Bindplane エージェントをインストールする
次の手順に沿って、Windows オペレーティング システムに Bindplane エージェントをインストールします。
Windows へのインストール
- 管理者としてコマンド プロンプトまたは PowerShell を開きます。
次のコマンドを実行します。
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quietインストールが完了するまで待ちます。
次のコマンドを実行して、インストールの内容を確認します。
sc query observiq-otel-collector
サービスが RUNNING と表示されます。
その他のインストール リソース
その他のインストール オプションとトラブルシューティングについては、Bindplane エージェントのインストール ガイドをご覧ください。
ログを取り込んで Google SecOps に送信するように Bindplane エージェントを構成する
構成ファイルを探す
Windows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
構成ファイルを編集します。
config.yamlの内容全体を次の構成に置き換えます。receivers: filelog: include: - C:\Logs\defender-av\*.evtx start_at: beginning exporters: chronicle/windows_defender_av: 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: 'C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json' customer_id: '<customer_id>' endpoint: chronicle.googleapis.com log_type: WINDOWS_DEFENDER_AV raw_log_field: body ingestion_labels: env: production service: pipelines: logs/defender_av_to_chronicle: receivers: - filelog exporters: - chronicle/windows_defender_av
構成パラメータ
各プレースホルダを次のように置き換えます。
レシーバーの構成:
filelog: ディスクからログファイルを収集するためのレシーバー タイプinclude: 監視するファイルパスのリスト。Windows Defender イベントログをエクスポートする場所に設定します(例:C:\Logs\defender-av\*.evtx)。start_at: 既存のログを読み取る場合はbeginningに設定し、新しいエントリのみを読み取る場合はendに設定します。
エクスポータの構成:
windows_defender_av: エクスポータのわかりやすい名前creds_file_path: サービス アカウントの JSON キーファイルのフルパス(オプション 1):- Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Windows:
<customer_id>: 前のステップのお客様 IDlocation:<LOCATION>は、Google SecOps インスタンスのリージョン(us、europe、asia-southeast1など)に置き換えます。エクスポーターは、chronicle.googleapis.comの前にこの値を付加します。完全なリストについては、リージョン エンドポイントをご覧ください。project:<PROJECT_NUMBER>を、[IAM と管理] > [設定] のプロジェクト番号に置き換えます。endpoint:chronicle.googleapis.comに設定したままにします。WINDOWS_DEFENDER_AV: Chronicle に表示されるログタイプingestion_labels: YAML 形式のオプションのラベル(例:env: production)
パイプライン構成:
defender_av_to_chronicle: パイプラインのわかりやすい名前
以前の Ingestion API エクスポータ
オプション 2 の取り込み認証ファイルを使用する場合は、
exportersブロックを次のように置き換えます。creds_file_pathを取り込み認証ファイルのパスに設定します。インスタンスが米国以外にある場合は、malachiteingestion-pa.googleapis.comをリージョン エンドポイント(例:europe-malachiteingestion-pa.googleapis.com)に置き換えます。exporters: chronicle/windows_defender_av: compression: gzip creds_file_path: 'C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json' customer_id: '<customer_id>' endpoint: malachiteingestion-pa.googleapis.com log_type: WINDOWS_DEFENDER_AV raw_log_field: body ingestion_labels: env: production
構成ファイルを保存する
- 編集が完了したら、ファイルを保存します。
- Windows の場合: [ファイル] > [保存] をクリックします。
Bindplane エージェントを再起動して変更を適用する
Windows で Bindplane エージェントを再起動するには:
次のいずれかのオプションを選択します。
- 管理者としてコマンド プロンプトまたは PowerShell を実行します。
net stop observiq-otel-collector && net start observiq-otel-collector- サービス コンソール:
Win+Rを押し、「services.msc」と入力して Enter キーを押します。- observIQ OpenTelemetry Collector を見つけます。
- 右クリックして [再起動] を選択します。
サービスが実行されていることを確認します。
sc query observiq-otel-collectorログでエラーを確認します。
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
Windows Defender ウイルス対策のログ エクスポートを構成する
Windows Defender ウイルス対策のログは、Windows イベントログの Microsoft-Windows-Windows Defender/Operational に保存されます。Bindplane エージェントがログを収集できるように、これらのログをディスク上のファイルにエクスポートする必要があります。
エクスポートされたログファイルを保存するディレクトリを作成します。
mkdir C:\Logs\defender-avwevtutilを使用して Windows Defender ウイルス対策のイベントログをエクスポートします。wevtutil epl "Microsoft-Windows-Windows Defender/Operational" C:\Logs\defender-av\defender-av.evtx(省略可)Windows タスク スケジューラを使用して定期的なエクスポートをスケジュールします。
$action = New-ScheduledTaskAction -Execute "wevtutil" -Argument 'epl "Microsoft-Windows-Windows Defender/Operational" C:\Logs\defender-av\defender-av.evtx /ow:true' $trigger = New-ScheduledTaskTrigger -RepetitionInterval (New-TimeSpan -Hours 1) -Once -At (Get-Date) Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "ExportDefenderLogs" -Description "Export Windows Defender AV logs for Bindplane agent"エクスポートされたログファイルが `C:\Logs\defender-av` に作成されていることを確認します。
config.yamlの Bindplane エージェントのincludeパスがエクスポート ディレクトリと一致していることを確認します。
UDM マッピング テーブル
| ログフィールド | UDM マッピング | ロジック |
|---|---|---|
| OpcodeValue, ThreadID, Channel, engine_version, security_intelligence_version, network_realtime_inspection_engine_version, network_realtime_inspection_security_intelligence_version, rtp_state, oa_state, ioav_state, bm_state, antivirus_security_intelligence_age, antispyware_security_intelligence_age, last_quick_scan_age, last_full_scan_age, antivirus_security_intelligence_creation_time, antispyware_security_intelligence_creation_time, last_quick_scan_start_time, last_quick_scan_end_time, last_quick_scan_source, last_full_scan_start_time, last_full_scan_end_time, last_full_scan_source, product_status | additional.fields | 空でない場合は、ラベルマップ {key: フィールド名, value: {string_value: フィールド値}} と統合されます。 |
| metadata.description | EventID に基づいてイベント固有の説明文字列に設定 | |
| metadata.event_type | has_principal が true の場合は「SCAN_HOST」に設定し、それ以外の場合は「GENERIC_EVENT」に設定します。EventID 1011、1116、1117 の場合は「SCAN_FILE」に設定します。 | |
| ProviderGuid | metadata.product_deployment_id | {} を削除した後の ProviderGuid の値 |
| metadata.product_event_type | EventID に基づいて、イベント固有のプロダクト イベントタイプ文字列に設定 | |
| RecordNumber | metadata.product_log_id | 値が文字列として直接コピーされる |
| platform_version | metadata.product_version | 値が直接コピーされる |
| FWLink | metadata.url_back_to_product | 値が直接コピーされる |
| metadata.vendor_name | 「Microsoft」に設定 | |
| metadata.product_name | 「Windows Defender AV」に設定 | |
| SourceModuleType | observer.application | 値が直接コピーされる |
| Domain、_domain | principal.administrative_domain | Domain の値、または EventID 1116、1117 の grok を使用して Detection User から抽出された _domain |
| ホスト名 | principal.hostname | 値が直接コピーされる |
| プロセス名 | principal.process.file.full_path | EventID 1116、1117 の値が直接コピーされます。 |
| ProcessID | principal.process.pid | 値が直接コピーされる |
| SourceModuleName | principal.resource.name | 値が直接コピーされる |
| AccountType | principal.user.role_description | 値が直接コピーされる |
| AccountName | principal.user.user_display_name | 値が直接コピーされる |
| User、UserID、_account | principal.user.userid | User の値、または UserID(空でない場合)、または EventID 1116、1117 の grok を使用して Detection User から抽出された _account |
| SourceName | security_result.about.resource.attribute.labels | 空でない場合は、ラベルマップ {key: "SourceName", value: SourceName} と統合されます。 |
| security_result.action | デフォルトは「ALLOW」に設定されます。EventID 1116 の場合は「BLOCK」、EventID 1117 の場合は「QUARANTINE」に設定されます。 | |
| security_result.category | EventID 1011、1116、1117 の場合は「SOFTWARE_MALICIOUS」に設定します。 | |
| ActivityID | security_result.detection_fields | ActivityID が空でなく、「-」でない場合は、detection_fields {key: "Activity ID", value: ActivityID} と統合されます。 |
| EventID | security_result.description | 「EventID: %{EventID}」に設定 |
| 脅威の名前 | security_result.rule_name | EventID 1011、1116、1117 の値が直接コピーされます。 |
| Severity、Level、EventType | security_result.severity | Severity が verbose|information|info と一致する場合は LOW、warning|error の場合は MEDIUM、critical の場合は HIGH に設定します。Severity は Level(5|4 -> information、2|3 -> warning、1 -> critical)または EventType(ERROR -> %{severity}、INFO -> "INFORMATIONAL"、それ以外は severity_details)から設定されます。 |
| 重大度名、重大度 | security_result.severity_details | EventID 1011、1116、1117 の Severity Name の値、または ERROR または INFO 以外の EventType の重大度の値 |
| 脅威の名前 | security_result.summary | EventID 1011、1116、1117 の値が直接コピーされます。 |
| カテゴリ名 | security_result.threat_name | EventID 1011、1116、1117 の値が直接コピーされます。 |
| FWLink | security_result.url_back_to_product | EventID 1011、1116、1117 の値が直接コピーされます。 |
| パス | target.file.full_path | EventID 1116、1117 の値が直接コピーされます。 |
| target.hostname | EventID 1117 の場合は「""」に設定されます。 | |
| パス | target.registry.registry_key | EventID 1011 の値が直接コピーされる |
EventRecordID |
event.idm.read_only_udm.metadata.product_log_id |
変更履歴からマッピング |
Product Version |
event.idm.read_only_udm.metadata.product_version |
変更履歴からマッピング |
ProviderGuid |
event.idm.read_only_udm.metadata.product_deployment_id |
変更履歴からマッピング |
Hostname |
event.idm.read_only_udm.principal.asset.hostname |
変更履歴からマッピング |
xmlns |
event.idm.read_only_udm.principal.url |
変更履歴からマッピング |
Threat Resource Path |
event.idm.read_only_udm.target.file.full_path |
変更履歴からマッピング |
Hashes |
event.idm.read_only_udm.target.file.sha1 |
変更履歴からマッピング |
RenderingInfoLevel |
event.idm.read_only_udm.security_result.severity_details |
変更履歴からマッピング |
Action Name |
event.idm.read_only_udm.security_result.action_details |
変更履歴からマッピング |
Detection Time |
event.idm.read_only_udm.security_result.first_discovered_time |
変更履歴からマッピング |
Threat ID |
event.idm.read_only_udm.security_result.threat_id |
変更履歴からマッピング |
Remediation User |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Status Description |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Action ID |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Additional Actions ID |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Additional Actions String |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Category ID |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Detection ID |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Engine Version |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Error Code |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Error Description |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Execution ID |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Execution Name |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Origin ID |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Origin Name |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Post Clean Status |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Pre Execution Status |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Security Intelligence Version |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Severity ID |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Source ID |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
State |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Status Code |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Type ID |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Type Name |
event.idm.read_only_udm.security_result.detection_fields |
変更履歴からマッピング |
Level |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
Culture |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
Keywords |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
Opcode |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
Product Name |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
Provider Name |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
RenderingInfoMessage |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
Service |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
Task |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
Version |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
Security UserID |
event.idm.read_only_udm.additional.fields |
変更履歴からマッピング |
EventID |
event.idm.read_only_udm.security_result.summary |
変更履歴からマッピング |
変更ログ
さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。