Microsoft Azure Resource ログを収集する

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

このドキュメントでは、Microsoft Azure Blob Storage V2 を使用して Google Security Operations フィードを設定し、Microsoft Azure リソースログを収集する方法について説明します。

Azure リソースログは、Azure リソース内で行われたオペレーションに関する分析情報を提供します。これらのログには、リソース オペレーション、ステータス、パフォーマンス指標に関する詳細情報が記録されます。コンテンツはリソースタイプによって異なり、認証イベント、構成の変更、アクセス試行、運用指標などのデータが含まれます。

始める前に

次の前提条件を満たしていることを確認します。

  • Google SecOps インスタンス
  • Microsoft Azure ポータルへの特権アクセス(次の権限を持つ)。

    • ストレージ アカウントを作成する
    • Azure リソースの診断設定を構成する
    • アクセスキーを管理する

Azure Storage アカウントを構成する

ストレージ アカウントを作成する

  1. Azure ポータルで、[ストレージ アカウント] を検索します。
  2. [+ 作成] をクリックします。
  3. 次の構成情報を提供してください。

    設定
    サブスクリプション Azure サブスクリプションを選択する
    リソース グループ 既存のものを選択するか、新しいものを作成する
    ストレージ アカウント名 一意の名前を入力します(例: azureresourcelogs)。
    リージョン リージョンを選択します(例: East US)。
    パフォーマンス 標準(推奨)
    冗長性 GRS(地理冗長ストレージ)または LRS(ローカル冗長ストレージ)
  4. [Review + create] をクリックします。

  5. アカウントの概要を確認して、[作成] をクリックします。

  6. デプロイが完了するまで待ちます。

ストレージ アカウントの認証情報を取得する

  1. 作成した Storage Account に移動します。
  2. 左側のナビゲーションで、[セキュリティとネットワーキング] の [アクセスキー] を選択します。
  3. [キーを表示] をクリックします。
  4. 後で使用するために、次の値をコピーして保存します。

    • ストレージ アカウント名: azureresourcelogs
    • キー 1 またはキー 2: 共有アクセスキー(base64 でエンコードされた 512 ビットのランダムな文字列)

Blob Service エンドポイントを取得する

  1. 同じストレージ アカウントで、左側のナビゲーションから [エンドポイント] を選択します。
  2. Blob サービスのエンドポイント URL をコピーして保存します。
    • 例: https://azureresourcelogs.blob.core.windows.net/

Azure リソースの診断設定を構成する

Azure リソースログはデフォルトでは収集されません。ログをストレージ アカウントに転送するには、Azure リソースごとに診断設定を作成する必要があります。

  1. Azure ポータルで、モニタリングする Azure リソースに移動します。
  2. 左側のナビゲーションで、[モニタリング] の [診断設定] を選択します。
  3. [+ 診断設定を追加] をクリックします。
  4. 次の構成の詳細を指定します。
    • 診断設定名: わかりやすい名前を入力します(例: export-to-secops)。
    • [ログ] セクションで、収集するログカテゴリを選択します。使用可能なカテゴリはリソースタイプによって異なります。一般的なカテゴリには、次のようなものがあります。
      • 管理(アクティビティ ログの場合)
      • セキュリティ(アクティビティ ログの場合)
      • AuditEvent(Key Vault の場合)
      • ApplicationGatewayAccessLog(Application Gateway の場合)
      • ApplicationGatewayFirewallLog(Application Gateway の場合)
      • NetworkSecurityGroupEvent(ネットワーク セキュリティ グループの場合)
    • [指標] セクション(省略可)で、[AllMetrics] を選択して、プラットフォーム指標をストレージ アカウントに送信します。
    • [宛先の詳細] セクションで、[ストレージ アカウントにアーカイブする] チェックボックスをオンにします。
    • サブスクリプション: ストレージ アカウントを含むサブスクリプションを選択します。
    • ストレージ アカウント: 作成したストレージ アカウント(例: azureresourcelogs)を選択します。
  5. [保存] をクリックします。

構成後、ログはストレージ アカウントのコンテナに自動的にエクスポートされます。Azure は、命名パターン insights-logs-<log-category-name> を使用してコンテナを作成します。次に例を示します。

  • Key Vault 監査ログ: insights-logs-auditevent
  • Application Gateway アクセスログ: insights-logs-applicationgatewayaccesslog
  • Application Gateway ファイアウォール ログ: insights-logs-applicationgatewayfirewalllog
  • ネットワーク セキュリティ グループのイベント: insights-logs-networksecuritygroupevent

Azure リソースログを取り込むように Google SecOps でフィードを構成する

  1. [SIEM 設定] > [フィード] に移動します。
  2. [Add New Feed] をクリックします。
  3. 次のページで [単一のフィードを設定] をクリックします。
  4. [フィード名] フィールドに、フィードの名前を入力します(例: Azure Resource Logs - Key Vault)。
  5. [ソースタイプ] で [Microsoft Azure Blob Storage V2] を選択します。
  6. [ログタイプ] として [Microsoft Azure Resource] を選択します。
  7. [次へ] をクリックします。
  8. 次の入力パラメータの値を指定します。

    • Azure URI: コンテナパスを含む Blob Service エンドポイント URL を入力します。
    https://azureresourcelogs.blob.core.windows.net/insights-logs-auditevent/
    
    • 次のように置き換えます。
      • azureresourcelogs: Azure ストレージ アカウント名。
      • insights-logs-auditevent: ログが保存される Blob コンテナ名(リソースタイプとログカテゴリによって異なります)。
    • Source deletion option: 必要に応じて削除オプションを選択します。

      • なし: 転送後にファイルを削除しません。
      • 転送されたファイルを削除する: 転送が完了した後にファイルを削除します。
      • 転送されたファイルと空のディレクトリを削除する: 転送が完了した後にファイルと空のディレクトリを削除します。
    • ファイルの最大経過日数: 指定した日数以内に変更されたファイルを含めます。デフォルトは 180 日です。

    • 共有キー: 手順 3 でストレージ アカウントから取得した共有キーの値(アクセスキー)を入力します。

    • アセットの名前空間: アセットの名前空間

    • Ingestion labels: このフィードのイベントに適用されるラベル。

  9. [次へ] をクリックします。

  10. [Finalize] 画面で新しいフィードの設定を確認し、[送信] をクリックします。

Azure Storage ファイアウォールを構成する(有効になっている場合)

Azure Storage アカウントでファイアウォールを使用している場合は、Google SecOps の IP 範囲を追加する必要があります。

  1. Azure ポータルで、ストレージ アカウントazureresourcelogs など)に移動します。
  2. [セキュリティとネットワーキング] で [ネットワーキング] を選択します。
  3. [ファイアウォールと仮想ネットワーク] で、[選択した仮想ネットワークと IP アドレスから有効] を選択します。
  4. [ファイアウォール] セクションの [アドレス範囲] で、[+ IP 範囲を追加] をクリックします。
  5. 各 Google SecOps IP 範囲を CIDR 表記で追加します。

  6. [保存] をクリックします。

UDM マッピング テーブル

ログフィールド UDM マッピング ロジック
さまざまな追加のフィールド*_label フィールド additional.fields さまざまな追加のフィールド*_label フィールドから統合されました
authenticationMethod extensions.auth.mechanism authenticationMethod が Password の場合は USERNAME_PASSWORD に設定します
category、event_type extensions.auth.type SQLSecurityAuditEvents の場合は MACHINE、特定のカテゴリの場合は SSO、その他の場合は AUTHTYPE_UNSPECIFIED に設定
properties.partialipaddress intermediary.ip properties.partialipaddress の値(空でない場合)
properties.event_time、stage_time、risk_time、last_update_time、time metadata.collected_timestamp ISO8601 を使用して、properties.event_time、stage_time、risk_time、last_update_time、またはフォールバック grok を使用した時間から変換されます。
properties.message、properties.activity、properties.log.stage metadata.description properties.message が空でない場合はその値。それ以外の場合は properties.activity の値。それ以外の場合は properties.log.stage の値
event_type metadata.event_type event_type の値(空でない場合)。空の場合は GENERIC_EVENT
category、record.category metadata.product_event_type カテゴリまたは record.category から直接コピーされた値
properties.event_id、properties.log.auditID metadata.product_log_id properties.event_id の値(空でない場合)。空の場合は properties.log.auditID の値
properties.log.apiVersion metadata.product_version properties.log.apiVersion から直接コピーされた値
プロトコル network.application_protocol プロトコルから直接コピーされた値
properties.log.verb network.dhcp.opcode properties.log.verb から直接コピーした値(大文字)
properties.CsMethod、record.properties.CsMethod network.http.method properties.CsMethod または record.properties.CsMethod から直接コピーされた値
user_agent network.http.parsed_user_agent user_agent から変換
properties.Referer、uri network.http.referral_url プロパティからの値。空でない場合は Referer、それ以外の場合は uri
properties.ScStatus、record.properties.ScStatus、properties.statusCode、record.properties.statusCode、responseStatus.code network.http.response_code properties.ScStatus、record.properties.ScStatus、properties.statusCode、record.properties.statusCode、responseStatus.code から整数に変換
user_agent network.http.user_agent user_agent から直接コピーされた値
properties.ScBytes、record.properties.ScBytes、properties.responseLength network.received_bytes properties.ScBytes、record.properties.ScBytes、または properties.responseLength から uinteger に変換
properties.CsBytes、record.properties.CsBytes、properties.requestLength network.sent_bytes properties.CsBytes、record.properties.CsBytes、または properties.requestLength から uinteger に変換されました
properties.session_id network.session_id properties.session_id から直接コピーされた値(文字列に変換)
properties.tlsVersion network.tls.version properties.tlsVersion から直接コピーされた値
domain_name_value principal.administrative_domain domain_name_value から直接コピーされた値
properties.clientAppUsed, target_application principal.application properties.clientAppUsed の値(空でない場合)。空の場合は target_application の値
prop_device_id principal.asset.asset_id null でない場合は、Device ID: の後に prop_device_id を設定
ハードウェア principal.asset.hardware ハードウェアから統合
properties.host_name、properties.CIp、record.properties.CIp、properties.ComputerName、record.properties.ComputerName、properties.CsHost、record.properties.CsHost、properties.server_instance_name、record.properties.server_instance_name、server_name principal.asset.hostname properties.host_name の値(空でない場合)。それ以外の場合は、properties.CIp(grok IP)、record.properties.CIp(grok IP)、properties.ComputerName、record.properties.ComputerName、properties.CsHost、record.properties.CsHost、properties.server_instance_name、record.properties.server_instance_name、server_name のいずれかの値
src_ip、src_ip1、properties.client_ip、record.properties.clientIpAddress、properties.clientIpAddress、callerIpAddress、properties.ipAddress、ip principal.asset.ip src_ip、src_ip1、properties.client_ip(grok IP)、record.properties.clientIpAddress、properties.clientIpAddress(grok IP)、record.properties.clientIpAddress、callerIpAddress(grok IP)、properties.ipAddress、ip の値
properties.host_name、properties.CsHost、record.properties.CsHost principal.hostname properties.host_name が空でない場合はその値。空の場合は properties.CsHost または record.properties.CsHost の値
src_ip、src_ip1、properties.client_ip、record.properties.clientIpAddress、properties.clientIpAddress、callerIpAddress、properties.ipAddress、ip principal.ip src_ip、src_ip1、properties.client_ip(grok IP)、record.properties.clientIpAddress、properties.clientIpAddress(grok IP)、record.properties.clientIpAddress、callerIpAddress(grok IP)、properties.ipAddress、ip の値
properties.location.city、provisioning_steps_city principal.location.city properties.location.city が空でない場合はその値。それ以外の場合は provisioning_steps_city の値
properties.location.countryOrRegion、provisioning_steps_country、location、Region principal.location.country_or_region properties.location.countryOrRegion が空でない場合はその値。それ以外の場合は provisioning_steps_country の値。それ以外の場合は location の値。それ以外の場合は Region の値
properties.location.geoCoordinates.latitude principal.location.region_latitude properties.location.geoCoordinates.latitude から直接コピーされた値
properties.location.geoCoordinates.longitude principal.location.region_longitude properties.location.geoCoordinates.longitude から直接コピーされた値
properties.location.state principal.location.state properties.location.state から直接コピーされた値
prop_os principal.platform prop_os が (?i)Win と一致する場合は WINDOWS、(?i)Lin と一致する場合は LINUX、(?i)Mac と一致する場合は MAC に設定します。
properties.deviceDetail.operatingSystem principal.platform_version properties.deviceDetail.operatingSystem から直接コピーされた値
src_port principal.port src_port から整数に変換
is_compliant_label、is_managed_label、serice_type_label、serice_credential_label principal.resource.attribute.labels is_compliant_label、is_managed_label、serice_type_label、serice_credential_label から統合
properties.sourceSystem.Name principal.resource.name properties.sourceSystem.Name から直接コピーされた値
properties.sourceSystem.Id principal.resource.product_object_id properties.sourceSystem.Id から直接コピーされた値
properties.server_principal_name、source_user_principal_name、user_principal_name、local_account_username_value principal.user.email_addresses properties.server_principal_name(メールと一致する場合)、source_user_principal_name(メールと一致する場合)、user_principal_name(メールと一致する場合)、または local_account_username_value(メールと一致する場合)から統合されます。
properties.sequence_group_id, grpname, properties.log.user.groups principal.user.group_identifiers properties.sequence_group_id、grpname、または properties.log.user.groups から統合されました
properties.sourceIdentity.details.id、properties.userId、details_id_not_present principal.user.product_object_id properties.sourceIdentity.details.id の値(空でない場合)。それ以外の場合は properties.userId の値。それ以外の場合は details_id_not_present の値
properties.ServicePrincipalDisplayName、properties.servicePrincipalName、properties.sourceIdentity.details.DisplayName、properties.userDisplayName、record.properties.log.user.username principal.user.user_display_name properties.ServicePrincipalDisplayName の値(空でない場合)。それ以外の場合は properties.servicePrincipalName。それ以外の場合は properties.sourceIdentity.details.DisplayName。それ以外の場合は properties.userDisplayName。それ以外の場合は record.properties.log.user.username
properties.servicePrincipalId、user_userPrincipalName、source_user_principal_name、details_user_principal_name、user_principal_name、properties.accountName、record.properties.log.user.uid principal.user.userid 空でない場合は properties.servicePrincipalId の値。それ以外の場合は user_userPrincipalName の値。それ以外の場合は source_user_principal_name の値。それ以外の場合は details_user_principal_name の値。それ以外の場合は user_principal_name の値。それ以外の場合は properties.accountName の値。それ以外の場合は record.properties.log.user.uid の値
security_action、succeeded、statusText、resultType security_result.action security_action が allow の場合は ALLOW に設定します。それ以外の場合は、succeeded が true、statusText が Success、resultType が success の場合は ALLOW に設定します。それ以外の場合は、succeeded が false、statusText が failed、resultType が failed の場合は BLOCK に設定します。
properties.action_name security_result.action_details properties.action_name から直接コピーされた値
status_label security_result.about.resource.attribute.labels status_label から統合
properties_log_label、corr_key_label、resultType_label、resultSignature_label、networkName_label、networkType_label、method_label、authentication_step_requirement_label、authentication_step_result_detail_label、stepdate_label、initiatedby_name_label、initiatedby_id_label、initiatedby_type_label、targetSystem_id_label、targetSystem_name_label、containerID_label、pod_label、authentication_label、api_name_label、scale_unit_label、namespace_name_label、subscription_id_label、activity_id_label_1、task_name_label、environment_label、cookie、additional_field_event_ip、additional_field_event_primary_stamp、additional_field_event_stamp_type、source、correlationId_field、activityDateTime_field、detectedDateTime_field、lastUpdatedDateTime_field、count_label、total_label、minimum_label、maximum_label、average_label、metricName_label、timeGrain_label、ApiName_label、Authentication_label、GeoType_label、old_label、new_label、add_label、keyId_label、sr_result.rule_name、sr_result.rule_id、resultField、sr_result.detection_fields security_result.detection_fields properties_log_label、corr_key_label、resultType_label、resultSignature_label、networkName_label、networkType_label、method_label、authentication_step_requirement_label、authentication_step_result_detail_label、stepdate_label、initiatedby_name_label、initiatedby_id_label、initiatedby_type_label、targetSystem_id_label、targetSystem_name_label、containerID_label、pod_label、authentication_label、api_name_label、scale_unit_label、namespace_name_label、subscription_id_label、activity_id_label_1、task_name_label、environment_label、cookie、additional_field_event_ip、additional_field_event_primary_stamp、additional_field_event_stamp_type、source、correlationId_field、activityDateTime_field、detectedDateTime_field、lastUpdatedDateTime_field、count_label、total_label、minimum_label、maximum_label、average_label、metricName_label、timeGrain_label、ApiName_label、Authentication_label、GeoType_label、old_label、new_label、add_label、keyId_label、sr_result.rule_name、sr_result.rule_id、resultField、sr_result.detection_fields から統合されました
resultDescription、sec_result.description、properties.queryexecutionstatus security_result.description resultDescription の値(改行を置換)。それ以外の場合は sec_result.description。それ以外の場合は properties.queryexecutionstatus
policy_id_value security_result.rule_id policy_id_value から直接コピーされた値
properties.Result、statusText、properties.queryexecutionstatus security_result.summary プロパティからの値。空でない場合は Result、それ以外の場合は statusText、それ以外の場合は properties.queryexecutionstatus
target_application target.application target_application からの値
properties.ComputerName、record.properties.ComputerName、properties.server_instance_name、record.properties.server_instance_name target.asset.hostname properties.ComputerName、record.properties.ComputerName、properties.server_instance_name、record.properties.server_instance_name のいずれかの値
(ハードコード) target.cloud.environment 「MICROSOFT_AZURE」に設定
properties.SPort、record.properties.SPort target.port properties.SPort または record.properties.SPort から整数に変換されます。
properties.querytext.query target.process.command_line properties.querytext.query から直接コピーされた値
properties.processId target.process.pid properties.processId から文字列に変換
subscription_id_label、resource_group_label、request_resource_type_label、request_resource_id_label、additional_objectKey、additional_clientRequestId、additional_RiskEventType、additional_tokenIssuerType、keyId_label、appid_label target.resource.attribute.labels subscription_id_label、resource_group_label、request_resource_type_label、request_resource_id_label、additional_objectKey、additional_clientRequestId、additional_RiskEventType、additional_tokenIssuerType、keyId_label、appid_label から統合
properties_databasename、properties.resourceDisplayName、record.properties.databasename、record.properties.databaseName target.resource.name properties_databasename が空でない場合はその値。それ以外の場合は properties.resourceDisplayName の値。それ以外の場合は record.properties.databasename の値。それ以外の場合は record.properties.databaseName の値
resourceId、properties.resourceId target.resource.product_object_id resourceId が空でない場合は resourceId の値。それ以外の場合は properties.resourceId の値
properties_collectionname、properties.resourceDisplayName、record.properties.collectionname、record.properties.collectionName、properties.log.objectRef.resource target.resource.resource_subtype properties_collectionname が空でない場合はその値。それ以外の場合は properties.resourceDisplayName の値。それ以外の場合は record.properties.collectionname の値。それ以外の場合は record.properties.collectionName の値。それ以外の場合は properties.log.objectRef.resource の値
resourceId、message target.resource.resource_type resourceId がパターンに一致する場合は DATABASE、メッセージが MANAGEDCLUSTERS に一致する場合は CLUSTER、MANAGEDINSTANCES に一致する場合は VIRTUAL_MACHINE、DATABASEACCOUNTS に一致する場合は DATABASE に設定します。
resourceType target.resource.type resourceType から直接コピーされた値
properties.CsUriStem、properties.log.requestURI、値(additionalInfo から) target.url properties.CsUriStem が空でない場合はその値。それ以外の場合は properties.log.requestURI の値。それ以外の場合は値(additionalInfo から)
user_principal_name target.user.email_addresses user_principal_name から統合(メールアドレスが一致する場合)
properties.userId target.user.product_object_id properties.userId から直接コピーされた値
properties.userDisplayName target.user.user_display_name properties.userDisplayName から直接コピーされた値
user_principal_name、properties.userPrincipalName target.user.userid user_principal_name が空でない場合はその値。それ以外の場合は properties.userPrincipalName の値
(ハードコード) metadata.product_name 「Azure Resource Logs」に設定します。
(ハードコード) metadata.vendor_name 「Microsoft」に設定

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