Microsoft Graph アクティビティ ログを収集する
このパーサーは、Microsoft Graph アクティビティ ログからフィールドを抽出し、統合データモデル(UDM)に変換します。UDM フィールドを初期化し、ペイロードを解析して、タイムスタンプを抽出し、さまざまなプロパティを UDM フィールドにマッピングし、IP アドレスとポートを処理し、プリンシパルとネットワーク情報の有無に基づいてイベントタイプを分類します。
始める前に
次の前提条件を満たしていることを確認します。
- Google SecOps インスタンス。
- Microsoft Entra ID と Azure ストレージ アカウントへの特権アクセス。
Azure ストレージ アカウントを構成する
- Azure コンソールで、ストレージ アカウントを検索します。
- [作成] をクリックします。
- 次の入力パラメータの値を指定します。
- Subscription: サブスクリプションを選択します。
- リソース グループ: リソース グループを選択します。
- リージョン: リージョンを選択します。
- パフォーマンス: 必要なパフォーマンス レベルを選択します(標準が推奨されます)。
- 冗長性: 必要な冗長性レベルを選択します(GRS または LRS を推奨)。
- ストレージ アカウント名: 新しいストレージ アカウントの名前を入力します。
- [Review + create] をクリックします。
- アカウントの概要を確認して、[作成] をクリックします。
- [ストレージ アカウントの概要] ページで、[セキュリティとネットワーキング] のサブメニュー [アクセスキー] を選択します。
- [key1] または [key2] の横にある [Show] をクリックします。
- [クリップボードにコピー] をクリックして、キーをコピーします。
キーは、後で参照できるように安全な場所に保存してください。
[ストレージ アカウントの概要] ページで、[設定] のサブメニュー [エンドポイント] を選択します。
[クリップボードにコピー] をクリックして、Blob サービス エンドポイント URL(https://
.blob.core.windows.net など)をコピーします。エンドポイント URL は、後で参照できるように安全な場所に保存します。
Microsoft Graph アクティビティ ログをストレージ アカウントにエクスポートするように構成する
- Azure コンソールで、[Entra ID] を検索します。
- [モニタリング] > [診断設定] を選択します。
- [+ 診断設定を追加] をクリックします。
- 設定に一意の名前(ms-graph-activity など)を付けます。
- Google SecOps にエクスポートする MicrosoftGraphActivityLog カテゴリを選択します。
- [宛先の詳細] で、[ストレージ アカウントにアーカイブする] を選択します。
- サブスクリプションと、前のステップで作成したストレージ アカウントを選択します。
[保存] をクリックします。
Microsoft Graph アクティビティ ログを設定する方法
- [SIEM Settings] > [Feeds] に移動します。
- [Add New Feed] をクリックします。
- 次のページで、[単一のフィードを設定] をクリックします。
- [フィード名] フィールドに、フィードの名前を入力します(例: Microsoft Graph アクティビティ ログ)。
- [ソースタイプ] で [Microsoft Azure Blob Storage V2] を選択します。
- [ログタイプ] として [Microsoft Graph アクティビティ ログ] を選択します。
- [次へ] をクリックします。
次の入力パラメータの値を指定します。
Azure uri: BLOB エンドポイント URL。
ENDPOINT_URL/BLOB_NAME次のように置き換えます。
ENDPOINT_URL: BLOB エンドポイント URL(https://<storageaccountname>.blob.core.windows.net)BLOB_NAME: BLOB の名前(例: insights-logs-)
Source deletion options: 必要に応じて削除オプションを選択します。
ファイルの最大経過日数: 過去の日数以内に変更されたファイル。デフォルトは 180 日です。
共有キー: Azure Blob Storage へのアクセスキー。
[次へ] をクリックします。
[Finalize] 画面で新しいフィードの設定を確認し、[送信] をクリックします。
サポートされている Microsoft Graph アクティビティ ログのサンプルログ
標準 JSON
{ "time": "2024-02-24T02:36:04.9540786Z", "resourceId": "/TENANTS/00000000-0000-0000-0000-000000000000/PROVIDERS/MICROSOFT.AADIAM", "operationName": "Microsoft Graph Activity", "operationVersion": "v1.0", "category": "MicrosoftGraphActivityLogs", "tenantId": "00000000-0000-0000-0000-000000000000", "resultSignature": "200", "durationMs": 856631, "callerIpAddress": "192.0.2.1", "correlationId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "Level": 4, "location": "South Central US", "properties": { "timeGenerated": "2024-02-24T02:36:04.9540786Z", "location": "South Central US", "requestId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "operationId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "clientRequestId": "ffffffff-gggg-hhhh-iiii-jjjjjjjjjjjj", "apiVersion": "v1.0", "requestMethod": "GET", "responseStatusCode": 200, "tenantId": "00000000-0000-0000-0000-000000000000", "ipAddress": "192.0.2.1", "userAgent": "Internal-Service-Scanner", "requestUri": "https://graph.microsoft.com/v1.0/subscribedSkus", "durationMs": 856631, "responseSizeBytes": 11808, "signInActivityId": "REDACTED_ACTIVITY_ID", "roles": "Organization.Read.All Policy.Read.All User.Read.All", "tokenIssuedAt": "2024-02-23T23:48:42Z", "appId": "00000000-0000-0000-0000-000000000000", "userId": null, "servicePrincipalId": "11111111-2222-3333-4444-555555555555", "identityProvider": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", "clientAuthMethod": "2" } }Azure Monitor PascalCase 形式
{ "TimeGenerated": "2024-06-07T11:52:40.4216173Z", "Location": "East US", "RequestId": "bbbbbbbb-1111-2222-3333-cccccccccccc", "OperationId": "bbbbbbbb-1111-2222-3333-cccccccccccc", "ClientRequestId": "dddddddd-4444-5555-6666-eeeeeeeeeeee", "ApiVersion": "v1.0", "RequestMethod": "GET", "ResponseStatusCode": 200, "AadTenantId": "00000000-0000-0000-0000-000000000000", "IPAddress": "198.51.100.50", "UserAgent": "LokiServer/1.2024", "RequestUri": "https://graph.microsoft.com/v1.0/users/user@example.com", "DurationMs": 1309774, "ResponseSizeBytes": 192, "SignInActivityId": "REDACTED_ACTIVITY_ID", "TokenIssuedAt": "2024-0G-07T11:47:39.0000000Z", "AppId": "00000000-0000-0000-0000-000000000000", "UserId": "user_id_9999", "Scopes": "User.Read User.Read.All", "ClientAuthMethod": 2, "_ItemId": "unique_item_id_001", "Type": "MicrosoftGraphActivityLogs", "TenantId": "00000000-0000-0000-0000-000000000000" }UDI 必須フィールド
{ "time": "2024-08-14T19:37:39.2484449Z", "resourceId": "/TENANTS/00000000-0000-0000-0000-000000000000/PROVIDERS/MICROSOFT.AADIAM", "operationName": "Microsoft Graph Activity", "resultSignature": "200", "callerIpAddress": "203.0.113.10", "properties": { "__UDI_RequiredFields_TenantId": "00000000-0000-0000-0000-000000000000", "__UDI_RequiredFields_UniqueId": "uuid-123456-7890", "timeGenerated": "2024-08-14T19:37:39.2484449Z", "requestId": "uuid-123456-7890", "requestMethod": "GET", "responseStatusCode": 200, "ipAddress": "203.0.113.10", "userAgent": "Security-Audit-Tool", "requestUri": "https://graph.microsoft.com/v1.0/auditLogs/directoryAudits", "UserPrincipalObjectID": "user_obj_8888", "appId": "00000000-0000-0000-0000-000000000000" }, "tenantId": "00000000-0000-0000-0000-000000000000" }UDI ベータ版の形式
{ "time": "2024-08-14T18:37:12.8698765Z", "operationVersion": "beta", "callerIpAddress": "2001:db8::ff00:42:8329", "level": "Informational", "properties": { "__UDI_RequiredFields_TenantId": "00000000-0000-0000-0000-000000000000", "apiVersion": "beta", "requestMethod": "GET", "responseStatusCode": 404, "ipAddress": "2001:db8::ff00:42:8329", "requestUri": "https://graph.microsoft.com/beta/users/user_id_masked/photos", "userId": "user_id_7777", "appId": "00000000-0000-0000-0000-000000000000" } }
UDM マッピング テーブル
| ログフィールド | UDM マッピング | ロジック |
|---|---|---|
callerIpAddress |
principal.asset.ip |
未加工ログのフィールド callerIpAddress が UDM フィールドにコピーされます。 |
callerIpAddress |
principal.ip |
未加工ログのフィールド callerIpAddress が UDM フィールドにコピーされます。 |
category |
security_result.category_details |
未加工ログのフィールド category が UDM フィールドにコピーされます。 |
correlationId |
security_result.detection_fields.value |
未加工ログのフィールド correlationId は、キーが correlationId の UDM フィールドにコピーされます。 |
Level |
security_result.detection_fields.value |
未加工ログのフィールド Level は文字列に変換され、キーが Level の UDM フィールドにコピーされます。 |
operationName |
metadata.product_event_type |
未加工ログのフィールド operationName が UDM フィールドにコピーされます。 |
operationVersion |
additional.fields.value.string_value |
未加工ログのフィールド operationVersion は、キーが operationVersion の UDM フィールドにコピーされます。 |
properties.apiVersion |
metadata.product_version |
未加工ログのフィールド properties.apiVersion が UDM フィールドにコピーされます。 |
properties.appId |
target.resource.product_object_id |
未加工ログのフィールド properties.appId が UDM フィールドにコピーされます。 |
properties.atContent |
additional.fields.value.string_value |
未加工ログのフィールド properties.atContent は、キーが atContent の UDM フィールドにコピーされます。 |
properties.clientAuthMethod |
extensions.auth.auth_details |
properties.clientAuthMethod の値に基づいて、UDM フィールドは「Public Client」(0)、「Client ID/Client Secret」(1)、「Client Certificate」(2)に設定されます。 |
properties.clientRequestId |
additional.fields.value.string_value |
未加工ログのフィールド properties.clientRequestId は、キーが clientRequestId の UDM フィールドにコピーされます。 |
properties.durationMs |
network.session_duration.seconds |
未加工ログのフィールド properties.durationMs はミリ秒から秒に変換され、UDM フィールドにコピーされます。 |
properties.identityProvider |
security_result.detection_fields.value |
未加工ログのフィールド properties.identityProvider は、キーが identityProvider の UDM フィールドにコピーされます。 |
properties.ipAddress |
principal.asset.ip |
未加工ログのフィールド properties.ipAddress から IP アドレスが抽出され、UDM フィールドにコピーされます。 |
properties.ipAddress |
principal.ip |
未加工ログのフィールド properties.ipAddress から IP アドレスが抽出され、UDM フィールドにコピーされます。 |
properties.location |
principal.location.name |
未加工ログのフィールド properties.location が UDM フィールドにコピーされます。 |
properties.operationId |
security_result.detection_fields.value |
未加工ログのフィールド properties.operationId は、キーが operationId の UDM フィールドにコピーされます。 |
properties.requestMethod |
network.http.method |
未加工ログのフィールド properties.requestMethod が UDM フィールドにコピーされます。 |
properties.requestId |
metadata.product_log_id |
未加工ログのフィールド properties.requestId が UDM フィールドにコピーされます。 |
properties.responseSizeBytes |
network.received_bytes |
未加工ログのフィールド properties.responseSizeBytes は符号なし整数に変換され、UDM フィールドにコピーされます。 |
properties.responseStatusCode |
network.http.response_code |
未加工ログのフィールド properties.responseStatusCode は整数に変換され、UDM フィールドにコピーされます。 |
properties.roles |
additional.fields.value.string_value |
未加工ログのフィールド properties.roles は、キーが roles の UDM フィールドにコピーされます。 |
properties.scopes |
additional.fields.value.string_value |
未加工ログのフィールド properties.scopes は、キーが Scopes の UDM フィールドにコピーされます。 |
properties.servicePrincipalId |
principal.user.userid |
properties.userId が空の場合、未加工ログフィールド properties.servicePrincipalId は UDM フィールドにコピーされます。 |
properties.signInActivityId |
network.session_id |
未加工ログのフィールド properties.signInActivityId が UDM フィールドにコピーされます。 |
properties.tenantId |
metadata.product_deployment_id |
未加工ログのフィールド properties.tenantId が UDM フィールドにコピーされます。 |
properties.tokenIssuedAt |
additional.fields.value.string_value |
未加工ログのフィールド properties.tokenIssuedAt は、キーが tokenIssuedAt の UDM フィールドにコピーされます。 |
properties.userAgent |
network.http.user_agent |
未加工ログのフィールド properties.userAgent が UDM フィールドにコピーされます。 |
properties.userId |
principal.user.userid |
未加工ログのフィールド properties.userId が UDM フィールドにコピーされます。 |
properties.wids |
security_result.detection_fields.value |
未加工ログのフィールド properties.wids は、キーが wids の UDM フィールドにコピーされます。 |
resourceId |
target.resource.attribute.labels.value |
未加工ログのフィールド resourceId は、キーが Resource ID の UDM フィールドにコピーされます。 |
resultSignature |
additional.fields.value.string_value |
未加工ログのフィールド resultSignature は、キーが resultSignature の UDM フィールドにコピーされます。 |
time |
metadata.event_timestamp |
未加工ログフィールド time が解析されてタイムスタンプに変換され、UDM フィールドにコピーされます。has_principal が true で network.http が空でない場合、UDM フィールド event.idm.read_only_udm.metadata.event_type は「NETWORK_HTTP」に設定されます。has_principal が true で network.http が空の場合、「STATUS_UPDATE」に設定されます。それ以外の場合は、「GENERIC_EVENT」に設定されます。UDM フィールドは「Microsoft Graph」に設定されます。UDM フィールドは「Microsoft」に設定されます。 |
変更履歴
さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。