Escalation dei privilegi: il super user del database AlloyDB scrive nelle tabelle utente
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questo documento descrive un tipo di risultato di minaccia in Security Command Center. I risultati delle minacce vengono generati dai
rilevatori di minacce quando rilevano
una potenziale minaccia nelle tue risorse cloud. Per un elenco completo dei risultati relativi alle minacce disponibili, consulta l'Indice dei risultati relativi alle minacce.
Panoramica
L'account superuser del database AlloyDB per PostgreSQL (postgres)
ha scritto nelle tabelle utente. Il super user (un ruolo con accesso molto esteso) in genere
non deve essere utilizzato per scrivere nelle tabelle utente. Per le normali attività quotidiane, è necessario utilizzare un account utente con accesso più limitato. Quando un superutente scrive in una tabella utente, ciò potrebbe indicare che un utente malintenzionato ha eseguito l'escalation dei privilegi o ha compromesso l'utente del database predefinito e sta modificando i dati. Potrebbe anche
indicare pratiche normali ma non sicure.
Come rispondere
Per rispondere a questo risultato:
Passaggio 1: esamina i dettagli del risultato
Apri un risultato Privilege Escalation: AlloyDB Database Superuser Writes to User Tables
come indicato in Revisione dei risultati.
Nella scheda Riepilogo del riquadro dei dettagli del risultato, esamina le
informazioni nelle seguenti sezioni:
Che cosa è stato rilevato, in particolare i seguenti campi:
Nome visualizzato database: il nome del database nell'istanza AlloyDB per PostgreSQL interessata.
Nome utente database: il superutente.
Query del database: la query SQL eseguita durante la scrittura nelle tabelle utente.
Risorsa interessata, in particolare i seguenti campi:
Nome completo risorsa: il nome della risorsa dell'istanza AlloyDB per PostgreSQL interessata.
Nome completo del genitore: il nome della risorsa dell'istanza AlloyDB per PostgreSQL.
Nome completo del progetto: il Google Cloud progetto che contiene
l'istanza AlloyDB per PostgreSQL.
Link correlati, in particolare i seguenti campi:
URI Cloud Logging: link alle voci di log.
Metodo MITRE ATT&CK: link alla documentazione MITRE ATT&CK.
Per visualizzare il JSON completo del risultato, fai clic sulla scheda JSON.
Passaggio 2: controlla i log
Nella console Google Cloud , vai a Esplora log facendo clic sul link in cloudLoggingQueryURI (dal passaggio 1).
La pagina Esplora log include tutti i log relativi all'istanza AlloyDB per PostgreSQL pertinente.
Controlla i log di PostgreSQL pgaudit, che contengono le query eseguite dal superuser, utilizzando i seguenti filtri:
protoPayload.request.user="postgres"
Passaggio 3: ricerca di metodi di attacco e risposta
Per determinare se sono necessari ulteriori passaggi di correzione, combina i risultati dell'indagine con la ricerca MITRE.
Passaggio 4: implementa la risposta
Il seguente piano di risposta potrebbe essere appropriato per questo risultato, ma potrebbe anche influire sulle operazioni.
Valuta attentamente le informazioni raccolte durante l'indagine per determinare il modo migliore per risolvere i risultati.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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)."]]