Exfiltration: Cloud SQL Data Exfiltration

This document describes a threat finding type in Security Command Center. Threat findings are generated by threat detectors when they detect a potential threat in your cloud resources. For a full list of available threat findings, see Threat findings index.

Finding description

Data exfiltration from Cloud SQL is detected by examining audit logs for two scenarios:

  • Live instance data exported to a Cloud Storage bucket outside the organization.
  • Live instance data exported to a Cloud Storage bucket that is owned by the organization and is publicly accessible.

All Cloud SQL instance types are supported.

For project-level activations of the Security Command Center Premium tier, this finding is available only if the Standard tier is enabled in the parent organization.

To respond to this finding, do the following:

Step 1: Review finding details

  1. Open an Exfiltration: Cloud SQL Data Exfiltration finding, as directed in Reviewing findings. The details panel for the finding opens to the Summary tab.
  2. On the Summary tab, review the information in the following sections:

    • What was detected, especially the following fields:
      • Principal email : the account used to exfiltrate the data.
      • Exfiltration sources: details about the Cloud SQL instance whose data was exfiltrated.
      • Exfiltration targets: details about the Cloud Storage bucket the data was exported to.
    • Affected resource, especially the following fields:
      • Resource full name: the resource name of the Cloud SQL whose data was exfiltrated.
      • Project full name: the Google Cloud project that contains the source Cloud SQL data.
    • Related links, including:
      • Cloud Logging URI: link to Logging entries.
      • MITRE ATT&CK method: link to the MITRE ATT&CK documentation.
      • Related findings: links to any related findings.
  3. Click the JSON tab.

  4. In the JSON for the finding, note the following fields:

    • sourceProperties:
      • evidence:
      • sourceLogId:
        • projectId: the Google Cloud project that contains the source Cloud SQL instance.
      • properties
      • bucketAccess: whether the Cloud Storage bucket is publicly accessible or external to the organization
      • exportScope: how much of the data was exported, such as, the whole instance, one or more databases, one or more tables, or a subset specified by a query)

Step 2: Review permissions and settings

  1. In the Google Cloud console, go to the IAM page.

    Go to IAM

  2. If necessary, select the project of the instance listed in the projectId field in the finding JSON (from Step 1).

  3. On the page that appears, in the Filter box, enter the email address listed on the Principal email row in the Summary tab of the finding details (from Step 1). Check what permissions are assigned to the account.

Step 3: Check logs

  1. In the Google Cloud console, go to Logs Explorer by clicking the link in Cloud Logging URI (from Step 1). The Logs Explorer page includes all logs related to the relevant Cloud SQL instance.

Step 4: Research attack and response methods

  1. Review the MITRE ATT&CK framework entry for this finding type: Exfiltration Over Web Service: Exfiltration to Cloud Storage.
  2. Review related findings by clicking the link on the Related findings row that was described in Step 1). Related findings have the same finding type on the same Cloud SQL instance.
  3. To develop a response plan, combine your investigation results with MITRE research.

Step 5: Implement your response

The following response plan might be appropriate for this finding, but might also impact operations. Carefully evaluate the information you gather in your investigation to determine the best way to resolve findings.

  • Contact the owner of the project with exfiltrated data.
  • Consider revoking permissions for access.principalEmail until the investigation is completed.
  • To stop further exfiltration, add restrictive IAM policies to the impacted Cloud SQL instances.
  • To limit access to and export from the Cloud SQL Admin API, use VPC Service Controls.
  • To identify and fix overly permissive roles, use IAM Recommender.

What's next