aws-customer-playbook-framework

Incident Response Playbook: Responding to Amazon Q Security Events

This document is provided for informational purposes only. It represents the current product offerings and practices from Amazon Web Services (AWS) as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS products or services, each of which is provided “as is” without warranty of any kind, whether express or implied. This document does not create any warranties, representations, contractual commitments, conditions, or assurances from AWS, its affiliates, suppliers, or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.

© 2024 Amazon Web Services, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution 4.0 International License.

This AWS Content is provided subject to the terms of the AWS Customer Agreement available at http://aws.amazon.com/agreement or other written agreement between the Customer and either Amazon Web Services, Inc. or Amazon Web Services EMEA SARL or both.

Points of Contact

Author: Author Name
Approver: Approver Name
Last Date Approved:

Executive Summary

This playbook outlines example processes and queries to investigate security events involving Amazon Q.

Preparation

This playbook references and integrates, where possible, with Prowler which is a command line tool that helps you with AWS security assessment, auditing, hardening and incident response.

Objectives

Throughout the execution of the playbook, focus on the *desired outcomes*, taking notes for enhancement of incident response capabilities.

Determine:

Recover:

Enhance CAF Security Perspective components:

AWS Cloud Adoption Framework Security Perspective

Image


Incident Classification & Handling

Incident Handling Process

The incident response process has the following stages:

Response Steps

  1. [PREPARATION]
  2. [PREPARATION]
  3. [PREPARATION]
  4. [DETECTION AND ANALYSIS] Perform detection and analyze CloudTrail for unrecognized API events
  5. [DETECTION AND ANALYSIS] Perform detection and analyze CloudWatch for unrecognized events
  6. [CONTAINMENT & ERADICATION] Delete or rotate IAM User Keys
  7. [CONTAINMENT & ERADICATION] Delete or rotate unrecognized resources

Preparation

Escalation Procedures

Amazon Q Model

Amazon Q is compromised of multiple components/services:

Detection and Analysis

Notes and Considerations

Event Names

The event names listed in the table below are a quick reference for types of events typically found in CloudTrail during the investigation of a security event involving Q. Of those listed in the table, the most common event names that are logged during normal model usage are:

Event Names Description
General Permissions —
GetConversation Grants permission to get individual messages associated with a specific conversation with Amazon Q
GetTroubleshootingResults Grants permission to get troubleshooting results with Amazon Q
SendMessage Grants permission to send a message to Amazon Q
StartConversation Grants permission to start a conversation with Amazon Q
StartTroubleshootingAnalysis StartTroubleshootingAnalysis Grants permission to start a troubleshooting analysis with Amazon Q
StartTroubleshootingResolutionExplanation Grants permission to start a troubleshooting resolution explanation with Amazon Q
Creating an application ——–
CreateApplication Grants permission to create an application
DeleteApplication Grants permission to delete an application
GetApplication Grants permission to get an application
ListApplications Grants permission to list the applications
UpdateApplication Grants permission to update an Application
Creating an index ——–
CreateIndex Grants permission to create an index for a given application
DeleteIndex Grants permission to delete an index
GetIndex Grants permission to get an index
ListIndices Grants permission to list the indices of an application
UpdateIndex Grants permission to update an index
Creating a retriever ——–
CreateRetriever Grants permission to create a retriever for a given application
DeleteRetriever Grants permission to delete a retriever
GetRetriever Grants permission to get a retriever
ListRetrievers Grants permission to list the retrievers of an application
UpdateRetriever Grants permission to update a Retriever
Connecting data sources ——–
CreateDataSource Grants permission to create a data source for a given application and index
DeleteDataSource Grants permission to delete a DataSource
GetDataSource Grants permission to get a data source
ListDataSources Grants permission to list the data sources of an application and an index
UpdateDataSource Grants permission to update a DataSource
StartDataSourceSyncJobs Grants permission to start Data Source sync job
StopDataSourceSyncJobs Grants permission to stop Data Source sync job
ListDataSourceSyncJobs Grants permission to get Data Source sync job history
Uploading documents ——–
BatchPutDocument Grants permission to batch put document
BatchDeleteDocument Grants permission to batch delete document
Chat and conversation management ——–
Chat Grants permission to chat using an application
ChatSync Grants permission to chat synchronously using an application
DeleteConversation Grants permission to delete a conversation
ListConversations Grants permission to list all conversations for an application
ListMessages Grants permission to list all messages
User and group management ——–
CreateUser Grants permission to create a user
DeleteUser Grants permission to delete a user
GetUser Grants permission to get a user
UpdateUser Grants permission to update a user
PutGroup Grants permission to put a group of users
DeleteGroup Grants permission to delete a group
GetGroup Grants permission to get a group
ListGroups Grants permission to list groups
Plugins ——–
CreatePlugin Grants permission to create a plugin for a given application
DeletePlugin Grants permission to delete a plugin
GetPlugin Grants permission to get a plugin
UpdatePlugin Grants permission to update a plugin
**Admin controls and guardrails ** ——–
UpdateChatControlsConfiguration Grants permission to update chat controls configuration for an application
DeleteChatControlsConfiguration Grants permission to delete chat controls configuration for an application
GetChatControlsConfiguration Grants permission to get chat controls configuration for an application

Data plane events in CloudTrail

By default, CloudTrail doesn’t log data events. The following shows the Amazon Q API operations logged to CloudTrail as data events. The Data event type (console) column shows the appropriate selection in the CloudTrail console. The Amazon Q resource types column shows the resources.type value that you would specify to log data events for the resource. More information is available in the Q User Guide.

Amazon Q Business Applications: AWS::QBusiness::Application

Amazon Q Business Data Resource: AWS::QBusiness::DataSource

Amazon Q Business Index: AWS::QBusiness::Index

Analysis

In the event of an incident, in addition to investigating the indicators of compromise, threat actor, timeframe, etc., here are some additional questions to consider once it has been confirmed that this is an incident relating to Amazon Q resources:

  1. What resources were created and deleted?
  2. What PlugIns were utilized?
  3. What applications did Q have access to during the security incident?
  4. Were these applications accessed by Q?
  5. Was any type of file uploaded to Q?
  6. Does Q have access to any IDE environment?

Containment and Eradication

Recovery

Data Protection and IAM Policies

Data Protection:

IAM Permissions:

Lessons Learned

This is a place to add items specific to your company that do not necessarilly need "fixing", but are important to know when executing this playbook in tandem with operational and business requirements.

Addressed Backlog Items

Current Backlog Items