このドキュメントでは、Security Command Center の脅威の検出結果のタイプについて説明します。脅威の検出結果は、クラウド リソースで潜在的な脅威が検出されたときに、脅威検出機能によって生成されます。使用可能な脅威の検出結果の一覧については、脅威の検出結果のインデックスをご覧ください。
概要
AlloyDB for PostgreSQL データベースのスーパーユーザー アカウント(postgres)がユーザー テーブルに書き込みました。通常、スーパーユーザー(非常に幅広いアクセス権を持つロール)は、ユーザー テーブルへの書き込みに使用するべきではありません。通常の日常的な操作では、アクセスが制限されているユーザー アカウントを使用する必要があります。スーパーユーザーがユーザー テーブルに書き込む場合は、攻撃者が権限を昇格したか、デフォルトのデータベース ユーザーを不正使用してデータを変更している可能性があります。また、それは通常ではあるものの、安全でない操作を示している可能性もあります。
対処方法
この検出結果に対応する手順は次のとおりです。
ステップ 1: 検出結果の詳細を確認する
検出結果の確認の説明に従って、Privilege Escalation: AlloyDB Database Superuser Writes to User Tables の検出結果を開きます。
検出結果の詳細パネルの [概要] タブで、次のセクションの情報を確認します。
検出された内容(特に次のフィールド):
データベース表示名: 影響を受けた AlloyDB for PostgreSQL インスタンスのデータベース名。
データベース ユーザー名: スーパー ユーザー。
データベース クエリ: ユーザー テーブルへの書き込み中に実行された SQL クエリ。
影響を受けているリソース(特に次のフィールド):
リソースの完全な名前: 影響を受けた AlloyDB for PostgreSQL インスタンスのリソース名。
親の完全な名前: AlloyDB for PostgreSQL インスタンスのリソース名。
プロジェクトのフルネーム: AlloyDB for PostgreSQL インスタンスを含む Google Cloud プロジェクト。
関連リンク(特に次のフィールド):
Cloud Logging URI: Logging エントリへのリンク。
MITRE ATT&CK 方式: MITRE ATT&CK ドキュメントへのリンク。
検出結果の完全な JSON を表示するには、[JSON] タブをクリックします。
ステップ 2: ログを確認する
Google Cloud コンソールで、cloudLoggingQueryURI のリンク(ステップ 1 を参照)をクリックして、[ログ エクスプローラ] に移動します。[ログ エクスプローラ] ページに、関連する AlloyDB for PostgreSQL インスタンスに関するすべてのログが表示されます。
[[["わかりやすい","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-11 UTC。"],[],[],null,["| Premium and Enterprise [service tiers](/security-command-center/docs/service-tiers)\n\nThis document describes a threat finding type in Security Command Center. Threat findings are generated by\n[threat detectors](/security-command-center/docs/concepts-security-sources#threats) when they detect\na potential threat in your cloud resources. For a full list of available threat findings, see [Threat findings index](/security-command-center/docs/threat-findings-index).\n\nOverview\n\nThe AlloyDB for PostgreSQL database superuser account (`postgres`)\nwrote to user tables. The superuser (a role with very broad access) generally\nshouldn't be used to write to user tables. A user account with more limited access\nshould be used for normal daily activity. When a superuser writes to a user\ntable, that could indicate that an attacker has escalated privileges or has\ncompromised the default database user and is modifying data. It could also\nindicate normal but unsafe practices.\n\nHow to respond\n\nTo respond to this finding, do the following:\n\nStep 1: Review finding details\n\n1. Open an `Privilege Escalation: AlloyDB Database Superuser Writes to User Tables` finding, as directed in [Reviewing findings](/security-command-center/docs/how-to-investigate-threats#reviewing_findings).\n2. On the **Summary** tab of the finding details panel, review the\n information in the following sections:\n\n - **What was detected** , especially the following fields:\n - **Database display name**: the name of the database in the AlloyDB for PostgreSQL instance that was affected.\n - **Database user name**: the superuser.\n - **Database query**: the SQL query executed while writing to user tables.\n - **Affected resource** , especially the following fields:\n - **Resource full name**: the resource name of the AlloyDB for PostgreSQL instance that was affected.\n - **Parent full name**: the resource name of the AlloyDB for PostgreSQL instance.\n - **Project full name**: the Google Cloud project that contains the AlloyDB for PostgreSQL instance.\n - **Related links** , especially the following fields:\n - **Cloud Logging URI**: link to Logging entries.\n - **MITRE ATT\\&CK method**: link to the MITRE ATT\\&CK documentation.\n3. To see the complete JSON for the finding, click the **JSON** tab.\n\nStep 2: Check logs\n\n1. In the Google Cloud console, go to **Logs Explorer** by clicking the link in `cloudLoggingQueryURI` (from [Step 1](#privesc_alloydb_database_superuser_writes_to_user_tables_findings)). The **Logs Explorer** page includes all logs related to the relevant AlloyDB for PostgreSQL instance.\n2. Check the logs for PostgreSQL pgaudit logs, which contain the queries executed by the superuser, by using the following filters:\n - `protoPayload.request.user=\"postgres\"`\n\nStep 3: Research attack and response methods\n\n1. Review the MITRE ATT\\&CK framework entry for this finding type: [Exfiltration Over Web Service](https://attack.mitre.org/techniques/T1078/001/).\n2. To determine if additional remediation steps are necessary, combine your investigation results with MITRE research.\n\nStep 4: Implement your response\n\n\nThe following response plan might be appropriate for this finding, but might also impact operations.\nCarefully evaluate the information you gather in your investigation to determine the best way to\nresolve findings.\n\n- [Review the users allowed to connect to the database](/alloydb/docs/database-users/about#manage-users).\n- [Consider changing the password for the superuser](/alloydb/docs/database-users/about#change-password).\n- Consider [creating a new, limited access user](/alloydb/docs/database-users/about#create) for the different types of queries used on the instance.\n - [Grant the new user only the necessary permissions needed to execute their queries](/alloydb/docs/database-users/about#create).\n - Update the credentials for the clients that connect to the AlloyDB for PostgreSQL instance\n\nWhat's next\n\n- Learn [how to work with threat\n findings in Security Command Center](/security-command-center/docs/how-to-investigate-threats).\n- Refer to the [Threat findings index](/security-command-center/docs/threat-findings-index).\n- Learn how to [review a\n finding](/security-command-center/docs/how-to-investigate-threats#reviewing_findings) through the Google Cloud console.\n- Learn about the [services that\n generate threat findings](/security-command-center/docs/concepts-security-sources#threats)."]]