이 문서에서는 Security Command Center의 위협 발견 항목 유형에 대해 설명합니다. 위협 발견 항목은 위협 감지기가 클라우드 리소스에서 잠재적인 위협을 감지할 때 생성됩니다. 사용 가능한 위협 발견 항목의 전체 목록은 위협 발견 항목 색인을 참고하세요.
개요
Cloud SQL 데이터베이스 수퍼유저 계정 (PostgreSQL용 postgres 및 MySQL용 root)이 사용자 테이블에 썼습니다. 수퍼유저(매우 광범위한 액세스 권한이 있는 역할)는 일반적으로 사용자 테이블에 쓰는 데 사용해서는 안 됩니다. 일반적인 일상 활동에는 액세스가 제한된 사용자 계정을 사용해야 합니다. 수퍼유저가 사용자 테이블에 작성하면 공격자가 권한을 에스컬레이션했거나 기본 데이터베이스 사용자의 보안을 침해하여 데이터를 수정하고 있음을 의미할 수 있습니다. 또한 정상일지라도 안전하지 않은 관행입니다.
대응 방법
이 발견 항목에 대응하려면 다음을 수행하세요.
1단계: 발견 항목 세부정보 검토하기
발견 항목 검토의 지시에 따라 Initial Access: Database Superuser Writes to User Tables 발견 항목을 엽니다.
발견 항목 세부정보 패널의 요약 탭에서 다음 섹션의 정보를 검토합니다.
특히 다음 필드를 포함하는 감지된 항목:
데이터베이스 표시 이름: 영향을 받은 Cloud SQL PostgreSQL 또는 MySQL 인스턴스의 데이터베이스 이름
데이터베이스 사용자 이름: 수퍼유저
데이터베이스 쿼리: 사용자 테이블에 쓰는 동안 실행된 SQL 쿼리
특히 다음 필드를 포함하는 영향을 받는 리소스:
리소스 전체 이름: 영향을 받은 Cloud SQL 인스턴스의 리소스 이름
상위 전체 이름: Cloud SQL 인스턴스의 리소스 이름
프로젝트 전체 이름: Cloud SQL 인스턴스가 포함된 Google Cloud 프로젝트입니다.
특히 다음 필드를 포함하는 관련 링크:
Cloud Logging URI: Logging 항목의 링크
MITRE ATT&CK 메서드: MITRE ATT&CK 문서의 링크
관련 발견 항목: 모든 관련 발견 항목의 링크
발견 항목의 전체 JSON을 보려면 JSON 탭을 클릭합니다.
2단계: 로그 확인하기
Google Cloud 코드에서 cloudLoggingQueryURI의 링크(1단계)를 클릭하여 로그 탐색기로 이동합니다.
로그 탐색기 페이지에는 관련 Cloud SQL 인스턴스와 관련된 모든 로그가 포함되어 있습니다.
다음 필터를 사용하여 수퍼유저가 실행한 쿼리가 포함된 PostgreSQL pgaudit 로그 또는 MySQL용 Cloud SQL 감사 로그를 확인합니다.
protoPayload.request.user="SUPERUSER"
3단계: 공격 및 대응 방법 조사하기
웹 서비스를 통한 유출 유형의 발견 항목에 대한 MITRE ATT&CK 프레임워크 항목을 검토하세요.
추가 해결 단계가 필요한지 확인하려면 조사 결과를 MITRE 연구와 결합합니다.
4단계: 대응 구현하기
다음의 응답 계획이 이 발견 항목에 적합할 수 있지만 작업에도 영향을 줄 수 있습니다.
조사에서 수집한 정보를 신중하게 평가하여 발견 항목을 해결할 최선의 방법을 결정해야 합니다.
[[["이해하기 쉬움","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(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 Cloud SQL database superuser account (`postgres`\nfor PostgreSQL and `root` for MySQL) wrote to user\ntables. The superuser (a role with very broad access) generally shouldn't be\nused to write to user tables. A user account with more limited access should be used\nfor normal daily activity. When a superuser writes to a user table, that could\nindicate that an attacker has escalated privileges or has compromised the\ndefault database user and is modifying data. It could also indicate normal but\nunsafe practices.\n\nHow to respond\n\nTo respond to this finding, do the following:\n\nStep 1: Review finding details\n\n1. Open an `Initial Access: 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 Cloud SQL PostgreSQL or MySQL 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 Cloud SQL instance that was affected.\n - **Parent full name**: the resource name of the Cloud SQL instance.\n - **Project full name**: the Google Cloud project that contains the Cloud SQL 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.\n - **Related findings**: links to any related findings.\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](#initial_access_database_superuser_writes_to_user_tables_findings)). The **Logs Explorer** page includes all logs related to the relevant Cloud SQL instance.\n2. Check the logs for PostgreSQL pgaudit logs or Cloud SQL for MySQL audit logs, which contain the queries executed by the superuser, by using the following filters:\n - `protoPayload.request.user=\"`\u003cvar class=\"edit\" translate=\"no\"\u003eSUPERUSER\u003c/var\u003e`\"`\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.\n\n - For PostgreSQL, see [Create and manage users](/sql/docs/postgres/create-manage-users)\n - For MySQL, see [Manage users with built-in authentication](/sql/docs/mysql/create-manage-users)\n- Consider changing the password for the superuser.\n\n - For PostgreSQL, see [Set the password for the default user](/sql/docs/postgres/create-manage-users#user-root)\n - For MySQL, see [Set the password for the default user](/sql/docs/mysql/create-manage-users#user-root)\n- Consider creating a new, limited access user for the different types of queries used on the instance.\n\n - Grant the new user only the necessary permissions needed to execute their queries.\n\n - For PostgreSQL, see [Grant (command)](https://www.postgresql.org/docs/14/sql-grant.html)\n - For MySQL, see [Access Control and Account Management](https://dev.mysql.com/doc/refman/8.0/en/access-control.html)\n - Update the credentials for the clients that connect to the Cloud SQL 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)."]]