
In modern cloud environments, Secrets Manager is widely used as a centralized service for storing sensitive credentials such as API keys, database passwords, and application configurations—especially in automated and microservices architectures. After obtaining access to a cloud account, attackers often use acquired API credentials to enumerate and read various secrets stored in Secrets Manager. This allows them to quickly gather sensitive information and facilitates lateral movement or further data breaches.
Write detection rules to identify abnormal Secrets Manager secret retrieval activities. Focus on suspicious behavior patterns related to Secrets Manager. For example, after secrets enumeration operations, watch for a high volume of secret retrieval requests in a short period, abnormal response results, or access from unexpected sources. Use a combination of behavioral indicators to identify potential risks of large-scale secret extraction.
When writing detection queries, please ensure that the
sourceIPAddressfield is included in the output results to facilitate subsequent validation.
Data source: CloudTrail, data sample:
{ "id": 5, "awsRegion": "ap-southeast-2", "eventCategory": "Management", "eventID": "35394ec1-9818-4a75-a898-00136f206344", "eventName": "GetSecretValue", "eventSource": "secretsmanager.amazonaws.com", "eventTime": "2025-05-26T10:46:12Z", "eventType": "AwsApiCall", "eventVersion": "1.11", "managementEvent": true, "readOnly": true, "recipientAccountId": "438465128930", "requestID": "cd726c56-0df4-4201-9231-02a7f70c2720", "requestParameters": { "secretId": "arn:aws:secretsmanager:ap-southeast-2:438465128930:secret:stratus-red-team-retrieve-secret-16-6gtIfM", "versionId": "7C0D17AC-F600-4D88-A303-F0032E1AD136" }, "responseElements": null, "sourceIPAddress": "220.243.242.26", "tlsDetails": { "cipherSuite": "TLS_AES_128_GCM_SHA256", "clientProvidedHostHeader": "secretsmanager.ap-southeast-2.amazonaws.com", "tlsVersion": "TLSv1.3" }, "userAgent": "APN/1.0 HashiCorp/1.0 Terraform/1.1.2 (+https://www.terraform.io) terraform-provider-aws/4.67.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.44.261 (go1.19.8; darwin; arm64) stratus-red-team_e579d3d8-ed80-4782-a87f-e1f3e3f09fc7 HashiCorp-terraform-exec/0.21.0", "userIdentity": { "accessKeyId": "AKIAWMFUO5HRKBD6JQ6D", "accountId": "438465128930", "arn": "arn:aws:iam::438465128930:user/soclabs-test", "principalId": "AIDAWMFUO5HRCBESZ467O", "type": "IAMUser", "userName": "soclabs-test" }, "_X_ROW_KEY": "row_98"}
No fields found