Microsoft IIS ログを収集する
このドキュメントでは、Bindplane を使用して Microsoft Internet Information Services(IIS)ログを Google Security Operations に収集する方法について説明します。パーサーはまず、不要な文字を削除し、フィールド名を標準化して、入力データのクレンジングと正規化を試みます。次に、一連の grok
パターンを使用して、さまざまな Microsoft IIS ログ形式から関連するフィールドを抽出し、統合データモデル(UDM)にマッピングします。
始める前に
- Google SecOps インスタンスがあることを確認します。
- Windows 2016 以降があることを確認します。
- プロキシの背後で実行している場合は、ファイアウォール ポートが開いていることを確認します。
Google SecOps の取り込み認証ファイルを取得する
- Google SecOps コンソールにログインします。
- [SIEM 設定] > [コレクション エージェント] に移動します。
- Ingestion Authentication File をダウンロードします。Bindplane をインストールするシステムにファイルを安全に保存します。
Google SecOps のお客様 ID を取得する
- Google SecOps コンソールにログインします。
- [SIEM 設定] > [プロファイル] に移動します。
- [組織の詳細情報] セクションから [お客様 ID] をコピーして保存します。
Windows に Bindplane エージェントをインストールする
- 管理者として コマンド プロンプトまたは PowerShell を開きます。
次のコマンドを実行します。
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
その他のインストール リソース
- その他のインストール オプションについては、こちらのインストール ガイドをご覧ください。
Syslog を取り込んで Google SecOps に送信するように Bindplane エージェントを構成する
- YAML ファイルを構成する前に、[サービス] パネルで
observIQ Distro for Open Telemetry Collector
Service を停止します。 構成ファイルにアクセスします。
config.yaml
ファイルを見つけます。通常、Linux では/etc/bindplane-agent/
ディレクトリに、Windows ではインストール ディレクトリにあります。- テキスト エディタ(
nano
、vi
、メモ帳など)を使用してファイルを開きます。
config.yaml
ファイルを次のように編集します。receivers: iis: collection_interval: 60s processors: # Resourcedetection is used to add a unique (host.name) to the metric resource(s), allowing users to filter between multiple agent systems. resourcedetection: detectors: ["system"] system: hostname_sources: ["os"] normalizesums: batch: exporters: chronicle/powershell: endpoint: malachiteingestion-pa.googleapis.com # Adjust the path to the credentials file you downloaded in Step 1 creds: '/path/to/ingestion-authentication-file.json' log_type: 'IIS' override_log_type: false raw_log_field: body customer_id: '<customer_id>' service: pipelines: logs/winpowershell: receivers: - iis processors: - resourcedetection - normalizesums - batch exporters: [chronicle/iis]
<customer_id>
は、実際の顧客 ID に置き換えます。/path/to/ingestion-authentication-file.json
の値を、Google SecOps の取り込み認証ファイルを取得するで認証ファイルを保存したパスに更新します。config.yaml
ファイルを保存したら、observIQ Distro for Open Telemetry Collector
Service を開始します。
Bindplane エージェントを再起動して変更を適用する
Windows で Bindplane エージェントを再起動するには、Services コンソールを使用するか、次のコマンドを入力します。
net stop BindPlaneAgent && net start BindPlaneAgent
UDM マッピング テーブル
ログフィールド | UDM マッピング | ロジック |
---|---|---|
@timestamp | metadata.event_timestamp | 未加工ログに記録されたイベントのタイムスタンプ。 |
@version | metadata.product_version | IIS サーバーのバージョン。 |
AgentDevice | additional.fields.AgentDevice.value.string_value | ログを生成したデバイス。 |
AgentLogFile | additional.fields.AgentLogFile.value.string_value | ログファイルの名前。 |
ASP.NET_SessionId | network.session_id | ユーザーのセッション ID。 |
c-ip | principal.ip | クライアントの IP アドレス。 |
チャンネル | security_result.about.resource.attribute.labels.Channel.value | イベントが記録されたチャネル。 |
ChannelID | security_result.about.resource.attribute.labels.ChannelID.value | イベントが記録されたチャンネルの ID。 |
パソコン | target.hostname | ターゲット マシンのホスト名。 |
cs-bytes | network.received_bytes | クライアントから受信したバイト数。 |
cs-host | principal.hostname、principal.asset.hostname | クライアントのホスト名。 |
cs-method | network.http.method | クライアントで使用される HTTP メソッド。 |
cs-uri-query | target.url | クライアントによってリクエストされた URL のクエリ文字列。 |
cs-uri-stem | target.url | クライアントによってリクエストされた URL のパス。 |
cs-username | principal.user.user_display_name | クライアントのユーザー名。 |
cs-version | network.tls.version_protocol | クライアントで使用される HTTP バージョン。 |
cs(Cookie) | Cookie 情報を抽出するために使用されます。 | |
cs(Referer) | network.http.referral_url | クライアントを現在のページに誘導した URL。 |
cs(User-Agent) | network.http.user_agent | クライアントのユーザー エージェント。 |
csbyte | network.received_bytes | クライアントから受信したバイト数。 |
cshost | principal.hostname、principal.asset.hostname | クライアントのホスト名。 |
csip | principal.ip、principal.asset.ip | クライアントの IP アドレス。 |
csmethod | network.http.method | クライアントで使用される HTTP メソッド。 |
csreferer | network.http.referral_url | クライアントを現在のページに誘導した URL。 |
csuseragent | network.http.user_agent | クライアントのユーザー エージェント。 |
csusername | principal.user.user_display_name | クライアントのユーザー名。 |
csversion | network.tls.version_protocol | クライアントで使用される HTTP バージョン。 |
日付 | 未加工ログのタイムスタンプが無効な場合に、イベント タイムスタンプの作成に使用されます。 | |
説明 | security_result.description | イベントの説明。 |
devicename | target.hostname | ターゲット マシンのホスト名。 |
dst_ip | target.ip、target.asset.ip | ターゲット マシンの IP アドレス。 |
dst_port | target.port | ターゲット マシンのポート番号。 |
duration | リクエストの所要時間(ミリ秒単位)。 | |
EventEnqueuedUtcTime | additional.fields.EventEnqueuedUtcTime.value.string_value | イベントがキューに登録された時刻(UTC)。 |
EventID | metadata.product_log_id | イベントの ID。 |
EventProcessedUtcTime | additional.fields.EventProcessedUtcTime.value.string_value | イベントが処理された時刻(UTC)。 |
EventTime | metadata.event_timestamp | イベントのタイムスタンプ。 |
EventType | metadata.product_event_type | イベントのタイプ。 |
file_path | target.file.full_path | イベントに関連するファイルのフルパス。 |
FilterId | security_result.about.resource.attribute.labels.FilterId.value | フィルタの ID。 |
FilterKey | security_result.about.resource.attribute.labels.FilterKey.value | フィルタのキー。 |
FilterName | security_result.about.resource.attribute.labels.FilterName.value | フィルタの名前。 |
FilterType | security_result.about.resource.attribute.labels.FilterType.value | フィルタのタイプ。 |
ホスト | target.hostname | ターゲット マシンのホスト名。 |
host.architecture | principal.asset.hardware.cpu_platform | ホストマシンのアーキテクチャ。 |
host.geo.name | additional.fields.geo_name.value.string_value | ホストマシンの地理的な位置。 |
host.hostname | target.hostname、target.asset.hostname | ホストマシンのホスト名。 |
host.id | observer.asset_id | ホストマシンの ID。 |
host.ip | principal.ip、principal.asset.ip | ホストマシンの IP アドレス。 |
host.mac | principal.mac | ホストマシンの MAC アドレス。 |
host.os.build | additional.fields.os_build.value.string_value | ホストマシンのオペレーティング システムのビルド番号。 |
host.os.kernel | principal.platform_patch_level | ホストマシンのオペレーティング システムのカーネル バージョン。 |
host.os.name | additional.fields.os_name.value.string_value | ホストマシンのオペレーティング システムの名前。 |
host.os.platform | principal.platform | ホストマシンのオペレーティング システムのプラットフォーム。 |
host.os.version | principal.platform_version | ホストマシンのオペレーティング システムのバージョン。 |
http_method | network.http.method | クライアントで使用される HTTP メソッド。 |
http_response | network.http.response_code | HTTP レスポンス コード |
http_status_code | network.http.response_code | レスポンスの HTTP ステータス コード。 |
http_substatus | additional.fields.sc_substatus.value.string_value | レスポンスの HTTP サブステータス コード。 |
インスタンス | additional.fields.instance.value.string_value | タスクのインスタンス ID。 |
intermediary_devicename | intermediary.hostname、intermediary.asset.hostname | 仲介デバイスのホスト名。 |
json_message | JSON 形式の未加工のログメッセージ。 | |
kv_fields | 未加工ログのメッセージから Key-Value ペアを抽出するために使用されます。 | |
LayerKey | security_result.about.resource.attribute.labels.LayerKey.value | レイヤのキー。 |
LayerName | security_result.about.resource.attribute.labels.LayerName.value | レイヤの名前。 |
LayerId | security_result.about.resource.attribute.labels.LayerId.value | レイヤの ID。 |
log.file.path | target.file.full_path | ログファイルのフルパス。 |
log.offset | metadata.product_log_id | ログファイル内のイベントのオフセット。 |
logstash.collect.host | observer.hostname | ログを収集したマシンのホスト名。 |
logstash.process.host | intermediary.hostname | ログを処理したマシンのホスト名。 |
logstash_json_message | JSON 形式の未加工のログメッセージ。 | |
メッセージ | security_result.description | 未加工のログ メッセージ。 |
ミニストリー | additional.fields.ministry.value.string_value | イベントに関連付けられている省庁。 |
name | エンティティの名前。 | |
NewValue | additional.fields.NewValue.value.string_value | 構成設定の新しい値。 |
OldValue | additional.fields.OldValue.value.string_value | 構成設定の古い値。 |
ポート | principal.port | クライアントのポート番号。 |
priority_code | syslog メッセージの優先度コード。 | |
ProcessID | principal.process.pid | イベントを生成したプロセスのプロセス ID。 |
ProviderGuid | security_result.about.resource.attribute.labels.ProviderGuid.value | プロバイダの GUID。 |
ProviderKey | security_result.about.resource.attribute.labels.ProviderKey.value | プロバイダのキー。 |
ProviderName | security_result.about.resource.attribute.labels.ProviderName.value | プロバイダの名前。 |
referrer_url | network.http.referral_url | クライアントを現在のページに誘導した URL。 |
request_url | target.url | クライアントによってリクエストされた URL。 |
s-computername | target.hostname | ターゲット マシンのホスト名。 |
s-ip | target.ip、target.asset.ip | ターゲット マシンの IP アドレス。 |
s-port | target.port | ターゲット マシンのポート番号。 |
s-sitename | additional.fields.sitename.value.string_value | サイトの名前。 |
sc-bytes | network.sent_bytes | クライアントに送信されたバイト数。 |
sc-status | network.http.response_code | レスポンスの HTTP ステータス コード。 |
sc-substatus | additional.fields.sc_substatus.value.string_value | レスポンスの HTTP サブステータス コード。 |
sc-win32-status | レスポンスの Windows ステータス コード。 | |
scbyte | network.sent_bytes | クライアントに送信されたバイト数。 |
scstatus | network.http.response_code | レスポンスの HTTP ステータス コード。 |
重要度 | security_result.severity | イベントの重大度。 |
service.type | additional.fields.service_type.value.string_value | サービスのタイプ。 |
sIP | principal.ip、principal.asset.ip | クライアントの IP アドレス。 |
sPort | principal.port | クライアントのポート番号。 |
sSiteName | additional.fields.sitename.value.string_value | サイトの名前。 |
src_ip | principal.ip、principal.asset.ip、observer.ip | クライアントの IP アドレス。 |
src_port | principal.port | クライアントのポート番号。 |
sysdate | syslog メッセージの日時。 | |
syslog_facility | security_result.severity_details | syslog メッセージのファシリティ。 |
syslog_pri | syslog メッセージの優先度。 | |
syslog_severity | security_result.severity_details | syslog メッセージの重大度。 |
syslog_severity_code | syslog メッセージの重大度コード。 | |
tags | security_result.rule_name | イベントに関連付けられたタグ。 |
タスク | additional.fields.task.value.string_value | タスクの名前。 |
時間 | 未加工ログのタイムスタンプが無効な場合に、イベント タイムスタンプの作成に使用されます。 | |
time-taken | リクエストの所要時間(ミリ秒単位)。 | |
uri_query | target.url | クライアントによってリクエストされた URL のクエリ文字列。 |
user_agent | network.http.user_agent | クライアントのユーザー エージェント。 |
ユーザー名 | target.user.userid | ユーザーのユーザー名。 |
UserSid | target.user.windows_sid | ユーザーの Windows SID。 |
重み | security_result.about.resource.attribute.labels.Weight.value | フィルタの重み。 |
win32_status | レスポンスの Windows ステータス コード。 | |
xforwardedfor | IP アドレスのカンマ区切りのリストを含む X-Forwarded-For ヘッダー。 | |
metadata.log_type | IIS |
|
network.direction | INBOUND |
|
metadata.vendor_name | Microsoft |
|
metadata.product_name | Internet Information Server |
|
metadata.event_type | NETWORK_HTTP 、USER_UNCATEGORIZED 、GENERIC_EVENT 、STATUS_UPDATE 、USER_LOGOUT 、USER_LOGIN |
|
extensions.auth.type | MACHINE |
さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。