> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/sensitive-data-asset-encrypted-with-encryption-key-outside-the-organization.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# Sensitive Data Asset Encrypted with Encryption Key Outside the Organization

### Synopsis

| Field             | Value                                                                                                                                                                                                                                                                       |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Rule Type         | Detection                                                                                                                                                                                                                                                                   |
| Severity          | High                                                                                                                                                                                                                                                                        |
| Category          | DATA                                                                                                                                                                                                                                                                        |
| Cloud Providers   | AWS, GCP                                                                                                                                                                                                                                                                    |
| Platform Module   | DSPM                                                                                                                                                                                                                                                                        |
| Asset Types       | AMAZON\_DYNAMODB\_TABLE, AWS\_S3\_VECTOR\_BUCKET, EBS\_VOLUME, EFS\_MOUNT\_TARGET, GOOGLE\_BIGQUERY\_DATASET, GOOGLE\_CLOUD\_BIGTABLE\_TABLE, GOOGLE\_CLOUD\_SQL\_DB\_INSTANCE, GOOGLE\_CLOUD\_STORAGE\_BUCKET, RDS\_DATABASE\_CLUSTER, RDS\_DATABASE\_INSTANCE, S3\_BUCKET |
| ATT\&CK Tactic    | TA0009 (TA0009)                                                                                                                                                                                                                                                             |
| ATT\&CK Technique | T1133 (T1133)                                                                                                                                                                                                                                                               |

### Description

This rule detects sensitive data assets that are encrypted using external encryption keys not owned or controlled by the organization. Relying on externally managed keys increases the risk of unauthorized decryption, lack of audit visibility, and potential non-compliance with internal security standards or regulatory frameworks. This risk is particularly concerning in ransomware scenarios, where lack of control over encryption keys can prevent recovery or allow attackers to manipulate key access. Organizations should enforce policies to require internal key management for all sensitive assets.

### Remediation

**Manual steps:**

S3 Bucket - Reconfigure S3 bucket to use organization-managed KMS key:

Go to the S3 dashboard in the AWS Console.

Select the `{entity}` bucket.

Go to the Properties tab and locate the Default Encryption section.

Click Edit, then select AWS KMS Key (SSE-KMS) and choose an organization-controlled CMK.

Click Save Changes. This will apply to new objects only. To re-encrypt existing objects, you must copy them over themselves using the new key.

S3 Bucket - Remove Sensitive Data from the S3 Bucket:

Navigate to the Amazon S3 console.

Select the bucket `{entity}`.

Review the objects stored in the bucket and identify any sensitive data. Use the Evidence section of this issue in Cortex to get insights on the sensitive data.

Delete or redact the sensitive data from the objects.

RDS Database Instance - Restore RDS instance with organization-managed KMS key:

Open the RDS dashboard in AWS Console.

Select the RDS instance `{entity}`.

Click Actions, then Take Snapshot.

Once snapshot is complete, go to Snapshots, select it, and choose Restore Snapshot.

In the restore wizard, choose a new name and set the KMS Key to an organization-owned key.

Update DNS or application settings to point to the new instance and decommission the old one.

RDS Database Instance - Remove Sensitive Data from the RDS Instance:

Connect to the database `{entity}`. To get or change the necessary information for connectivity navigate to the Aurora and RDS dashboard in AWS, and view the instance's details.

Review the objects stored in the database and identify any sensitive data. Use the Evidence section of this issue in Cortex to get insights on the sensitive data.

Delete the sensitive data from the instance.

RDS Database Cluster - Restore RDS cluster with organization-managed KMS key:

Open the RDS dashboard in AWS Console.

Select the `{entity}` RDS cluster.

Click Actions, then Take Snapshot.

Once snapshot is complete, go to Snapshots, select it, and choose Restore Snapshot.

In the restore wizard, choose a new name and set the KMS Key to an organization-owned key.

Update DNS or application settings to point to the new instance and decommission the old one.

RDS Database Cluster - Remove Sensitive Data from the RDS Database:

Connect to the database `{entity}`. To get or change the necessary information for connectivity navigate to the Aurora and RDS dashboard in AWS, and view the instance's details.

Review the objects stored in the database and identify any sensitive data. Use the Evidence section of this issue in Cortex to get insights on the sensitive data.

Delete the sensitive data from the database.

Amazon DynamoDB Table - Update DynamoDB table to use organization-managed KMS key:

Open the DynamoDB console.

Select the table `{entity}`.

In the Table Details, under Encryption, click Edit.

Choose Customer Managed Key and select a key owned by your organization.

Click Save Changes.

Amazon DynamoDB Table - Remove Sensitive Data from the DynamoDB Table:

Navigate to the Amazon DynamoDB dashboard.

Select Tables from the left navigation pane.

Choose the DynamoDB Table `{entity}`.

In the left panel, click on Explore Items.

Review the items stored in the table and identify any sensitive data. Use the Evidence section of this issue in Cortex to get insights on the sensitive data.

Delete or redact the sensitive data from the items.

EBS Volume - Recreate EBS volume with organization-managed KMS key:

Go to the EC2 dashboard and open the Volumes section.

Select the volume `{entity}` and create a snapshot.

After snapshot is ready, click Actions, then Create Volume from snapshot.

In the creation wizard, choose an organization-managed KMS key.

Attach the new volume to the EC2 instance and verify access, then detach and delete the old volume.

EBS Volume - Remove Sensitive Data from the EBS Volume:

Attach the EBS volume `{entity}` to an EC2 instance.

Mount the volume to the instance and inspect it using filesystem tools.

Locate and remove sensitive files using insights from the Evidence section of this issue in Cortex.

EFS Mount Target - Migrate EFS data to a new file system with organization-managed key:

EFS encryption settings can't be changed post-creation. Create a new EFS file system using an organization-owned CMK.

Mount both the old and new EFS file systems to an EC2 instance.

Copy the data using `rsync` or similar tools.

Update your mount targets and applications to point to the new EFS.

Delete the old EFS system.

EFS Mount Target - Remove Sensitive Data from the EFS File System:

Mount the EFS file system on an EC2 instance.

Use standard Linux tools (e.g., `find`, `grep`) to identify files containing sensitive data.

Delete or sanitize the sensitive files as appropriate.

Google Cloud Storage Bucket - Set CMEK on GCS bucket and re-encrypt existing data:

Go to the Cloud Storage console and select the `{entity}` bucket.

Click Edit on the bucket details and update the Default KMS Key to one owned by your organization.

This change only affects newly uploaded objects. To re-encrypt existing objects, use `gsutil cp` to copy each object over itself.

Google Cloud Storage Bucket - Remove Sensitive Data from the Bucket:

Navigate to the Google Cloud Storage console.

Select the bucket `{entity}`.

Review the objects stored in the bucket and identify any sensitive data. Use the Evidence section of this issue in Cortex to get insights on the sensitive data.

Delete or redact the sensitive data from the objects.

Google Cloud SQL DB Instance - Export and re-import Cloud SQL instance with organization-managed CMEK:

Cloud SQL CMEK can only be set at creation. Export your database to a Cloud Storage bucket.

Create a new Cloud SQL instance and specify your organization's CMEK during the setup.

Import the SQL dump or backup into the new instance.

Update your applications to connect to the new instance.

Google Cloud SQL DB Instance - Remove Sensitive Data from the Cloud SQL Instance:

Navigate to the GCP Cloud SQL dashboard.

Select the SQL instance `{entity}`.

Connect to the instance by clicking Cloud SQL Studio in the left panel, and enter the credentials.

Review the objects stored in the instance and identify any sensitive data. Use the Evidence section of this issue in Cortex to get insights on the sensitive data.

Delete or redact the sensitive data from the databases.

Google Cloud Bigtable Table - Migrate Bigtable data to instance with CMEK:

Bigtable requires CMEK to be set at instance creation. Create a new instance with an organization-managed CMEK.

Use Dataflow, custom scripts, or the `cbt` tool to copy tables and data to the new instance.

Update all application references to use the new instance.

Google Cloud Bigtable Table - Remove Sensitive Data from the Bigtable Table:

Use the `cbt` CLI tool or Dataflow to connect to the Bigtable instance.

Query rows based on guidance from the Evidence section in Cortex to locate sensitive data.

Use `cbt delete` or `cbt set` commands to remove or overwrite sensitive data.

Google BigQuery Dataset - Set CMEK for BigQuery dataset and re-encrypt tables:

Go to the BigQuery console and locate the `{entity}` dataset.

In the dataset details, click Edit and set a default CMEK key owned by your organization.

To apply encryption to existing tables, you must recreate them (e.g., `CREATE TABLE ... AS SELECT`) using the new CMEK.

Google BigQuery Dataset - Remove Sensitive Data from the BigQuery Dataset:

Navigate to the Google Cloud Console.

Go to the BigQuery service.

In the Explorer panel, click on the Dataset `{entity}`.

Identify tables within the dataset that contain sensitive data. Use the Evidence section of this issue in Cortex to get insights on the sensitive data.

For each table containing sensitive data, execute SQL queries to redact, mask, or delete the sensitive information.

Alternatively, delete the entire table if it's no longer needed and contains only sensitive data.

AWS S3 Vectors Bucket - Recreate the S3 vector bucket with an organization-managed KMS key:

Go to the S3 dashboard in the AWS Console and open the Vector Buckets section.

Select the `{entity}` vector bucket and review its Encryption configuration.

S3 vector bucket encryption is set at creation time. Create a new vector bucket and select AWS KMS Key (SSE-KMS) with an organization-controlled CMK.

Recreate the vector indexes in the new bucket and re-ingest the vector data.

Update the applications that query the vectors to point to the new bucket, then delete the old vector bucket.

AWS S3 Vectors Bucket - Remove Sensitive Data from the S3 Vector Bucket:

Navigate to the Amazon S3 console and open the Vector Buckets section.

Select the `{entity}` vector bucket and review its vector indexes.

Identify the vectors and their metadata that contain sensitive data. Use the Evidence section of this issue in Cortex to get insights on the sensitive data.

Delete the affected vectors or indexes, and re-embed the source data without the sensitive content.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/sensitive-data-asset-encrypted-with-encryption-key-outside-the-organization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
