[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-05 (世界標準時間)。"],[],[],null,["| Premium and Enterprise [service tiers](/security-command-center/docs/service-tiers)\n\nVerify that Event Threat Detection is working by intentionally triggering the\nIAM Anomalous Grant detector and checking for findings.\n\nEvent Threat Detection is a built-in service that monitors your organization's\nCloud Logging and Google Workspace logging streams and detects threats in\nnear-real time. To learn more, read\n[Event Threat Detection overview](/security-command-center/docs/concepts-event-threat-detection-overview).\n\nBefore you begin\n\nTo view Event Threat Detection findings, the service must be enabled in\nSecurity Command Center\n[Services](/security-command-center/docs/how-to-configure-security-command-center#enable-service)\nsettings.\n\nTo complete this guide, you must have an Identity and Access Management (IAM) role\nwith the `resourcemanager.projects.setIamPolicy` permission, like the Project\nIAM Admin role.\n\nTesting Event Threat Detection\n\nTo test Event Threat Detection, you create a test user, grant permissions, and then\nview the finding in the Google Cloud console and in Cloud Logging.\n\nStep 1: Creating a test user\n\nTo trigger the detector, you need a test user with a gmail.com email address.\nYou can create a gmail.com account and then grant it access to the project where\nyou want to perform the test. Make sure that this gmail.com account doesn't already\nhave any IAM permissions in the project where you are performing the test.\n\nStep 2: Triggering the IAM Anomalous Grant detector\n\nTrigger the IAM Anomalous Grant detector by inviting the gmail.com email address\nto the Project Owner role.\n| **Note:** Currently, this finding is only triggered for Security Command Center users with a gmail.com email address.\n\n1. Go to the [IAM \\& Admin](https://console.cloud.google.com/iam-admin/iam) page in the Google Cloud console. \n [Go to the IAM \\& Admin page](https://console.cloud.google.com/iam-admin/iam)\n2. On the **IAM \\& Admin** page, click **Add**.\n3. In the **Add principals** window, under **New principals**, enter the test user's gmail.com address.\n4. Under **Select a role** , select **Project \\\u003e Owner**.\n5. Click **Save**.\n\nNext, you verify that the IAM Anomalous Grant detector has written a finding.\n\nStep 3: Viewing the finding in Security Command Center\n\nTo view the Event Threat Detection finding in Security Command Center:\n\n1. Go to the Security Command Center **Findings** page in the Google Cloud console.\n\n [Go to Findings](https://console.cloud.google.com/security/command-center/findings)\n2. In the **Category** section of the **Quick filters** panel, select\n **Persistence: IAM anomalous grant** . If necessary, click **View more**\n to find it. The **Findings query results** panel updates to show only\n the selected finding category.\n\n3. To sort the list in the **Findings query results** panel, click the\n **Event time** column header so that the most recent finding displays first.\n\n4. In the **Findings query results** panel, display the details of the finding\n by clicking **Persistence: IAM Anomalous Grant** in the **Category** column.\n The details panel for the finding opens and displays the **Summary** tab.\n\n5. Check the value on the **Principal email** row. It should be the test\n gmail.com email address that you granted ownership to.\n\nIf a finding doesn't appear that matches your test gmail.com account, verify\nyour Event Threat Detection settings.\n\nStep 4: Viewing the finding in Cloud Logging\n\nIf you enabled logging findings to Cloud Logging, you can view the\nfinding there. Viewing logging findings in Cloud Logging is only\navailable if you activate Security Command Center Premium tier at the\norganization level.\n| **Prerequisite:** Before you can view Event Threat Detection findings in Logging, [configure log export](/security-command-center/docs/export-cloud-logging).\n\n1. Go to **Logs Explorer** in the Google Cloud console.\n\n [Go to Logs Explorer](https://console.cloud.google.com/logs/query)\n2. Select the Google Cloud project where you are storing your\n Event Threat Detection logs.\n\n3. Use the **Query** pane to build your query in one of the following ways:\n\n - In the **All resources** list, do the following:\n 1. Select **Threat Detector** to display a list of all the detectors.\n 2. Under **DETECTOR_NAME** , select **iam_anomalous_grant**.\n 3. Click **Apply** . The **Query results** table is updated with the logs you selected.\n - Enter the following query in the query editor and click\n **Run query**:\n\n \u003cbr /\u003e\n\n ```bash\n resource.type=\"threat_detector\"\n ```\n\n \u003cbr /\u003e\n\n The **Query results** table is updated with the logs you selected.\n4. To view a log, click a table row, and then click **Expand nested fields**.\n\nIf you don't see a finding for the IAM Anomalous Grant rule, verify your\nEvent Threat Detection settings.\n\nClean up\n\nWhen you're finished testing, remove the test user from the project.\n\n1. Go to the [IAM \\& Admin](https://console.cloud.google.com/iam-admin/iam) page in the Google Cloud console. \n [Go to the IAM \\& Admin page](https://console.cloud.google.com/iam-admin/iam)\n2. Next to the test user's gmail.com address, click **Edit**.\n3. On the **Edit permissions** panel that appears, click **Delete** for all roles granted to the test user.\n4. Click **Save**.\n\nWhat's next\n\n- Learn more about [using Event Threat Detection](/security-command-center/docs/how-to-use-event-threat-detection).\n- Read a high-level overview of [Event Threat Detection concepts](/security-command-center/docs/concepts-event-threat-detection-overview).\n- Learn how to [investigate and develop response plans](/security-command-center/docs/how-to-investigate-threats) for threats."]]