Rechteausweitung: AlloyDB-Datenbank-Superuser schreibt in Nutzertabellen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
In diesem Dokument wird ein Typ von Bedrohungsergebnissen in Security Command Center beschrieben. Bedrohungsergebnisse werden von Bedrohungsdetektoren generiert, wenn sie eine potenzielle Bedrohung in Ihren Cloud-Ressourcen erkennen. Eine vollständige Liste der verfügbaren Bedrohungsergebnisse finden Sie im Index der Bedrohungsergebnisse.
Übersicht
Das AlloyDB for PostgreSQL-Datenbank-Superuserkonto (postgres) hat in Nutzertabellen geschrieben. Der Superuser (eine Rolle mit sehr weitreichendem Zugriff) sollte im Allgemeinen nicht zum Schreiben in Nutzertabellen verwendet werden. Für normale tägliche Aktivitäten sollte ein Nutzerkonto mit eingeschränkterem Zugriff verwendet werden. Wenn ein Superuser in eine Nutzertabelle schreibt, könnte das darauf hindeuten, dass ein Angreifer seine Rechte erweitert oder den Standardnutzer der Datenbank kompromittiert hat und Daten ändert. Es kann auch auf normale, aber unsichere Praktiken hinweisen.
So reagieren Sie
Gehen Sie folgendermaßen vor, um auf dieses Ergebnis zu reagieren:
Schritt 1: Ergebnisdetails prüfen
Öffnen Sie ein Privilege Escalation: AlloyDB Database Superuser Writes to User Tables-Ergebnis, wie unter Ergebnisse prüfen beschrieben.
Sehen Sie sich im Bereich „Ergebnisdetails“ auf dem Tab Zusammenfassung die Informationen in den folgenden Abschnitten an:
Was wurde erkannt?, insbesondere die folgenden Felder:
Anzeigename der Datenbank: Der Name der Datenbank in der betroffenen AlloyDB for PostgreSQL-Instanz.
Datenbanknutzername: Der Superuser.
Datenbankabfrage: Die SQL-Abfrage, die beim Schreiben in Nutzertabellen ausgeführt wird.
Betroffene Ressource, insbesondere die folgenden Felder:
Vollständiger Ressourcenname: Der Ressourcenname der betroffenen AlloyDB for PostgreSQL-Instanz.
Vollständiger Name des übergeordneten Elements: Der Ressourcenname der AlloyDB for PostgreSQL-Instanz.
Vollständiger Projektname: Das Google Cloud Projekt, das die AlloyDB for PostgreSQL-Instanz enthält.
Weitere Informationen, insbesondere die folgenden Felder:
Cloud Logging-URI: Link zu Logging-Einträgen.
MITRE-ATT&CK-Methode: Link zur MITRE-ATT&CK-Dokumentation.
Klicken Sie auf den Tab JSON, um das vollständige JSON für das Ergebnis aufzurufen.
Schritt 2: Protokolle prüfen
Rufen Sie in der Google Cloud Console den Log-Explorer auf. Klicken Sie dazu auf den Link in cloudLoggingQueryURI (aus Schritt 1).
Die Seite Log-Explorer enthält alle Logs, die sich auf die relevante AlloyDB for PostgreSQL-Instanz beziehen.
Prüfen Sie die Logs auf PostgreSQL-pgaudit-Logs, die die vom Superuser ausgeführten Abfragen enthalten. Verwenden Sie dazu die folgenden Filter:
protoPayload.request.user="postgres"
Schritt 3: Forschungsangriffe und Reaktionsmethoden
Um festzustellen, ob zusätzliche Schritte zur Abhilfe erforderlich sind, kombinieren Sie Ihre Untersuchungsergebnisse mit der MITRE-Forschung.
Schritt 4: Antwort implementieren
Der folgende Antwortplan ist möglicherweise für dieses Ergebnis geeignet, kann sich jedoch auch auf Vorgänge auswirken.
Prüfen Sie die Informationen, die Sie im Rahmen Ihrer Untersuchung erfasst haben, sorgfältig, um die beste Lösung für die Ergebnisse zu ermitteln.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-05 (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)."]]