コンテキストアウェア分析で Sensitive Data Protection のデータを使用する

このドキュメントでは、Sensitive Data Protection および追加のログソースのエンティティ コンテキスト データを使用して、脅威の調査を実行するときに、潜在的な脅威の影響と範囲に関するコンテキストを理解する方法を説明します。

このドキュメントで説明するユースケースでは、ユーザー(MITRE ATT&CK Technique T1204.002)による悪意のあるファイルの実行と、そのユーザーがネットワーク上のその他の場所にある機密データにアクセスできるかどうかを検出します。

この例では、Google Security Operations で次のデータが取り込まれ、正規化されている必要があります。

  • ネットワーク ログと EDR ログを使用するユーザー アクティビティ データ。
  • Google Cloud IAM 分析などのデータソースからのリソース関係。
  • 保存されたデータの種類と機密性に関するラベルを含む Sensitive Data Protection のログ。

Google Security Operations は、元データを解析して統合データモデル(UDM)エンティティとイベント レコードに変換できる必要があります。

Sensitive Data Protection のデータを Google Security Operations に取り込む方法については、Google Security Operations への Sensitive Data Protection データのエクスポートをご覧ください。

Google Cloud IAM 分析データ

この例の Google Cloud IAM 分析ログデータは、組織内のユーザーを識別し、各ユーザーがネットワーク上の他のシステムと持つ関係を把握します。次に、UDM エンティティ レコードとして保存された IAM 分析ログのスニペットを示します。これには、analytics:claim.patients という BigQuery テーブルを管理する mikeross ユーザーに関する情報が保存されます。

metadata.vendor_name: "Google Cloud Platform"
metadata.product_name: "GCP IAM Analysis"
metadata.entity_type: "USER"
entity.user.userid: "mikeross"
relations[2].entity.resource.name: "analytics:claim.patients"
relations[2].entity.resource.resource_type: "TABLE"
relations[2].entity_type: "RESOURCE"
relations[2].relationship: "ADMINISTERS"

Sensitive Data Protection のデータ

この例の Sensitive Data Protection データには、BigQuery テーブルに関する情報が保存されます。次に、UDM エンティティ レコードとして保存された Sensitive Data Protection ログのスニペットを示します。これは、米国社会保障番号が格納されていることを示す、Predicted InfoType ラベル US_SOCIAL_SECURITY_NUMBER を持つ analytics:claim.patients という BigQuery テーブルを表します。

metadata.vendor_name: "Google Cloud Platform"
metadata.product_name: "GCP DLP CONTEXT"
metadata.entity_type: "RESOURCE"
metadata.description: "RISK_HIGH"
entity.resource.resource_type: "TABLE"
entity.resource.resource_subtype: "BigQuery Table"
entity.resource.attribute.cloud.environment"GOOGLE_CLOUD_PLATFORM"
entity.resource.attribute.labels[0].key: "Sensitivity Score"
entity.resource.attribute.labels[0].value: "SENSITIVITY_HIGH"
entity.resource.attribute.labels[1].key: "Predicted InfoType"
entity.resource.attribute.labels[1].value: "US_SOCIAL_SECURITY_NUMBER"
entity.resource.product_object_id: "analytics:claim.patients"

ウェブプロキシ イベント

この例のウェブプロキシ イベントは、ネットワーク アクティビティをキャプチャします。次のスニペットは、UDM イベント レコードとして保存されている Zscaler ウェブプロキシのログです。これは、ユーザーが userid の値 mikeross を持つ実行可能ファイルのネットワーク ダウンロード イベントをキャプチャします。ここで、received_bytes の値は 514605 です。

metadata.log_type = "ZSCALER_WEBPROXY"
metadata.product_name = "NSS"
metadata.vendor_name = "Zscaler"
metadata.event_type = "NETWORK_HTTP"
network.http.response_code = 200
network.received_bytes = 514605
principal.user.userid = "mikeross"
target.url = "http://manygoodnews.com/dow/Client%20Update.exe"

EDR イベント

この例の EDR イベントは、エンドポイント デバイスでのアクティビティをキャプチャします。次のスニペットは、UDM イベント レコードとして保存された CrowdStrike Falcon EDR ログです。これは、Microsoft Excel アプリケーションと userid の値 mikeross を持つユーザーを含むネットワーク イベントをキャプチャします。

metadata.log_type = "CS_EDR"
metadata.product_name = "Falcon"
metadata.vendor_name = "Crowdstrike"
metadata.event_type = "NETWORK_HTTP"
target.process.file.full_path = "\\Device\\HarddiskVolume1\\Program Files\\C:\\Program Files\\Microsoft Office\\Office16\\EXCEL.exe"
target.url = "http://manygoodnews.com/dow/Client%20Update.exe"
target.user.userid = "mikeross"

これらのレコードには、ユーザー識別子 mikeross とテーブル名 analytics:claim.patients の両方の共通情報があります。このドキュメントの次のセクションでは、レコードを結合するために、これらの値をルールで使用する方法について説明します。

この例の検出エンジンルール

この例のルールでは、ユーザー(MITRE ATT&CK Technique T1204.002)による悪意のあるファイルの実行を検出します。

このユーザーがネットワーク上の他の場所にも機密データにアクセスできる場合、このルールにより、より高いリスクスコアが検出に割り当てられます。このルールは次の情報に関連付けられます。

  • 実行可能ファイルのダウンロードや起動などのユーザー アクティビティ。
  • リソース間の関係(BigQuery テーブルに対するユーザーの関係など)。
  • ユーザーがアクセスできるリソース(BigQuery テーブルに保存されているデータの種類など)における機密情報の存在。

サンプルルールの各セクションの説明は次のとおりです。

  • events セクションでは、ルールが検索するデータのパターンを指定し、次の内容が含まれます。

    • グループ 1 とグループ 2 は、大量のデータまたは Excel アプリケーション内のアクティビティに関連する実行可能ファイルのダウンロードをキャプチャするネットワークと EDR のイベントを識別します。
    • グループ 3 は、ネットワークおよび EDR イベントで識別されたユーザーが、BigQuery テーブルに対する権限も持つレコードを識別します。
    • グループ 4 は、ユーザーがアクセスできる BigQuery テーブルの Sensitive Data Protection レコードを識別します。

    式の各グループは、$table_name 変数または $user 変数を使用して、同じユーザーとデータベース テーブルに関連するレコードを結合します。

  • outcome セクションでは、ルールは $risk_score 変数を作成し、テーブル内のデータの機密性に基づいて値を設定します。この場合、データに US_SOCIAL_SECURITY_NUMBER Sensitive Data Protection infoType のラベルが付いているかどうかを確認します。

    outcome セクションでは、$principalHostname$entity_resource_name などの追加の変数も設定されます。これらの変数は、検出によって返され、保存されるため、Google Security Operations で表示するときにも表示できます。変数の値を列として表示できます。

  • condition セクションでは、パターンが events セクションで指定されたすべての UDM レコードを検索するように指定します。

  rule high_risk_user_download_executable_from_macro {
 meta:
   author = "Google Cloud Security Demos"
   description = "Executable downloaded by Microsoft Excel from High Risk User"
   severity = "High"
   technique = "T1204.002"

 events:
   //Group 1. identify a proxy event with suspected executable download
   $proxy_event.principal.user.userid = $user
   $proxy_event.target.url =  /.*\.exe$/ or
   $proxy_event.network.received_bytes > 102400

   //Group 2. correlate with an EDR event indicating Excel activity
   $edr_event.target.user.userid  = $user
   $edr_event.target.process.file.full_path = /excel/ nocase
   $edr_event.metadata.event_type = "NETWORK_HTTP"

   //Group 3. Use the entity to find the permissions
   $user_entity.graph.entity.user.userid = $user
   $user_entity.graph.relations.entity.resource.name = $table_name

   //Group 4. the entity is from Cloud DLP data
   $table_context.graph.entity.resource.product_object_id = $table_name
   $table_context.graph.metadata.product_name = "GCP DLP CONTEXT"

 match:
    $user over 5m

 outcome:
   //calculate risk score
   $risk_score = max(
       if( $table_context.graph.entity.resource.attribute.labels.value = "US_SOCIAL_SECURITY_NUMBER", 80)
       )
   $technique = array_distinct("T1204.002")
   $principalHostname = array_distinct($proxy_event.principal.hostname)
   $principalIp = array_distinct($proxy_event.principal.ip)
   $principalMac = array_distinct($proxy_event.principal.mac)
   $targetHostname = array_distinct($proxy_event.target.hostname)
   $target_url = array_distinct($proxy_event.target.url)
   $targetIp = array_distinct($proxy_event.target.ip)
   $principalUserUserid =  array_distinct($proxy_event.principal.user.userid)
   $entity_resource_name = array_distinct($table_context.graph.entity.resource.name)

condition:
   $proxy_event and $edr_event and $user_entity and $table_context
}

検出について

既存のデータでルールをテストし、定義で指定されたアクティビティのパターンが特定されると、検出が生成されます。[検出] パネルに、ルールのテスト後に生成された検出が表示されます。[検出] パネルには、ルールが検出を作成する原因となったイベント レコードとエンティティ レコードも表示されます。この例では、次のレコードが表示されています。

  • Google Cloud IAM 分析 UDM エンティティ
  • Sensitive Data Protection UDM エンティティ
  • Zscaler ウェブプロキシ UDM イベント
  • CrowdStrike Falcon EDR UDM イベント

[検出] パネルで、イベントまたはエンティティ レコードを選択して詳細を表示します。

検出では、ルールの outcome セクションで定義された変数も保存されます。[検出] パネルで変数を表示するには、[] を選択し、[] メニューから 1 つ以上の変数名を選択します。選択した列が [検出] パネルに表示されます。

次のステップ

カスタムルールを作成するには、YARA-L 2.0 言語の概要をご覧ください。

カスタム コンテキストアウェア分析を作成するには、コンテキストアウェア分析の作成をご覧ください。

事前定義された脅威分析を使用するには、Google Security Operations のキュレートされた検出の使用をご覧ください。